I noticed something today that hadn’t before…when you start SQL Server in Single User Mode using the –f switch, tempdb gets recreated back to where the model database is destined.

First I run the following:

sqlstart_tempdb_1

You can see that I have four tempdb files on the F:\ drive. Now I start SQL Server in the minimal mode with –f:

sqlstart_tempdb_2

Stop and start the services and you see that tempdb goes back to its original locale:

sqlstart_tempdb_3

Restarting with the –f switch taken out, and tempdb is once again recreated back in the F:\ location with four tempdb files.

Trying the same with the –m option (single-user) and you don’t find the same behavior. The tempdb database does not get moved back to the default location with the original default configuration; all of the files stay in the same location.

Read more on starting SQL Server at the following links:

http://msdn.microsoft.com/en-us/library/ms188236.aspx
http://msdn.microsoft.com/en-us/library/ms180965.aspx
http://msdn.microsoft.com/en-us/library/ms191193.aspx

Thanks for reading,
Lee

 

------------------------


Posted in: SQL Administration  Tags:
blog comments powered by Disqus

by Lee Everest, M.S.

Info

Poll

Do you use Azure or cloud in your organization?



Show Results

Ads

Search


Month List

Calendar

«  May 2012  »
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910
View posts in large calendar

Tags

Disclaimer
The opinions, code, examples, et.al. expressed herein are my own personal opinions and do not represent my employer's view in any way, shape form, or fashion.  All code for demonstration purposes - no guarantees, either written or implied, are made.

© Copyright 2012 Lee Everest's SQL Server, etc. weblog