Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

installing sql 2005 Expand / Collapse
Author
Message
Posted Monday, February 25, 2008 11:46 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, October 3, 2012 6:15 PM
Points: 38, Visits: 89
Dear Forum,

First time i have touched sql 2005, I have installed onto one drive in our test enviroment (we only had one drive) and worked fine.

i have installed in our live environment successfully, but I want to to move the temp.mdf and temp.log off the C: partiton to D: for the DATa and L: for the Logs.

I tried to detach ie single user etc, but the error i get it is that it is a system database and cannot be detached.

we are curently not running anything on this server, it is a 64 bit install.

any suggestion, its temp database I really want to move.
Post #460071
Posted Monday, February 25, 2008 11:55 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Wednesday, August 27, 2014 2:46 AM
Points: 999, Visits: 13,480
you need to use the alter database statement (look in BOL). you specify the new filename for the data and log files and then restart the sql service.

As SQL starts with a fresh tempdb each time it will just build one in the new path you specified. Then you can just delete the old mdf and ldf.

USE master;
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = tempdev, FILENAME = 'E:\SQLData\tempdb.mdf');
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = templog, FILENAME = 'E:\SQLData\templog.ldf');
GO
Post #460074
Posted Tuesday, February 26, 2008 12:17 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, October 3, 2012 6:15 PM
Points: 38, Visits: 89
thanks that has got it.

regards
Post #460081
Posted Wednesday, February 27, 2008 2:37 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 7:55 AM
Points: 2,868, Visits: 3,214
If you are nwe to SQL Server 2005, you may find SQL Server FineBuild on Codeplex useful. The reference document brings together a lot of best-practice advice given by Microsoft and the SQL community.

Original author: SQL Server FineBuild 1-click install and best practice configuration of SQL Server 2014, 2012, 2008 R2, 2008 and 2005. 28 July 2014: now over 30,000 downloads.
Disclaimer: All information provided is a personal opinion that may not match reality.
Concept: "Pizza Apartheid" - the discrimination that separates those who earn enough in one day to buy a pizza if they want one, from those who can not.
Post #460738
Posted Wednesday, February 27, 2008 9:23 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Monday, August 11, 2014 9:39 AM
Points: 3,461, Visits: 350
You can use the help from the below link

http://www.sql-articles.com/index.php?page=articles/msysdb.htm


Cheers,
Sugeshkumar Rajendran
SQL Server MVP
http://sugeshkr.blogspot.com
Post #460990
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse