Linux 下面如何设置Oracle的自动启…

Linux 下面如何设置Oracle的自动启动.

1. 先设置 /etc/oratab 文件.
添加一下信息.

$ORACLE_SID:$ORACLE_HOME:Y|N
Y表示在系统启动的时候, 自动启动,
N表示在系统启动的时候不启动.

  Code:

[Copy to clipboard]  

[oracle@xdanal ydhf]$ more /etc/oratab
webora9:/oracle/product/9.2.4:Y
[oracle@xdanal ydhf]$

 


2. 修改/etc/rc.d/rc.local
添加一下信息.

su - oracle -c 'dbstart'
su - oracle -c 'lsnrctl start'

  Code:

[Copy to clipboard]  

[oracle@xdanal ydhf]$ more /etc/rc.d/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

su - oracle -c 'lsnrctl start'
su - oracle -c 'dbstart'
[oracle@xdanal ydhf]$

 


3. 在命令行测试使用dbstart, dbshut脚本, 看看脚本是不是能够正常启动关闭数据库,
dbshut中默认使用shutdown 命令关闭的. 即使用shutdown normal关闭的.

如果需要可以修改, $ORACLE_HOME/bin/dbshut脚本, 将shutdown 修改为shutdown immediate. 这样关闭数据库的时间会大大加快:)

注:

1、In some cases for 9.2.0 I also had to copy the init file for my SID "test" from /opt/oracle/admin/test/pfile to $ORACLE_HOME/dbs to get dbstart and dbshut working:  
cp /opt/oracle/admin/test/pfile/inittest.ora.642002224936 $ORACLE_HOME/dbs/inittest.ora
But first make sure if your init file already exists in $ORACLE_HOME/dbs!

2some bugs in dbstart when you using spfile in oracle9i

You can do the following step to solve it:

代码:--------------------------------------------------------------------------------

- edit the dbstart script

  - add the following line:

       SPFILE=${ORACLE_HOME}/dbs/spfile${ORACLE_SID}.ora

   after this line:

       PFILE=${ORACLE_HOME}/dbs/init${ORACLE_SID}.ora

      - change:

        if [ -f $PFILE ] ; then    

       to:

              if [ -f $PFILE -o -f $SPFILE ] ; -------------------------------------------------------------------

 

 

 

 


Linux 下面如何设置Oracle的自动启动.

1. 先设置 /etc/oratab 文件.
添加一下信息.

$ORACLE_SID:$ORACLE_HOME:Y|N
Y表示在系统启动的时候, 自动启动,
N表示在系统启动的时候不启动.

  Code:

[Copy to clipboard]  

[oracle@xdanal ydhf]$ more /etc/oratab
webora9:/oracle/product/9.2.4:Y
[oracle@xdanal ydhf]$

 


2. 修改/etc/rc.d/rc.local
添加一下信息.

su - oracle -c 'dbstart'
su - oracle -c 'lsnrctl start'

  Code:

[Copy to clipboard]  

[oracle@xdanal ydhf]$ more /etc/rc.d/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

su - oracle -c 'lsnrctl start'
su - oracle -c 'dbstart'
[oracle@xdanal ydhf]$

 


3. 在命令行测试使用dbstart, dbshut脚本, 看看脚本是不是能够正常启动关闭数据库,
dbshut中默认使用shutdown 命令关闭的. 即使用shutdown normal关闭的.

如果需要可以修改, $ORACLE_HOME/bin/dbshut脚本, 将shutdown 修改为shutdown immediate. 这样关闭数据库的时间会大大加快:)

注:

1、In some cases for 9.2.0 I also had to copy the init file for my SID "test" from /opt/oracle/admin/test/pfile to $ORACLE_HOME/dbs to get dbstart and dbshut working:  
cp /opt/oracle/admin/test/pfile/inittest.ora.642002224936 $ORACLE_HOME/dbs/inittest.ora
But first make sure if your init file already exists in $ORACLE_HOME/dbs!

2some bugs in dbstart when you using spfile in oracle9i

You can do the following step to solve it:

代码:--------------------------------------------------------------------------------

- edit the dbstart script

  - add the following line:

       SPFILE=${ORACLE_HOME}/dbs/spfile${ORACLE_SID}.ora

   after this line:

       PFILE=${ORACLE_HOME}/dbs/init${ORACLE_SID}.ora

      - change:

        if [ -f $PFILE ] ; then    

       to:

              if [ -f $PFILE -o -f $SPFILE ] ; -------------------------------------------------------------------
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
根据引用的内容,这段引用中包含了一些Vue.js代码和HTML代码,并讨论了换行符和空格在网页中的使用。其中,引用是关于添加和还原换行符的方法,引用是关于在编辑数据时获取详情和使用textarea的示例代码,引用是关于HTML中空格的处理和字符实体的使用。 问题中提到的&nbsp;是HTML中表示空格的字符实体。HTML通常会自动截取多余的空格,不管你加多少空格,都被看做一个空格。为了在网页中增加空格,可以使用&nbsp;表示空格。此外,还有其他常用的字符实体,如<表示小于号,>表示大于号,&表示&符号,"表示双引号,等等。 需要注意的是,引用的内容中有一些HTML实体被转义了,所以在描述字符实体时需要参考编码转义后的字符。 根据给定的引用内容,我无法直接回答问题,因为问题中的信息不完整。请提供更具体的问题或补充说明,我将尽力为您提供帮助。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [js+v-html+正则表达式去除所有& nbsp和html标签(& nbsp 换行 )](https://blog.csdn.net/xm_w_xm/article/details/91992754)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *3* [html&nbsp;&nbsp;特殊字符(转)](https://blog.csdn.net/feiniu5566/article/details/13624619)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值