SQL Backup

Is it possible for the SQL backup file will be override each time rather than appending to the existing one ? Where can I modify this setting ?

Is it possible to send out an notification email after each backup ?

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

ste5anSenior DeveloperCommented:
Right click on the backup task and change it..

Sure. But you must correctly setup Database Mail first.
AXISHKAuthor Commented:
Can you show the setting through a screenshot ?

How can the Database mail linked to my SQL Backup job ?

Vikas GargBusiness Intelligence DeveloperCommented:

You can use property window to change from Append to Overwrite
as shown in the image

and for mail notification you can configure DBMAIL as shown in below link


Hope this will help

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
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

ste5anSenior DeveloperCommented:
Please read the Database Mail documentation first. Otherwise even with a cooking receipt it's later hard to understand and modify.
AXISHKAuthor Commented:
Tks. How to link the job to a email alert ?

Tks again.
ste5anSenior DeveloperCommented:
David ToddSenior DBACommented:

Take a look at what Ola Hallengren's script does. It adds the datetime etc to the backup filename, so each backup creates a separate unique file.

I no longer write my own backup routines. Instead I use Ola's.


PS What the others said about using Database mail, adding that to the SQL Agent profile, then adding operators and getting a notification on a job that fails.

Brent Ozar's sp_Blitz checks for enabled scheduled jobs that don't have a failure notification.
nemws1Database AdministratorCommented:
If you ever do a backup via SQL, add the "INIT" option (and make sure you don't have "NOINIT" set) and it will overwrite the previously existing backup.  I agree with others though - use Ola Hallengren's maintenance script - it is excellent.

BACKUP DATABASE [AdventureWorks2008R2]
	TO DISK = N'F:\Backup\AdventureWorks2008R2_FULL.bak'
	, NAME = N'AdventureWorks2008R2-Full Database Backup'
	, STATS = 5

Open in new window

Steve WalesSenior Database AdministratorCommented:
Just be aware that if you are overwriting the previous backup ... and that's ALL you are doing, you are exposing yourself to a serious failure.

Say you start your backup at 8PM and it takes 45 minutes.

Each night you overwrite your backup.

What happens if you have a critical failure at 8:30 PM?

You've overwritten your last good backup and your current backup hasn't finished yet.

Be aware of that.   You can set up maintenance plans to clean up old backups and set up your backups to write a new file very night with date and time appended (or use Ola Hallengren's scripts as a base as indicated by David Todd above).
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 2008

From novice to tech pro — start learning today.

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.