About 30,800,000 results
Open links in new tab
  1. Get list of databases from SQL Server - Stack Overflow

    Jul 8, 2014 · To list all available databases in MS-SQL Server using T-SQL, you can execute the following query: SELECT name, database_id, create_date FROM sys.databases; GO If you want to exclude system databases just add below condition in query:

  2. Find a database with a particular table OR Find a table in every ...

    Mar 20, 2015 · Okay, if you're just wanting to find each database that contains a particular table, and aren't going to be querying the table, then you can just do: DBName sysname not null. exec sp_MSforeachdb 'use [?]; if OBJECT_ID(''dbo.mytable'') is …

  3. SQL Server Show/List Databases - GeeksforGeeks

    May 21, 2024 · SQL Server provides two main methods to solve this such as using SQL commands and using SQL Server Management Studio (SSMS). In this article, we will learn about how to Show/List the SQL Server Databases using both approaches in detail.

  4. View list of databases on SQL Server - SQL Server | Microsoft Learn

    Sep 29, 2024 · This article describes how to view a list of databases on an instance of SQL Server by using SQL Server Management Studio or Transact-SQL.

  5. How to get list of database from SQL Server? - Stack Overflow

    Jan 30, 2012 · So if you want only online databases, use. SELECT (columns) FROM sys.databases WHERE state = 0

  6. Different ways to search for objects in SQL databases - SQL

    Jun 29, 2020 · In this article, we explored various ways to search for SQL database objects in SQL Server. We can use T-SQL, object explorer search, SSMS filter, as well as third-party tools such as ApexSQL Search for the same.

  7. 3 Ways to Get a List of Databases in SQL Server (T-SQL)

    Dec 11, 2021 · Below are three ways we can use T-SQL to return a list of databases in SQL Server. In SQL Server, the sp_databases stored procedure lists the databases that either reside in an instance of the SQL Server or are accessible through a database gateway. Here’s an example of executing this procedure: Example result:

  8. How to Quickly Get a List of All Databases in SQL Server Instance using

    May 15, 2023 · You can quickly generate a comprehensive list of all databases in your SQL Server environment along with their state (such as ‘ONLINE’, ‘OFFLINE’. This is an essential query for any database administration task, such as inventory checks, capacity planning, or just to maintain an up-to-date overview of your SQL Server instances.

  9. List All Databases in SQL Server - GeeksforGeeks

    Apr 7, 2025 · To get a list of all databases on the SQL Server, use the following query: SELECT name FROM sys.databases; This command will return all databases, including system and user-defined databases.

  10. How to Find Database Name in SQL Server Using Query?

    Oct 27, 2023 · To find database names in SQL Server using query, you have two ways: first, you can find the name of the database using the database ID, or you can use a function that shows the name of the currently connected database.

  11. Some results have been removed
Refresh