The server principal is not able to access the database under the current security context in SQL Server MS 2012

后端 未结 10 915
-上瘾入骨i
-上瘾入骨i 2020-12-13 01:46

I am trying to access my hosting server’s database through SQL Server Management Studio, everything till login is fine but when I use the command use myDatabase

10条回答
  •  执念已碎
    2020-12-13 02:33

    I spent quite a while wrestling with this problem and then I realized I was making a simple mistake in the fact that I had forgotten which particular database I was targeting my connection to. I was using the standard SQL Server connection window to enter the credentials:

    I had to check the Connection Properties tab to verify that I was choosing the correct database to connect to. I had accidentally left the Connect to database option here set to a selection from a previous session. This is why I was unable to connect to the database I thought I was trying to connect to.

    Note that you need to click the Options >> button in order for the Connection Properties and other tabs to show up.

提交回复
热议问题