Search code examples
sql-server-2008-r2database-restore

Error: Specified cast is not valid. (SqlManagerUI)


I have a backup from database in SQL Server 2008 R2. When I want to restore this backup to SQL Server, I get this error: "Error: Specified cast is not valid. (SqlManagerUI)" How to I resolve this error? Thanks.


Solution

  • There are some funnies restoring old databases into SQL 2008 via the guy; have you tried doing it via TSQL ?

    Use Master
    Go
    RESTORE DATABASE YourDB
    FROM DISK = 'C:\YourBackUpFile.bak'
    WITH MOVE 'YourMDFLogicalName' TO 'D:\Data\YourMDFFile.mdf',--check and adjust path
    MOVE 'YourLDFLogicalName' TO 'D:\Data\YourLDFFile.ldf'