|
|
9 April 2010
|
Error on Attaching Database to SQL Server
If you want to attach database to SQL Server via SQL Server Management Studio (SSMS) and encounter the following error message, you need to
right click SSMS and select "Run as Administrator" mode (see figure below).
Attach database failed for Server 'your server name'. (Microsoft.SqlServer.Smo)
Additional information:
An exception occurred while executing a Transact-SQL or batch,
(Microsoft.SqlServer.ConnectionInfo)
Unable to open the physical file "C:\xxx.mdf".
Operating system error 5: "5(error not found)". (Microsoft SQL Server, Error:5120)
This is because recent versions of Windows do not automatically give
administrator right to these type of program even you log in yourself as
administrator. You need to explicitly tell Windows that you are using
administrator role to do somethings.
more topics...
|