Answered by:
Moving WSUS db from one sql2005 server to another sql 2005 server

Question
-
Hi,
This is probably a simple question for you guys to answer, I have almost no SQL experience but have been assign this task.
We have a WSUS 3.0 SP2 server running on a Server2008 with the database residing on a SQL2005 (Windows Server 2003)
It would be most appreciated if someone could point me in the right direction on how to move the db from one sql2005 server to another sql2005 server.
I have tried to stop update service on wsus server, detach database, attach database and changing registry value on wsus server to point to t he new sql2005 server but I can not get it to workArticles on how to perform this operation from Windows internal db to a sql2005 are legio but I can not seem to find the info i need.
Please advice.
Peter Gierer
Monday, July 5, 2010 10:28 AM
Answers
-
This is how I have gone about it.
1. Stop update service on wsus server.
2. Detach db on present sql2005 server.
3. Copy db to new sql2005 server
4. Edit registry on wsus server
5. Attach db on the new sql2005 server.
5. Start update service on wsus server.
6. Reboot wsus server.Any suggestions ;-)
Yes... as I now remember... it's something that got skipped over in the documentation. I got tripped up by this omission the first time I did a database server migration in my own environment.
You need to create a COMPUTER ACCOUNT on the new SQL Server for the front end server. The original account will exist in the original server. If you look in the SUSDB\Security\Users folder you'll see an account for DOMAIN\WSUSSERVER$. Create a SQL Login and Database User account on the new database server and make that account a nember of the webService Database Role in the SUSDB database.
Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
Principal/CTO, Onsite Technology Solutions, Houston, Texas
Microsoft MVP - Software Distribution (2005-2010)
My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
My Blog: http://onsitechsolutions.spaces.live.com- Marked as answer by Eric Zhang CHN Monday, July 19, 2010 2:19 AM
Monday, July 5, 2010 9:51 PM
All replies
-
Hi Peter,
See steps in this article:
How to move the WSUS database to a different SQL Server - Action plans and problem solving - Site Home - MSDN Blogs
http://blogs.msdn.com/b/john_daskalakis/archive/2009/04/06/9533669.aspx
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.Monday, July 5, 2010 10:46 AM -
It would be most appreciated if someone could point me in the right direction on how to move the db from one sql2005 server to another sql2005 server.
This is also functionally documented in the section Migrating from Windows Internal Database to SQL Server in the WSUS Operations Guide, and the steps are identical, except that SQL Server Management Studio is likely already installed on the original server so it will not be necessary to use sqlcmd.exe to detach the database.
John's blog post (cited by Eric) is adequate == for WSUS v2 == but it is wholly inappropriate for WSUS v3, and that's somewhat disconcerting given that it was posted in April 2009. :-/
To wit:
- WSUS doesn't care about the .NET Framework v1.x and SQL Server 2005 requires the .NET Framework v2.0
- The command WSUSSetup /b is a WSUS v2 command; there is no requirement to run WSUSSetup on the back-end server.
And at that point I would suggest completely abandoning the blog post provided by Eric, and referring to the product documentation as your authoritative source for the procedure. The blog post cited WILL NOT WORK.
Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
Principal/CTO, Onsite Technology Solutions, Houston, Texas
Microsoft MVP - Software Distribution (2005-2010)
My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
My Blog: http://onsitechsolutions.spaces.live.comMonday, July 5, 2010 3:24 PM -
Hi,
First, thank you Eric and Lawrence for your input.
I noticed that the solution posted by Eric did not apply to WSUS v.3.0 and futher more, I have no intention of moving WSUS from
the present server.
All I want to do is move the databse to a different SQL server.I have tried to follow the WSUS operation guide minus the sqlcmd.exe part but I can not get it to work.
This is how I have gone about it.
1. Stop update service on wsus server.
2. Detach db on present sql2005 server.
3. Copy db to new sql2005 server
4. Edit registry on wsus server
5. Attach db on the new sql2005 server.
5. Start update service on wsus server.
6. Reboot wsus server.Any suggestions ;-)
Peter
Monday, July 5, 2010 4:08 PM -
This is how I have gone about it.
1. Stop update service on wsus server.
2. Detach db on present sql2005 server.
3. Copy db to new sql2005 server
4. Edit registry on wsus server
5. Attach db on the new sql2005 server.
5. Start update service on wsus server.
6. Reboot wsus server.Any suggestions ;-)
Yes... as I now remember... it's something that got skipped over in the documentation. I got tripped up by this omission the first time I did a database server migration in my own environment.
You need to create a COMPUTER ACCOUNT on the new SQL Server for the front end server. The original account will exist in the original server. If you look in the SUSDB\Security\Users folder you'll see an account for DOMAIN\WSUSSERVER$. Create a SQL Login and Database User account on the new database server and make that account a nember of the webService Database Role in the SUSDB database.
Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
Principal/CTO, Onsite Technology Solutions, Houston, Texas
Microsoft MVP - Software Distribution (2005-2010)
My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
My Blog: http://onsitechsolutions.spaces.live.com- Marked as answer by Eric Zhang CHN Monday, July 19, 2010 2:19 AM
Monday, July 5, 2010 9:51 PM -
Would these be the same procedures if I want to go from a remote SQL 2005 DB to a remote SQL 2008 DB?
Since the front-end WSUS server remains the same, do I have to worry about the SQL logins?
Thanks
Thursday, July 15, 2010 1:03 AM -
Would these be the same procedures if I want to go from a remote SQL 2005 DB to a remote SQL 2008 DB?
Yes.Since the front-end WSUS server remains the same, do I have to worry about the SQL logins?
Yes. The SQL Logins are an object of the database server. Any migration from one database instance to another, even on the same system, will require the creation of the computer account in the target SQL Server instance.
Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
Principal/CTO, Onsite Technology Solutions, Houston, Texas
Microsoft MVP - Software Distribution (2005-2010)
My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
My Blog: http://onsitechsolutions.spaces.live.comThursday, July 15, 2010 3:44 AM