Restoring Logs - Empty Logs

  • I have a job that retrieves log files from an FTP site, then restores them into a local database.

    The issue I am having is if a log file is empty, the restore aborts and I have to remove the empty log file from the directory. Then restart the process.

    Is there anything I can run that will let me know that the logfile is empty so I can automate this process?

  • What method are you using to load the log file. SSIS, bulk insert, etc?

  • EXECUTE master..sqlbackup '-SQL "RESTORE LOG [XXX] FROM DISK = ''D:\xxx\TransactionLogs\*.sqb'' WITH PASSWORD = ''xxxx'', MOVETO = ''D:\xxx\TransactionLogs\Processed'', STANDBY = ''D:\XXX.undo'', DISCONNECT_EXISTING, ORPHAN_CHECK"', @exitcode OUTPUT, @sqlerrorcode OUTPUT

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply