February 25, 2008 at 11:46 pm
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.
February 25, 2008 at 11:55 pm
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
February 26, 2008 at 12:17 am
thanks that has got it.
regards
February 27, 2008 at 2:37 am
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: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.
When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara
February 27, 2008 at 9:23 am
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
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply