July 14, 2014 at 7:05 pm
Good afternoon all,
I have a 3rd party product which creates an agent job to run full backups each night.
The job is:
EXEC xp_cmdshell 'DEL E:\Shared Data\MyBackup\MYDATABASE02.bak'
EXEC xp_cmdshell 'REN E:\Shared Data\MyBackup\MYDATABASE01.bak MYDATABASE02.bak'
EXEC xp_cmdshell 'REN E:\Shared Data\MyBackup\MYDATABASE.bak MYDATABASE01.bak'
BACKUP DATABASE M1DD TO DISK = 'E:\Shared Data\MyBackup\MYDATABASE.bak'
WITH INIT, DESCRIPTION = 'Backup of DataBase (MYDATABASE)'
Problem I am having, for one client only, is that only one copy of the backup is retained (overwritten each night).
Permissions appear correct, agent account is correct, xp_cmdshell is enabled, I am running out of ideas and don't like to spend a lot of time 'mucking around' where backups are concerned...sooner resolved the better.
Anyone have any ideas I haven't though of?
“Program (pro’ gram) n. a logical sequence of operations to be performed by a computer that usually results in error messages, v.t. to engage in an activity similar to banging one’s head against a wall.”
July 14, 2014 at 7:20 pm
sounds like the database you are having issues with could still be backing up at the same time you are trying the rename the file from 01 to 02 or maybe something else is locking the .bak?
July 14, 2014 at 7:26 pm
Shaun Finnegan (7/14/2014)
sounds like the database you are having issues with could still be backing up at the same time you are trying the rename the file from 01 to 02 or maybe something else is locking the .bak?
I created a new, empty backup dir and found that the issue is the same there...the baks are overwritten without the rename being run.
“Program (pro’ gram) n. a logical sequence of operations to be performed by a computer that usually results in error messages, v.t. to engage in an activity similar to banging one’s head against a wall.”
July 14, 2014 at 7:37 pm
what's the message when you run each of those commands separately from SSMS?
Who's the owner of the SQL Agent job?
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply