Lost in .NET Code

Developing software in .NET, Security and other ramblings.

Moving a SUSDB Database on SBS 2003

Wednesday, January 7, 2009

WSUS database by default tend to be on the C drive, which is all good until you start to run out of space.

The problem then comes in moving the database from C: to often your data drive in my example D:

The biggest problem people have in doing this is actually connecting to the database.

Most people like point and click tools like SQL Server Management Studio or Express edition
http://www.microsoft.com/downloads/details.aspx?FamilyId=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en

MAKE SURE YOU HAVE A BACKUP BEFORE YOU START THIS.

To connect to the database you need to use the following address as the Server Name:

file://pipe/mssql$microsoft##ssee/sql/query

I connected through using this address as Administrator which seem to work ;-) Once you have a connection in the database.

The rest becomes alot simplier in terms of moving the SUSDB . Expand the database list and you should see SUSDB .

Before you do this though make a note of were the files are !! ldf and the mdf ;-)

Right click on the database

Task -> Detach

you will need to select the option "Drop Connections" otherwise it will normally fail to detach.

Once you have detached the database. *COPY* ldf and mdf file to your new location.

Once copied you simple need to Attach the database back in again. Right click on Database -> Attach

Locate the mdf file in the new location and attach the database back.
Once you are happy that database is re-attached correctly and you have checked the system is working, you can delete you old mdf and ldf file. Personally I just copied them off onto a USB drive just in case. You should then have some space back on your C drive.

[UPDATE]
Make sure you check the permissions on the database before you start this procedure just in case.

Labels:

0 Comments:

Post a Comment

<< Home


Subscribe in a reader


Useful Links

Fircroft Trust Ltd
Unwind Software Ltd


Archives

December 2006   January 2007   February 2007   March 2007   April 2007   May 2007   June 2007   October 2007   November 2007   February 2008   April 2008   May 2008   June 2008   July 2008   August 2008   October 2008   November 2008   December 2008   January 2009   March 2009  


Fun and Games



 

This page is powered by Blogger. Isn't yours?