none
move WSUS database from one SQL Server to another SQL Server

    Question

  • Hello,

    WSUS Server is installed on Windows 2008 R2 Server and WSUS DB is installed also on separate Windows 2008 R2 Server.

    on database side, there is installed SQL Server 2008 R2 Standard Edition.. and there is Named Instance configured (SQL01\WSUS).

    i also prepared another SQL server which is in cluster, and there is installed SQL Server 2008 R2 SP2 Enterprise Edition (OS is windows server 2008 R2).

    so i found an article related to this issue and i was following to that steps 

    http://social.technet.microsoft.com/forums/en-US/winserverwsus/thread/7e5c7139-1e33-4f4b-a477-db77c43ee09c

    1.Install SQL Server 2005 (with the Server and Client Tools option) and SQL Server 2005 Service Pack 1 or higher on your new server.

    2.Stop the IIS Admin service and the Update Services service:

    in Services snapin.

    •Right-click IIS Admin Service, and then click Stop.

    •Right-click Update Services, and then click Stop.

    3.Detach the WSUS database (SUSDB) from the orginal SQL server. 

    sqlcmd -S np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query
    use master
    alter database SUSDB set single_user with rollback immediate
    go
    sp_detach_db ‘SUSDB’
    go

    when i m launching sqlcmd syntax in command promt it is not executed

    C:\Users\adm>sqlcmd -S sql01\wsus
    1>
    2> sqlcmd -S np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query
    3> use master
    4> alter database SUSDB set single_user with rollback immediate
    5> go
    Msg 102, Level 15, State 1, Server SQL01\WSUS, Line 2
    Incorrect syntax near 'S'.
    1> sp_detach_db `SUSDB'
    2>

    any ideas?


    Costa Curta

    Tuesday, January 29, 2013 8:23 AM

Answers

  • Hi, you must use

    >>sqlcmd -S np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query<<

    when you WSUS DB use Windows Internal Database, but your WSUS DB installed on SQL Server. You don't need to use it

    In this case use:  sqlcmd -S Server\Instance

    Or you can do it simply via MS SQL Management Studio

    DB - Task - Detach




    Maxim Sinel'nikov

    • Marked as answer by Costa Curta Wednesday, January 30, 2013 1:43 PM
    Tuesday, January 29, 2013 1:23 PM

All replies

  • Hi, you must use

    >>sqlcmd -S np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query<<

    when you WSUS DB use Windows Internal Database, but your WSUS DB installed on SQL Server. You don't need to use it

    In this case use:  sqlcmd -S Server\Instance

    Or you can do it simply via MS SQL Management Studio

    DB - Task - Detach




    Maxim Sinel'nikov

    • Marked as answer by Costa Curta Wednesday, January 30, 2013 1:43 PM
    Tuesday, January 29, 2013 1:23 PM
  • Hi, you must use

    >>sqlcmd -S np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query<<

    when you WSUS DB use Windows Internal Database, but your WSUS DB installed on SQL Server. You don't need to use it

    In this case use:  sqlcmd -S Server\Instance

    Or you can do it simply via MS SQL Management Studio

    DB - Task - Detach




    Maxim Sinel'nikov

    thanks for help Siniy Atos,

    i did it.


    Costa Curta

    Wednesday, January 30, 2013 1:43 PM