current page: scripts
Nederlandse versie



Usage is free. Try and use at your own risk.

Some usefull scripts

remote_metadata

A simple sql script that show how to use dbms_metadata api to modify DDL from existing tables taken from a remote database.
Usage is free. Try and use at your own risk.

ora_backup.sh

Have you ever needed a simple backup script that runs on AIX and Solaris, that is able to to a HOT and COLD backup, supports cooked files and raw devices ans also is able to backup an OPS configuration ? ora_backup.sh does this. It's been tested on AIX, Solaris, tru64 and macos but I expect no problems on HP-UX too. Oracle versions 7.3.4 up until 9i have been successfully backed up. The OPS option has only been verified on oracle 8.1.5, 8.1.6 and 9i The restore script is generated during the backup.

features

ora_backup.sh -s ORACLE_SID -t HOT:ARCH -d /somewhere/on/disc -m
Usage is free. Try and use at your own risk.

clean_arch.sh

clean_arch.sh works together with ora_backup.sh. As soon as the filesystem is filled more that a given percentage the cleaning of the oldest archives that are not required for recovery are removed. clean_arch.sh Run clean_arch.sh on a very regular basis from cron.
Usage is free. Try and use at your own risk.

getLogs

When you plan to use ora_backup.sh on an OPS installation you also might need getLogs.sh. It has to be installed on very node of the cluster in the crontab to copy all archived log files to all other nodes of the cluster. Every instance needs to have 2 archive destinations. One that contains all files (arch) and one that only contains the newer files (delta). The files from all delta locations will be transferred to the node running getLogs. When all nodes have the files, cleanDelta is allowed to clean the files that are on every node.
Usage is free. Try and use at your own risk.

clear_alertlog.tcl

When OEM raises the 'alert' event it is not reset until the alertfile is cleared or the event has been deleted from the history. when you plan to use the history for logging, this script will work conveniently when you solved the alert message and want the entry to be saved and the event flag cleared to green. clear_alertlog.tcl Select the target database for which the job has to run and moments later the flag will be cleared.
Usage is free. Try and use at your own risk.

heavy.sql

This little peace of pl/sql identifies the queries that perform lot's of diskreads. heavy.sql get's the full sql text from the quiries in the sga and explains them. When the query contains full tablescans, it is reported.
Usage is free. Try and use at your own risk.

resize_log.sql

This resize_log.sql shows the current online redolog members and asks which group has to be adjusted. Simple but easy.
Usage is free. Try and use at your own risk.

grab.tcl

This grab.tcl is usable in combination with OEM 9.2 and scheduled reports where results are listed in separate html files per target. Grab.tcl can help translating the html table to csv files to be processed by sqlldr.
Usage is free. Try and use at your own risk.

dbms_scheduler

A simple example of a job chain with some event handling. Run the enclosed install.sql script as sysdba and use dbconsole to view the job system.
Usage is free. Try and use at your own risk.

Last updated on 26-11-2007
Comments or questions on this site can be mailed to webmaster@ronr.nl