Master database
To change the path of the master database on statup parameters of SQL Server instance:
- Launch enterprise manager for SQL 2000.
- Right click on database instance and select properties.
- Click the Startup Parameters button.
- On Startup Parameters window set the paths for master database by changing the paths that are starting with -d and -l to a new file paths.
- Stop SQL Server service.
- Move the master database files to new file path.
- Start SQL Server service and the server should run with new master database file paths.
- If there are any problem on starting the service, make sure that the paths are correct.
Other System databases (model, msdb, tempdb)
- Determine the logical file name of the database files for the database by running command:
USE <dbname>
GO
EXEC sp_helpfile
GO - Change the file paths of the database by running the following command:
USE master
GO
ALTER DATABASE <dbname>
MODIFY FILE (NAME = <logical file name1> , FILENAME = ‘<new path1>’)
GO
ALTER DATABASE <dbname>
MODIFY FILE (NAME = <logical file name2> , FILENAME = ‘<new path2>’)
GO - Stop SQL Server service.
- Move the databse files to new file paths.
- Start SQL Server service and the server .
- If there are any problem on starting the service, make sure that the paths are correct.