How to Migrate WSUS Database between two SQL 服务器.
解决方案 1. You have access to both SQL Servers
1. 跑步 Command Prompt as Admin on your server with WSUS Role;
2. Type and execute the next command:
net stop W3SVC && net stop wuauserv && net stop WsusService
3. 跑步 SQL 服务器 管理工作室 on the first (old) SQL 服务器;
4. Navigate to your WSUS Database (by default SUSDB). Right Click and select Tasks\Detach;
5. Copy your WSUS Database 和 Logs files to a new location;
6. Run the new SQL 管理工作室 和 附 copied Database;
7. On your WSUS Server run 注册表编辑器 and change the key:
HKLM\SOFTWARE\Microsoft\UpdateServices\Server\Setup\SqlServerNameStart
8. Change server name from old SQL Server to new;
9. 跑步 Command Prompt as Admin on your server with WSUS Role;
10. Type the next command:
net start W3SVC && net start wuauserv && net start WsusService
11. Test, by running WSUS Console.
解决方案 2. You have files of WSUS Database
In case you can’t access to SQL Server instance with WSUS database with SQL 管理工作室, but DB and Logs files are available.
1. 跑步 Command Prompt as Admin on your server with WSUS Role;
2. Type and execute the next command:
net stop W3SVC && net stop wuauserv && net stop WsusService
5. Copy your WSUS Database 和 Logs files to new location;
6. 跑步 SQL 管理工作室 on the new SQL 服务器和 附 copied Database;
7. 扩张 这 安全, Right Click on Logins, and then select New Login;
8. 进入 NT AUTHORITY\NETWORK SERVICE 为 Login Name;
9. 点击 User Mapping and confirm that the user has the dbo Default Schema granted on the SUSDB 数据库;
10. 点击 好的 to create the login;
11. Right Click on Logins, and then select New Login;
12. 进入 {WSUS Server Name}\WSUS Administrators 为 Login Name;
13. 点击 User Mapping and confirm that the WSUS Administrators Group is granted access to the SUSDB 数据库;
14. 点击 好的 to create the login;
15. On your WSUS Server run 注册表编辑器 and change key:
HKLM\SOFTWARE\Microsoft\UpdateServices\Server\Setup\SqlServerNameStart
16. Change server name from old SQL Server to new;
17. 跑步 Command Prompt as Admin on your server with WSUS Role;
18. Type the next command:
net start W3SVC && net start wuauserv && net start WsusService
19. Test, by running WSUS Console.