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

17,293

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.

Share:
17,293
dotancohen
Author by

dotancohen

I currently develop and support the backends of a few LAMP-stack based web applications for BSS (Business Support Services) that my company specializes in. I have experience in software project management, business process development, and I ran a software development business for a short time (actually twice). I have been using PHP since 1998 or '99, and I'm reasonably competent in the associated client-side technologies. I find myself using Python often, mostly for my own personal projects, I'm quite poetic in VIM, and of course Git is a cornerstone of my development. Lately I have been experimenting with machine learning, mostly with scikit-learn.

Updated on June 21, 2022

Comments

  • dotancohen
    dotancohen almost 2 years

    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.

  • Kamran Bigdely
    Kamran Bigdely over 10 years
    any proof that this is really a bug?(a link to MS website or ...)
  • dotancohen
    dotancohen over 10 years
    Yes, I had filed an issue with Microsoft and received an email confirming the issue.
  • Kamran Bigdely
    Kamran Bigdely over 10 years
    That would be helpful and informative if you share the link to issue or the email they sent you.
  • dotancohen
    dotancohen over 10 years
    I never got a link to an issue, just an email confirming that they know about it. I don't know if they knew about the issue beforehand or if I was the first to report. I don't know if they even bothered to check the issue, maybe all issues get that same reply.