-1

How do I find out what databases are listed under an instance that I'm not connected to?

(this is homework...sort of)

I found out how to locate other instances through Admin Tools, then Services. But I don't know if there is a way to list all the databases found on all the instances of my server in question. Can this be done?

I'm trying to map out the entire architecture of our databases and instances for both sql server (which is what I'm asking about), and later for Oracle/Linux.

Do I need to connect to every instance?

Other questions

I'm new to SQL SERVER & SSMS(2017). I'm new to this job too. Everyone here has been in the industry since forever ago, and I'm the only one that came straight out of college.

What are the best sites to learn SQL Server & SSMS? I still have Lynda access with my college credentials, and I've been using that for the past 2 days.

  • Please only ask a single question per question. And note that requests for recommendations for third party resources are off-topic and will get closed. https://stackoverflow.com/help/how-to-ask – Dale K Apr 18 '19 at 20:47
  • If you have access to the files system of the server machine you could take a look in the data directory of an instance. The .mdf and .ldf files there are usually/often named like the database they contain. That isn't a 100% though. For that you'd need to connect and query the catalog. – sticky bit Apr 18 '19 at 21:01
  • 1
    You are new - you should be asking questions. Lots of questions to the people who should be training you and bringing you up to speed on how your organization does things. – SMor Apr 18 '19 at 21:28

2 Answers2

1

You can't get a list of databases for an instance that you're not connected to. Having the ability to get that list without connecting would represent a big security risk and vulnerability. You would need to connect to each instance individually and query the sys.databases view.

Luis Cazares
  • 3,495
  • 8
  • 22
0

Assuming that you have SSMS 17.9.1 installed, then in my opinion, the best way to learn how it works is to use it to design & manipulate databases in a domain that you already know a lot about. So, lets say that you are an enthusiastic member of your local cycling club. You could design an application that maintains records of club membership, bicycle characteristics and club races.

You will need a good T-SQL reference (lots on the internet e.g. search "Learn T-SQL".) Use the T-SQL reference to design a database schema including add check clauses, triggers and other features.

Then you could build an application that talks to your database. (e.g. using ASP.NET).

You will find that the T-SQL datatypes are not the same as the Oracle datatypes. However, Microsoft has a website that shows you how to convert from T-SQL to Oracle systems. You can use resources like this to migrate your T-SQL "my cycle club" application to Oracle.

Its a bit old now but the book "Beginning ASP.NET 4.5.1: in C# and VB" has a good step-by step approach where the author explains everything that you need to know in great detail.

My main point is that you should start with a topic that you already know and then add new skills step by step.

Ken Evans
  • 362
  • 1
  • 11