Forum Discussion
SSMS Object Explorer doesn't show any of my databases
Hi!
First of all, don't get discouraged! SQL Server can be confusing when you're starting out, especially when you have multiple instances installed on the same machine. We've all been there, and I'm sure one day you'll look back at this and have a good story to tell :)
I suspect one of two things might have happened.
1. You might be connecting to a different SQL Server instance.
Since you mentioned installing a newer SQL Server version and initially connecting to the older one, I'd start by checking how many SQL Server instances you actually have installed.
Open SQL Server Configuration Manager and navigate to SQL Server Services.
CMD -> Run -> SQLServerManager17.msc (for SQL Server 2025). Other version you can check here:
https://learn.microsoft.com/en-us/sql/tools/configuration-manager/sql-server-configuration-manager?view=sql-server-ver17
Then you should see entries such as:
- SQL Server (MSSQLSERVER) – the default instance
- SQL Server (YourInstanceName) – another named instance
For example my Configuration Manager, show me only one instance:
Check how many SQL Server Database Engine services are listed and whether they're running. Each instance is independent and maintains its own databases. Just because the MDF and LDF files exist somewhere on your disk doesn't mean they're attached to the instance you're currently connected to.
Once you identify your instances, try connecting to each one in SSMS and run:
SELECT
SERVERPROPERTY('ServerName') AS ServerName,
SERVERPROPERTY('InstanceName') AS InstanceName,
SERVERPROPERTY('ProductVersion') AS ProductVersion;
SELECT name, state_desc
FROM sys.databases;
This should help us identify which instance you're connected to and whether your databases are registered there.
2. Could you have accidentally detached your databases?
Since you mentioned trying several things while troubleshooting, do you remember using Tasks > Detach in SSMS or executing `sp_detach_db`? Detaching a database removes it from the SQL Server instance but leaves the MDF and LDF files on disk. That would explain why the database files still exist but the databases are no longer visible in SSMS. If that's what happened, we may be able to attach them again. However, let's confirm the situation before making any more changes.
Microsoft documentation:
https://learn.microsoft.com/sql/relational-databases/databases/database-detach-and-attach-sql-server
One useful SSMS feature for the future: Registered Servers. Since you're working with multiple SQL Server instances, I'd also recommend exploring the Registered Servers feature in SSMS.
You can open it using View > Registered Servers or Ctrl+Alt+G.
It allows you to register your SQL Server instances, give them meaningful names, organize them into groups, and easily connect to the correct instance. For example, you could register your instances as "SQL Server 2022 - Local" and "SQL Server 2025 - Local" to avoid accidentally working on the wrong one.
Documentation:
https://learn.microsoft.com/ssms/register-servers/create-a-new-registered-server-sql-server-management-studio
And a few friendly suggestions:
- Always take a backup before making significant changes to your databases
- Double-check which instance you're connected to before executing administrative commands
- Avoid manually deleting or moving database files while troubleshooting
- Try changing one thing at a time. It's much easier to identify what went wrong that way
For now, I wouldn't uninstall, delete, or recreate anything. Your database files may still be perfectly fine, and we first need to understand what's happened.
And don't give up! Every experienced DBA has a few stories about mistakes made while learning. The difference is that eventually those mistakes become lessons, and sometimes even funny stories we tell other people :)
Your answer is very helpful, and enabled me to make a lot of progress. I'll describe my new situation.
I clicked the Connect dropdown in SSMS and selected each of the SQL Server instances in turn. SSMS now displays three Object Explorer entries that describe the three server names:
- The original server, installed a few years ago by the installer for an application I use. Product version is 12.0.4237.0 (SQL Server 2014).
- The server I installed at the start of my present adventure. Product version is 17.0.1145 (SQL Server 2025).
- The server I installed immediately after #2, after I ran a query and got SQL Server 2014, making me think that install #2 had failed because I didn't understand how connections work. Also SQL Server 2025.
But I have a problem connecting to the server name of my choice. Here's what I do:
- Select Connect > Database Engines, opening the Connections dialog. Select server #1 in Server Names and click Connect.
- Click in the Query pane, then click Execute.
- SSMS executes the query and displays the result, which says I'm using SQL Server 2014, which is correct.
- Repeat steps 1-3 for server #2, with the same result, which is wrong.
- Repeat steps 1-3 for server #3, with the same result, wrong again.
Somehow the procedure for connecting to a database, as I understand it, is not working.
The Object Explorer entry for server #1 shows both of the dbo databases I defined, and I found that I can USE a database and SELECT data from its tables, AOK. But the two Object Explorer entries for servers #2 and #3 don't show either one. They have a subentry for "Database Snapshots" instead of "Databases," and both are empty.
Based on your explanation, I think that is simply because I defined the databases in a connection to server #1, and servers #2 and #3 each have their own sets of tables, which don't include those two. If that's correct, then it's natural that I have to use ATTACH to attach those database to server #2 or #3.
That leaves me with these questions:
- Is my understanding of my situation, above, correct?
- What am I doing wrong when I try to connect to different SQL Server names, and I always end up with server #1?
- Will it cause any problems to have the same databases attached to two running SQL Servers? (That's a transitional situation. I can uninstall SQL Server 2014 as soon I'm absolutely sure that both tables and the first table's application are fully compatible with SQL Server 2025.)
- According to Google AI, I can uninstall the SQL Server installations I don't need in Windows Control Panel, just like any other application. Is that correct?
Thanks again for your generous help!