USE master; GO ALTER DATABASE mssqlsystemresource MODIFY FILE (NAME=data,FILENAME='C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\mssqlsystemresource.mdf' ); ALTER DATABASE mssqlsystemresource MODIFY FILE (NAME=log,FILENAME='C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\mssqlsystemresource.ldf' ); ALTER DATABASE mssqlsystemresource SET READ_ONLY;
USE master; GO ALTER DATABASE model MODIFY FILE (NAME=modeldev,FILENAME='C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\model.mdf' ); ALTER DATABASE model MODIFY FILE (NAME=modellog,FILENAME='C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\modellog.ldf' ); GO USE master; GO ALTER DATABASE msdb MODIFY FILE (NAME=MSDBData,FILENAME='C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\msdbdata.mdf' ); ALTER DATABASE msdb MODIFY FILE (NAME=MSDBLog,FILENAME='C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\msdblog.ldf' ); GO USE master; GO ALTER DATABASE tempdb MODIFY FILE (NAME=tempdev,FILENAME='C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\tempdb.mdf' ); ALTER DATABASE tempdb MODIFY FILE (NAME=templog,FILENAME='C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\templog.ldf' ); GO