October 10, 2011 at 1:48 am
Hello Every Body
I'm using sql server 2008 R2 SP1.
I have a backup file ,when i try to restore database from this backup file i see an error "Object cannot be cast from DBNull to other types. (mscorlib)"
How can I solve this problem?
October 10, 2011 at 4:06 am
Is this what you see during restore operation or after restore?
It doesn’t look SQL Server Error message.
October 10, 2011 at 4:18 am
Hi;
Is this backup is OK?
From which version of SQL it was taken and Are sure you are storing on SQL 2k8 r2 sp1? is any other Version's Instase on Box?
Ali
MCTS SQL Server2k8
October 10, 2011 at 5:01 am
what backup do you have is it from 2k8 R2 ??
give the details to get help
October 11, 2011 at 9:25 am
Sounds like a client error, are you using the Restore Database Wizard? If you are using the GUI dont. Restore the database using TSQL, search 'RESTORE DATABASE' in BOL.
Thanks
Chris
October 12, 2011 at 4:52 am
Hello
My Backup file is from sqlserver 2008 r2 sp1 and I try to restore it on another pc with sqlserver 2008 r2 sp1
When I select backup file I see error :'Object cannot be cast from DBNull to other types. (mscorlib)"'
October 12, 2011 at 5:45 am
try restoring using a query
restore database mydb from disk='<your path here>\<your backup file name>'
October 12, 2011 at 7:03 am
Hi,
I believe that your backup file is corrupted one. Please take back up again.
Please use RESTORE VERIFYONLY option to make sure if the back up is not corrupted.
You may refer this url : http://msdn.microsoft.com/en-us/library/ms188902.aspx
Best Regards,
Sudhir
October 12, 2011 at 7:17 am
CoolCodeShare (10/12/2011)
Hi,I believe that your backup file is corrupted one. Please take back up again.
Please use RESTORE VERIFYONLY option to make sure if the back up is not corrupted.
You may refer this url : http://msdn.microsoft.com/en-us/library/ms188902.aspx
Best Regards,
Sudhir
Actually that's only 99% sure. You need to restore the file to confirm it works (& ideally run checkdb as well).
October 12, 2011 at 7:25 am
Ninja is correct. The verifyonly will not necessarily prevent corruption. You need to do a restore, or mount the backup file using one of the tools, such as Red Gate's Virtual Restore (there are others) to ensure it's not corrupt.
Also, you should be using WITH CHECKSUM on your backups as well.
October 12, 2011 at 10:04 pm
Eskandari (10/12/2011)
HelloMy Backup file is from sqlserver 2008 r2 sp1 and I try to restore it on another pc with sqlserver 2008 r2 sp1
When I select backup file I see error :'Object cannot be cast from DBNull to other types. (mscorlib)"'
You can take backup again and use verify backup option (option is available in Backup screen -> Options -> Reliability -> Verify backup when finished) and try to restore it again.
Thanks
October 15, 2011 at 3:51 am
i try to restore using this query :
RESTORE DATABASE MyDatabase
FROM DISK = N'C:\MyBackup.bak'
WITH
FILE = ?,
NOUNLOAD,
REPLACE,
STATS = 10
GO
because there are many backups in 'C:\MyBackup.bak' file ,And I want to restore last file ,I don't Know What number to put in place of ?
October 15, 2011 at 6:54 am
Eskandari (10/15/2011)
i try to restore using this query :RESTORE DATABASE MyDatabase
FROM DISK = N'C:\MyBackup.bak'
WITH
FILE = ?,
NOUNLOAD,
REPLACE,
STATS = 10
GO
because there are many backups in 'C:\MyBackup.bak' file ,And I want to restore last file ,I don't Know What number to put in place of ?
Query MSDB..BACKUPSET table and search for MAX(POSITION) for your database backup.
Position:
Backup set position used in the restore operation to locate the appropriate backup set and files.
Viewing 15 posts - 1 through 15 (of 17 total)
You must be logged in to reply to this topic. Login to reply