SQL Server Please use the with move option to identify the valid location of the file

xiaoxiao2021-04-06  315

Please use the with move option to identify the valid location of the file

2008-10-22 14:50

466 people read

Comments (0)

Collect

Report

The mistake is as follows:

Device activation errors. Physical file name C: / program files / ST2008 / SXT.MDF may be wrong

File SXT_DAT 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 errors. Physical file name C: / program files / ST2008 / SXT.LDF may be wrong

File SXT_LOG 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 the same as full backup, library name and company.

Solve the problem:

- Database file name problem

- Execute the following statement in the query analyzer to solve

RESTORE DATABASE 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 File C: /sxt.mdf

Move 'sxt_log' to 'c: /sxt.ldf' - Restore SXT_LOG to File C: /sxt.ldf

Backup databases can be used:

Backup Database Basename to Disk = 'filename'

转载请注明原文地址:https://www.9cbs.com/read-132285.html

New Post(0)