下面是偶在 UNIX 上手工启动和关闭 Oracle9iAS 的步骤,分三部份:
1. 建立环境参数文件,如你用csh/tcsh, 建立 inf.csh, ias.csh 两个文件。如你用sh/ksh/bash, 建立 inf.ksh, ias.ksh 两个文件。
2. 手工启动Oracle9iAS的两步曲:(1).启动 Infrastrcture. (2).启动 iAS.
3. 手工关闭Oracle9iAS的两步曲:(1).关闭iAS.(2). 关闭Infrastrcture.(注意次序)
I. 建立环境参数文件:
[php]
- inf.csh
setenv ORACLE_BASE /usr4/app/oracle/product
setenv ORACLE_HOME /usr4/app/oracle/product/9ias_inf
setenv ORACLE_SID iasdb
setenv LD_LIBRARY_PATH $ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
setenv PATH {$PATH}:$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin
setenv PATH {$PATH}:$ORACLE_HOME/dcm/bin
- ias.csh
setenv ORACLE_BASE /usr2/app/oracle/product
setenv ORACLE_HOME /usr2/app/oracle/product/9ias_rl2
setenv ORACLE_SID iasdb
setenv LD_LIBRARY_PATH $ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
setenv PATH {$PATH}:$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin
setenv PATH {$PATH}:$ORACLE_HOME/dcm/bin
- inf.ksh
export ORACLE_BASE=/usr4/app/oracle/product
export ORACLE_HOME=/usr4/app/oracle/product/9ias_inf
export ORACLE_SID=iasdb
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin
export PATH=$PATH:$ORACLE_HOME/dcm/bin
- ias.ksh
export ORACLE_BASE=/usr2/app/oracle/product
export ORACLE_HOME=/usr2/app/oracle/product/9ias_rl2
export ORACLE_SID=iasdb
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin
export PATH=$PATH:$ORACLE_HOME/dcm/bin
[/php]
II. 手工启动Oracle9iAS的两步曲:
1. 启动 Infrastrcture.
[php]
% source inf.csh -- under sh/ksh, use $ . inf.ksh
% lsnrctl start -- startup TNS listener
% sqlplus -- Start Infrastructure Database
username: connect as sysdba
password: manager
SQL> startup
SQL> exit
% oidmon start -- Oracle Internet Directory Monitor
% oidctl server=oidldapd instance=1 configset=1 start -- Internet Directory
% dcmctl start -cl -- Start all application server instance in a cluster
-- This need a previously DISPLAY enviornment set like:
% setenv DISPLAY :0.0
% emctl start -- start EM webcite
userid/password=ias_admin/your_password
[/php]
2. 启动 iAS.
[php]
% source ias.sh -- under sh/ksh, use $ . ias.ksh
% dcmctl start -- ( -ct ohs, -ct oc4j does not work)
% webcachectl start
% rwserver.sh server=rep_yourserver authid=orcladmin/your_password &
-- Start up report service in the background.
-- Has to be started from a Xterm, and keep that
-- live Xterm for ever
[/php]
III. 手工关闭Oracle9iAS的两步曲:
1. 关闭iAS.
[php]
% source ias.sh -- under sh/ksh, use $ . ias.ksh
% rwserver.sh server=rep_yourserver shutdown=normal authid=orcladmin/your_passwd
-- shutdown the report service
% webcachectl stop -- stop Oracle WebCache
% dcmctl stop -- stop HTTP Server and OC4J
[/php]
2. 关闭Infrastrcture.
[php]
% source inf.csh -- under sh/ksh, use $ . inf.ksh
$ dcmctl stop -- Stop all application instance include em
% oidctl server=oidldapd instance=1 configset=1 stop -- Internet Directory
% oidmon stop -- Oracle Internet Directory Monitor
% lsnrctl stop -- TNS listener
% sqlplus (user: connect as sysdba; password: manager)
SQL>shutdown immediate;
Notes. After everything stoped, we still have: (Oracle Process Management and Notification)
oracle 20275 1 0 17:19:16 ? 0:00 /usr2/app/oracle/product/9ias_inf/opmn/bin/opmn -ds
oracle 20276 20275 0 17:19:16 ? 0:11 /usr2/app/oracle/product/9ias_inf/opmn/bin/opmn -ds
Just use the UNIX kill command to kill them:
% ps -Af |grep 9ias_inf
% kill -9 process_id
[/php]