January 18, 2008 at 2:18 am
Comments posted to this topic are about the item Select,Update,Delete,Insert etc.. in many server using 1 query
"-=Still Learning=-"
Lester Policarpio
March 28, 2012 at 1:48 am
why not use replication ?
March 28, 2012 at 6:28 am
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.
March 28, 2012 at 7:40 am
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 ?
March 28, 2012 at 7:57 am
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.
March 28, 2012 at 8:11 am
why not use POSH (Powershell) ?
easy, convenient and efficient
______________________________________________________________________________________________________________________________________________________________________________________
HTH !
Kin
MCTS : 2005, 2008
Active SQL Server Community Contributor
March 28, 2012 at 3:14 pm
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/
March 29, 2012 at 12:36 pm
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.:-)
May 11, 2016 at 7:02 am
Thanks for the script.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy