RMAN parameters, in scripts (only Oracle 11g or later)

When we make a list of the backups made with:

Source   
RMAN> list backup summary;

For example, we may have problems locating a backupset. The result is quite confusing and certainly inelegant labels are created by default.

Continue reading

RMAN restore backup, from tape to another server

A good exercise to verify that a backups made it correctly, is prepare a script that does a restoring on demand to another server (frequently in preproducction environment)

I tell a restoring and not a clone (something really amazing that you can clone a DB without stop it until current time), because the cloned needs the origin DB (surely production) has to remain in open state and in case of disaster this is not the scenario.

The restoring show here was made without external RMAN catalog (is using only information of controlfile as catalog), this forces to have enable the option: Continue reading

Automatic start Oracle database linux RedHat

A small script to automatically start an Oracle DB:

Source   
# chkconfig: 2345 80 20
# description: Oracle Database
#!/bin/bash
start() {
su - oracle <<EOF
lsnrctl start
sqlplus / as sysdba<<EOO
startup
EOO
EOF
}
stop() {
su - oracle <<EOF
sqlplus / as sysdba<<EOO
shutdown immediate
EOO
lsnrctl stop
EOF
}
case "$1" in
start)
start
;;
stop)
stop
;;
*)
echo $"Usage: $0 {start|stop}"
esac

Start the database as “oracle” user, you have to have all correctemente configured environment variables.

You can install this script with chkconfig, because the head is prepared for this