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)
 SQL Server 2005 Instance will not start
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jpotucek
Constraint Violating Yak Guru

USA
273 Posts

Posted - 04/13/2011 :  07:26:18  Show Profile  Send jpotucek an AOL message  Reply with Quote
x

Edited by - jpotucek on 06/22/2013 02:42:27

nigelrivett
Flowing Fount of Yak Knowledge

United Kingdom
3383 Posts

Posted - 04/13/2011 :  08:07:15  Show Profile  Visit nigelrivett's Homepage  Reply with Quote
USE master;
GO
ALTER DATABASE MODEL
MODIFY FILE (NAME = modeldev, FILENAME = 'E:\Microsoft SQL Server\MSSQL.1\MSSQL\Data');
GO
ALTER DATABASE MODEL
MODIFY FILE (NAME = modellog, FILENAME = 'E:\Microsoft SQL Server\MSSQL.1\MSSQL\Data');
GO

Isn't data the folder name rather than the filename?
If there is a file named data then this is giving the same name to the data and log file so whichever gets opened first will be locked when the other tries to open it.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

jpotucek
Constraint Violating Yak Guru

USA
273 Posts

Posted - 04/13/2011 :  08:42:46  Show Profile  Send jpotucek an AOL message  Reply with Quote
I started the instance in single user mode and ran this:

SELECT name, physical_name AS CurrentLocation
FROM sys.master_files
WHERE database_id < 5
here are the results.
master F:\MSSQL\\Default\DataFiles\master.mdf
mastlog G:\MSSQL\\Default\Logfiles\mastlog.ldf
tempdev H:\MSSQL\\Default\TEMPDB\tempdb.mdf
templog H:\MSSQL\Default\TEMPDB\templog.ldf
modeldev E:\Microsoft SQL Server\MSSQL.1\MSSQL\Data
modellog E:\Microsoft SQL Server\MSSQL.1\MSSQL\Data
MSDBData E:\Microsoft SQL Server\MSSQL.1\MSSQL\Data
MSDBLog E:\Microsoft SQL Server\MSSQL.1\MSSQL\Data

you're right.. when i tried to move them back i did not specify filenames for the model and msdb.

I started up in single user mode and reissued my commands:


USE master;
GO
ALTER DATABASE MSDB
MODIFY FILE (NAME = msdbdata, FILENAME = 'E:\Microsoft SQL Server\MSSQL.1\MSSQL\Data\msdbdata.mdf');
GO
ALTER DATABASE  MSDB
MODIFY FILE (NAME = msdblog, FILENAME = 'E:\Microsoft SQL Server\MSSQL.1\MSSQL\Data\msdblog.ldf');
GO



USE master;
GO
ALTER DATABASE MODEL
MODIFY FILE (NAME = modeldev, FILENAME = 'E:\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Model.mdf');
GO
ALTER DATABASE  MODEL
MODIFY FILE (NAME = modellog, FILENAME = 'E:\Microsoft SQL Server\MSSQL.1\MSSQL\Data\modellog.ldf');
GO


The instance started with no problem!!

Edited by - jpotucek on 06/22/2013 02:44:10
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.04 seconds. Powered By: Snitz Forums 2000