Sql Server 2005 model log has reached 93%

I have tried backing up the database and shrinking the model database.  I am unable to figure out how to shrink it down.  The model log is set to 89 MB with 10% unrestricted growth.  Space available shows .08 MB.  The recovery model is set to full.  Autoshrink is not enabled.  Does anyone out there have a solution to this?  
Who is Participating?
chapmandewConnect With a Mentor Commented:
OK, can you close this out?
Have you tried dbcc shrinkdb('model',20) ?
Chris MangusDatabase AdministratorCommented:
Model should never be growing unless you've grown it manually, or used it.

Model is truly a model for any new database you create via the GUI.

Why are you trying to shrink it?  If it is a problem I'd copy the model .mdf and .ldf from another server.  Stop your SQL service on this server and copy the .mdf and .ldf from the other server over this, then restart SQL services.
A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

CTGSEAuthor Commented:
No I haven't.  Where would I do this from?
In management studio.  try this script:

use model

dbcc shrinkdb('model',20)

cmangus is right though...this db shouldn't be growing.  I would say that someone has it as their default db for one reason or another and has been creating objects there.  Just move them to a different db.
Anthony PerkinsCommented:
Before you can do a DBCC SHRINKFILE you are going to have to take care of the Transaction Log.  That means backing it up.

But yes, I agree, you have bigger problems than that.
No need to back up the trans log file for the model database....you probably shouldn't have it in full recovery mode anyway.  Just truncate the log...


It usually isn't advisable to do this, but in this case I think it is OK.
CTGSEAuthor Commented:
I thought I would post back since I am seeking another issue.

Resolution:  I created a maintenance plan to backup the transaction logs to free up unused logs.  This seemed to have helped with many of my clients.  Thanks for all of the replies.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.