Handling method of MSSQL attached database access denial prompt 5120 error

Time:2021-10-16

MSSQL prompts the following error when attaching the database:

Unable to open physical file “* * *. MDF”. Operating system error 5: ‘5 (access denied.)’. (Microsoft SQL server, error: 5120)

This experience describes how to handle the error and then successfully attach the database.

Add the authenticated users user name. Assign the authenticated users user full control rights. Then attach the database again, and the attached database is successful.

Recommended Today

Swift advanced (XV) extension

The extension in swift is somewhat similar to the category in OC Extension can beenumeration、structural morphology、class、agreementAdd new features□ you can add methods, calculation attributes, subscripts, (convenient) initializers, nested types, protocols, etc What extensions can’t do:□ original functions cannot be overwritten□ you cannot add storage attributes or add attribute observers to existing attributes□ cannot add parent […]