March 23, 2004 at 8:57 am
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.
March 23, 2004 at 9:02 am
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
March 23, 2004 at 9:06 am
Nice, thanks! I was also hoping for something in QA, 'cause it's handy for ad-hoc work...
March 24, 2004 at 8:36 am
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.
March 24, 2004 at 9:10 am
Add -S%1 to have it open the connection in QA.
For a full list of options do isqlw /? in a command prompt
March 24, 2004 at 11:21 am
I was also hoping for something in QA
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply