首页 > 编程知识 正文

windows无法启动oracle服务(oracle启动数据库)

时间:2023-05-04 14:02:37 阅读:70947 作者:3477

解决了Oracle的EM无法启动EM。 提示localhost_oracledb not found。

[ Oracle @ oracledb~] $ emctlstartdbconsoleemconfigurationissue./app/Oracle/product/11.2.0/db _1/local ho ssho

(1)要重新创建em数据库,必须输入数据库SID、sys和sysman密码。

[ Oracle @ oracledb~] $ emca-reposrecreatestartedemcaatoct 31,20211336014336056无心哑铃, 版本11.2.0.3.0 production Oracle.all rights reserved.enterthefollowinginformation 3360数据库id : oracledblistention r swordforsysmanuser 3360------------------------------ willbeputinquiescemode--------。 ------------------------------------------.---------------------------------------------- ------------------------------------------.---------------------------------------------- [是(y ) /否(n ) ]: yOct 31, 20211336015336022 am Oracle.sysman.emconfigperforminfo : thisoperationisbeingloggedat/app/Oracle/cfgtoollloged emca _ ca 20211336015336023 am Oracle.sysman.emcp.emreposconfiginvokeinfo : droppingtheemrepository,thismaytakeawhile, oct 20211336017336008 am Oracle.sysman.emcp.emreposconfiginvokeinfo : repositorysuccessfullydroppedoct 31, 20211336017336009 am Oracle.sysman.emcp.emreposconfigcreaterepositoryinfo : creatingtheemrepository (thismaytakeawhillilitory sman.emcp.emreposconfiginvokeinfo : repositorysuccessfullycreatedenterprisemanagerconfiguration cesssfulllyfinishedemcatocatococation 20211336023:29am(2)配置数据库SYSMAN和DBSNMP帐户的初始密码为: oem_temp

邮件可以选择直接返回滑架。 过程需要等待一段时间。

[ Oracle @ oracledb~] $ emca-configdbcontroldbstartedemcaatoct 31,20211336035336017无心哑铃, 版本11.2.0.3.0产品2011年、 Oracle.all rights reserved.enterthefollowinginformation 3360数据库id : oracledblistenerportnumber 33601521监听器Oracle Oracle : ypasswordforsysuser 3360 passwordfordbsnmpuser 3360 oct 31, 20211336036:18 am Oracle.sysman.emcp.util.generalutilinitsqlengineloaclywarning 3360 ora-2800003360 theacccountiountiolocountiolocon tions (选项) : outgoing mail (SMTP ) serverfornotifications (选项) 3360----

ified the following settingsDatabase ORACLE_HOME ................ /app/oracle/product/11.2.0/db_1Local hostname ................ localhostListener ORACLE_HOME ................ YListener port number ................ 1521Database SID ................ oracledbEmail address for notifications ............... Outgoing Mail (SMTP) server for notifications ............... -----------------------------------------------------------------Do you wish to continue? [yes(Y)/no(N)]: yOct 31, 2021 1:36:45 AM oracle.sysman.emcp.EMConfig performINFO: This operation is being logged at /app/oracle/cfgtoollogs/emca/oracledb/emca_2021_10_31_01_35_16.log.Oct 31, 2021 1:36:51 AM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepositoryINFO: Uploading configuration data to EM repository (this may take a while) ...Oct 31, 2021 1:38:25 AM oracle.sysman.emcp.EMReposConfig invokeINFO: Uploaded configuration data successfullyOct 31, 2021 1:38:26 AM oracle.sysman.emcp.ParamsManager getLocalListenerWARNING: Error retrieving listener for localhostOct 31, 2021 1:38:27 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsoleINFO: Securing Database Control (this may take a while) ...Oct 31, 2021 1:38:35 AM oracle.sysman.emcp.util.PlatformInterface executeCommandWARNING: Error executing /app/oracle/product/11.2.0/db_1/bin/emctl secure dbconsole -host localhost -sid oracledb Oct 31, 2021 1:38:35 AM oracle.sysman.emcp.EMDBPostConfig performConfigurationWARNING: Error securing Database control.Oct 31, 2021 1:38:35 AM oracle.sysman.emcp.EMDBPostConfig setWarnMsgINFO: Error securing Database Control. Database Control has been brought-up in non-secure mode. To secure the Database Control execute the following command(s): 1) Set the environment variable ORACLE_UNQNAME to Database unique name 2) /app/oracle/product/11.2.0/db_1/bin/emctl stop dbconsole 3) /app/oracle/product/11.2.0/db_1/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user > 4) /app/oracle/product/11.2.0/db_1/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user > 5) /app/oracle/product/11.2.0/db_1/bin/emctl start dbconsole To secure Em Key, run /app/oracle/product/11.2.0/db_1/bin/emctl config emkey -remove_from_repos -sysman_pwd < Password for SYSMAN user >Oct 31, 2021 1:38:35 AM oracle.sysman.emcp.util.DBControlUtil startOMSINFO: Starting Database Control (this may take a while) ...Oct 31, 2021 1:38:41 AM oracle.sysman.emcp.EMDBPostConfig performConfigurationINFO: Database Control started successfullyOct 31, 2021 1:38:42 AM oracle.sysman.emcp.EMDBPostConfig performConfigurationINFO: >>>>>>>>>>> The Database Control URL is http://localhost:1158/em <<<<<<<<<<<Error securing Database Control. Database Control has been brought-up in non-secure mode. To secure the Database Control execute the following command(s): 1) Set the environment variable ORACLE_UNQNAME to Database unique name 2) /app/oracle/product/11.2.0/db_1/bin/emctl stop dbconsole 3) /app/oracle/product/11.2.0/db_1/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user > 4) /app/oracle/product/11.2.0/db_1/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user > 5) /app/oracle/product/11.2.0/db_1/bin/emctl start dbconsole To secure Em Key, run /app/oracle/product/11.2.0/db_1/bin/emctl config emkey -remove_from_repos -sysman_pwd < Password for SYSMAN user >[oracle@oracledb ~]$ (3)开机启动项 [root@oracledb ~]# cat /etc/rc.local#!/bin/bash# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES## It is highly advisable to create own systemd services or udev rules# to run scripts during boot instead of using this file.## In contrast to previous versions due to parallel execution during boot# this script will NOT be run after all other services.## Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure# that this script will be executed during boot.touch /var/lock/subsys/localsu - oracle -c 'dbstart'su - oracle -c 'lsnrctl start'su - oracle -c 'emctl start dbconsole' (4)日常管理 手工启动em

先设置ORACLE_SID环境变迷路的彩虹,启动EM console服务

emctl start dbconsole

先设置ORACLE_SID环境变迷路的彩虹,停止EM console服务

emctl stop dbconsole

先设置ORACLE_SID环境变迷路的彩虹,查看EM console服务的状态

emctl status dbconsole

配置dbconsole的步骤

emca -repos create

emca -config dbcontrol db

emctl start dbconsole

重新配置dbconsole的步骤

emca -repos drop

emca -repos create

emca -config dbcontrol db

emctl start dbconsole

(5) 常用命令

emca -repos create创建一个EM资料库

emca -repos recreate重建一个EM资料库

emca -repos drop删除一个EM资料库

emca -config dbcontrol db配置数据库的 Database Control

emca -deconfig dbcontrol db删除数据库的 Database Control配置

emca -reconfig ports 重新配置db control的端口,默认端口在1158

emctl start console启动EM console服务,使用前需要先设置ORACLE_SID环境变量

emctl stop console停止EM console服务,使用前需要先设置ORACLE_SID环境变量

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。