Wednesday, March 30, 2011

How to execute sql script against multiple databases?

A friend of mine, ask me that question few days ago... At first moment, I give him some bash script that I have, for connecting to multiple hosts through ssh and than executing some commands, and tell him that he can easily change to connect with sqlplus with some list of connections and than run the sql script.
But, after some time, I tried to find some better way to do this...
After some reading, I found, and off course,  successfully tried this two ways of doing this:

1) EM grid control

In a book "Oracle Enterprise grid control 10g handbook" , in chapter 14 "Database Management in Grid Control", Page 447, we have workshop "run a SQL Script Against Multiple databases", where, in details, is explained how to achieve what we wanted.

preview: Oracle Enterprise grid control 10g handbook

 2) Toad ScriptManager

I will not copy/paste someone else work :-).. Here is a link and detail explanation:

Toad metod 1

3) Toad Project Manager 

And, my favorite, fastest and most elegant way:

Toad metod 2 

So much for this time!

No comments:

Post a Comment