Restore 2005 backup to 2008 database

Posted on 2011-10-19
Last Modified: 2012-05-12
I was under the impression you could do this however when I try when I select the backup file as the source I get an error dialog saying

"Specified cast is invalid. (SQLManagerUI)"

Am I missing something?

Question by:Philip Pinnell
    LVL 9

    Accepted Solution

    Try running the below code

    RESTORE DATABASE [DBName] FROM  DISK = N'D:\backFileName.bak' 
    WITH  FILE = 1,  MOVE N'DBName' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\DBName_11.mdf',  
    MOVE N'DBName_log' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\DBName_11.ldf',  
    PASSWORD = 'password'

    Open in new window

    LVL 16

    Author Comment

    by:Philip Pinnell
    Got an error with that too but tried another backup which worked so I may have a corruption
    LVL 10

    Assisted Solution

    it is the issue with the management studion , just save your resture script as script.sql

    sqlcmd -E -S .\SQLEXPRESS -i script.sql -o logreport.log
    LVL 16

    Author Comment

    by:Philip Pinnell
    Another backup worked ok so I guess it must have been some sort of corruption
    LVL 10

    Expert Comment

    please checck the database using the query

    restore verifyonly from disk='c:\***********path of the backup file'

    RESTORE  filelistonly
    from disk = 'C:\Krishna\Krishnafile pathn.bak'

    LVL 16

    Author Closing Comment

    by:Philip Pinnell
    Thanks for all help

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Suggested Solutions

    In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
    This video discusses moving either the default database or any database to a new volume.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the fileā€¦

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now