搜索
首页数据库mysql教程Solaris上Oracle数据库开机自动启动方法

Solaris上Oracle数据库开机自动启动方法总结: 一、Solaris上开机自动启动 Solaris在开机时,会自动运行/etc/rc.d目录下的所有脚

Solaris上Oracle数据库开机自动启动方法总结:

一、Solaris上开机自动启动

Solaris在开机时,会自动运行/etc/rc.d目录下的所有脚本,其中N越大,执行的级别越高。其中,S开头的脚本在开机时自动运行,K开头的脚本在关机时自动运行。

二、Oracle上的启动脚本

启动脚本可以自己编写,也可以使用Oracle自带的启动和关闭数据库的脚本。

Oracle自带脚本:$ORACLE_HOME/bin/dbstart、$ORA_HOME/bin/dbshut

特别需要注意的是:dbstart中的参数PFILE可能存在问题,需要手动修改。

1、如在oracle用户下运行dbstart命令没有反应,,则需要在文件/var/opt/oracle/oratab中将“ora:/export/home/oracle/product/9.2:N”修改为“ora:/export/home/oracle/product/9.2:Y”。

三、设置Oracle自动启动步骤(使用Oracle自带脚本)

1、修改dbstart、dbshut脚本,保证直接运行时可启动和关闭数据库;

2、新建调用dbstart、dbshut的脚本dbora放置在/etc/init.d目录下,dbora的内容如下:

#!/bin/sh
ORA_HOME=/export/home/oracle/app/oracle/products/9.2.0
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
  then
  echo "Oracle startup:cannot start"
  exit
fi
case "$1" in
'start' )
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart &
/etc/init.d/dblsnrctl.sh
;;
'stop' )
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut &
;;
esac

3、新建启动lsnrctl的脚本dblsnrctl.sh(dbora脚本将调用此脚本)防止在/etc/init.d目录下,dblsnrctl.sh的内容如下:

#!/bin/sh

su - oracle

lsnrctl start

exit

4、修改dbora脚本和dblsnrctl.sh脚本的权限,以保证可运行:

#chmod 755 /etc/init.d/dbora

#chmod 755 /etc/init.d/dblsnrctl.sh

5、在/etc/rc2.d中设置启动链接:

#cd /etc/rc2.d

6、在/etc/rc0.d中设置关闭链接:

#cd /etc/rc0.d

声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
如何在MySQL中删除或修改现有视图?如何在MySQL中删除或修改现有视图?May 16, 2025 am 12:11 AM

todropaviewInmySQL,使用“ dropviewifexistsview_name;” andTomodifyAview,使用“ createOrreplaceViewViewViewview_nameAsSelect ...”。whendroppingaview,asew dectivectenciesanduse和showcreateateviewViewview_name;“ tounderStanditSsstructure.whenModifying

MySQL视图:我可以使用哪些设计模式?MySQL视图:我可以使用哪些设计模式?May 16, 2025 am 12:10 AM

mySqlViewScaneFectectialized unizedesignpatternslikeadapter,Decorator,Factory,andObserver.1)adapterPatternadaptSdataForomDifferentTablesIntoAunifiendView.2)decoratorPatternenhancateDataWithCalcalcualdCalcalculenfields.3)fieldfields.3)

在MySQL中使用视图的优点是什么?在MySQL中使用视图的优点是什么?May 16, 2025 am 12:09 AM

查看InMysqlareBeneForsImplifyingComplexqueries,增强安全性,确保dataConsistency,andOptimizingPerformance.1)他们simimplifycomplexqueriesbleiesbyEncapsbyEnculatingThemintoreusableviews.2)viewsEnenenhancesecuritybyControllityByControllingDataAcces.3)

如何在MySQL中创建一个简单的视图?如何在MySQL中创建一个简单的视图?May 16, 2025 am 12:08 AM

toCreateAsimpleViewInmySQL,USEthecReateaTeviewStatement.1)defitEtheetEtheTeViewWithCreatEaTeviewView_nameas.2)指定usethectstatementTorivedesireddata.3)usethectStatementTorivedesireddata.3)usetheviewlikeatlikeatlikeatlikeatlikeatlikeatable.views.viewssimplplifefifydataaccessandenenanceberity but consisterfort,butconserfort,consoncontorfinft

MySQL创建用户语句:示例和常见错误MySQL创建用户语句:示例和常见错误May 16, 2025 am 12:04 AM

1)foralocaluser:createUser'localuser'@'@'localhost'Indidendify'securepassword'; 2)foraremoteuser:creationuser's creationuser'Remoteer'Remoteer'Remoteer'Remoteer'Remoteer'Remoteer'Remoteer'Remoteer'Rocaluser'@'localhost'Indidendify'seceledify'Securepassword'; 2)

在MySQL中使用视图的局限性是什么?在MySQL中使用视图的局限性是什么?May 14, 2025 am 12:10 AM

mysqlviewshavelimitations:1)他们不使用Supportallsqloperations,限制DatamanipulationThroughViewSwithJoinSorsubqueries.2)他们canimpactperformance,尤其是withcomplexcomplexclexeriesorlargedatasets.3)

确保您的MySQL数据库:添加用户并授予特权确保您的MySQL数据库:添加用户并授予特权May 14, 2025 am 12:09 AM

porthusermanagementInmysqliscialforenhancingsEcurityAndsingsmenting效率databaseoperation.1)usecReateusertoAddusers,指定connectionsourcewith@'localhost'or@'%'。

哪些因素会影响我可以在MySQL中使用的触发器数量?哪些因素会影响我可以在MySQL中使用的触发器数量?May 14, 2025 am 12:08 AM

mysqldoes notimposeahardlimitontriggers,butacticalfactorsdeterminetheireffactective:1)serverConfiguration impactactStriggerGermanagement; 2)复杂的TriggerSincreaseSySystemsystem load; 3)largertablesslowtriggerperfermance; 4)highConconcConcrencerCancancancancanceTigrignecentign; 5); 5)

See all articles

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

Video Face Swap

Video Face Swap

使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

北端:融合系统,解释
4 周前By尊渡假赌尊渡假赌尊渡假赌
Mandragora:巫婆树的耳语 - 如何解锁抓钩
4 周前By尊渡假赌尊渡假赌尊渡假赌
<🎜>掩盖:探险33-如何获得完美的色度催化剂
2 周前By尊渡假赌尊渡假赌尊渡假赌

热工具

EditPlus 中文破解版

EditPlus 中文破解版

体积小,语法高亮,不支持代码提示功能

SublimeText3 Mac版

SublimeText3 Mac版

神级代码编辑软件(SublimeText3)

SublimeText3 英文版

SublimeText3 英文版

推荐:为Win版本,支持代码提示!

禅工作室 13.0.1

禅工作室 13.0.1

功能强大的PHP集成开发环境

SublimeText3汉化版

SublimeText3汉化版

中文版,非常好用