SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Site Related Forums
 Article Discussion
 Article: Moving the tempdb database
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AskSQLTeam
Ask SQLTeam Question

USA
0 Posts

Posted - 11/05/2007 :  07:45:52  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote

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 - 11/06/2007 :  11:22:55  Show Profile  Reply with Quote
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)?

Edited by - Maxer on 11/06/2007 11:23:17
Go to Top of Page

rjrjack
Starting Member

USA
1 Posts

Posted - 12/06/2007 :  10:25:20  Show Profile  Reply with Quote
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

USA
10 Posts

Posted - 12/06/2007 :  11:24:45  Show Profile  Reply with Quote
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 - 01/15/2009 :  10:42:09  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

USA
7174 Posts

Posted - 01/15/2009 :  22:48:59  Show Profile  Reply with Quote
Thanks for sharing.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000