An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Unable to open the physical file "D:\Murach C#\Murack C#\Database\MMABooks.mdf". Operating system error 5: "5(Access is denied.)". (Microsoft SQL Server, Error: 5120)
hfinmt
Member
56 Points
137 Posts
Access denied - operating system error 5
Mar 10, 2010 12:32 AM|LINK
Hello all,
I am attempting to add a database to Server Management Studio, and this error came up. How to I work around this?
TITLE: Microsoft SQL Server Management Studio
------------------------------
Attach database failed for Server 'HFINNY-PC'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.2531.0+((Katmai_PCU_Main).090329-1045+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Unable to open the physical file "D:\Murach C#\Murack C#\Database\MMABooks.mdf". Operating system error 5: "5(Access is denied.)". (Microsoft SQL Server, Error: 5120)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.2531&EvtSrc=MSSQLServer&EvtID=5120&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
cnranasinghe
Star
8885 Points
1798 Posts
Re: Access denied - operating system error 5
Mar 10, 2010 12:51 AM|LINK
Check this link
http://social.msdn.microsoft.com/Forums/en/sqlserversamples/thread/574b2da9-7b42-4169-a4c7-6d334ba0a4a7
panjaasis
Member
2 Points
1 Post
Re: Access denied - operating system error 5
Jul 04, 2012 12:13 PM|LINK
right click on sql server management studio, select run as administrator
okay