June 28, 2008 at 9:12 pm
I am writing a program that will connect to each of the 2600+ databases (v2000 and v2005) in our environment and pull permissions. i had written a script that would load the privs into the temp database for each server and then push them to a central repository. however, some of the temp dbs are configured differently from the other databases so i kept getting collate (?) errors.
so now, i'm looking to try something different. is it possible to write a stored procedure that will spawn connections to multiple servers, run queries on the databases, and insert the data to local tables all at the same time so that i dont have to wait for each server & database to complete?
If i need to clarify, please let me know.
Start main procedure
get list of servers
for each server:
connect and get list of databases
for each database:
pull permissions and send back to original database
repeat simultaneously on each database
repeat simultaneously on each server
June 28, 2008 at 9:47 pm
Two Words: "Service Broker"
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
June 29, 2008 at 10:27 am
Or CLR procedures. you can spawn threads inside one of those.
However why do you want to? You complicate things and if you have issues with your code, you could create debugging headaches or other issues.
I used to manage hundreds of instances and we'd have processes that connected to every machine. Worked well.
The other thing you might consider is have a local admin database on each server. Set up the permissions job in there and have each server pull the data to the admin database. It's self contained and it allows you to hit each server directly and get the info.
Then have a central instance that connects to all these remote admin databases and gets the data. If it misses one or there's an issue, it still has the other data and you could always get to that local machine and see the data there.
July 15, 2008 at 12:21 pm
thanks for the suggestions. i ended up just rewriting the script to connect to the server first, write a record for all databases, then pull the permissions. thanks again though
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply