Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Site Related Forums
 Article Discussion
 Article: Moving the tempdb database

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2007-11-05 : 07:45:52

Moving the tempdb database in SQL Server is a simple process but does require the service to be restarted.



Read Moving the tempdb database

Maxer
Yak Posting Veteran

51 Posts

Posted - 2007-11-06 : 11:22:55
I just wanted to say that is a helpful article, but do you have anything on moving the Report Server database between servers on SQL Server 2005? (Servers with different names)?
Go to Top of Page

rjrjack
Starting Member

1 Post

Posted - 2007-12-06 : 10:25:20
This is helpful info, which IMHO would be more helpful if it discussed the advantages of moving tempdb to a different drive, as opposed to leaving it on C: drive...
Go to Top of Page

TheSQLGuru
SQL Server MVP

10 Posts

Posted - 2007-12-06 : 11:24:45
I think you should add in some comments about appropriately sizing tempdb and show how to set the initial size and growth increments.

Kevin G Boles
TheSQLGuru
Indicium Resources, Inc.
Go to Top of Page

cdepaolo
Starting Member

2 Posts

Posted - 2009-01-15 : 10:42:09
Hi. I used this script to move the log file of one of our production databases. I'm sure this goes without saying for most of you, but I am new to the DBA role and didn't fully understand the implications of what I was doing. If you do not stop the services prior to moving the file, when you stop and start them after the move, the database will not have any objects associated with it. This is because the log file was in use at the time you set the new path. If you then try to view the properties of the database, you will receive an error indicating that the file is corrupt or unreadable. What has happened is the physical file still exists in the old location, but this script that was just run has told SQL Server to go to the new location to find it. All you need to do is copy the file from the old location to the new location...that is, if you make the same mistake I made. Your best bet is to STOP SERVICES BEFORE moving the file :)

I'm sure this goes without saying for most of you, but some of us need it completely spelled out for us.

Thank you for this script. I have used it a few times, but was burned today by a mistake that I made when using this script. I thought posting my blatantly ignorant mistake here might be helpful to others so I am sacrificing myself for the greater good.

Cathy
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-01-15 : 22:48:59
Thanks for sharing.
Go to Top of Page
   

- Advertisement -