Hello, you are not logged in.  Login or sign up
Community >> Blogs
Search Toad World Search

Blogs
Toad and Database Commentaries

 Toad World blogs are a mix of insightful how-tos from Quest experts as well as their commentary on experiences with new database technologies.

Do you have a topic that you'd like discussed?  We'd love to hear from you.  Send us your idea for a blog topic.

Multi-Location Script Executions
 
Location: Blogs DB2    
 JimWankowski Wednesday, November 21, 2007 8:24 PM

In many cases there is a need to create an object or to execute an SQL statement in multiple locations. The group execute option in TOAD for DB2 allows you to execute a script against multiple environments with one easy step.  Let’s step through a few use cases.

Example 1:  A new table needs to be added to multiple databases.  The first step is to generate the necessary DDL and send it to the editor.

The next step is to go to the toolbar and select VIEW/GROUP EXECUTE:

The group execute window will open on the bottom of the editor, displaying all your cataloged connections.  Select the locations you wish to execute the DDL from and click the execute button.

Status messages will be displayed next to selected targets and script executions can be view on the right.

Example 2: Execute a query against multiple databases and validate that the same results set is being brought back.

Open the Query in the editor and select the VIEW/GROUP EXECTUE option.

Select the desired targets and execute the query.  Then right click on the results sets and send them to the Data Diff Viewer.

 

The Diff Viewer will then validate the results are the same.

As you can see the “Group Execute” option can be a very useful tool.  It is very easy to replicate script executions across multiple environments and even multiple platforms of DB2 concurrently.

Copyright ©2007 Quest Software Inc.
Permalink |  Trackback

Comments (1)   Add Comment
By hillbillyToad on Friday, November 30, 2007 7:25 AM
Reading this reminded of a similar feature in Toad for Oracle that is often overlooked, so thanks Jim for prodding me to investigate it!

If you want to run 1 or more scripts against 1 or more Oracle connections, just do this:

1)Open Toad for Oracle
2)Create your connections
3)Open the Script Manager
4)On the Script Manager toolbar, hit the dropdown control on the connection button. Toggle ON the connections you want your script(s) to execute against.
5)Add your script(s) to the Manager
6)Select the script(s) you want executed
7)Hit the Lightning Bolt Button
8)Toad will then execute your script against each connection selected in step 4, and provide output in a seperate tab at the bottom of the screen on the 'Output' tab.


Comment:
Add Comment   Cancel 
Search Blog Entries
 
Blogger and Topic List
 

 

All Recent Entries
 

 

Johannes Ahrends
Unicode

Steven Feuerstein
Oracle PL/SQL

Daniel Norwood
Toad for Data Analysis
John Pocknell
Toad for Oracle
Bert Scalzo
Toad for Oracle, Data Modeling, Benchmarking
Jeff Smith
Toad product family
Richard To
SQL Optimization
Jim Wankowski
DB2 - LUW and z/OS
John Weathington
Compliance
Doug Williams
Database Musings
  Henrik "Mauritz" Johnson
Toad Tips & Tricks on the "other" Toads
  Toad World Editor
Toad World issues

  Toad Data Modeler Opens in a new window
Data Modeling
 

Copyright 2008 by Quest Software  | Terms Of Use | Privacy Statement | Contact Us