0

I have a sql instance up and running with the data files located on a SAN drive. I need to move this instance to a different SAN. I have server/instance on san drive p:\ in rack 1. I have a new server on rack 2 that I want to move it to. How do I best accomplish this if it's even possible? Yes, I'm a noob. Any help is greatly appreciated.

2 Answers2

1

Assuming that you can tolerate down time on the system, the easy way is to take the instance offline, bring up the new storage temporarily under some unused drive letters, copy all of the files from the drives on the old storage to drives on the new storage (while preserving the security ACLs on the files and folders--I normally use robocopy for this), remote the old storage, free up the "official" drive letters, change the drive letters from the temporary drive letters to the official drive letters and bring the instance up. As long as none of the paths change and the read/write security on the files and paths is the same, the instance won't know the difference between the old drives and the new drives.

Another good alternative is talk to your SAN team. They may have ways of migrating the data "behind the scenes" onto other storage. That would not require downtime on your part.

Whenever you are doing stuff like this, it's always a good idea to be extra careful about having a good set of backups before you start.

Darin Strait
  • 2,012
  • 12
  • 6
0

1) USE the ALTER DATABASE command to change your file locations 2) USE the ALTER DATABASE databasename SET OFFLINE 3) Move your database files 4) USE the ALTER DATABASE databasename SET ONLINE

jl.
  • 1,076
  • 8
  • 10
  • There are multiple databases contained within the instance. I'm wondering what challenges I will face if I try to move the sql server instance from one san drive to a different san drive on a different rack. If I do that and restart sql after moving it, will I need to modify the registry? –  Nov 05 '10 at 14:41
  • I might have thrown a bit of sand in the gear box. I presumed that you wanted to move all of the databases (system and user) from the source location to the target location. In that case the master and msdb would need to be restored from a backup before using steps 1) - 4) for the user databases. If you are simply moving user databases from the source to the target it would be easier to DETACH them, move their respective files, then ATTACH them at their new server location. Hope I haven't totally confused things. – jl. Nov 05 '10 at 17:12