Asynchronous
Asynchronous

Reputation: 3977

Cannot see Databases In Visual Studio SQL Server Object Explorer after previous database dropped

I used to be able to see all databases in the SQL Server Object Explorer in Visual studio 2012. I dropped one of the main databases that I used to work with in VS, now I can no longer see any of the other databases.

I can connect to the Server (SQL Server 2012) but the database tree is empty.

Screen shot:

enter image description here

How do I restore seeing the databases?

Upvotes: 2

Views: 5001

Answers (2)

Jebarson Jebamony
Jebarson Jebamony

Reputation: 549

I am posting the answer after 5 years as this potential bug is still a repro with VS2019. Apparently the issue seems to be with the database selected while adding the server.

To solve this issue, leave the database name to default as below. I will be following up with the VS team in the meantime.

Don't select anything on the default database

Upvotes: 5

Asynchronous
Asynchronous

Reputation: 3977

Okay, found the answer:

I needed to set a default database in SQL Server using Management Studio.

As soon as I did this and connected to a server in Visual Studio, the databases appeared in the Object Explorer in Visual studio.

How to set the default database: You simply go to: Security --> Select your login --> properties --> select default database.

Upvotes: 1

Related Questions