Link to home
Get AccessLog in
Avatar of William White
William WhiteFlag for United States of America

asked on

move tempdb log file to a new location

I need to move the log file for tempdb.  The datafile can stay where it is.  Is there a way to move just the log file to a new location without restarting SQL?
Avatar of Scott Pletcher
Scott Pletcher
Flag of United States of America image

Maybe.

You can add another log file.  Then when SQL starts using it as the main log file, you can remove the original log file.

Tricky part is getting SQL to use the other log file, esp. on tempdb.

AFTER adding the new log file, you could try shrinking the existing log file in tempdb, but I'm not 100% sure that's 100% safe -- that is, it might cause something running to fail (maybe).
ASKER CERTIFIED SOLUTION
Avatar of TempDBA
TempDBA
Flag of India image

Link to home
membership
This content is only available to members.
To access this content, you must be a member of Experts Exchange.
Get Access
??

Log files will roll over if you have more than one.  And you can remove unused log files.