I'm guessing that using sqlcmd in some form from inside this script is going to be one of the answers but sitting here with ssmse open and a "new query" ready to be written ... there's gotta be some switch command in T-SQL where I can move between the instances.
Ultimately I wish to run a broad spectrum effect on each of several databases and composit the results.
All I can think of doing right now is to use "sqlcmd -i" naming the instance then another .sql script, to completion tabulating data, then run it again on the next instance ...
I believe the local->remote->local again is ok with that?
I see sp_addlinkedserver in the towering list of things available in the programmability scripts to check out. All I might have to do is add the name of the "remote" database after linking in the "remote" server, right?
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)