含有replication環境的sqlserver切換到standby
On db-core-r1,restore newjoyo2,service2,userinfo2 database with recover,KEEP_REPLICATION restore master and msdb | RESTORE DATABASE dddddd2 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. |
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/756652/viewspace-242520/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- pycharm切換conda環境PyCharm
- jenkins動態切換環境Jenkins
- jupyter notebook中 切換不同的Python環境Python
- DataGuard---->物理StandBy的角色切換之switchover
- window環境下安裝和切換兩個python環境Python
- 【Linux】gnome桌面環境切換KDE PlasmaLinuxASM
- vue 構建環境切換指令碼Vue指令碼
- app 測試環境切換問題APP
- Homestead 環境中 PHP 版本快速切換PHP
- Mac環境下WingIDE切換python版本MacIDEPython
- webpack介面環境切換的配置-超簡單Web
- Pytest 如何使用切換被測試環境
- (全)Python 的虛擬環境構建和jupyter notebook 中虛擬環境切換Python
- Nacos 解決 laravel 多環境下配置切換Laravel
- 使用maven的profile切換專案各環境的引數Maven
- SQLServer2012映象主庫掛掉如何切換到映象備庫SQLServer
- 深圳java培訓:SpringBoot的yml配置及多環境切換JavaSpring Boot
- 關於使用springboot的application.yml切換dev配置環境Spring BootAPPdev
- yml檔案中使用profile配置切換多環境
- 【原創】vs2022配置切換多個ollvm環境LVM
- 生產環境中如何切換MySQL儲存引擎GAMySql儲存引擎
- [小白工具書]一行命令切換本地Python環境Python
- 一鍵快速切換開發環境以及多渠道打包開發環境
- ORACLE 12C DATAGUARD環境搭建和主從切換Oracle
- PyCharm的本地終端,無法進入、啟用、切換conda環境PyCharm
- Azure Web App (二)使用部署槽切換部署環境程式碼WebAPP
- Atom編輯器中使用Hydrogen切換Python虛擬環境Python
- Geo-replication: 從 Copysets 到 Tiered Replication
- springboot系列學習(八):yml配置檔案,多環境下的相互切換Spring Boot
- 使用 Postman 的 Environments 和 Tests 簡化在不同環境中的切換步驟Postman
- Python:使用pyinstaller打包含有gettext locales語言環境的專案Python
- RVM切換到rbenv[MacOS]Mac
- idea 2024.2切換到舊版的UIIdeaUI
- 想了解下,app 自動化測試給的包是否都需要寫個步驟切換到測試環境APP
- git切換到指定目錄Git
- sqlserver關於釋出訂閱replication_subscription的總結SQLServer
- 如何從 Docker Desktop 切換到 ColimaDocker
- 從NodeJS切換到Ruby on Rails - nikodunkNodeJSAI