Linux and Shell Scripting Part 2

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 :)


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


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
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:)


You need to understand the Oracle architecture, but is this a limit for you?

Tom Kyte on his book Expert One-on-One Oracle, Chapter 1, Developing Successful Oracle Applications, Summary part mentions that : “You need to understand the Oracle architecture. You don’t have to know it so well that you are able to rewrite the server if you wanted but you should know it well enough that you are aware of the implications of using a particular feature.”

His book is an excellent resource for a newbie who wants to learn, understand Oracle Architecture. For the last five years each summer during our internship program we study these resources for 12 weeks time;

* Oracle® Database Concepts 10g Release 2 (10.2)
* Practical Oracle 8i: Building Efficient Databases by Jonathan Lewis
* Expert One-On-One by Thomas Kyte
* Efficient Oracle by Design by Thomas Kyte
* Oracle PL/SQL Best Practices by Steven Feuerstein
* Oracle PL/SQL Programming by Steven Feuerstein
* Oracle Introduction for Newbies

Tahiti, Tom Kyte, Jonathan Lewis and Steven Feuerstein enable young software engineers to adapt easily, no time wasting during their career startup with this kind of a guidance.

But after some years Kyte’s advice may start to limit you. If you feel to be able to rewrite a server similar to Oracle, below are my advised resources which you may want to check parallel to your Oracle expertise.

– An Introduction to Database Systems, by C.J. Date, Addison, Wesley
– A Guide to the SQL Standard, by C.J. Date, et. al, Addison, Wesley
– Fundamentals of Database Systems, by Elmasri and Navathe
– Transaction Processing, by Jim Gray, Morgan, Kaufmann
– Transactional Information Systems by Gerhard Weikum, Kaufmann
– Database Management Systems by Raghu Ramakrishnan , Johannes Gehrke
– Design of the UNIX Operating System by Maurice J. Bach
– Portable C and Unix System Programming by J. E. Lapin
– Advanced UNIX Programming by Marc J. Rochkind
– Solaris Internals(TM): Solaris 10 and OpenSolaris Kernel Architecture by Richard McDougall , Jim Mauro
– Solaris(TM) Performance and Tools: DTrace and MDB Techniques for Solaris 10 and OpenSolaris by Richard McDougall , Jim Mauro , Brendan Gregg
– Advanced Programming in the UNIX(R) Environment by W. Richard Stevens , Stephen A. Rago
Developer’s Frequently Asked Questions (FAQ) for PostgreSQL
PostgreSQL TODO List

Oracle OpenWorld 2007(OOW07) just started

It has been more than a week everybody was excited for the coming OOW07, and now it has come. For us who are not lucky to attend this year, we will be waiting for the best presentations to be published on OTN as traditionally and follow the feeds;

Oracle OpenWorld News Aggregator(RSS Feed)

Oracle OpenWorld 2007(OOW07)

Different Ways to Follow Oracle OpenWorld 2007

OOW Presentation Downloads

And a quick bomb – Check out Oracle VM :)

Also a new social network for Oracle users and developers

A Month Dedicated to Oracle Again, December 2007

I again volunteered to do a single man show(from front-end to the tables) with APEX, this time this project is also challenging with the end users’ needs which only can be handled with AJAX. As a result blogging and OTN forums stuff will be suspending for a small amount of time.

But next month will be big, first of all I am very happy to learn that I will be going to UKOUG 2007 to meet best of the best and some friends; Lewis, Kyte, Dyke, Senegacnik and much more. I had to choose Ukoug over Oow, I am sorry I will not be able to meet some of my friends in San Francisco this year :(

Also Alejandro Vargas, who owns one of my favorite Oracle blogs as I mentioned before, will be here in İstanbul, Turkcell Academy for a three days seminar on Oracle Database Maximum Availability Architecture(MAA) Best Practices. We agreed on the content with Alejandro, just the best practices based on 10gR2 and maybe some 11gR1 new enhancements also;

Day 1a – Automatic Storage Management(ASM) Best Practices
Day 1b – Real Application Clusters(RAC) Best Practices
Day 2a – Data Guard Best Practices
Day 2b – Recovery Manager(RMAN) Best Practices
Day 3a – Flashback Best Practices
Day 3c – Enterprise Manager Grid Control Best Practices

Another invitation came from Yıldız Teknik Üniversitesi and CeTurk group, I will be meeting and delivering a half day free seminar on Oracle database introduction, wait interface and simple 10046 response time analysis to the young software engineer and candidates.

As a tradition I will be putting all my notes and resources on my blog. Up to that times you may check this year’s previous notes –
Jonathan Lewis and Julian Dyke
Lutz Hartmann
Joze Senegacnik

Recent weeks past quite hard for me because of some really strong private problems, so I also want to thank for the support of my friends here and I feel very lucky to have Oracle in my life during this hard healing period.