How can we help you today? How can we help you today?
Gladiatr
Hi Petey, Thanks for replying to my post. On the production server (PS) we have a job schedule to run every 10 minutes executing the following command to generate a transaction log file locally: DECLARE @exitcode int DECLARE @sqlerrorcode int exec master..sqlbackup N'-sql "BACKUP LOG [Application] TO DISK = ''E:\SQLbackups\Transaction Logs\Application_Log_<DATETIME yyyymmdd_hhnnss>.sqb'' WITH NAME = ''<AUTO>'', DESCRIPTION = ''<AUTO>'', PASSWORD = ''<ENCRYPTEDPASSWORD>password==</ENCRYPTEDPASSWORD>'', KEYSIZE = 256, MIRRORFILE = ''\\LS2\Solomon\Application_Log_<DATETIME yyyymmdd_hhnnss>.sqb'', COMPRESSION = 3, THREADS = 1"', @exitcode OUTPUT, @sqlerrorcode OUTPUT IF (@exitcode <>0) OR (@sqlerrorcode <> 0) BEGIN RAISERROR ('SQL Backup job failed with exitcode: %d SQL error code: %d', 16, 1, @exitcode, @sqlerrorcode) END Once this job executes, it creates a sqlbackup log file locally on the PS and then it mirrors the log file to the standby server (LS). The following log file generated when we had the space issue on the PS with the log file of zero size. Here is the log: SQL Backup log file 10/11/2008 2:00:01 AM: Backing up Application (transaction log) to: E:\SQLbackups\Transaction Logs\Application_Log_20081011_020001.sqb \\LS2\Solomon\Application_Log_20081011_020001.sqb 10/11/2008 2:00:01 AM: BACKUP LOG [Application] TO DISK = 'E:\SQLbackups\Transaction Logs\Application_Log_20081011_020001.sqb' WITH NAME = '<AUTO>', DESCRIPTION = '<AUTO>', PASSWORD = 'XXXXXXXXXX', KEYSIZE = 256, MIRRORFILE = '\\LS2\Solomon\Application_Log_20081011_020001.sqb', COMPRESSION = 3, THREADS = 1 Thread 0 warning: Warning 210: Error writing to backup file: E:\SQLbackups\Transaction Logs\Application_Log_20081011_020001.sqb Warning: System error code: (There is not enough space on the disk) 10/11/2008 2:00:06 AM: Backup data size : 49.500 MB Processed 5698 pages for database 'Application', file 'Application_Log' on file 1. BACKUP LOG successfully processed 5698 pages in 3.749 seconds (12.450 MB/sec). The following command restore the logs on the LS: DECLARE @exitcode int DECLARE @sqlerrorcode int exec master..sqlbackup N'-sql "RESTORE LOG [Application] FROM DISK = ''E:\Solomon\Application_Log_*.sqb'' WITH STANDBY = ''E:\DATABASES\UNDO\UNDO_Application.DAT'', PASSWORD = ''password'', MOVETO = ''E:\Solomon\ApplicationTransactionLogArchive\''"', @exitcode OUTPUT, @sqlerrorcode OUTPUT IF (@exitcode <>0) OR (@sqlerrorcode <> 0) BEGIN RAISERROR ('SQL Backup job failed with exitcode: %d SQL error code: %d', 16, 1, @exitcode, @sqlerrorcode) END When I try to restore the file from the LS which was generated by the MIRRORFILE option produces the following log: SQL Backup log file 10/11/2008 2:10:00 AM: Not a SQL Backup nor native backup file: 'E:\Solomon\Application_Log_20081011_020001.sqb' Since this happens, I have to always restore the full backup once again then apply the individual log files to make the log shipping working. Being in the following situation, this made me think that the MIRRORFILE option is no more reliable. This is just one database example I mentioned here. I have 18 other databases running on the PS and jobs similar to the one I mentioned above to generate sqlbackup logs and because of this space issue those jobs obviously created 0 size file but at the LS end the MIRRORFILE option looks like created a reliable restorable transaction log file but it fails only when you try to restore those logs on the LS. So the outcome, my log shipping breaks everytime the space issue arises. Your help is appreciated. Thanks again. -gladiatr. / comments
Hi Petey, Thanks for replying to my post. On the production server (PS) we have a job schedule to run every 10 minutes executing the following command to generate a transaction log file locally: DE...
0 votes
Matthew Flatt wrote: Hi, Thank you for your post into the forum. Unfortunately there isn't a way to fix these corrupt transaction log files, so if you do not have a local copy on the source server your database will need to be reseeded. In your job scripts, you are using the MIRRORFILE option, if you have now resolved your source server space issues I would advise replacing this with COPYTO. You should then have a good transaction log backup file available on your source server if the copied file does get corrupted. You may wish to use a different program to replace this copying process if you get a lot of logs which become corrupted. Our CopyTool written by Petey may work for you and is available from Here I hope this helps, Hi Matthew, I have a question now regarding this CopyTool. As you have suggested in your earlier reply to use the CopyTool to copy logs file. I have already setup my logshipping in this way now. Now, there is a new problem I discovered today when we again ran out of space on the production server but this time on the C: drive. When I investigated the cause I found out that there was a huge file created by this CopyTool on the C: drive under FTPTools folder in Document and Settings\All Users\Application Data\FTPTools. The size of this file was over 1GB. Now, my question is there any way to change the path of the this CopyTool error log file to some other drive by using parameters like /use or /filelist etc. Or, is there any way not to create this error log file? My other question is, this is a CopyTool so why it is creating an FTPTool folder instead in Document and Settings\All Users\Application Data. Please provide your feedback on this. Also please let me know what /INITLIST exactly does when used. Thanks. -Gladiatr. / comments
Matthew Flatt wrote: Hi, Thank you for your post into the forum. Unfortunately there isn't a way to fix these corrupt transaction log files, so if you do not have a local copy on the source serv...
0 votes
Matthew Flatt wrote: Hi, Thank you for your post into the forum. Unfortunately there isn't a way to fix these corrupt transaction log files, so if you do not have a local copy on the source server your database will need to be reseeded. In your job scripts, you are using the MIRRORFILE option, if you have now resolved your source server space issues I would advise replacing this with COPYTO. You should then have a good transaction log backup file available on your source server if the copied file does get corrupted. You may wish to use a different program to replace this copying process if you get a lot of logs which become corrupted. Our CopyTool written by Petey may work for you and is available from Here I hope this helps, Thank you Matthew for replying to my post. I didn't get a chance to check your reply earlier since we are busy in upgrading our SQL 2000 database engine to SQL 2005. I understand we can't fix the corrupt transaction log files, however, it would be nice in future if we can do this as well, but I have couple of questions below now: Firstly, I ran into space issue on my PS server and I'm using the MIRRORFILE option, isn't it the job would generate the warning message in the SQLBackup eventlog about running out of space on the PS but at the same time it would mirror the same transaction log on my Standby (LS) server even the job is unable to backup the transaction log backup on the PS machine. According to my understanding this is what MIRRORFILE option is suppose to do. Secondly, the reason we used the MIRRORFILE option is we would like to keep a transaction log backup on the PS as well as on the LS together. If I use the COPYTO option the transaction log backup that is being happening on the PS would copy the corrupt log backup to the LS as well, then this way I would end up having two copies of the corrupt transaction log backup file. Atleast, by using the MIRRORFILE option I have an advantage of a good file on either of the servers. And thirdly, we are keeping the transaction log files on our PS because we have an additional drives on the PS for this purpose with RAID capabilities and we are mirrioring the transaction log backups to the LS so in case of disaster or space issue we can have atleast one fully trusted working transaction log backup. Please put some light on this. Also, thank you for providing me the link to the CopyTool written by Petey I will definitely try this as well. I appreciate your help. Thanks. -gladiatr / comments
Matthew Flatt wrote: Hi, Thank you for your post into the forum. Unfortunately there isn't a way to fix these corrupt transaction log files, so if you do not have a local copy on the source serv...
0 votes
Hi, Is there a way to convert SQLBackup 5 (.SQB) file format to SQLBackup 6 or higher file format. I would like to use the SQLVirtual Restore to mount the .sqb files that were backed up in SQLBackup 5.4. Thanks. -Muneeb / comments
Hi, Is there a way to convert SQLBackup 5 (.SQB) file format to SQLBackup 6 or higher file format. I would like to use the SQLVirtual Restore to mount the .sqb files that were backed up in SQLBacku...
0 votes
Thanks Peter for replying me. Let me try to explain it to you what I am trying to achieve. We have two servers (Production and Backup) running currently in our organization. An SQL Server instance is running on the production server which has got some critical databases running. There are also a couple of daily nightly full backup jobs scheduled on the Production server which are responsible for the daily nightly backup of our critical databases. Every night these jobs does the database full backup on one of the local hard drives on the production server and later the same job copies that database full backup to our Backup server and then all the databases from the Backup server transferred to the Tape drive. This way we have the last nights latest full backup of all our databases on the production server as well as on the backup server and also on the tapes. I am using the TO DISK command to created the full backup on the local Production server and later using the COPYTO command to replicate the backup to the Backup server. With the help of FILEOPTIONS=4 I am able to overwrite the full backup files on the Backup server. Using the senerio I mentioned above I can have the full backups of all our database at three different locations i.e. Production, Backup servers and Tape drive. Now my problem is if lets say last nights job on the production server creates a backup on the local drive which is on the production server and if in any case the backup gets corrupted and later the same job copies the files across the network to the backup server and then later copies to the Tape drive then we end up having a corrupted backup overall on three different locations which is no use to us. Here instead of using the COPYTO command I would like to use the MIRRORFILE command which create the full backup on the production server and later we have the mirror file as well on the backup server. In this case if the backup corrupts on the production server I will have the working mirror file on the Backup server and on Tape. Here I would like to keep the mirror files for 7 days of each database we have and once the 8 day backup is started we would like the SQL Backup to delete the files only keep the latest 7 days files. I was reading the SQL Backup help and found out that FILEOPTIONS parameter can only work with the DISK and COPYTO command but it does not work with the MIRRORFILE command. Am I right? and also the ERASEFILES and ERASEFILES_ATSTART also works with the FILEOPTIONS and COPYTO command but not the MIRRORFILE command. Am I correct? Is there any way that I can use the DISK, MIRRORFILE and FILEOPTIONS=1? Please help. Thanks. / comments
Thanks Peter for replying me. Let me try to explain it to you what I am trying to achieve. We have two servers (Production and Backup) running currently in our organization. An SQL Server instance ...
0 votes