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

Select,Update,Delete,Insert etc.. in many server using 1 query Expand / Collapse
Author
Message
Posted Friday, January 18, 2008 2:18 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, March 06, 2014 2:38 AM
Points: 398, Visits: 2,423
Comments posted to this topic are about the item Select,Update,Delete,Insert etc.. in many server using 1 query

"-=Still Learning=-"

Lester Policarpio

Post #444768
Posted Wednesday, March 28, 2012 1:48 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, November 18, 2013 2:52 PM
Points: 4, Visits: 22
why not use replication ?
Post #1274106
Posted Wednesday, March 28, 2012 6:28 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Wednesday, January 16, 2013 4:23 PM
Points: 415, Visits: 2,333
daniel 40017 (3/28/2012)
why not use replication ?


So how would you set up replication to send a one time query to my 50 linked servers? It must be a short efficient procedure since its a one off job.
Post #1274235
Posted Wednesday, March 28, 2012 7:40 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, November 18, 2013 2:52 PM
Points: 4, Visits: 22
The issue you presented regards an insert operation.
a query is a different thing - one might think you are referring to distributed query on multiple servers for performance.

an insert operation is generally not a one time operation and if you are adding records to a table and need to insert the same records to 50 other db's than I would use replication on that table and replicate it to all other servers. you have a built in module in sql server that does the work - why develop it yourself ?

Post #1274289
Posted Wednesday, March 28, 2012 7:57 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Wednesday, January 16, 2013 4:23 PM
Points: 415, Visits: 2,333
daniel 40017 (3/28/2012)
The issue you presented regards an insert operation.
a query is a different thing - one might think you are referring to distributed query on multiple servers for performance.

an insert operation is generally not a one time operation and if you are adding records to a table and need to insert the same records to 50 other db's than I would use replication on that table and replicate it to all other servers. you have a built in module in sql server that does the work - why develop it yourself ?

I think it was a pretty handy little concept (I wasn't the original author), I'll probably play with his script a bit. It would be useful in my situation because I do have multiple servers, and while I may insert values into many tables on many servers, I wouldn't want the complete contents of tables replicated, and I'd also do select queries.
Post #1274317
Posted Wednesday, March 28, 2012 8:11 AM


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: 2 days ago @ 3:29 PM
Points: 734, Visits: 3,561
why not use POSH (Powershell) ?

easy, convenient and efficient



______________________________________________________________________________________________________________________________________________________________________________________
HTH !
Kin
MCTS : 2005, 2008
Active SQL Server Community Contributor
Post #1274331
Posted Wednesday, March 28, 2012 3:14 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, April 14, 2014 9:08 AM
Points: 1,234, Visits: 717
Or, if you have all the servers in a server group in SSMS, just open a multi-server query window in SSMS and run the query once against all the servers. http://shaunjstuart.com/archive/2011/09/teaching-an-old-dog-new-tricks/
Post #1274695
Posted Thursday, March 29, 2012 12:36 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, April 14, 2014 1:09 PM
Points: 9, Visits: 518
shaun.stuart (3/28/2012)
Or, if you have all the servers in a server group in SSMS, just open a multi-server query window in SSMS and run the query once against all the servers. http://shaunjstuart.com/archive/2011/09/teaching-an-old-dog-new-tricks/


This was my first thought.
Post #1275299
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse