Once you have the Application Server 10g
installed, you need to create scripts that set the operating system
environment variables. If you have more than on instance on a
server, you need to create a script from each instance.
The Enterprise Manager Application Control web site is a great tool
and should be used for most maintenance. Those with experience
with the 9iAS Enterprise Manager will be pleasantly surprised at the
speed that Application Control 10g executes. Even with the
improvement 10g brings to the Enterprise Manager web site, you will
still occasionally need to work from the operating system and you
will need to set the environmental variables.
Each instance has its own ORACLE_HOME where
it’s datafiles are located. If you issue the command:
[oracle@appsvr oracle]$ opmnctl stopall
The operating system will execute the first
opmnctl file that is finds while traversing the PATH variable.
This may not be the file you are trying to execute. Since each
instance has its own environment, the easiest way to do this is to
make an environment file for each instance on the server.
When creating the script you need to save the
old PATH list so that it can be reset each time the script is run.
Otherwise, the current PATH will just continue to grow as you run
each script. I save my PATH at logon in an environment
variable PATH_OLD (in oracle .bash_profile).
PATH_OLD = $PATH;
export PATH_OLD
Then I start each environment script by
reestablishing the original path.
For each instance on a sever you need to
define:
Here is an example script that sets the
environmental variables for the Infrastructure instance
ORACLE_HOME=/u01/oracle; export ORACLE_HOME
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib: \
/usr/local/bin;
export LD_LIBRARY_PATH
ORACLE_SID=asdb; export ORACLE_SID
PATH=/usr/bin:$ORACLE_HOME/bin: \
$ORACLE_HOME/opmn/bin: \
$PATH_OLD; export PATH
To use
the above script run it with the source command.
[oracle@appsvr oracle]$ source infra10g
or use
the "." to run it in a scripts.
[oracle@appsvr oracle]$ . /home/oracle/infra10g
Now when
you execute opmnctl, the OS runs the correct command.
You can
also set environmental variables in a Windows environment by using a
batch file and the set command.
set
ORACLE_HOME=f:\oracle\infra10g
Again,
most of you maintenance and configuration will be executed in the
Enterprise Manager Application Control 10g web site, but when you
need to from the OS, having the environmental variables configures
will insure that you are executing the correct program on the
correct instance.
|