Automatically open connections in QA

  • I frequently open connections to eight different sql servers to perform various functions - how can I quickly open these connections in one step?

     

     

    Thanks,

     

     

    Jim.

  • You could use isqlw. First create a script with the t-sql code you need to execute in all your servers and then from DOS, you could use something like this:

    C:\FOR %1 IN (Server1, Server2,Server3,Server4,Server5,Server6,Server7) DO isqlw -Uusername -Ppassword -iscript.sql -o%1.txt

    This will execute the script you created in all the servers you specify and save an output file with the servername.txt

  • Nice, thanks!  I was also hoping for something in QA, 'cause it's handy for ad-hoc work...

  • This is not quite as automatic, but definitely is faster than manually logging into multiple instances of QA. Use Enterprise Manager to connect to a server, then expand down to the Databases level for that server and select (highlight) a database. Then go to Tools, SQL Query Analyzer..., and QA will open, already connected to that database with the credentials you used in your SQL Server Registration properties for that server. A different QA window will open for each database.

  • Add -S%1 to have it open the connection in QA.

    For a full list of options do isqlw /? in a command prompt

  • I was also hoping for something in QA

     
    Notice that isqlw is QA by the command line. If you only execute isqlw with no parameters, then QA will open.
     
    You are right Antares, I forgot the Server parameter. Thanks!

Viewing 6 posts - 1 through 5 (of 5 total)

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