Use the with move option to identify the valid location of the file.

Source: Internet
Author: User
The error is as follows:
Device activation error. The physical file name c: \ Program Files \ st2008 \ sxt. MDF may be incorrect.
The sxt_dat file cannot be restored to c: \ Program Files \ st2008 \ sxt. MDF. Use the with move option to indicate the valid location of the file.
Device activation error. The physical file name c: \ Program Files \ st2008 \ sxt. LDF may be incorrect.
The sxt_log file cannot be restored to c: \ Program Files \ st2008 \ sxt. LDF. Use the with move option to indicate the valid location of the file.

It is a full backup. The database name is the same as that in the company.

Solution:

-- Database file name problem

-- Query analyzer and execute the following statement to solve the problem

Restore database name
From disk = 'C: \ A. Bak' -- c: \ A. Bak is the backup file name
With move 'sxt _ dat 'to 'C: \ sxt. MDF' -- Restore sxt_dat to the file c: \ sxt. MDF.
, Move 'sxt _ log' to 'C: \ sxt. ldf' -- Restore sxt_log to the file c: \ sxt. LDF.

Force restore with "with Replace ".

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.