Wednesday, July 20, 2011

Moving WSUS content and Windows Internal Database to another drive

Today I had to create a RAID massive from the disk, where WSUS content was stored. Also there was database file of Windows Internal Database (that's how I store the information about my WSUS).
Moving WSUS content is a really easy task involving just a few steps.
It requires just one command.
wsusutil movecontent [path to new location] [path to log file]
(Location of wsusutil command is %drive%\Program Files\Update Services\Tools)
It's a bit strange, but the command couldn't run successfully and terminated with error "access to log file path is denied" nevertheless it had "everyone full access, network service full access, etc." permissions. The solution I found, was to create a simple txt file and point the command to it rather than to the folder. That's funny that the file has to be created manually.

To move database files, I had to install SQL Server Management Studio Express.
Fill the following parameters In the connection dialogue box:
Server Type: Database Engine
Servername: \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query
Authentication: Windows Authentication

In the "Databases" find "SUSDB", click on "Tasks" and then "Detach". In the dialogue box select "Drop connections".
Then we have to simply copy the folders using explorer or anything else.
When folders are in the right place, open SQL  Server Management Studio Express and right click on "Databases". Select "Attach" and choose the .mdb file.

Done!