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
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • How I Built a SQL Diagnostic Tool That Works Without Touching Your Database
  • Designing Rayfall: One Expression Language for a Columnar Database
  • Database Bottlenecks Nobody Talks About: Optimizing SQL Queries Beyond Indexing
  • Seeding Postgres When Your Schema Has Foreign-Key Cycles

Trending

  • The Bottleneck of Scaling
  • Select AI and Vector Search on a Legacy Oracle Schema: What It Actually Takes
  • Teaching an LLM Your Schema's Rules: Inside Jailer's AI Subsetting Assistant
  • Databricks Lakebase: Give Your Agent a Branch, Not Your Production Database
  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 user avatar
Merrick Chaffer
·
Mar. 28, 14 · Interview
Likes (0)
Comment
Save
Tweet
Share
49.4K Views

Join the DZone community and get the full member experience.

Join For Free

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

  • How I Built a SQL Diagnostic Tool That Works Without Touching Your Database
  • Designing Rayfall: One Expression Language for a Columnar Database
  • Database Bottlenecks Nobody Talks About: Optimizing SQL Queries Beyond Indexing
  • Seeding Postgres When Your Schema Has Foreign-Key Cycles

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • 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