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.
aneilgAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

s___kCommented:
Look in SQL Server Agent -> Jobs -> Notifications
Also you'll need to configure Operator to send Mail
0
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                        %
0
s___kCommented:
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
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

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
0
s___kCommented:
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
0
aneilgAuthor Commented:
sorry to be a apin, i get 63174

do you think 70000 mb
and 10% looks ok
0
s___kCommented:
It depends on what your db is intended for and your server resources.
Shrinking database removes only unused space
0
Guy Hengel [angelIII / a3]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.
0
aneilgAuthor Commented:
partially answered.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.