Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
nyphalanx
Starting Member
1 Post |
Posted - 2007-06-29 : 14:40:51
|
We have a job that every 20 minutes creates a log backup and ships the log backup to another server (custom log shipping and i'll limit the needless details). We have about 40 databases that we log ship but two databases in particular we have encountered a random issue in which the log backup goes missing. These are the steps we take to generate the backup. 1- Add the backup device EXEC sp_addumpdevice 'disk', @dev_logical_name, @dev_phys_name2- Backup the log: BACKUP LOG MyDatabase TO MyDatabase_logDump With INITWe then pause for 5 seconds and check if the log backup file has been created using xp_cmdshell and a 'dir' command. Now randomly we get the message that the file was not found and this only happens for this specific database (the database gets rarely updated). Just to clarify there are no errors during the backup command because looked at the SQL Server logs to verify that it is executing the command. The file not found message points to the same directory/file that we specified in the sp_adddumpdevice procedure call so we know the file is being created in the specified location. I have gone as far as creating a windows service that monitors the folder to see if the file even gets created and it does but it instantly gets deleted. So my question is could there be a situation in SQL Server where a backup file gets created but deleted automatically during the backup process? |
|
Kristen
Test
22859 Posts |
Posted - 2007-06-30 : 05:25:25
|
"could there be a situation in SQL Server where a backup file gets created but deleted automatically during the backup process?"Maybe that's what the WITH INIT is doing ... and its just taking a little while, perhaps because the database is big and SQL Server is working out what to backup etc.personally I prefer to use BACKUP ... TO 'Some Path and Filename' rather than use the Dump Device syntax which I think is a hang-over from yesteryear!Kristen |
 |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-06-30 : 21:22:05
|
How long does log backup take? |
 |
|
|
|
|