ITPUB??ì3
12月微软Hyper-V虚拟化沙龙主题征集
ITPUB论坛 » Oracle新技术/11g » 如何让oracle 10g在redht as3上自动加载服务

标题: 如何让oracle 10g在redht as3上自动加载服务
离线 好大的老鼠
一般会员



精华贴数 0
个人空间 0
技术积分 142 (12757)
社区积分 1 (33590)
注册日期 2002-5-17
论坛徽章:0
      
      

发表于 2004-4-18 02:31 
如何让oracle 10g在redht as3上自动加载服务

在REDHAT AS3 上安装orcle 10g成功,但是每次都要手打开服务
太麻烦,按照oracle的B10812_02
http://download.oracle.com/docs/pdf/B10812_02.pdf
中的Automating Database Startup and Shutdown 照做了,还是不行
能看到在加载oradb服务,但是都是停了10几秒后就跳过去了,也不知道如何才能看到错误信息?谁成功过,留个经验如何!


只看该作者    顶部
离线 Kamus
版主


精华贴数 51
个人空间 400
技术积分 46804 (13)
社区积分 3565 (391)
注册日期 2002-5-26
论坛徽章:30
现任管理团队成员2007年度ITPUB最佳技术原创精华ITPUB元老ITPUB北京九华山庄2008年会纪念徽章管理团队2007贡献徽章参与2007年甲骨文全球大会(中国上海)纪念
ITPUB北京香山2007年会纪念徽章管理团队2006纪念徽章会员2007贡献徽章会员2006贡献徽章授权会员2008北京奥运纪念徽章:跳水

发表于 2004-4-18 02:45 
PHP code:


#!/bin/sh



# Set ORA_HOME to be equivalent to the $ORACLE_HOME

# from which you wish to execute dbstart and dbshut;

#

# Set ORA_OWNER to the user id of the owner of the

# Oracle database in ORA_HOME.



ORA_HOME=/oracle/product/10.1

ORA_OWNER
=oracle

LOG
=$ORA_HOME/startup.log



touch $LOG

chmod a
+r $LOG



if [! -f $ORA_HOME/bin/dbstart]

then

     
echo "Oracle startupcannot start"

     exit

fi



#case "$1" in

#     'start')

#

#          # Start the Oracle databases:

#          # The following command assumes that the oracle login

#          # will not prompt the user for any values

#

#     su - $ORA_OWNER -c $ORA_HOME/bin/dbstart &

#     ;;

#

#     'stop')

#

#          # Stop the Oracle databases:

#          # The following command assumes that the oracle login

#          # will not prompt the user for any values

#

#     su - $ORA_OWNER -c $ORA_HOME/bin/dbshut &

#     ;;

#

#esac



case $1 in

'start')

        echo &
quot;$0starting up" >> $LOG

        date 
>> $LOG

        
# Start Oracle Net

        
if [ -f $ORA_HOME/bin/lsnrctl ] ;

        
then

                
echo "starting Oracle Net listener"

                
su $ORA_OWNER -'/oracle/product/10.1/bin/lsnrctl start LISTENER1'>> $LOG 2>&&

        
fi

        
echo "starting Oracle databases"

        
su $ORA_OWNER -c $ORA_HOME/bin/dbstart >> $LOG 2>&1

        
;;

'stop')

        echo &
quot;$0shutting down" >> $LOG

        date 
>> $LOG

        
# Stop Oracle Net

        
if [ -f $ORA_HOME/bin/lsnrctl ] ;

        
then

                
echo "stopping Oracle Net listener"

                
su $ORA_OWNER -'/oracle/product/10.1/bin/lsnrctl stop LISTENER1'>> $LOG 2>&1

        fi

        
echo "stopping Oracle databases"

        
su $ORA_OWNER -c $ORA_HOME/bin/dbshut >> $LOG 2>&1

        
;;

*)

        echo &
quot;usage: ${start|stop}"

        exit

        ;;

esac

#

exit

上面是dbora脚本,link什么的我就不说了
启动完毕以后去检查startup.log文件,如果有错会显示的


__________________
有事情请发Gmail邮箱,站内IM可能不能及时回复。    

***Chanel [K]***

从明天起, 做一个幸福的人  
喂马, 劈柴, 周游世界  
从明天起, 关心粮食和蔬菜  
我有一所房子 面朝大海, 春暖花开
只看该作者    顶部
离线 好大的老鼠
一般会员



精华贴数 0
个人空间 0
技术积分 142 (12757)
社区积分 1 (33590)
注册日期 2002-5-17
论坛徽章:0
      
      

发表于 2004-4-18 07:36 
还是不行,比原来还严重。ORA_HOME没设错,步骤也对,怎么这么邪门?


只看该作者    顶部
离线 好大的老鼠
一般会员



精华贴数 0
个人空间 0
技术积分 142 (12757)
社区积分 1 (33590)
注册日期 2002-5-17
论坛徽章:0
      
      

发表于 2004-4-18 15:43 
写了一个脚本搞定了,其实很简单,只要往/etc/rc.local里面加服务名就行了!


只看该作者    顶部
 
    

相关内容


CopyRight 1999-2006 itpub.net All Right Reserved.
北京皓辰广域网络信息技术有限公司. 版权所有
E-mail:Webmaster@itpub.net
京ICP证:010037号 联系我们 法律顾问