How to Migrate WSUS Database between two SQL Serwery.
Rozwiązanie 1. You have access to both SQL Servers
1. Uruchomić 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. Uruchomić SQL Serwer Management Studio on the first (old) SQL Serwer;
4. Navigate to your WSUS Database (by default SUSDB). Right Click and select Tasks\Detach;
5. Copy your WSUS Database I Logs files to a new location;
6. Run the new SQL Management Studio I Attach copied Database;
7. On your WSUS Server run Edytor rejestru and change the key:
HKLM\SOFTWARE\Microsoft\UpdateServices\Server\Setup\SqlServerNameStart
8. Change server name from old SQL Server to new;
9. Uruchomić Command Prompt as Admin on your server with WSUS Role;
10. Wpisz następne polecenie:
net start W3SVC && net start wuauserv && net start WsusService
11. Test, by running WSUS Console.
Rozwiązanie 2. You have files of WSUS Database
In case you can’t access to SQL Server instance with WSUS database with SQL Management Studio, but DB and Logs files are available.
1. Uruchomić 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 I Logs files to new location;
6. Uruchomić SQL Management Studio on the new SQL Server and Attach copied Database;
7. Zwiększać the Bezpieczeństwo, Right Click on Logins, and then select New Login;
8. Wchodzić NT AUTHORITY\NETWORK SERVICE dla Login Name;
9. Kliknij User Mapping and confirm that the user has the dbo Default Schema granted on the SUSDB Baza danych;
10. Kliknij OK to create the login;
11. Right Click on Logins, and then select New Login;
12. Wchodzić {WSUS Server Name}\WSUS Administrators dla Login Name;
13. Kliknij User Mapping and confirm that the WSUS Administrators Group is granted access to the SUSDB Baza danych;
14. Kliknij OK to create the login;
15. On your WSUS Server run Edytor rejestru and change key:
HKLM\SOFTWARE\Microsoft\UpdateServices\Server\Setup\SqlServerNameStart
16. Change server name from old SQL Server to new;
17. Uruchomić Command Prompt as Admin on your server with WSUS Role;
18. Wpisz następne polecenie:
net start W3SVC && net start wuauserv && net start WsusService
19. Test, by running WSUS Console.