You are on page 1of 1

sql - SQL Server Operating system error 5: 5(Access is denied.

EXEC sp_attach_single_file_db @dbname = 'DhpProDB1', @PhysName =


'D:\backup\DhpProDB.mdf'

***********

SQL Server database engine service account must have permissions to read/write in
the new folder.

Check out this

To fix, I did the following:

Added the Administrators Group to the file security permissions with full control
for the Data file (S:) and the Log File (T:).

Attached the database and it works fine.

You might also like