9

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:\ ?

  • 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
15

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 
| 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
  • remmeber to enter "Go " in second line after first query to execute it – Iman Nov 26 '15 at 9:31
  • for me for some reason MSSQL12.SQLEXPRESS or SQL 2014 LocalDB express was replaced instead of old MSSQL11.SQLEXPRESS path – Iman Nov 26 '15 at 9:37

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