DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • PostgreSQL vs Oracle: When Higher Cost Means Better Performance
  • Grounding AI Agents in Governed Data
  • Engineering Self-Healing SQL Pipelines With LLMs: Validation, Guardrails, and Safe Recovery
  • How I Built a SQL Diagnostic Tool That Works Without Touching Your Database

Trending

  • Designing Frontend Applications for Failure, Not Just Success
  • The Permission Was Valid. The Action Was Not Authorized.
  • Moving 900+ GB of Prometheus Without a Cutover Weekend
  • Why Vulnerability Management Fails Without Reliable Asset Data

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Data Engineering
  3. Databases
  4. How to Run a SQL Query Across Multiple Databases with One Query

How to Run a SQL Query Across Multiple Databases with One Query

By 
Merrick Chaffer
·
Mar. 28, 14 · Interview
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
49.5K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

In SQL Server management studio, using, View, Registered Servers (Ctrl+Alt+G) set up the servers that you want to execute the same query across all servers for, right click the group, select new query. Then when you execute the query, the results will come back with the first column showing you the database instance that that row came from.

image

Database sql

Published at DZone with permission of Merrick Chaffer. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • PostgreSQL vs Oracle: When Higher Cost Means Better Performance
  • Grounding AI Agents in Governed Data
  • Engineering Self-Healing SQL Pipelines With LLMs: Validation, Guardrails, and Safe Recovery
  • How I Built a SQL Diagnostic Tool That Works Without Touching Your Database

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook