Tuesday, November 20, 2012

Moving WSUS WID Database in Windows Server 2012

I can not guarantee this will work for you, but here is what I did when a coworker installed the WSUS database to the wrong drive. This post also assumes you know what you are doing, and are able to use SQL Management Studio 2012.


  1. Install SQL Server Management Studio 2012 (You can try Management Studio for 2008 or 2008 R2 I recieved an error when I tried initially)
  2. Run SQL Management Studio 2012 as Administrator
  3. Connect to Server Name \\.\pipe\Microsoft##WID\tsql\query (old versions used to be \\.\pipe\Microsoft##SSEE\sql\query this has changed in Server 2012 WSUS 4)
  4. Select Windows Authentication and login
  5. Expand Databases
  6. Right Click SUSDB
  7. Hover over Tasks
  8. Select Detach (Management Studio for 2008 might give you an error here)
  9. Select the Drop Connections checkbox
  10. Click OK
  11. Move the SUSDB.mdf and the SUSDB_log.ldf to the new location.
  12. Back in SQL Server Management Studio right click on Databases
  13. Select Attach
  14. Click Add
  15. Navigate to the new SUSDB.mdf location and select the mdf that is in the new location.
  16. Verify the mdf and the ldf are showing in their location properly.
  17. Click OK
  18. Verify the SUSDB database has attached and is not read-only, (if it is listed as SUSDB (Read-Only), verify the permissions on the folder and files you moved are the same as the permissions of its original location).
  19. Once reattached you should now be good to go. If things look iffy, restart Update Services/IIS Admin/WID Services, or reboot.

http://technet.microsoft.com/en-us/library/hh852349.aspx

17 comments:

  1. so when I try to attach the db in the new file location I am unable to select the folder. I am only able to select the c drive. I have moved my db to another drive E: (which is local) It has the same permissions...I have even restarted the server but no joy there either....any ideas? I am using MS SQL Server Management Studio 2012

    ReplyDelete
    Replies
    1. Serverville: Moving Wsus Wid Database In Windows Server 2012 >>>>> Download Now

      >>>>> Download Full

      Serverville: Moving Wsus Wid Database In Windows Server 2012 >>>>> Download LINK

      >>>>> Download Now

      Serverville: Moving Wsus Wid Database In Windows Server 2012 >>>>> Download Full

      >>>>> Download LINK cd

      Delete
  2. Found the answer to my problem...its a vmware thing!

    http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1012225

    Follow these instructions and it fixes the issue. All drives are now visible to SQL

    ReplyDelete
  3. Great catch! It's amazing the variety of errors all administrators encounter in their own, unique, environments. I'm glad you were able to find a solution to your problem. Good luck!

    ReplyDelete
  4. Just to add to this. Login as the local administrator else you won't have permissions to the SQL engine.

    ReplyDelete
  5. Hi how can i change this \\.\pipe\Microsoft##WID\tsql\query

    ReplyDelete
  6. Hi how can i change this \\.\pipe\Microsoft##WID\tsql\query

    ReplyDelete
  7. Thanks, Was having hardtime trying to find that Namepipe string......

    ReplyDelete
  8. I had the same (Read Only) database problem with the move. Problem was with the permissions as noted in step 18 above. The missing permission was for the username MSSQL$MICROSOFT##WID which I could not add manually. My workaround was to run the following robocopy command at step 11 which copied the files security permissions: Robocopy C:\Windows\WID\Data W:\WID /SEC /R:2 /W:2

    ReplyDelete
    Replies
    1. You can add the permission manually if you give it the right prefix. Try NT SERVICE\MSSQL$MICROSOFT##WID in the future.

      Delete
    2. or in powershell....
      Get-Acl -Path C:\Windows\WID\Data | Set-Acl -Path NewPath

      Delete
  9. Iam GreenVomit8 Thanks, that was the step I was missing.

    ReplyDelete
  10. windows 8 online product key shop , cd window multipoint server 2011 , windows 10 product key shows as generic key , windows 10 activation transfer , microsoft project 2010 windows 7 product key , office 2013 key sale , win7 ultimate upgrade key , windows 10 key sale , lCNCEI

    buy office 2016 product key

    windows server 2012 r2 free

    rosetta stone french key sale

    ReplyDelete
  11. win 7 activation key , windows 10 activation error code 0x8007007b , product key windows 7 home premium 32 bit free , windows 8.1 pro key buy , windows 10 product key october 2015 , window 7 product key stores , windows enterprise 8 for sale , office 2013 key sale , lI0F65

    buy office 2016 product key

    windows server 2012 r2 free

    rosetta stone french key sale

    windows 10 product serial number offer

    ReplyDelete
  12. I really loved reading your blog. It was very well authored and easy to undertand. Unlike additional blogs I have read which are really not tht good. I also found your posts very interesting. In fact after reading, I had to go show it to my friend and he ejoyed it as well! movers sherman oaks

    ReplyDelete
  13. Just want to say thanks. Your instructions have helped. Just thought that you might need to include the issue with the SUSDB being read-only which is fixed by manually adding the NT SERVICE\MSSQL$MICROSOFT##WID and give it NTFS write permissions.

    ReplyDelete
  14. Serverville: Moving Wsus Wid Database In Windows Server 2012 >>>>> Download Now

    >>>>> Download Full

    Serverville: Moving Wsus Wid Database In Windows Server 2012 >>>>> Download LINK

    >>>>> Download Now

    Serverville: Moving Wsus Wid Database In Windows Server 2012 >>>>> Download Full

    >>>>> Download LINK KQ

    ReplyDelete