Get remote sql server properties

  • If you cant connect to servers, nothing much can be done

    Try to run this on such a server, where you have access to maximum servers

    I have update the filtering to remove all failure messages from the output

    for /f %%a in (srvlist.txt) do osql -E -S %%a -i scr.txt -n -w999 >> out.txt

    findstr /V "\-\-\-" out.txt > temp.txt

    findstr /V "\[" temp.txt > temp2.txt

    findstr "[a-z]" temp2.txt > out.txt

    del temp.txt

    del temp2.txt

    notepad out.txt

    Line 3 is truncating all messages (as error messages start with '[')

  • Thanks again. One last question, is it just enough to specify the server name in the "srvlist.txt" or is it neccessary to add a PATH to the names?

  • Hi Boolean_z,

    SOLVED!!!!

    I get results for all the servers, the prob.had to do with my network configuration.

    I needed to specify also, our network url beside the server name. (servername.domain.com) .

    For other folks that might want to use the script, remember, the url stuff had to do with my particular kind of network config.

    In a normal scenario(Boolean_z correct me if am wrong) , I think, just, the server name is fine.

    Thank..........................................................s:-D

  • It depends, for my enterprise, we can connect to any sql server from our central monitoring server.

  • greg eze (4/2/2009)


    To make use of RPC, I will definitely have to turn off the fire walls of those machines,we have them turned on by default. That's where the security issue comes in.

    I shall try the script Boolean_z sent to me when am done with what am doing right now, and let you'all know as soon as possible. However any further input will be welcomed.

    Many thanks to everyone that has contributed so far.

    You do realize that this implies that most SQL Server Client software & apps cannot talk to the SQL Servers because they use this same mechanism?

    [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]

  • Could be. Thank you one more time.

Viewing 6 posts - 16 through 20 (of 20 total)

You must be logged in to reply to this topic. Login to reply