Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Multiple Server Queries with SSMS 2008 Expand / Collapse
Author
Message
Posted Wednesday, August 13, 2008 9:26 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, September 2, 2014 1:10 PM
Points: 1,708, Visits: 1,793
Comments posted to this topic are about the item Multiple Server Queries with SSMS 2008

Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs
Post #552398
Posted Thursday, August 14, 2008 7:02 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, May 9, 2013 8:07 AM
Points: 1,221, Visits: 2,614
Pretty cool Jonathan. Yet another reason to upgrade to 2008.

Ken Simmons
http://twitter.com/KenSimmons
Post #552638
Posted Thursday, August 14, 2008 12:23 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Thursday, June 5, 2014 10:54 AM
Points: 9,902, Visits: 9,480
Excellent observation, Jonathan. thanks for passing it along. :)

-- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoung
Proactive Performance Solutions, Inc.
"Performance is our middle name."
Post #552978
Posted Monday, August 18, 2008 3:19 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, July 21, 2014 11:32 AM
Points: 372, Visits: 414
Thanks, i was using this technique for a while, what i couldn't figure out it how the resultset of all these servers can be store in one table in one database for future usage?

Appriciate any response...

Thx ~ Prakash


Prakash Heda
Lead DBA Team - www.sqlfeatures.com
Video sessions on Performance Tuning and SQL 2012 HA
Post #554625
Posted Monday, August 18, 2008 4:51 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, September 2, 2014 1:10 PM
Points: 1,708, Visits: 1,793
The multi server query is actually executed as separate batches on each server, so any statements being run are still batch scoped which means they will complete inside their respective connection. So if you issue a create the table statement, it is run on each server in the database that is selected in the dropdown. The same goes for Inserts. The aggregation of the data and display with server name happens client side by SSMS. This is why you can control the ServerName being ON/OFF with a change to the Options under Tools.

Your question actually points out an extremely valuable use for this that I never actually considered previously. I have seen a number of questions where someone wants to update a database across multiple servers, like a development farm with the same piece of code. I worked in one company that had 24 different development instances to manage consistently. Changing one core procedure would require changing the connection 24 times to deploy it to everywhere. This is easily accomplished with Multi-server queries, and I'll have to call a buddy of mine who actually has a nightmarish development environment like I describe above and tell him about this.


Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs
Post #554659
Posted Monday, August 18, 2008 5:30 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, July 21, 2014 11:32 AM
Points: 372, Visits: 414
yeah thats the problem, we here supporting 100+ environment, without access to the box, only sysadmin access...making a check everyday to ensure all of them are in sync and basic configuration is not changes...ddl changes, security changes tracking are some of the tasks needed to ensure a good control...

as of now using sqlcmd to do this tasks...it was quite painful though

lets hope somebody has explored that option and have right solution...


Prakash Heda
Lead DBA Team - www.sqlfeatures.com
Video sessions on Performance Tuning and SQL 2012 HA
Post #554674
Posted Wednesday, August 20, 2008 1:51 PM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Friday, April 4, 2014 4:40 PM
Points: 751, Visits: 917
That was extremely useful, thank you.

---
Timothy A Wiseman
SQL Blog: http://timothyawiseman.wordpress.com/
Post #556081
Posted Thursday, August 21, 2008 10:22 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: 2 days ago @ 3:24 PM
Points: 536, Visits: 762
What a great tip. Thank you! It infuriates me that Microsoft wouldn't document better something as useful as this.


Post #557049
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse