Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 MODEL Database LDF

Author  Topic 

dbalearner
Constraint Violating Yak Guru

272 Posts

Posted - 2011-03-01 : 18:29:47

The MODEL Database occupies more than 95 percent of its allocated Log Space Used.

Is it ok to keep it like this or needs something to do (Since it is System database can't do much).

Can anyone have any ideology for this.

Thanks in Advance.

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-03-01 : 18:34:15
You can do almost anything to model except DROP it and change certain minor settings.

95% isn't that important, what's the size of the log file? If it's larger than 8 or 16 MB then you should check for unwanted data or objects that might have been accidentally created in model.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-03-01 : 18:49:20
What recovery model is MODEL? If it's not SIMPLE, then is MODEL excluded from your tlog backups for some odd reason?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

dbalearner
Constraint Violating Yak Guru

272 Posts

Posted - 2011-03-01 : 18:54:38
Thanks for that reply.

I have 164 MB on Model Log Space currently, (perhaps it is less as what you might say) but my MDF for Model is 1 MB.

Based on this assumption, how to reduce this unwanted space.

Also, I dont have any unwanted objects residing on this database apart.

Please advise, Thanks.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-03-01 : 19:00:42
You can use DBCC SHRINKFILE to reduce the file size, but you'll first need to truncate the log or back it up.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

dbalearner
Constraint Violating Yak Guru

272 Posts

Posted - 2011-03-01 : 19:09:23
Thanks All.

However, MODEL is FULL Recovery Model.

What would be the difference if I am not procured Backup Log OR Truncate the Log for MODEL?


What would be the best time to do (During business hours OR After hours).

Thanks once again.
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-03-01 : 20:14:53
You can do anything you want to model at any time. It's not used by the system for anything except as a...wait for it...model for new databases, particularly for tempdb when SQL Server is (re)started. It's useful for setting defaults: file size and growth increment, recovery model, ANSI settings, and so on. These can always be overridden on a new database.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-03-02 : 13:10:56
Add the MODEL database to your tlog backup plan. Why are you excluding it in the first place?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -