Can't see second azure sql database in SSMS object explorer

5,556

Solution 1

So for me, it turned out that when I was connecting using SSMS, I had set the database to connect to as my first database by accident - meaning that was all I could see.

On connect, go to Options, then check the database you're connecting to. If you're using multiple users to connect to that server like I was, my admin user ended up also being forced to connect to a single database instead of < default >.

Solution 2

SSMS does not automatically update the database list when new databases are added. You need to refresh the view manually.

In Object Explorer, highlight the Databases node. Hit F5 to refresh. The list of databases should refresh and your new database should appear.

Another method would be to disconnect SSMS from the server and reconnect.

Share:
5,556

Related videos on Youtube

Sam
Author by

Sam

Updated on September 18, 2022

Comments

  • Sam
    Sam almost 2 years

    I have created a second database on my existing Azure SQL server. The first database works fine and I can see it using SSMS.

    I cannot see the second database in the object explorer. Autocomplete detects that it exists however.

    Any suggestions?

    • Sam Cogan
      Sam Cogan almost 8 years
      What version of SSMS are you using?
    • designarti
      designarti almost 8 years
      Have you resolved your issue yet?
  • Ilessa
    Ilessa about 7 years
    Interesting, I have a similar problem (using SSMS 13.0.16106.4) and I've tried both these methods and still can't see the other two databases - I can see them on the portal though
  • designarti
    designarti about 7 years
    Ah, that makes sense. I have a few databases I like to be able to connect to quickly. I use the Registered Servers view window and add a New Server Registration for each specific database I need quick access to, specifying the database explicitly in the connection options.
  • Sam
    Sam about 7 years
    Ding ding ding!!! That was it - been bothering me this whole time :)
  • Ilessa
    Ilessa about 7 years
    Ha thanks, your question turned up when I was having the same problem! Glad I could help :)
  • Jerad Rose
    Jerad Rose about 7 years
    that didn't work for me. I had to create a new connection despite refreshing about 5 times. I have the same version as @llessa. interestingly I now have TWO instances of the server in object explorer and the original only has one database and the one I just added has the newly added missing database
  • designarti
    designarti about 7 years
    There's an aspect of SSMS 2016 behavior that I've found odd when connecting to Azure SQL Database. Assuming you have admin-level privileges, if you connect and open a query to the Azure SQL server without specifying a default database, you end up in the master database. You can use the database switcher dropdown once, and only once. After that, the switcher cannot be used. It's as though you were not limited to a single database, but after you make a choice, it limits you. I wonder if what you're experiencing is another side-effect of this.
  • superjos
    superjos about 6 years
    Thanks for your answer, that somehow solved the urgent issue I had too. But I recall you could see more than one DB, if your user had the right privileges, within the same connection. Now it seems I'm stuck with the one DB I select in Options tab. Has something changed?
  • Ilessa
    Ilessa about 6 years
    If you leave the DB in the options tab to <default> you can see all the databases that user has permission to see. In my case, I had a user who could only see one DB and (as this user came up first in the list) when I changed user to the one with multiple connections, it didn't change the DB in the Options pane.