Computer room charge System--additional database

Source: Internet
Author: User
Tags ntfs permissions

When attaching the database, there was an error "attaching the database error, for more information, click the hyperlink in the message column." ”

Click "OK" to open the hyperlink in the Message column and pop up the error box "An exception occurred while executing the Transact-SQL statement or batch." Unable to upgrade to database ' Charge_sys ' because it is read-only, or only read-only files. Make the database or file writable, and then rerun the restore operation. ”


Cause of error: This is the NTFS permissions issue (disk partition format), NTFS format has a lot more options for permission setting, and thus brings many problems. For example, caused this time the authority is not assigned, the attach is unsuccessful.

Workaround: Assign the "Full Control" permission to the folder where the files are located to users to resolve the issue.

Select the folder that contains the files you want to attach, and then right-click Properties-Security-users-Select Full Control in Users-apply-OK.


Then open the database, attach


Click "Add"


Check the MDF file-"OK"


Click OK


haha ~ the Attach succeeded


Of course, there are two ways to solve this problem besides this one (by myself)

The first copy of the file to be attached to the SQL Server default data directory, and then attach the success.

The second is to select Windows Authentication when logging on, or you can attach a success.


Additionally, there may not be a "security" tab in the properties of the XP user folder. WORKAROUND: Open My Computer-tools-Folder Options


Remove the checkbox "Use Simple File Sharing (recommended)" On the View tab.


Database attached successfully, the next knock on the machine room. Haha, look forward to ~

If you have any questions or suggestions, please leave a message ~

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.