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
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Moving Tembdb file
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Peter99
Constraint Violating Yak Guru

494 Posts

Posted - 09/29/2011 :  13:46:17  Show Profile  Reply with Quote
Hi,

I was moving tempdb log file from one drive to other. I used following command:

alter database temdb
modify file(name=tempdev,
filename='d:\data\temp_log.ldf'

By mistake I wrote data file name in name=filename. I copied log file to new location. Now I cannot start sql server instance. Any help?

Thanks

russell
Pyro-ma-ni-yak

USA
5072 Posts

Posted - 09/29/2011 :  14:02:44  Show Profile  Visit russell's Homepage  Reply with Quote
Can you start SQL with the -f paramater?

If so, then you can re-run your alter database statement and restart (without the -f param).

http://msdn.microsoft.com/en-us/library/ms190737.aspx
Go to Top of Page

Peter99
Constraint Violating Yak Guru

494 Posts

Posted - 09/29/2011 :  15:46:20  Show Profile  Reply with Quote
Thanks Russell for your help. That's works.
Go to Top of Page

russell
Pyro-ma-ni-yak

USA
5072 Posts

Posted - 09/29/2011 :  17:06:25  Show Profile  Visit russell's Homepage  Reply with Quote
You're welcome. Glad to help.
Go to Top of Page

russell
Pyro-ma-ni-yak

USA
5072 Posts

Posted - 09/30/2011 :  09:34:02  Show Profile  Visit russell's Homepage  Reply with Quote
By the way, with tempdb, no need to actually move the files. Just restart MSSQL.
Go to Top of Page

Peter99
Constraint Violating Yak Guru

494 Posts

Posted - 09/30/2011 :  13:23:44  Show Profile  Reply with Quote
But old files will be there. I have to delete them manually. Anyhow thanks for help.
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.08 seconds. Powered By: Snitz Forums 2000