Databases Reference
In-Depth Information
5.
Once the these directories are created, execute the following script to modify the
location of the tempdb database for your SQL Server instance:
USE master
GO
--Changing the location of data file
--(.mdf file) of tempdb database.
ALTER DATABASE tempdb
MODIFY FILE
(
Name = tempdev
,FileName = 'M:\TempDB_Data\tempdb.mdf'
)
GO
--Changing the location of log file
--(.ldf file) of tempdb database.
ALTER DATABASE tempdb
MODIFY FILE
(
Name = templog
,FileName = 'N:\TempDB_Log\templog.ldf'
)
GO
6. After executing the previous commands, you will need to restart SQL Server service.
For this, select SQL Server Configuration Manager from the Configuration Tools
option in the Microsoft SQL Server 2012 program group in the Start menu.
7. In SQL Server Configuration Manager, select SQL Server Services from the left
pane. Right-click on the name of a SQL Server service for your SQL Server instance,
and then select Restart to restart the service. Refer to the following screenshot for
more details:
 
Search WWH ::




Custom Search