Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've bought my first VPS yesterday, and I have installed Microsoft SQL Server 2012 Express on it.

Then I have restarted my VPS. But SQL Server Service didn't start. I've tried to start it manually, but It can't start:

SQL Server service doesn't start

What is the problem? How to solve it?

P.S: This is my first server management, and I'm a newbie, if you need any further details about this, please leave a comment. I'll update the question.

Update 1: This is some log details from Event viewer that I thought that they may be useful for this problem:

FCB::Open failed: Could not open file e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\MSDBData.mdf for file number 1. OS error: 3(The system cannot find the path specified.).

The resource database build version is 11.00.3000. This is an informational message only. No user action is required.

FileMgr::StartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\MSDBLog.ldf'. Diagnose and correct the operating system error, and retry the operation.

Starting up database 'model'.

FCB::Open failed: Could not open file e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\model.mdf for file number 1. OS error: 3(The system cannot find the path specified.).

FileMgr::StartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\modellog.ldf'. Diagnose and correct the operating system error, and retry the operation.

I'm confused about these e:\s, my VPS has just one C:\ drive, So what is e:\ ?

share|improve this question

closed as off topic by MDMarra, SvW, mdpc, Scott Pack, Ward Nov 13 '12 at 21:49

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
look at the logs, like the error message said. Go to event viewer and have a take it from there. –  Sc0rian Nov 12 '12 at 12:56
    
@Sc0rian Question updated. –  Mahdi Ghiasi Nov 12 '12 at 13:12
add comment

1 Answer

up vote 5 down vote accepted

There a few topics on it, but someone posted a good workaround here

NET START MSSQL$SQLEXPRESS /f /T3608

SQLCMD -S .\SQLEXPRESS

1>SELECT name, physical_name, state_desc FROM sys.master_files ORDER BY database_id;

Now notice those wrong file names; and run following commands ...

Note: you need to change the file name location ..

1>ALTER DATABASE model MODIFY FILE ( NAME = modeldev, FILENAME = 'c:\model.mdf');
2>ALTER DATABASE model MODIFY FILE ( NAME = modellog, FILENAME = 'c:\modellog.ldf');
3> go

ALTER DATABASE msdb MODIFY FILE ( NAME = MSDBData, FILENAME = 'c:\MSDBData.mdf');
ALTER DATABASE msdb MODIFY FILE ( NAME = MSDBLog, FILENAME = 'c:\MSDBLog.ldf');

ALTER DATABASE tempdb MODIFY FILE ( NAME = tempdev, FILENAME = 'c:\temp.mdf');
ALTER DATABASE tempdb MODIFY FILE ( NAME = templog, FILENAME = 'c:\temp.ldf');

go

exit;

NET STOP MSSQL$SQLEXPRESS 
share|improve this answer
    
After running those commands, Now I'm getting these errors (in Event Viewer): Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'c:\modellog.ldf'. Diagnose and correct the operating system error, and retry the operation. How to create those *.mdf, *.ldf files? –  Mahdi Ghiasi Nov 12 '12 at 18:40
    
There was model, modellog, MSDBData and MSDBLog files in C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA. Now the problem is solved. Thank you very much! –  Mahdi Ghiasi Nov 12 '12 at 19:09
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.