Wednesday, November 24, 2010

Moving data directories in SQL Server 2005

If you ever need to move the data directories in SQL Server 2005 after the install, here's how:
  1. to set up a new location for new DBs only, open SQL Server Management Studio (SSMS) --> rightclick the instance --> Properties --> Database Settings --> change the default data and log directories.
  2. for any user DBs already created, you can use 'detach and attach' in SSMS - http://msdn.microsoft.com/en-us/library/ms187858(v=SQL.90).aspx
  3. for system databases, it's a bit more tricky but at least it's well documented, try this: http://msdn.microsoft.com/en-us/library/ms345408(v=SQL.90).aspx
Easy!

No comments:

Post a Comment