sql-serversql-server-config-manager

Move SQL Sever installation to another drive


I've a new drive to my database, so moved all databases to this new drive. Now I need to move the system databases and the remaining folders that SQL creates such as FTData, JOBS, Log, etc.

How I move all this files? since the current unit (not C:) will be disconnected when all the process is done.

I google it but only find to move database (already done)

EDIT 1: it is a cluster failover installation with Windows failover service

EDIT 2: the SQL installation is in the default location, the files as FTData, Log (the system log) and the mentioned folders are on my E drive and need to move to my new X drive.

Thanks!


Solution

  • Well, I write this here in case if someone has the same scenario (or similar).

    What I did was:

    1. Move all user databases to the new LUN (look at microsoft recomendations)
    2. Move all system database to the new LUN (look at microsoft recomendations)
    3. I searched on the register for my old drive letter (E:), since my old drive was used only for the databases data and some objects created by sql server. And replace in both nodes. Move the MSSQL.... folder from my E: folder to the new LUN.

    For the 2th and the 3th step I completly shut down the sql service. And on each database migration, an script was executed to verify that all databases were online.

    Here are the keys changed on the register.

    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft SQL Server\MSSQL12.MSSQLSERVER\CPE\ErrorDumpDir

    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft SQL Server\MSSQL12.MSSQLSERVER\Replication\WorkingDirectory

    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft SQL Server\MSSQL12.MSSQLSERVER\SQLServerAgent\ErrorLogFile

    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft SQL Server\MSSQL12.MSSQLSERVER\SQLServerAgent\WorkingDirectory