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
 General SQL Server Forums
 New to SQL Server Programming
 tempdb.mdf is nota primary database file

Author  Topic 

Crotalus
Starting Member

16 Posts

Posted - 2007-08-06 : 17:43:26
I really needed to move the tempdb file to another hard drive, so I used this bit of code.

USE master
go

ALTER DATABASE tempdb MODIFY FILE (NAME = tempdev, FILENAME = 'E:\tempdb.mdf')
go

ALTER DATABASE tempdb MODIFY FILE (NAME = templog, FILENAME = 'E:\templog.ldf')
go

Now sql server manager won't even start. The log files says

"tempdb.mdf is not a privary database file. CREATE DATABASE failed. Some file names listed could not be created.
WARNING: problem activiating all tempdb files. See previous errors."

Any ideas on how to make this program work again, without reinstalling it?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-08-06 : 17:57:19
http://support.microsoft.com/kb/313702

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

Crotalus
Starting Member

16 Posts

Posted - 2007-08-06 : 22:23:07
I don't think it is a permissions problem. I only have one user and that user has administrative rights. By the way that should say "primary" and not "privary".
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-08-07 : 15:00:29
Resolved under http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=87460

Locking this thread since it's a duplicate.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -