How can we help you today? How can we help you today?

Error: Could not convert variant of type (Null) into type...

I am getting the following error in my log file for SQL Backup:

Error: Could not convert variant of type (Null) into type (Int64)

My backup job is failing with exitcode 500. Here's the relevant events and logs:

Job step output:

Executed as user: 3NET\SQLServerService. FULL_(local)_Eor_20060927_004500.sqb [SQLSTATE 01000] (Message 0) SQL Backup job failed with exitcode: 500 SQL error code: 0 [SQLSTATE 42000] (Error 50000). The step failed.


Events:

3455 :
Analysis of database 'Eor' (7) is 100% complete (approximately 0 more seconds)

18267 :
Database restored: Database: Eor, creation date(time): 2005/06/10(11:15:16), first LSN: 48675:47337:1, last LSN: 48675:47359:1, number of dump devices: 1, device information: (FILE=1, TYPE=VIRTUAL_DEVICE: {'SQLBACKUP_D5850EF7-FD9B-4931-92A3-25C017E4DA37'}).


Logs:

SQL Backup log file
9/28/2006 3:01:30 AM: Reading file header of "F:\MSSQL\Backup\Eor\FULL_(local)_Eor_20060927_004500.sqb"

9/28/2006 3:01:30 AM: RESTORE HEADERONLY FROM DISK = 'F:\MSSQL\Backup\Eor\FULL_(local)_Eor_20060927_004500.sqb'

9/28/2006 3:02:16 AM: Error: Could not convert variant of type (Null) into type (Int64)


SQL Backup log file
9/28/2006 3:02:17 AM: Restoring Eor (database) from:
F:\MSSQL\Backup\Eor\FULL_(local)_Eor_20060927_004500.sqb

9/28/2006 3:02:17 AM: RESTORE DATABASE [Eor] FROM DISK = 'F:\MSSQL\Backup\Eor\FULL_(local)_Eor_20060927_004500.sqb' WITH RECOVERY, MOVE 'Eor_Data' TO 'f:\MSSQL\Data\Eor_Data.mdf', MOVE 'Eor_Log' TO 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\Eor_Log.ldf', REPLACE

Processed 246696 pages for database 'Eor', file 'Eor_Data' on file 1.
Processed 2 pages for database 'Eor', file 'Eor_Log' on file 1.
RESTORE DATABASE successfully processed 246698 pages in 78.234 seconds (25.832 MB/sec).


Thanks for any help.
Keith_Walton
0

Comments

1 comment

  • petey
    It appears that you are retrieving the backup header (RESTORE HEADERONLY ...) prior to actually restoring the database. RESTORE HEADERONLY failed, but the restore process itself succeeded.

    I do not know why SQL Backup failed to restore the header. I can only guess that the header is corrupted. I would suggest running DBCC CHECKDB to ensure that the database itself is consistent.

    Is this the first time you are encountering this error? If you ran the same command (RESTORE HEADERONLY FROM DISK = 'F:\MSSQL\Backup\Eor\FULL_(local)_Eor_20060927_004500.sqb'
    ) from Query Analyzer, do you get the same error?
    petey
    0

Add comment

Please sign in to leave a comment.