SQL LanguageSQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
I have the following statement being run in an SQL Server 2000 Job:
Backup Database DBName To Disk='C:\Path\DBName.bak'
Every time this runs it appends to the existing file (the last scheduled backup) This makes the file size grow and grow and grow.Eg if the first .bak file was 10Mb the next back up will push the file size to 20Mb even though there has been no more data in the tables. Can I alter this statement to replace or overwrite the existing file?
Take a look at EXPIREDATE and RETAINDAYS in BOL for Backup Database
âI sense many useless updates in you... Useless updates lead to defragmentation... Defragmentation leads to downtime...Downtime leads to suffering..Defragmentation is the path to the darkside.. DBCC INDEXDEFRAG and DBCC DBREINDEX are the force...May the force be with you" -- http://sqlservercode.blogspot.com/