linux环境 oracle19c 开机自启动

vim oracleStart.sh

#!/bin/sh
# chkconfig: 35 95 1
 
# description: init script. to start/stop oracle database19c
# match these values to your environment:

export ORACLE_BASE=/home/oracle/app/oracle;
export ORACLE_HOME=$ORACLE_BASE/product/19.3.0/db_1;
export ORACLE_SID=dzjg;
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin;
export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH;
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
ORACLE_USER=oracle;

# see how we are called:
start(){
	echo -n "starting oracle: "
	su - "$ORACLE_USER" << EOO
		lsnrctl start
		#exchange ORACLE_SID
		export ORACLE_SID=dzjg
		sqlplus /nolog <

你可能感兴趣的:(oracle开机自启动)