SQL: Moving system databases

Select name, physical_name from sys.master_files
Use master
go
Alter database tempdb modify file (name=tempdev,filename=’C:\Data\tempdb.mdf’)
go
Alter database tempdb modify file (name=templog,filename=’C:\logs\tempdb.ldf’)
go
SQL Server startup parameters (in SQL Server configuration manager). Right click on SQL Server and go to properties – advanced tab.
-dC:\data\master.mdf;-eC:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG;-lC:\logs\mastlog.ldf
Use master
go
Alter database msdb modify file (name=msdbdata,filename=’C:\data\msdbdata.mdf’)
go
Alter database msdb modify file (name=msdblog,filename=’C:\logs\msdblog.ldf’)
go
Use master
go
Alter database model modify file (name=modeldev,filename=’C:\data\model.mdf’)
go
Alter database model modify file (name=modellog,filename=’C:\logs\modellog.ldf’)
go
Advertisements

SQL: Which Service Pack installed

select serverproperty(‘productlevel’)