Reputation: 559
What can I do with this I have an error on running the SQL Server Express service
Windows could not start the SQL Server on local computer...
EDIT:
By the way I have looked at the event log and I found this
The log scan number (85:368:1) passed to log scan in database 'model' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during start up.
EDIT II:
I did all suggestions but it still not running(sql express server service) can anyone help me to do this?
Upvotes: 9
Views: 21010
Reputation: 79
If you use the regular MSSQL 12 (instead of SQLExpress) follow the instructions below:
Upvotes: 7
Reputation: 559
To those who has the same problem as mine try doing this. here are the things that i have done just to solve this:
First: Go to this path C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\Binn\Templates
Second: Copy and paste the database/file named model.mdf and modellog.ldf to this path C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA
That's it.. Thanks to those who answers my question..
Upvotes: 35
Reputation: 592
You have to rebuild the Database : 'model'. The simpliest way is to copy this 2 files model.mdf and modellog.ldf from a working instance.
You can also use this command to rebuild system database Setup QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=InstanceName /SQLSYSADMINACCOUNTS=accounts [/ SAPWD= StrongPassword ] [ /SQLCOLLATION=CollationName]
See here
Upvotes: 1
Reputation: 180
If you never install SQL Server on your machine then do not try to install visual studio first.
Always install SQL Server first.
To remove and re-install you have to remove all the SQL server instance and then install.
Upvotes: 0