Showing posts with label orsomething. Show all posts
Showing posts with label orsomething. Show all posts

Monday, March 12, 2012

run query on multiple server

query return list of user or
query return list od databases or
something else
This is fine when I run query on one server.
I must get resault for other server.
How to get information for all servers on the LAN or from txt file with
servers name?
Thanks
TaleHi
If you have a text file with the server names (say servers.txt) you could do
FOR /F %i IN (servers.txt) DO osql -S%i -E -dMaster -Q"SELECT * FROM
Pubs..Authors"
John
"Tale" <tales@.eunet.yu> wrote in message news:e1t5k9$kmn$2@.news.eunet.yu...
> query return list of user or
> query return list od databases or
> something else
> This is fine when I run query on one server.
> I must get resault for other server.
> How to get information for all servers on the LAN or from txt file with
> servers name?
> Thanks
> Tale
>