Results 1 to 2 of 2

Thread: BackUp Script

  1. #1
    Join Date
    Jun 2006
    Posts
    28

    BackUp Script

    I was wondering if someone can help me with the backup copy script. I am using the following script.

    BACKUP DATABASE [NewUniverse] TO DISK = 'D:\IND-SAPSQL\BackUp\NewUniverse.bak' WITH INIT , NOUNLOAD , NAME = N'universes backup', NOSKIP , STATS = 10, NOFORMAT

    The script works nicely, however I am interested in using expiration date or retain days. So I wrote the following script for retain days


    BACKUP DATABASE [NewUniverse] TO DISK = 'D:\IND-SAPSQL\BackUp\NewUniverse.bak' WITH INIT , NOUNLOAD , NAME = N'universes backup', NOSKIP , RETAINDAYS = 2, STATS = 10, NOFORMAT

    The script fails as the file expiration date is less than 2 days, which is what it is supposed to do. Hmm I am trying to find a way where the script should still be able to backup the database by creating another file.


  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    You have to use different backup file name. By the way, why don't just use maintenance plan?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •