2

I am trying to restore database created on server to my localbox however i am getting 'Error: Specified cast is not valid. (SqlManagerUI)' error message.

Server Info: Windows Server 2008 Standard 64 bit Microsoft SQL Server 2008: (Info obtained from SSMS About page)

    Microsoft SQL Server Management Studio      10.0.4064.0 
Microsoft Analysis Services Client Tools        10.0.4064.0
Microsoft Data Access Components (MDAC)         6.0.6002.18005
Microsoft MSXML                                 3.0 6.0 
Microsoft Internet Explorer                     8.0.6001.19190
Microsoft .NET Framework                        2.0.50727.4216
Operating System                                6.0.6002

My Localbox: Windows 7 64bit Microsoft SQL Server 2008:

Microsoft SQL Server Management Studio          10.0.4064.0
Microsoft Analysis Services Client Tools        10.0.4064.0
Microsoft Data Access Components (MDAC)         6.1.7601.17514
Microsoft MSXML                                 3.0 4.0 5.0 6.0 
Microsoft Internet Explorer                     9.0.8112.16421
Microsoft .NET Framework                        2.0.50727.5448
Operating System                                6.1.7601

Does anyone know how to fix this issue?

Sanjeev

3
  • What about SELECT @@VERSION on each: this is more important
    – gbn
    Mar 7 '12 at 14:14
  • where iam suppose to look for that info?
    – sanjeev40084
    Mar 7 '12 at 14:20
  • You run it as a query against SQL Server...
    – gbn
    Mar 7 '12 at 14:25
1

Generate the restore script from the GUI, instead of using the GUI to do the restore.

Then add the PASSWORD option...

--generated from the GUI dialog box
RESTORE DATABASE foo FROM  DISK = N'somepath' WITH ...

-- and add this
PASSWORD = '**password_is_this**'
GO
3
  • got this error message: Msg 3102, Level 16, State 1, Line 1 RESTORE cannot process database '<databaseName>' because it is in use by this session. It is recommended that the master database be used when performing this operation. Msg 3013, Level 16, State 1, Line 1 RESTORE DATABASE is terminating abnormally. script: RESTORE DATABASE <databaseName> from DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Backup\backup.bak'
    – sanjeev40084
    Mar 7 '12 at 14:27
  • 3
    Did you read the error? ..because it is in use by this session... You are blocking yourself...
    – gbn
    Mar 7 '12 at 14:29
  • yes, i did and no matter how many times i close the ssms and open and run the script, i still run into that error.
    – sanjeev40084
    Mar 7 '12 at 15:18
1

This was the issue: http://technoscatter.blogspot.com/2011/11/ms-sql-troubleshoot-2-specified-cast-is.html

2
  • 1
    Instead of linking to the answer, you should add details about the problem and how you resolved it.
    – Hannah Vernon
    Nov 1 '13 at 2:54
  • the page did not open.it has 404 not found Apr 23 '17 at 10:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.