新建文件名为Oracle
- [root@stark init.d]# pwd
- /etc/init.d
- [root@stark init.d]# touch oracle
向oracle中添加下列内容
- #!/bin/bash
- # chkconfig: 35 95 1
- # description: init script. to start/stop oracle database 10g, TNS listener
- # match these values to your environment:
- export ORACLE_BASE=/oracle
- export ORACLE_HOME=/oracle/10.2
- export ORACLE_TERM=xterm
- export PATH=/home$ORACLE_HOME/bin:$PATH:.
- export NLS_LANG=American_America.AL32UTF8
- export ORACLE_SID=stark
- export DISPLAY=localhost:0
- export ORACLE_USER=oracle
- case $1 in
- start)
- su - "$ORACLE_USER"<<stark
- lsnrctl start
- sqlplus /nolog<<jadeshow
- connect / as sysdba
- startup
- jadeshow
-
- stark
- ;;
- stop)
- su - "$ORACLE_USER"<<stark
- lsnrctl stop
- sqlplus /nolog<<jadeshow
- connect / as sysdba
- shutdown immediate
- jadeshow
-
- stark
- ;;
-
-
- *)
- echo "Usage: $0 {start|stop}"
- ;;
- esac
修改权限,使得oracle具有可执行权限
- [root@stark init.d]# chmod a+x oracle
添加oracle到系统服务并且开机启动
- [root@stark init.d]# chkconfig add oracle
- [root@stark init.d]# chkconfig oracle on
DUMP数据文件特定块到跟踪文件里Oracle EBS使用adpatch工具打patch过程相关资讯 Oracle数据库基础教程
- 在Oracle数据库中插入含有&符号的 (03/06/2013 09:20:14)
- Oracle 执行计划更改导致数据加工 (02/13/2013 14:45:04)
- 判断Oracle Sequence是否存在 (02/13/2013 14:32:26)
| - Oracle数据库中无法对数据表进行 (02/26/2013 14:24:58)
- Oracle 在同一台主机上建立用户管 (02/13/2013 14:40:58)
- Oracle em 无法启动,报not found错 (02/13/2013 14:29:48)
|
本文评论 查看全部评论 (0)