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?
PeterErhardAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Megan BrooksSQL Server ConsultantCommented:
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.
0
Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
>> 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/
0
PeterErhardAuthor Commented:
Thanks guys, I finished up just doing an un-install and re-install of SQL and re-attaching the databases.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
Yes, that should ideally fix it since model database is a system database and would have been successfully recreated during installation..
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.