Link to home
Start Free TrialLog in
Avatar of PeterErhard
PeterErhard

asked on

Major issue with SQL 2008

Something has gone wrong with the SQL Server and when the SQL Engine service starts this appears in the event log:

An error occurred while processing the log for database 'model'.  If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log.

and when I try and connect to the instance I get this:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

What can be done?
Avatar of Megan Brooks
Megan Brooks
Flag of United States of America image

The second error would result from the SQL Server Service not starting. The reason for it not starting apparently is a problem with the 'model' database. Are the model.mdf and modellog.ldf files present in the DATA directory (assuming you don't have a separate log directory)? Is that directory online?
Do you have a backup for the model database? If there isn't an obvious problem with the above two files that can be corrected easily then restoring model might be the quickest way to fix things, as long as this error isn't just one part of a larger problem.
Avatar of Raja Jegan R
>> An error occurred while processing the log for database 'model'.  If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log

Your model database is in trouble and hence you need to restore model database either from backups ( if you have it) or need to reinstall SQL Server..
If it is a user database, you can try the approach given below but this can't be done on system databases.

http://blog.sqlauthority.com/2008/07/21/sql-server-fix-error-9004-an-error-occurred-while-processing-the-log-for-database-if-possible-restore-from-backup-if-a-backup-is-not-available-it-might-be-necessary-to-rebuild-the-log/

And for the second error, this might help fixing it:

http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/
ASKER CERTIFIED SOLUTION
Avatar of PeterErhard
PeterErhard

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, that should ideally fix it since model database is a system database and would have been successfully recreated during installation..