Cannot Restore 2012 full bak in 2012 sql ent: Object cannot be cast from DBNull to other types

good morning team,

Cannot get a restore started and right of the bat I am getting the following message:
Object cannot be cast from DBNull to other types

I have following and they are fail:

sql server 2012 developers edition
sql server 2012 developers edition with service pack 2
sql server 2012 developers edition with Enterprise components + sp2
sql server 2012 enterprise edition with sp2

So, is it safe to assume that the given BAK file is corrupt?
Any information would be grand.
thx

JohnE
John EsraeloDatabase / SQL DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

QlemoBatchelor, Developer and EE Topic AdvisorCommented:
How did you create the backup file?
0
John EsraeloDatabase / SQL DeveloperAuthor Commented:
Qlemo


We have received this from a 3rd party's download site and the attached is the information about the file.download site and file infothx

JohnE
0
John EsraeloDatabase / SQL DeveloperAuthor Commented:
By the way Qlemo, this is a single file as you see in the bottom of the image and the information on the top is based on the "filelistonly" displaying the content of the list.

Is there a way to restore those pieces individually ?
just thinking, not sure.
thx

JohnE
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

John EsraeloDatabase / SQL DeveloperAuthor Commented:
Restore Header Only returns the following :
*** INCOMPLETE ***      NULL      NULL      NULL      NULL      1      NULL      NULL      NULL      NULL
0
John EsraeloDatabase / SQL DeveloperAuthor Commented:
more information on this:

Msg 3241, Level 16, State 1, Line 2
The media family on device 'C:\DBA\DB_ToRestoreFrom.BAK' is incorrectly formed. SQL Server cannot process this media family.
Msg 3013, Level 16, State 1, Line 2
RESTORE DATABASE is terminating abnormally.
0
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
Am I correct that the first part of the screenshot is the result of running the filelostonly on the remote site? The last comment tells us the file is incomplete - maybe compare the size of the original and the downloaded file?
0
John EsraeloDatabase / SQL DeveloperAuthor Commented:
Here are some observations and possible issues with this DB.
But, not sure, so I went ahead and sent an email to the 3rd party to redo the backup file.
Here are couple of things.
1> the ftp download link does not allow nor show if there is a binary option or text option to down load from
2> previously dealing with them we had 2012, now, if they have changed to a higher version and did not disclose then this possible error may come up
3> the backup is simply corrupt
Other than these I am not sure what to look for unless you have better answers and can point me to a better direction.
thx

JohnE
0
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
You can use a "downlevel" backup on more recent SQL servers without issues. DB will get upgraded automatically after the backup has been restored. We do that with a 2000 template DB, and it works with 2012 without issues.
0
John EsraeloDatabase / SQL DeveloperAuthor Commented:
Qlemo,

It seems like the size of bak file does not match the total sizes on the fileList, right?


JohnE
0
John EsraeloDatabase / SQL DeveloperAuthor Commented:
Are you saying that we should be able to restore a DB (>2012) in SQL server 2012?
0
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
1. The file size of the filelist info does not need to match - the backup might be compressed. And the backup does only contain open transactions not yet comitted to the data files, but the filelist tells to full size.
Compare the file size of the BAK file on the site with your local one.

2. No, it is reversed. You can use older backups with newer SQL Server releases, but not newer backups with older SQL Servers.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
John EsraeloDatabase / SQL DeveloperAuthor Commented:
I just went ahead and installed 2014 dev just in case if they have used the upper version and while awaiting their responses.
Also, I was thinking about what if they have used a 3rd party backup software such as LiteSpeed then that would fail too, right?
0
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
Using a 3rd party app would be stupid, if not negotiated to do so.
0
John EsraeloDatabase / SQL DeveloperAuthor Commented:
good assistance and laying out the possibilities of what may have gone wrong.
thx
0
John EsraeloDatabase / SQL DeveloperAuthor Commented:
Q: you don't think that the ndf files are causing this error,   do you ?
(see the original attachment)
0
John EsraeloDatabase / SQL DeveloperAuthor Commented:
anyway, I went ahead and created all the ndf files with the same names, matching the snap-shot, and the "verifyonly" command indicates "read on ...bak failed: 13 (the data is invalid)
I am convinced.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2012

From novice to tech pro — start learning today.