The SQL database is ready to be restored with an error, prompting: "Device activation errors ... Please use with MOVE ... (

Source: Internet
Author: User

A database is backed up on one machine, and the backup file is hit and copied to another machine, and there is a mistake in preparing the restore, the prompt is: "Device activation error, physical file name: D:\Program   Files\Microsoft   Sqlserver\ Mssql\finance_data.mdf "may be wrong. File Finance_data cannot be reverted to D:\Program   Files\Microsoft   Sqlserver\mssql\finance_ Data.mdf. Use the WITH   MOVE   option to identify a valid location for the file ... "    workaround:  Directory not    --Detailed steps to solve the first problem: & nbsp       1. Methods in Enterprise Manager:    --Right-click "Database"    -All Tasks    --Restore Database    --"restore a number According to the library "Enter the restored database name    --Restore Select" From Device "--Select device--add--Add your backup file--OK, back to the database restore interface    -- Backup number--Select Content--Select the content you want to restore that backup    --option--Change the physical file name in "Move to physical file name" to the file name of your data file to hold    --If the database you want to restore already exists, select " Force restore on an existing database "-   -OK             2. Using the SQL statement method (assuming your backup file name is:   C:\xx.bak        --list logical file names in Backup files     restore   filelistonly   from   disk= ' C:\xx.bak '            --Use the MOVE option for statement recovery, based on the logical file name listed above     RestoRe   database   restored DB name     from   disk= ' C:\xx.bak '     with   move   ' logical data Piece name 1 '   to   ' C: Physical data file name 1 '    , move   ' logical data file name 2 '   to   ' C \ Physical data file name 2 '    . .    , move   ' logical data file name N '   to   ' C + + physical data file name n '

The

SQL database was prepared for a restore with an error, prompting: "Device activation errors ... Please use with MOVE ... (

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.