含有replication环境的sqlserver切换到standby

上一篇 / 下一篇  2008-03-18 00:00:00 / 个人分类:SQLSERVER

含有replication环境的sqlserver切换到standby(自己创建的standby,非sqlserver自带的logshipping)

On db-core-r1,restore newjoyo2,service2,userinfo2 database with recover,KEEP_REPLICATION

restore master and msdb

RESTORE DATABASE dddddd2 WITH KEEP_REPLICATION, RECOVERY
RESTORE DATABASE eeeeee2 WITH KEEP_REPLICATION, RECOVERY
RESTORE DATABASE ffffff2 WITH KEEP_REPLICATION, RECOVERY

c:Program FilesMicrosoft SQL ServerMSSQLBinn>sqlservr.exe -c -m -f(if necessary)

login db by using sql query analyzer(windows authentication) on the server to restore masterdb

restore database master from disk='f:master_full_XXX' WITH RECOVERY,STATS=5,

MOVE 'master' TO 'D:Microsoft SQL ServerMSSQLDatamaster.mdf',

MOVE 'mastlog' TO 'D:Microsoft SQL ServerMSSQLDatamastlog.ldf'

restore database msdb from disk='f:msdb_full_XXX' with recovery

restart 10.104.14.143 database.

check error log on 10.104.14.134

on master db, modify correct data file location. Then, Start db to check.

select top 50 * from master..sysaltfiles

where name like '%newjoyo2%'

select * from master..sysdatabases where name='newjoyo2'

update master..sysdatabases

set filename='D:Program FilesMicrosoft SQL ServerMSSQLDataxxxxxxxxxxxx_Data.mdf'

where name='xxxxxx'

--update master..sysaltfiles

set filename='D:Program FilesMicrosoft SQL ServerMSSQLDataxxxxxxxxxxxx_Data.mdf'

where filename='F:Program FilesMicrosoft SQL ServerMSSQLDataxxxxxxxxxxxx_Data.mdf'

and name='xxxxxx_Data'

--update master..sysaltfiles

set filename='E:Program FilesMicrosoft SQL ServerMSSQLDataxxxxxxxxxxxx_data02.mdf'

where filename='G:Program FilesMicrosoft SQL ServerMSSQLDataxxxxxxxxxxxx_data02.mdf'

and name='xxxxxx_data02'

--update master..sysaltfiles

set filename='F:Program FilesMicrosoft SQL ServerMSSQLDataxxxxxxxxxxxx_data02.mdf'

where filename='H:Program FilesMicrosoft SQL ServerMSSQLDataxxxxxxxxxxxx_Log.LDF'

and name='xxxxxx_Log'

select top 50 * from master

stop and restart db. And to modify large memory to 16G.

on cluster, to test failover from one node to other.

add standby DB regedit to start replication manually.

open replication on db-dist according to every db setup and enabled all jobs.

diff backup database

Start all JOBs on. If have time,dbcc checkdb ('dbname')

update cluster name from updatedbtemp to updatedb

test updatedb cluster name.


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-10-14  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 12127
  • 日志数: 1537
  • 建立时间: 2008-04-17
  • 更新时间: 2008-10-12

RSS订阅

Open Toolbar