Solved

Database 'model' transaction logs are full and I can't start SQL...

Posted on 2010-08-31
1
307 Views
Last Modified: 2012-06-22
SQL will start right now and then stop about 3 seconds after and I see the following entry in the event viewer:

The transaction log for database 'model' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases

However, I can't go into the management studio or anything because it's won't allow it to start long enough for me to connect. How can I empty the transaction logs for 'model' without being in SQL management studio to run a query?

This is SQL 2005 by the way...
0
Comment
Question by:willlandymore
1 Comment
 
LVL 28

Accepted Solution

by:
Ryan McCauley earned 500 total points
ID: 33568383
The "Model" database is what SQL Server uses as the baseline for creating new databases - it doesn't have any actual data in it. If you have another copy of SQL Server elsewhere on your network (as long as it's the same version or lower), you can just replace the model.MDF and model.LDF files with the ones from the other server, and then SQL should start without a problem.

If you don't have another SQL Server instance handy, you'll need to rename the log file, then start SQL Server (which will flag the model database as "Suspect", since the log is missing). Once it does that, you can ask SQL Server to recreate the log file from scratch. See this link for instructions on recreating a log file when it's missing:

http://www.tech-recipes.com/rx/1867/sql_server_2005_how_to_attach_or_reattach_a_database_missing_the_ldf/
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SHOWPLAN permission denied in database 'AdventureWorks'. 13 111
Stored procedure 4 35
Can Unique column have more than one Null? 8 54
Unable to save view in SSMS 21 73
Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question