1)启动脚本(dbstart.sh)
1 lsnrctl start 2 sqlplus /nolog <<EOF 3 connect / as sysdba 4 startup; 5 exit 6 EOF
$sh dbstart.sh 即可
2)关闭脚本(dbstop.sh)
1 lsnrctl stop 2 sqlplus /nolog <<EOF 3 connect / as sysdba 4 shutdown immediate; 5 exit 6 EOF
$sh dbstop.sh 即可