-
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.
-
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
-
Forum Rules
|
|