Issues with the Database
Applies To: Windows Server 2003 with SP2, Windows Server 2008 R2, Windows Server 2008 R2 with SP1, Windows Server Update Services, Windows Small Business Server 2011 Standard
If you have problems with the SQL Server database or Windows Internal Database, make sure that the WSUS database is in the correct SQL Server instance before you start to troubleshoot SQL Server issues.
You need to use the sqlcmd utility. For more information about the sqlcmd utility, see sqlcmd Utility.
Troubleshooting database issues
To ensure that the WSUS database is in the correct SQL Server instance
Verify the SQL Server name by opening a Command Prompt window and typing the following:
Reg query "HKLM\SOFTWARE\Microsoft\Update Services\Server\Setup" /v SqlServerName
The output contains the SQL Server name to be used in the next step.
Type the following:
sqlcmd -S SqlServerName** -E -d SUSDB**.
If you are using Windows Internal Database as the WSUS database, use the following string in place of *SqlServerName* in the command: **np:\\\\.\\pipe\\MSSQL$MICROSOFT\#\#SSEE\\sql\\query**.
- Review any error messages and correct the problems.