SQL Error 4305

RudiMRudiM Posts: 11
edited October 7, 2008 3:59AM in SQL Backup Previous Versions
Hi, I am currently using Red-Gate Backup V.5 for Log Shipping between Server A to Server B. Both Servers are running SQL 2005. I keep on getting SQL Error 4305. This means as far as I can understand is that the LSN is incorrect, I double check my Logs on Server A and on Server B. No logs are missing and all in sequence. I have to manually run the log restore with in SQL 2005 using SQL Query and the log restores. I start the restore job again and it will run fine for an hour or so and then the SQL Error 4305 starts again. I only use red gate for my backup and restore procedures and there is no other processes that will interfere with Red-Gate. Any help will be much appreciated

THX
Rudi
Rudi

Comments

  • peteypetey Posts: 2,358 New member
    Could you please check the backup logs on the production server (Server A), for the correponding log backup file that generated error 4305? The default folder for the logs is C:\Documents and Settings\All Users\Application Data\Red Gate\SQL Backup\Log\<instance name>.

    Were there any warnings recorded?

    Thanks.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Log on Server A
    (The Log Failed to Restore on Server B with the error code 4305)

    SQL Backup log file 5.2.0.2825
    2008/02/10 14:40:00: Backing up Cellular (transaction log) to:
    2008/02/10 14:40:00: D:\CellularLogs\LOG__Cellular_20080210_144000.sqb

    2008/02/10 14:40:00: BACKUP LOG [Cellular] TO DISK = 'D:\CellularLogs\LOG__Cellular_<DATETIME yyyymmdd_hhnnss>.sqb' WITH NAME = '<AUTO>', DESCRIPTION = '<AUTO>', ERASEFILES = 7, COPYTO = '\\192.168.110.48\CellularLogs', COMPRESSION = 1, THREADS = 1

    2008/02/10 14:40:06: Backup data size : 73.500 MB
    2008/02/10 14:40:06: Compressed data size: 21.210 MB
    2008/02/10 14:40:06: Compression rate : 71.14%

    Processed 8698 pages for database 'Cellular', file 'Cellular_Log' on file 1.
    BACKUP LOG successfully processed 8698 pages in 4.351 seconds (16.375 MB/sec).
    2008/02/10 14:40:07: Deleting old backup file: D:\CellularLogs\LOG__Cellular_20080203_144000.sqb
    2008/02/10 14:40:09: Copied D:\CellularLogs\LOG__Cellular_20080210_144000.sqb to \\192.168.110.48\CellularLogs\LOG__Cellular_20080210_144000.sqb.
    2008/02/10 14:40:09: SQL Backup process ended.


    This is the Latest Log On server A

    (The Log Failed to Restore on Server B with the error code 4305)

    SQL Backup log file 5.2.0.2825
    2008/02/10 18:40:00: Backing up Cellular (transaction log) to:
    2008/02/10 18:40:00: D:\CellularLogs\LOG__Cellular_20080210_184000.sqb

    2008/02/10 18:40:00: BACKUP LOG [Cellular] TO DISK = 'D:\CellularLogs\LOG__Cellular_<DATETIME yyyymmdd_hhnnss>.sqb' WITH NAME = '<AUTO>', DESCRIPTION = '<AUTO>', ERASEFILES = 7, COPYTO = '\\192.168.110.48\CellularLogs', COMPRESSION = 1, THREADS = 1

    2008/02/10 18:40:31: VDI error 1010: Failed to get configuration from server. Check that the SQL Server instance is running, and that you have the SQL Server Systems Administrator server role. Error code: (-2139684861: The api was waiting and the timeout interval had elapsed.)
    2008/02/10 18:40:41: SQL error 3013: BACKUP LOG is terminating abnormally.
    2008/02/10 18:40:41: SQL error 3201: Cannot open backup device 'SQLBACKUP_E6A26A88-FFC3-4663-B1CC-858EA96F5A70'. Operating system error 0x80070002(The system cannot find the file specified.).
    2008/02/10 18:40:41:
    2008/02/10 18:40:41: Memory profile
    2008/02/10 18:40:41: Type Maximum Minimum Average Blk count Total
    2008/02/10 18:40:41:





    2008/02/10 18:40:41: Commit 68050944 4096 1168870 1546 1807073280
    2008/02/10 18:40:41: Reserve 2088960 4096 112132 311 34873344
    2008/02/10 18:40:41: Free 156958720 4096 1725827 177 305471488
    2008/02/10 18:40:41: Private 68050944 4096 1248368 1415 1766440960
    2008/02/10 18:40:41: Mapped 1060864 4096 111323 56 6234112
    2008/02/10 18:40:41: Image 24707072 4096 179459 386 69271552
    2008/02/10 18:40:41:
    2008/02/10 18:40:41: Warning 300: Backup failed. Retry attempt: 1
    2008/02/10 18:40:43: BACKUP LOG [Cellular] TO DISK = 'D:\CellularLogs\LOG__Cellular_20080210_184000.sqb' WITH NAME = 'Database (Cellular), 2008/02/10 18:40:00', DESCRIPTION = 'Backup on 2008/02/10 18:40:00 Server: CAPS Database: Cellular', INIT, ERASEFILES = 7, COPYTO = '\\192.168.110.48\CellularLogs', COMPRESSION = 1, THREADS = 1

    2008/02/10 18:40:49: Backup data size : 89.063 MB
    2008/02/10 18:40:49: Compressed data size: 28.612 MB
    2008/02/10 18:40:49: Compression rate : 67.87%

    Processed 11232 pages for database 'Cellular', file 'Cellular_Log' on file 1.
    BACKUP LOG successfully processed 11232 pages in 5.460 seconds (16.850 MB/sec).
    2008/02/10 18:40:49: Deleting old backup file: D:\CellularLogs\LOG__Cellular_20080203_183001.sqb
    2008/02/10 18:40:49: Deleting old backup file: D:\CellularLogs\LOG__Cellular_20080203_184000.sqb
    2008/02/10 18:40:53: Copied D:\CellularLogs\LOG__Cellular_20080210_184000.sqb to \\192.168.110.48\CellularLogs\LOG__Cellular_20080210_184000.sqb.
    Rudi
  • peteypetey Posts: 2,358 New member
    For the logs that failed to be restored, could you please run a RESTORE SQBHEADERONLY on that file, and the backup file prior to that? Does the 'Last LSN' value of the previous file match up to the 'First LSN' value of the file that failed to be restored?

    Thanks.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Hi
    Hope all is well.

    I read in one of the posts that SQL BackUp 5.3 sorts out a problem regarding to the LSN numbering. Will that sort out my problem? I am still having a lot of problems with my log restore. (SQL Error 4305) When the job runs on server B with the wild card for the log name

    DECLARE @exitcode int
    DECLARE @sqlerrorcode int
    exec master..sqlbackup N'-sql "RESTORE LOG [Cellular] FROM DISK = ''F:\CellularLogs\LOG__Cellular_*.sqb'' WITH STANDBY = ''C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\UNDO_Cellular.DAT'', ERASEFILES = 7, FILEOPTIONS = 1, MOVETO = ''F:\CellularLogs\done\''"', @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

    the job wil fail with SQL error 4305

    But if I run the same job in SQL Query and spesify the log name the restore job will succeed...

    Thx
    Rudi
    Rudi
Sign In or Register to comment.