We help IT Professionals succeed at work.

SQL 2008R2 - Relocate default instance ID root directory after install

Majellao asked
Our standard build is to install binaries on C drive & Instance Root directory in f:\SQLSERVER during SQL 2008R2 install.
I have found a server that does not fit the 'standard build'  the default  instance root directory is D  - I know I can change the default for database locations after the install, but I actually want to relocate everything on D   to F -  with the introduction of the 'Instance ID ' in SQL 2008 is this easy to do i.e. follow standard system database & user database  relocation instructions or is there something else I need to consider in regards to the 'Instance ID' and registry keys .
My preference is to rebuild and restore user database - but the customer does not want any extended down time .  
Any suggestions would be appreciated.
Watch Question

The only safe way is to move the databases to another place in the structure of your file system.

Stop SQL server.  
Move the physical files off somewhere else (you will see why in the next step)
Uninstall SQL Server
Reinstall SQL Server in the place you want it.
Stop SQL Server
Put the saved off database files to the new location where they would be and then start SQL Server.


Thanks for your prompt reply and assistance  - you have confirmed what I originally thought.

Good luck.  It is worthwhile venture to have consistency.


Can I ask one more question - in the scenario you suggested  (would take full dump anyway prior to uninstall) if I detached the user database and moved the mdf/ldfs  to the new partitions- could I use attach  for for user databases after the install - or should I rely on restores from the backups - just thought it may be quicker

I would take a full backup, then I would detach the databases and uninstall and reinstall.  Then attach the databases.

If you have logins in the master that you want to keep, you could use the sp_helprevlogin out on the support.microsoft.com site and store them for creation later on.


Assitance Greatly appreciated - confirmed my initial thoughts on potential issues