Re: Can I move tempdb?
From: Dan Guzman (danguzman_at_nospam-earthlink.net)
Date: 07/29/04
- Next message: David Portas: "Re: problem with a clustered index??"
- Previous message: Wayne Snyder: "Re: Performance hit"
- In reply to: Greg Linwood: "Re: Can I move tempdb?"
- Next in thread: Greg Linwood: "Re: Can I move tempdb?"
- Reply: Greg Linwood: "Re: Can I move tempdb?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 29 Jul 2004 08:49:52 -0500
Tempdb file name changes take affect after SQL Server is restarted and are
permanent. The file locations are stored in the master database sysaltfiles
table and the primary file path is also stored in sysdatabases. If only
tempdb needs to be moved, no other changes need to be made. The KB article
reference posted by details procedures for moving other database files.
Model isn't used to determine database file locations. The default location
for new database data and log files is stored in the registry and the EM GUI
can be used to change these. However, tempdb is a special case because the
file locations are known at startup and those are used if new tempdb files
need to be created.
-- Hope this helps. Dan Guzman SQL Server MVP "Greg Linwood" <g_linwoodQhotmail.com> wrote in message news:%23z%23r06WdEHA.2408@tk2msftngp13.phx.gbl... > Does the location of the model db also need to be altered for the changes to > remain after restarting SQL? Or perhaps a job configured to run at startup > so that other create database statements aren't affected would be more > appropriate if the poster wants the change persisted. I'm actually not sure > whether or not the change would be lost after restart - perhaps SQL has some > way of remembering location of tempdb files? > > Regards, > Greg Linwood > SQL Server MVP > > "Dan Guzman" <danguzman@nospam-earthlink.net> wrote in message > news:e6kwkqWdEHA.1152@TK2MSFTNGP09.phx.gbl... > > You can move tempdb files with ALTER DATABASE ... MODIFY FILE, specifying > > the desired file locations. Delete the old files after restarting SQL > > Server. For example: > > > > ALTER DATABASE tempdb > > MODIFY FILE(NAME='tempdev', FILENAME='F:\DataFiles\tempdb.mdf') > > > > ALTER DATABASE tempdb > > MODIFY FILE(NAME='tempdev', FILENAME='G:\LogFiles\templog.ldf') > > > > -- > > Hope this helps. > > > > Dan Guzman > > SQL Server MVP > > > > "aerosnoop" <anonymous@somewhere.net> wrote in message > > news:OTMkgiWdEHA.4092@TK2MSFTNGP10.phx.gbl... > > > Is there a way to relocate tempdb to another drive? > > > > > >
- Next message: David Portas: "Re: problem with a clustered index??"
- Previous message: Wayne Snyder: "Re: Performance hit"
- In reply to: Greg Linwood: "Re: Can I move tempdb?"
- Next in thread: Greg Linwood: "Re: Can I move tempdb?"
- Reply: Greg Linwood: "Re: Can I move tempdb?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|