When SQL Server restores the database, it prompts that it cannot enable the backup device (the device has an error or the device has been detached). SQL Server cannot enable the backup device.

Source: Internet
Author: User

When SQL Server restores the database, it prompts that it cannot enable the backup device (the device has an error or the device has been detached). SQL Server cannot enable the backup device.

[Problem description]
When you perform manual backup in system management, the system prompts "the backup device cannot be turned on, E: \ Automatic Backup \ ufidau8xTmp \ UFDATA. BAK '. An error occurs on the device or the device is offline. For more information, see SQL Server error logs. -2147217900"
Click "OK" and a suggestion "1. Check the remaining disk space in the prompt path, or whether the prompt directory exists. 2. Check the prompted system library bundle path d: \ u8soft \ Admin \ server \, consistent with the mdf data file directory (ZT + account set number \ year number, this part is not saved in the system library"

[Cause]
The temporary Backup Directory cannot be written with the "cannot open backup device 'e: \ Automatic Backup \ ufidau8xTmp \ UFDATA. BAK '" command, which should be unauthorized.

[Solution]
Stop the U8TASKSERVICE and delete the directory.
[Note] Back up data before modification;
[Note] If you have any questions, please contact us by email in time.

Solution:

Check that the SQL server on the server is run by a low-Permission user and the bak file is backed up remotely. Therefore, the SQL server running user in the backup directory has no read permission, so copy the bak file to the place where the SQL server running user has the read permission. If you can select this bak file, right-click and add everyone to have the read permission, and then restore the database.

However, the SQL Server database may be running as follows:

Use SQL statements to disconnect all users and roll back all transactions. The specific SQL statements are as follows:

Copy codeThe Code is as follows:
Alter database [DATABASE name]
SET OFFLINE WITH ROLLBACK IMMEDIATE

Related Article

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.