24.12.2012 Views

Backing Up Oracle - Computing at Cornell

Backing Up Oracle - Computing at Cornell

Backing Up Oracle - Computing at Cornell

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 11. Day-to-day monitoring on Windows 2000<br />

Once the TDP for <strong>Oracle</strong> implement<strong>at</strong>ion and environment has been set up,<br />

as described in the preceding chapters, it is recommended th<strong>at</strong> the regular<br />

day-to-day tasks be monitored and autom<strong>at</strong>ed for more efficient execution.<br />

This chapter details some of the processes and tasks which can be used.<br />

11.1 Autom<strong>at</strong>ing d<strong>at</strong>abase tasks<br />

There are some <strong>Oracle</strong> d<strong>at</strong>abase tasks which can be autom<strong>at</strong>ed as detailed<br />

below. These are best determined by the <strong>Oracle</strong> DBA.<br />

11.1.1 Starting SQL*Net and RDBMS services <strong>at</strong> system reboot<br />

During the <strong>Oracle</strong> install<strong>at</strong>ion process, the <strong>Oracle</strong> services are set to start<br />

autom<strong>at</strong>ically. If they are not starting autom<strong>at</strong>ically, check the services to see<br />

wh<strong>at</strong> the startup mode is and modify it appropri<strong>at</strong>ely.<br />

11.2 Autom<strong>at</strong>ing RMAN backups<br />

In order to autom<strong>at</strong>e <strong>Oracle</strong> RMAN backups, you use the RMAN cmdfile<br />

option. When you specify cmdfile when invoking RMAN, then RMAN<br />

executes the file specified line by line. The file should be plain text. In<br />

Section 10.3.1, “Consistent whole d<strong>at</strong>abase backup” on page 163 we<br />

discussed the cre<strong>at</strong>ion of the scripts directory to hold our RMAN scripts. Also<br />

in th<strong>at</strong> section, we showed how to run the script backup_offline_beach using<br />

the cmdfile option.<br />

Instead of typing in the SET ORACLE_SID and RMAN commands each time,<br />

we cre<strong>at</strong>ed a simple command file called AUTORMAN.CMD, th<strong>at</strong> uses simple<br />

variable substitution to call the RMAN script and cre<strong>at</strong>e the log file. This file is<br />

based on a d<strong>at</strong>abase SID of BEACH, where the internal password of the<br />

BEACH d<strong>at</strong>abase is manager, and the user/password and d<strong>at</strong>abase of the<br />

recovery c<strong>at</strong>alog is rman/rman@rio, a directory c:\oracle\admin\scripts th<strong>at</strong><br />

contains the RMAN scripts. You will need to modify all of these values to<br />

correspond with your environment.<br />

set ORACLE_SID=BEACH<br />

rman target internal/manager@beach rcvc<strong>at</strong> rman/rman@rio<br />

cmdfile=c:\oracle\admin\scripts\%1 log=c:\oracle\admin\scripts\%1.log<br />

© Copyright IBM Corp. 2001 171

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!