SQL Server attached database error, error code 5123_mssql2008

Source: Internet
Author: User
Tags error code microsoft sql server

Today, in an attachment to a previous database (not in the directory where SQL Server was initially installed), there is always a 5123 error code, as shown in the figure:

Initially thought it was SqlServer2008 incompatible with the original database, because the database is not known that the version was created, in the official looked at, explained that the permissions are not right, should put this database in the directory of SQL Server installation, that is, X:\Program Files\Microsoft SQL Server\mssql10. Mssqlserver\mssql\data, sure enough to solve the problem, but can not always put the database in this directory Ah! So I looked for other solutions;

The first solution : Just the method, put this file in the SQL Server default location, but it is best not to put in the C disk, in the event of reloading the system that day, the play is over, haha;

The second solution is to change the default database folder for the SQL Server Real column, select the SQL Server instance, right-click the property, have a "database setting" on the left, and click on the "database default location", and set this to your own directory.

The third solution is to change the permissions of the folder where the database is located, add a user of everyone, set to "Full Control" permission, it is OK, this program is direct and convenient;

Cloud Habitat Small Series think, local test, the recommended use of the third, the server, or to do a set of permissions.

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.