sql backup shrink

I need to backup then shrink a few databases then send an email.

What’s the best option, I’ve looked at maintenance plans. But cannot find an email option.
Who is Participating?
s___kConnect With a Mentor Commented:
You can add job, which executes sql command and check in this command the size of the DB, if it is larger than x MB then shrink it.
SELECT * FROM sysfiles this will give you DB files info about size, etc
DBCC SHRINKFILE (yourdb, size)  shrink you db file
Look in SQL Server Agent -> Jobs -> Notifications
Also you'll need to configure Operator to send Mail
aneilgAuthor Commented:
thanks just another question on shrinking.

what do i need to set the following to.
MIS Data Warehouse
Size 100002MB
Space Available 1939MB

Shrink database when it grows beyond                  MB
Amount of free space after shrink                        %
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

aneilgAuthor Commented:
this is what it is at the moment. what do you recommend.

1      1      8086272      -1      128      2      0      Data       F:\Data.mdf
2      0      4714024      268435456      10      1048642      0      Data _log      E:\Data_log.ldf
As size column represents the size of data file in 8kb pages you can use this:
SELECT size * 8 / 1024  FROM sysfiles  
this gives you data file size in MB
aneilgAuthor Commented:
sorry to be a apin, i get 63174

do you think 70000 mb
and 10% looks ok
It depends on what your db is intended for and your server resources.
Shrinking database removes only unused space
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
shrink on regular basis ?
don't do that, please, you just waste I/O power when the file(s) have to grow later.
aneilgAuthor Commented:
partially answered.
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.