0

I have a Windows server 2012 instance running SSMS 2014. I connect to that computer from a Windows 7 machine also running SSMS 2014.

When I perform a backup and copy the .bak file from the server to my local machine and try to run a restore, whenever I select the file as the source device, and then click "Contents" it generates an error that says "Object cannot be cast from DBNULL to other types."

The other direction, creating a backup on my local machine and then copying it via RDC to the server and performing a restore works without any issues. But regardless of the database, pulling it down from the server and trying to restore on my local machine causes this error.

Has anyone else run into this issue? I've additionally tried performing a restore with a query instead of the GUI but it pretends that the file is corrupted. Copying the same file back onto the remove server via RDC lets me read it in on the server without any issue however, so I suspect the file is just fine.

Any help is greatly appreciated, thanks.

ercmcd
  • 143
  • 1
  • 1
  • 9
  • Do you have SQL Server 2014 installed on your PC ? Having SSMS 2014 doesnt necessarily mean you have SQL Server 2014, Also once you have copied the backup from server to your pc do a `RESTORE HEADERONLY FROM DISK = C:\...bakupfile.bak` and paste the results here . – M.Ali Jun 22 '16 at 01:10
  • SSMS has almost nothing to backup / restore. SSMS is just an interface between MS SQL Server (any version) and your eyes. Restore statement requires that the server you are restoring to is the same version or newer. Additionally too large backups cant be restored to Express versions. (2GB restriction). Also backup location must be accessible to an account which runs restore command. – Alex Kudryashev Jun 22 '16 at 01:33
  • You need to do a restore, or mount the backup file using one of the tools such as [SQL .bak recovery software](http://www.mdfviewer.com/recovery/backup/) – Jason Clark Jun 22 '16 at 05:40

1 Answers1

0

The error message looks like its from SSMS, not a TSQL error on the server.

Given that it works locally, and not remotely, I would guess it is something to do with how you are referencing the remote file (remember that when you ask SQL Server to do a remote restore, you need to give it the full UNC path to the remote files location).

I would recommend that you have a look at Books Online to get the correct format for doing a TSQL restore over a UNC path, and give that a go (Rather than using SSMS from your local machine).

Smurf
  • 361
  • 1
  • 3