question

May Tamemee avatar image
May Tamemee asked

Seeking for help (troubleshoot in SQL server error 5123)

I have create a Database called PersonnelDatabase2010 in SQL server2005 including tables,relations,functions and diagram then I add the connection to the my project in Visual Studio 2008 (web application) the problem is when open the database in SQL server I have the following message error 5123

Since I have a daily copy of the mdf and ldf so I tried to - Delete the Database connection in the Server Explorer (Visual Studio), connection string and the sqldatasource and still the same error when opening the database in SQL server

sql-server-2005
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Scot Hauder avatar image
Scot Hauder answered

Sounds like the SQLServer Service does not have permissions to the mdf/ldf files. Right click the files and under properties->Security add the account that the SQLServer Service is running under and give it full control. You may be better off doing a backup/restore instead of copying the mdf/ldf files. If you continue to copy the files, use robocopy, it is a smarter version of copy that retains the original permissions on the files

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.