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 ~