Groups | Blog | Home
all groups > sql server new users > february 2007 >

sql server new users : Shrink advice please


Vayse
2/15/2007 12:00:00 AM
A thirdparty application fills populates a SQL Server database, every 24
hours. It overwrites all prior data. Backup is set to Simple.

It used to import all branches, but now we've changed it so only import
certain branches. ( that is, a branch/office of the company)
The amount of data has more or less halved.
So, some questions:
1) To shrink an existing mdf and ldf - is the ole right click/Shrink
Database is the best option?
2) Ongoing, should I enable the auto shrink?
3) This database is never backed up. Its only used for reporting
purposes, and I can run the import at any time. Is there any settings I
should change to take advantage of this?

Thanks
Vayse

Hari Prasad
2/15/2007 6:52:57 AM
Hello,

Auto shrink may not be a good option. Rarther you could write a DBCC
SHRINKFILE (see books online) for the
database and schedule it execute every week or alternate days through SQL
Server Agent schedule.

Since the recovery model is SIMPLE; you do not want to backup or truncate
the log.

Thanks
Hari

[quoted text, click to view]

Bob Simms
2/16/2007 12:00:00 AM
[quoted text, click to view]
The auto-shrink option shrinks the database whenever the database has 25%
free space. Whenver. If that means peak time at 0930, then that's what it
will do. So for performance reasons it is better to do it manually. You
could get SQL agent to do it by using a maintenance plan. This will shrink
the mdf.

If you are not worried about the recoverability of your database, but the
database into simple recovery model, as this constantly truncates the log on
each checkpoint and keeps the ldf small.

Bob Simms
www.xpertise.co.uk

AddThis Social Bookmark Button