Extract(Read) > Transform(Test&Apply) > Load(Learn) Blog

November 29, 2007

Linux and Shell Scripting Part 2

Filed under: Oracle, Linux and Shell Scripting — H.Tonguç Yılmaz @ 3:08 pm

There are several series I couldn’t get into as much as I wanted last year. BIS, Security, Linux, Apex and Information Integration are some of these, let’s say maybe next year, of course if time remains from 11g new features stuff :) So this one goes to Linux category.

One of my colleagues needed my help on some shell scripting, since I love this I gave a break on my Apex project I mentioned earlier in a post and helped her.

Request was to clone a remote 9i oracle schema into local 10g database and make it read only, a periodically unix cron runnable script is needed. So script should involve four main parts at least;
A. sqlplus to drop and recreate local clone user,
B. export remote schema to local dump file,
C. import remote schema from local dump file,
D. sqlplus to revoke all unwanted grants on the schema, just the SELECT type of privileges may remain.

Here are the scripts we used, you may check them, comment on them and maybe you might want to use these as templates for your needs, because I do so when I start any kind of Oracle shell script need, time is saved :)

clone_user.ksh
step1.sql
step4.sql

Since there are some attractions used, here you will also find my comments on the scripts mentioned above.

comments.txt

During my Apex work last several weeks I benefited so much from OTN Apex forum, very active and effective forum, whenever I faced a problem there I found the exact detailed solution easily. So a bunch of thanks from me goes to below experts for putting their valuable time into all OTN forums, several times they saved me;

Scott Spadafore
Hans Forbrich
Vikas
Nicolas Gasparotto
Hector Rivera Madrid
Rob van Wijk

It is great to feel your support behind guys, take care! :)

Lately I learned that Steven Feuerstein will be in Istanbul for a two days seminar, he subscribed and announced his seminar to OracleTURK group members, it was really fun to monitor the feedbacks of the group members. Including me Steven has lots of fans here in Turkey, so I guess he may have a similar crowd waiting which Roberto Carlos experienced during his first arrival to Atatürk Airport after his transfer from Real Madrid to my team Fenerbahçe this year :)

ps : lately two important names Jonathan Lewis and Howard Rogers are also active at OTN forums, I hinted this one because you also might want to watch their posts over OTN forums rss feeds since usually each post of them is like an article to study(but be warned, if Burleson is included within the thread then things may get a little complicated:).

Another additional hint goes for Dizwell, he has his own way of sharing his experiences, which may help you to extra enjoy reading his long feedbacks:)

2 Comments »

  1. Thanks for sharing your own experience, and for your nice feedback !
    Keep it up,
    Nicolas.

    Comment by nicolasgasparotto — December 9, 2007 @ 1:44 pm | Reply

  2. Recently I learned that this need of cloning a schema over database link can be handled with 10g EM :)

    Comment by H.Tonguç Yılmaz — December 19, 2007 @ 7:19 pm | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: