Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > SQL Language
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
SQL Language SQL 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 24th, 2005, 10:50 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default Back Up DataBase Syntax (Jobs)

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?

Thank you in advance

Wind is your friend
Matt
__________________
Wind is your friend
Matt
Reply With Quote
  #2 (permalink)  
Old October 25th, 2005, 07:24 AM
Authorized User
 
Join Date: Sep 2005
Location: , , .
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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/
Reply With Quote
  #3 (permalink)  
Old October 25th, 2005, 06:51 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

If I am creating a job using EM. Are these properties avaibale to me? The way I am reading them they are not.

Is it possible to create a 'scheduled job' using EM that overwrites the last .bak file

TYIA

Wind is your friend
Matt
Reply With Quote
  #4 (permalink)  
Old October 26th, 2005, 06:30 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Here is the solution for anyone interested:

The INIT is what did it

BACKUP DATABASE [DBName] TO DISK = N'C:\Inetpub\wwwroot\path\DBName.bak' WITH INIT , NOUNLOAD , NAME = N'SomeName', NOSKIP , STATS = 10, NOFORMAT

Wind is your friend
Matt
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the right back end database for PHP? charliemears PHP Databases 1 May 21st, 2008 03:44 PM
Writing back to the Database angieb1008 VB Databases Basics 0 January 4th, 2007 06:00 PM
saving table of information back into database mrjits Excel VBA 3 July 17th, 2006 01:42 PM
forum have back-end database? abdul_wasie SQL Server 2000 1 May 9th, 2005 09:11 AM
Queries on Back End database? gazolba Access 3 May 1st, 2004 11:30 AM



All times are GMT -4. The time now is 12:58 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.