| Author |
Topic |
|
rudba
Constraint Violating Yak Guru
415 Posts |
Posted - 2009-02-03 : 09:58:00
|
| Hi guys,How do i replace the already backup db |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-03 : 09:59:02
|
| replace? do you mean restore your db with last backup? |
 |
|
|
rudba
Constraint Violating Yak Guru
415 Posts |
Posted - 2009-02-03 : 10:05:04
|
| Thanks visakh16,No, i have to backup db using script. So every week the backup script run. So i have to replace or delete exist backup db and creating new backpu. |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-02-03 : 10:17:42
|
quote: Originally posted by rudba Thanks visakh16,No, i have to backup db using script. So every week the backup script run. So i have to replace or delete exist backup db and creating new backpu.
Add INIT to Backup script |
 |
|
|
rudba
Constraint Violating Yak Guru
415 Posts |
Posted - 2009-02-03 : 10:23:10
|
| Yes, I did like this:BACKUP DATABASE TestDb TO DISK = 'E:\Db_Backup\TestDb.bak' WITH RETAINDAYS = 7, INITgot this error:Msg 4030, Level 16, State 1, Line 1The medium on device 'E:\Db_Backup\TestDb.bak' expires on Feb 4 2009 10:10:27:000AM and cannot be overwritten.Msg 3013, Level 16, State 1, Line 1BACKUP DATABASE is terminating abnormally. |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-02-03 : 10:26:20
|
| Probably you set expire data while backing up. It should be left as default. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-03 : 10:27:17
|
| http://www.sqlserverdba.co.cc/2008/12/medium-on-device-bak-expires-on-and.html |
 |
|
|
rudba
Constraint Violating Yak Guru
415 Posts |
Posted - 2009-02-03 : 10:29:37
|
| thanks guys, |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-03 : 10:30:56
|
| refer the link. try using SKIP |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-02-03 : 10:31:40
|
| You can't replace unexpired backup.Copy that backup to other location or tape and start fresh new backup. |
 |
|
|
rudba
Constraint Violating Yak Guru
415 Posts |
Posted - 2009-02-03 : 10:34:27
|
| Thanks guys. |
 |
|
|
|