AUTO START ORACLE ON LINUX(zt)
LINUX下AUTO START ORACLE(保留一下)
1, user root 下面修改:
[root@hpcmdb2 ~]# vi /etc/oratab
orc1:/opt/oracle/product/10.2.0/db_1:Y
將N該為Y
2, user oracle 下面修改:
[root@hpcmdb2 init.d]# su - oracle
[oracle@hpcmdb2 ~]$ cd $ORACLE_HOME/bin
[oracle@hpcmdb2 ~]$ cd $ORACLE_HOME/bin
[oracle@hpcmdb2 bin]$ vi dbstart
找到 ORACLE_HOME_LISTNER 這行, 修改成:
ORACLE_HOME_LISTNER=/opt/oracle/product/10.2.0/db_1
或者直接修改成:
ORACLE_HOME_LISTNER=$ORACLE_HOME
同樣道理修改 dbshut
[oracle@hpcmdb2 bin]$ vi dbshut
測試執行 dbshut, dbstart 看能否啟動oracle 服務及listener服務
[oracle@hpcmdb2 bin]$ ps -efw | grep ora_
[oracle@hpcmdb2 bin]$ lsnrctl status
[oracle@hpcmdb2 bin]$ ps -efw | grep LISTEN | grep -v grep
在切換回 user root:
[root@hpcmdb2 init.d]# cd /etc/rc.d/init.d/
[root@hpcmdb2 init.d]# vi oracle10
#!/bin/bash
# chkconfig: 345 99 10
# description: Startup Script for Oracle Databases
# /etc/init.d/oracle10
export ORACLE_SID=orc1
# export ORACLE_HOME_LISTNER=/opt/oracle/product/10.2.0/db_1/bin/
export ORACLE_BASE=/opt
export ORACLE_HOME=/opt/oracle/product/10.2.0/db_1
export PATH=$PATH:$ORACLE_HOME/bin
case "$1" in
start)
su oracle -c $ORACLE_HOME/bin/dbstart
touch /var/lock/oracle
echo "OK"
;;
stop)
echo -n "Shutdown Oracle: "
su oracle -c $ORACLE_HOME/bin/dbshut
rm -f /var/lock/oracle
echo "OK"
;;
*)
echo "Usage: 'basename $0' start|stop"
exit 1
esac
exit 0
# chkconfig: 345 99 10
# description: Startup Script for Oracle Databases
# /etc/init.d/oracle10
export ORACLE_SID=orc1
# export ORACLE_HOME_LISTNER=/opt/oracle/product/10.2.0/db_1/bin/
export ORACLE_BASE=/opt
export ORACLE_HOME=/opt/oracle/product/10.2.0/db_1
export PATH=$PATH:$ORACLE_HOME/bin
case "$1" in
start)
su oracle -c $ORACLE_HOME/bin/dbstart
touch /var/lock/oracle
echo "OK"
;;
stop)
echo -n "Shutdown Oracle: "
su oracle -c $ORACLE_HOME/bin/dbshut
rm -f /var/lock/oracle
echo "OK"
;;
*)
echo "Usage: 'basename $0' start|stop"
exit 1
esac
exit 0
儲存,
然後又是同樣的
chkconfig --add oracle10
chkconfig --list oracle10
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/756652/viewspace-242495/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Change AUTO_START in ASM Resource Oracle ClusterwareASMOracle
- oracle 10gr2 rac 修改auto_startOracle 10g
- linux start oracleLinuxOracle
- 引數FAST_START_PARALLEL_ROLLBACK(ZT)ASTParallel
- 關於session.auto_start報警的問題Session
- CRS-1205:Auto-start failed for the CRS resourceAI
- 關於session.auto_start報警的問題薦Session
- [zt] Oracle10g ASM Auto IO Rebalance新特性及ASM體系結構OracleASM
- 如何啟用sqlplus的auto trace功能(zt)SQL
- Linux auto-mountLinux
- Oracle Start with ....Connect ByOracle
- 隨身碟(auto病毒)類病毒分析與解決方案(zt)
- START WITH and CONNECT BY in Oracle SQLOracleSQL
- oracle enqueue(zt)OracleENQ
- [zt] dmt、lmt、mssm, assm (SEGMENT SPACE MANAGEMENT AUTO) 的一點總結SSM
- oracle中start with connect by priorOracle
- Oracle DataPump Quick Start [ID 413965.1]OracleUI
- Oracle10g RAC for Linux配置全過程(zt)OracleLinux
- ORACLE LARGE MEMORY(zt)Oracle
- oracle job管理(zt)Oracle
- oracle event 2 (zt)Oracle
- [zt] Oracle LogMinerOracle
- zt_oracle indexOracleIndex
- Oracle RAC TAF [zt]Oracle
- Oracle的MTS (ZT)Oracle
- oracle block 格式 (zt)OracleBloC
- ORACLE ROWID (zt)Oracle
- [zt] ORACLE RAC原理Oracle
- jboss oracle rac (zt)Oracle
- Linux下oracle10g安裝配置說明(ZT)LinuxOracle
- oracle10.2.0.2 bug "AUTO SGA: Not freeOracle
- Oracle Database Cloud - Database as a Service Quick StartOracleDatabaseCloudUI
- Oracle start with connect by PostgreSQL recursive cteOracleSQL
- 【AUTO】配置Oracle資料庫和監聽隨Linux系統自啟動Oracle資料庫Linux
- oracle time_zone(zt)Oracle
- ZT oracle全文索引Oracle索引
- (zt)Oracle效能調整Oracle
- Oracle Job 小結(ZT)Oracle