Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Management Studio attach database: Cannot open "Add" dialogue

Tags:

ssms

When I press the Add... button in the Attach Databases window I get the following error:

TITLE: Microsoft SQL Server Management Studio
------------------------------
Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
The server principal "callisto\dotancohen" is not able to access the database "model" under the current security context. (Microsoft SQL Server, Error: 916)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.1750&EvtSrc=MSSQLServer&EvtID=916&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------

The mention of "current security context" led me to believe that this is a permissions issue. However, when I open SQL Management Studio as Administrator I can in fact open the Add... dialogue but it will not let me browse to the C:\Users\dotancohen directory in which my database .mdf file is stored.

This is with SQL Management Studio 2012 RC0 on Windows 7 32 bit. The database .mdf file that I am interested in opening is a 2012 file and 2008 will not open it (my connect.Open() statement fails with 2008, works with 2012). Thank you.

Note that I am not interested in opening SQL Management Studio as administrator to access the database, but rather I am interested in resolving the issue with the user-opened SQL Management Studio to access the database as a regular user. My C# application running in debug mode can open this database without escalated privileges.

like image 444
dotancohen Avatar asked Mar 01 '12 11:03

dotancohen


1 Answers

It turns out that this is a known bug with SQL Management Studio 2012, or at least the Beta and RC0 version.

By the way, here is the link to file bugs against Microsoft products. Not all MS products can have bugs filed against them at all times, so if the product that you need to file an issue is unavailable for bugs at the moment, try again in a month or two.

like image 146
dotancohen Avatar answered Jan 04 '23 11:01

dotancohen