It gets me every time

If you are trying to attach a db to your sql server and you are getting the following error, you need to run your management studio in administrator mode. Simply right click on Microsoft SQL Server Management Studio and select "Run as Administrator"

TITLE: Microsoft SQL Server Management Studio
------------------------------

Attach database failed for Server 'xxxxxx\sqlexpress'.  (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=13.0.14500.10+((SSMS_Rel).160415-0249)&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 "xxxxxxx\data\Sitecore.Exm.mdf". Operating system error 5: "5(Access is denied.)". (Microsoft SQL Server, Error: 5120)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=12.00.2269&EvtSrc=MSSQLServer&EvtID=5120&LinkId=20476


Comments