Error 5123 prompted when attaching a database to sql2008
Unable to retrieve data for this request ...... An exception occurred when executing a Transact-SQL statement or batch processing ...... When you try to open or create a physical file d: dataejiaOA. mdf, createfile encounters a system error 5 (access denied ). (Microsoft SQL Server, error: 5123 ).
Solution
1. Directly copy your database to the SQL installation directory C:/pg/msql/MSSQL10.MSSQLSERVER/mssql/DATA
2. on the mdf and ldf files of your database, right-click ----> properties ----> add ----> advanced ----> search now ----> Authenticated Users ----> OK ---> check with full control ----> OK
If the problem persists, try again.
Right-click the elastic block storage, and view the permissions of the user on the "security" tab in properties. Check who the startup account is, run services. msc, find the SQL Server service in the service manager, view the "logon" tab, select a local user, and restart the service.
Microsoft SQL Server, error: 3415
An error occurred while attaching the database to the server "servername. (Microsoft. SqlServer. Smo)
The database 'dbname' cannot be upgraded because it is read-only or has a read-only file. Set the database or file to writable, and then run the recovery operation again. (Microsoft SQL Server, error: 3415)
After checking the database files, they do not have the read-only attribute. Attaching the database files to SQL Server 2000 is normal. Click the help link in the error message dialog box to open an invalid link of I'm sorry. BS: Microsoft.
Multiple Research parties found that the file is not read-only. Strictly speaking, it should be a "permission" problem. The current SQL Server login account does not have the write permission for the file to be attached, the above "read-only" prompt appears. The solutions are as follows:
• Copy the file to be appended to the default Data directory of SQL Server. The attachment will succeed;
• During login verification, select "Windows Authentication" instead of "SQL Server Authentication", even if your login account is sa;
• If "SQL Server Authentication" is required, change the logon account's permissions so that it has full operation permissions on the files to be attached;
• Change the Account logon identity of SQL Server from Network Service to Local Service;
This problem occurs in Windows XP. By the way, the current SQL Server 2008 Enterprise Edition can be installed in XP.
SQL2008 append Database Error Code 5120
Cause of error: This file has no operation permission, so an error occurs when it is attached. You only need to grant full access to the USERS of this file or folder.
Solution:
1. Right-click the database file icon and choose "properties"> "security"> "edit.
2. Select Authenticated Users from the group or user name list, and select full control from the permission list.
3. Select "OK" to close the dialog box.