How to: Database Service fails to start due to log full of model database

today I got an issue reported by our partners, their database server could not start due to log full of model database, after research, I worked out a solution and wrote it down to look in futher as shown below:

 

Symptom:

Due to log full of model database, the database engine service could not start.

Resolution:

1. Go to cmd prompt and issue NET STOP MSSQLSERVER

2. Start SQL server in single user mode / maintenance mode with the following trace flags

NET START MSSQLSERVER /c /m /T3608

clip_image002

3. Now connect to the SQL engine with ‘sqlcmd’ console and issue the following command

clip_image004

4. Next, issue the follow command and uncomment the rest of the parameters and use the best one for your scenario

How to: Database Service fails to start due to log full of model database_第1张图片

USE master;

GO

ALTER DATABASE model

MODIFY FILE

(

    NAME = modellog,

FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA.ldf',

    SIZE = 50MB)

--MAXSIZE = 100MB,

--FILEGROWTH = 5MB

4. Now run the following command to stop&start your SQL server

Net stop mssqlserver && net start mssqlserver

How to: Database Service fails to start due to log full of model database_第2张图片

 

Hope it helps the guys need help.

你可能感兴趣的:(database)