Moving ALL SQL Server 2000 Data StructuresBy Jasper Smith on 7 July 2002 | Tags: Administration This article expands on the following two Microsoft Knowledge Base Articles: INF: Moving SQL Server Databases to a New Location with Detach/Attach (Q224071) and INF: How to Move, Copy, and Back Up Full-Text Catalog Folders and Files (Q240867). Whilst these articles focus on moving the actual database files and full text catalogs, what happens if you want to move ALL the disk structures associated with a SQL Server installation from one drive to another on the same server? On a 24/7 production server where minimising downtime is imperative how can we move the folder structures, SQL Error log and SQL Agent log to a new drive?
Our server called TEST has the SQL program files installed on its C: drive, user databases
on an internal RAID array D: and the system databases and folder structures on an external array E:
We need to remove the external array E: and thus need to move all our SQL Data Structures from the
E: drive to the D: drive. For this example we are using a named instance TEST\TEST2.
Assuming we have already moved all our databases and Full Text Catalogs as per the KB articles we
now need to remove the remaing disk infrastucture. Replication is NOT enabled. SQL Agent is stopped.
For our instance TEST\TEST2 we have a folder on E: called MSSQL$TEST2 which contains the following subdirectories: BACKUP - default backup location DATA - default database file location FTDATA - default FT Catalog location and FTS system config files JOBS - SQL Agent working area LOG - SQL Server and SQL Agent Logs REPLDATA - Replication working area These are the standard on-disk folder structures installed by SQL Server. Follow these steps to complete the move from E:\MSSQL$TEST2 to D:\MSSQL$TEST2:
So with a little bit of registry surgery we have our SQL Server up and running again with no reference to E: These registry changes can be scripted beforehand and you can use numerous methods to apply them e.g. .reg file which you merge, vbs script using WScript Shell Regwrite method, REGFIND.EXE that is part of the NT4 and 2000 Resource Kits can be used to search and replace registry entries. In practice I choose to do this by hand as its still a very quick process and can be completed in a couple of minutes. DISCLAIMER : This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, check the following MS Knowledge Base article Description of the Microsoft Windows Registry. The techniques described above are NOT supported by Microsoft or the author, however they have been tested on Windows NT4 Server SP6,Windows 2000 Server SP2,Windows 2000 Profesional SP2 with SQL 2000 Standard, Developer,Enterprise and Desktop versions on SP2 and with no Service Pack. It has NOT been tested on other configurations or with Replication enabled however it has been tested in a MSX environment.
|
- Advertisement - |