About 4,280,000 results
Open links in new tab
  1. Selecting data from two different servers in SQL Server

    Dec 30, 2021 · You can do it using Linked Server. Typically linked servers are configured to enable the Database Engine to execute a Transact-SQL statement that includes tables in …

  2. Connecting to multiple servers in a Query Window using SQLCMD

    Jan 15, 2014 · One particularly useful feature is the ability to switch between different SQL Servers within a query window. Without SQLCMD the usual way to do this is to bring up the …

  3. How to Connect Multiple SQL Servers Using SSMS Tool: A …

    Apr 9, 2025 · Whether you’re using SQL Server 2022, 2019, or both, understanding how to connect via SSMS is essential for database development, testing, and administration. In this …

  4. What is the T-SQL syntax to connect to another SQL Server?

    Jun 20, 2015 · :Connect server_name[\instance_name] [-l timeout] [-U user_name [-P password] If you are connecting to multiple servers, be sure to insert GO between connections; otherwise …

  5. Run Query with Different Server and Different Database

    Feb 16, 2021 · How we can we use the 'USE' command with Server to mover server. A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, …

  6. Execute Statements Against Multiple Servers Simultaneously

    Feb 13, 2025 · This article describes how to query multiple servers at the same time in SQL Server, by creating a local server group, or a Central Management Server and one or more …

  7. Multi-server scripts with SSMS using SQLCMD mode

    Feb 13, 2009 · One of my favorite things about SQLCMD mode, is that allows you to connect to multiple servers using the same SSMS editor window. That means, we can run the same T …

  8. Execute SQL Server query on multiple servers at the same time

    Jun 8, 2009 · In this tip I show you what this new feature is, how to setup it and how to collect data from all of your servers at the same time. And best of all, once it is setup you can even …

  9. Run SQL Script On Multiple Servers Using Powershell

    In a more distributed environment there is a need to use Powershell script to connect to multiple SQL servers and execute queries. The results can include service or Database records that …

  10. Connect to multiple servers and databases and run the same SQL ...

    Jul 23, 2021 · I have a fixed list of SQL Server 2019 (v15) Express databases, distributed across the country. I am hoping to script a way of querying them in a T-SQL batch. Have gotten as far …

  11. Some results have been removed
Refresh