一次配置oracle em的经历
对oracle10grac配置em,原本是非常简单的事,却花费了很长时间,记录下来,备忘。 首先是报如下错误: [oracle@node1 admin]$ emca -config dbcontrol dbSTARTED EMCA at Aug 17, 2014 9:06:47 AMEM Configuration Assistant, Version 10.2.0.5.0 Production
对oracle10grac配置em,原本是非常简单的事,却花费了很长时间,记录下来,备忘。
首先是报如下错误:
[oracle@node1 admin]$ emca -config dbcontrol db STARTED EMCA at Aug 17, 2014 9:06:47 AM EM Configuration Assistant, Version 10.2.0.5.0 Production Copyright (c) 2003, 2009, Oracle. All rights reserved. Enter the following information: Database SID: racdb1 Listener port number: 1521 Password for SYS user: Password for DBSNMP user: Aug 17, 2014 9:06:57 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngine WARNING: ORA-28000: the account is locked Password for SYSMAN user: Aug 17, 2014 9:07:02 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngine WARNING: ORA-28000: the account is locked Email address for notifications (optional): Outgoing Mail (SMTP) server for notifications (optional): ASM ORACLE_HOME [ /u01/app/oracle/product/11.2.0/db ]: ASM SID [ +ASM ]: ASM port [ 1521 ]: ASM user role [ SYSDBA ]: ASM username [ SYS ]: ASM user password: ASM user password: ----------------------------------------------------------------- You have specified the following settings Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db Local hostname ................ node1 Listener port number ................ 1521 Database SID ................ racdb1 Email address for notifications ............... Outgoing Mail (SMTP) server for notifications ............... ASM ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db ASM SID ................ +ASM ASM port ................ 1521 ASM user role ................ SYSDBA ASM username ................ SYS ----------------------------------------------------------------- Do you wish to continue? [yes(Y)/no(N)]: y Aug 17, 2014 9:12:22 AM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at /u01/app/oracle/product/11.2.0/db/cfgtoollogs/emca/racdb/emca_2014-08-17_09-06-47-AM.log. Aug 17, 2014 9:12:34 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole INFO: Securing Database Control (this may take a while) ... Aug 17, 2014 9:13:01 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole INFO: Database Control secured successfully. Aug 17, 2014 9:13:01 AM oracle.sysman.emcp.util.DBControlUtil startOMS INFO: Starting Database Control (this may take a while) ... Aug 17, 2014 9:17:40 AM oracle.sysman.emcp.util.PlatformInterface executeCommand WARNING: Error executing /u01/app/oracle/product/11.2.0/db/bin/emctl start dbconsole Aug 17, 2014 9:17:40 AM oracle.sysman.emcp.EMConfig perform SEVERE: Error starting Database Control Refer to the log file at /u01/app/oracle/product/11.2.0/db/cfgtoollogs/emca/racdb/emca_2014-08-17_09-06-47-AM.log for more details. Could not complete the configuration. Refer to the log file at /u01/app/oracle/product/11.2.0/db/cfgtoollogs/emca/racdb/emca_2014-08-17_09-06-47-AM.log for more details.
[root@node1 ~]# cat /u01/app/oracle/product/11.2.0/db/cfgtoollogs/emca/racdb/emca_2014-08-17_09-06-47-AM.log
Aug 17, 2014 9:17:40 AM oracle.sysman.emcp.EMConfig perform CONFIG: Stack Trace: oracle.sysman.emcp.exception.EMConfigException: Error starting Database Control at oracle.sysman.emcp.EMDBPostConfig.performConfiguration(EMDBPostConfig.java:649) at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:227) at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:196) at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:184) at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:494) at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1161) at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:478) at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:426)
Oracle对此的解释是:
In Enterprise Manager Database Control with Oracle Database 10.2.0.4 and 10.2.0.5, the root certificate used to secure communications via the Secure Socket Layer (SSL) protocol will expire on 31-Dec-2010 00:00:00. The certificate expiration will cause errors if you attempt to configure Database Control on or after 31-Dec-2010. Existing Database Control configurations are not affected by this issue.
If you plan to configure Database Control with either of these Oracle Database releases, Oracle strongly recommends that you apply Patch 8350262 to your Oracle Home installations before you configure Database Control. Configuration of Database Control is typically done when you create or upgrade Oracle Database, or if you run Enterprise Manager Configuration Assistant (EMCA) in standalone mode.
可以查看:Enterprise Manager Database Control Configuration - Recovering From Errors Due to CA Expiry on Oracle Database 10.2.0.4 or 10.2.0.5 [Video] [ID 1222603.1]
解决方法:
如果是在创建实例前就已经打了这个patch的话,那之后就不会报错了。如果是在创建实例之后才打的这个patch,那么需要执行以下:
对于单实例:
1.使用Opatch安装Patch 8350262
2.设置ORACLE_HOME and ORACLE_SID 环境变量,执行
3.Re-secure Database Control with the following command:
4.Re-start Database Control with the following command:
对于RAC:
1.使用Opatch安装Patch 8350262, 在一个节点安装就ok了。
2.在所有节点执行:设置ORACLE_HOME and ORACLE_SID 环境变量,执行
3.Re-secure Database Control on the first cluster node with the following command:
4.Re-secure Database Control on the remaining cluster nodes with the following command. Note that the -reset switch is not included with this command:
5.Re-start Database Control by executing the following command on each node in the cluster:
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options SQL> DROP public synonym SETEMVIEWUSERCONTEXT; Synonym dropped. SQL> DROP PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS; Synonym dropped. SQL> drop role MGMT_USER; Role dropped. SQL> DROP USER MGMT_VIEW CASCADE; DROP USER MGMT_VIEW CASCADE * ERROR at line 1: ORA-01918: user 'MGMT_VIEW' does not exist SQL> DROP USER SYSMAN CASCADE; User dropped. SQL> exit
之后新建em成功,
[oracle@node1 ~]$ emca -config dbcontrol db -repos create STARTED EMCA at Aug 17, 2014 2:58:04 PM EM Configuration Assistant, Version 10.2.0.5.0 Production Copyright (c) 2003, 2009, Oracle. All rights reserved. Enter the following information: Database SID: racdb1 Listener port number: 1521 Password for SYS user: Password for DBSNMP user: Password for SYSMAN user: Email address for notifications (optional): Outgoing Mail (SMTP) server for notifications (optional): ASM ORACLE_HOME [ /u01/app/oracle/product/11.2.0/db ]: ASM SID [ +ASM ]: +ASM1 ASM port [ 1521 ]: ASM user role [ SYSDBA ]: ASM username [ SYS ]: ASM user password: ----------------------------------------------------------------- You have specified the following settings Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db Local hostname ................ node1 Listener port number ................ 1521 Database SID ................ racdb1 Email address for notifications ............... Outgoing Mail (SMTP) server for notifications ............... ASM ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db ASM SID ................ +ASM1 ASM port ................ 1521 ASM user role ................ SYSDBA ASM username ................ SYS ----------------------------------------------------------------- Do you wish to continue? [yes(Y)/no(N)]: y Aug 17, 2014 2:58:32 PM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at /u01/app/oracle/product/11.2.0/db/cfgtoollogs/emca/racdb/emca_2014-08-17_02-58-04-PM.log. Aug 17, 2014 2:58:34 PM oracle.sysman.emcp.EMReposConfig createRepository INFO: Creating the EM repository (this may take a while) ... Aug 17, 2014 3:02:14 PM oracle.sysman.emcp.EMReposConfig invoke INFO: Repository successfully created Aug 17, 2014 3:02:24 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole INFO: Securing Database Control (this may take a while) ... Aug 17, 2014 3:02:50 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole INFO: Database Control secured successfully. Aug 17, 2014 3:02:50 PM oracle.sysman.emcp.util.DBControlUtil startOMS INFO: Starting Database Control (this may take a while) ... Aug 17, 2014 3:04:27 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: Database Control started successfully Aug 17, 2014 3:04:27 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: >>>>>>>>>>> The Database Control URL is https://node1:1158/em <p><br> </p> 登陆之后,发现不是rac的em,重新配置 <p><br> </p><pre class="brush:php;toolbar:false">[oracle@node1 dbs]$ cd /u01/app/crs_home/bin [oracle@node1 bin]$ ./cemutlo -n crs [oracle@node1 bin]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Sun Aug 17 17:18:28 2014 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options SQL> show parameter name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_file_name_convert string db_name string racdb db_unique_name string racdb global_names boolean TRUE instance_name string racdb1 lock_name_space string log_file_name_convert string service_names string service1, SYS$ADMIN.TARGET_QUE UE.RACDB.EPOINT.COM, service2, racdb.epoint.com SQL>
[oracle@node1 dbs]$ emca -config dbcontrol db -repos create -cluster STARTED EMCA at Aug 17, 2014 5:02:15 PM EM Configuration Assistant, Version 10.2.0.5.0 Production Copyright (c) 2003, 2009, Oracle. All rights reserved. Enter the following information: Database unique name: racdb Database Control is already configured for the database racdb You have chosen to configure Database Control for managing the database racdb This will remove the existing configuration and the default settings and perform a fresh configuration Do you wish to continue? [yes(Y)/no(N)]: y Listener port number: 1521 Cluster name: crs Password for SYS user: Password for DBSNMP user: Password for SYSMAN user: Email address for notifications (optional): Outgoing Mail (SMTP) server for notifications (optional): ASM ORACLE_HOME [ /u01/app/oracle/product/11.2.0/db ]: ASM port [ 1521 ]: ASM user role [ SYSDBA ]: ASM username [ SYS ]: ASM user password: ----------------------------------------------------------------- You have specified the following settings Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db Database instance hostname ................ node1 Listener port number ................ 1521 Cluster name ................ crs Database unique name ................ racdb Email address for notifications ............... Outgoing Mail (SMTP) server for notifications ............... ASM ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db ASM port ................ 1521 ASM user role ................ SYSDBA ASM username ................ SYS ----------------------------------------------------------------- Do you wish to continue? [yes(Y)/no(N)]: y Aug 17, 2014 5:02:38 PM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at /u01/app/oracle/product/11.2.0/db/cfgtoollogs/emca/racdb/emca_2014-08-17_05-02-15-PM.log. Aug 17, 2014 5:02:40 PM oracle.sysman.emcp.util.DBControlUtil stopOMS INFO: Stopping Database Control (this may take a while) ... Aug 17, 2014 5:02:44 PM oracle.sysman.emcp.EMReposConfig createRepository INFO: Creating the EM repository (this may take a while) ... Aug 17, 2014 5:05:22 PM oracle.sysman.emcp.EMReposConfig invoke INFO: Repository successfully created Aug 17, 2014 5:05:27 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles INFO: Propagating /u01/app/oracle/product/11.2.0/db/oc4j/j2ee/OC4J_DBConsole_node1_racdb1 to remote nodes ... Aug 17, 2014 5:05:28 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles INFO: Propagating /u01/app/oracle/product/11.2.0/db/oc4j/j2ee/OC4J_DBConsole_node2_racdb2 to remote nodes ... Aug 17, 2014 5:05:28 PM oracle.sysman.emcp.EMDBCConfig copyAndPropagateOC4JDir INFO: Propagating /u01/app/oracle/product/11.2.0/db/oc4j/j2ee/isqlplus_node1 to remote nodes ... Aug 17, 2014 5:05:29 PM oracle.sysman.emcp.EMDBCConfig copyAndPropagateOC4JDir INFO: Propagating /u01/app/oracle/product/11.2.0/db/oc4j/j2ee/isqlplus_node2 to remote nodes ... Aug 17, 2014 5:05:34 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs INFO: Propagating /u01/app/oracle/product/11.2.0/db/node1_racdb1 to remote nodes ... Aug 17, 2014 5:05:37 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs INFO: Propagating /u01/app/oracle/product/11.2.0/db/node2_racdb2 to remote nodes ... Aug 17, 2014 5:05:38 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole INFO: Securing Database Control (this may take a while) ... Aug 17, 2014 5:06:30 PM oracle.sysman.emcp.util.DBControlUtil startOMS INFO: Starting Database Control (this may take a while) ... Aug 17, 2014 5:08:26 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: Database Control started successfully Aug 17, 2014 5:08:26 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: >>>>>>>>>>> The Database Control URL is https://node1:1158/em <br> <br> <br> 其他问题: <p>如果drop repos特别慢,可以尝试如下语句:<span>alter system unquiesce;</span><br> <br> </p>

热AI工具

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

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

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

热门话题

数据导入方法:1. 使用 SQLLoader 实用程序:准备数据文件、创建控制文件、运行 SQLLoader;2. 使用 IMP/EXP 工具:导出数据、导入数据。提示:1. 大数据集推荐 SQL*Loader;2. 目标表应存在,列定义匹配;3. 导入后需验证数据完整性。

创建 Oracle 表涉及以下步骤:使用 CREATE TABLE 语法指定表名、列名、数据类型、约束和默认值。表名应简洁、描述性,且不超过 30 个字符。列名应描述性,数据类型指定列中存储的数据类型。NOT NULL 约束确保列中不允许使用空值,DEFAULT 子句可指定列的默认值。PRIMARY KEY 约束标识表的唯一记录。FOREIGN KEY 约束指定表中的列引用另一个表中的主键。请参见示例表 students 的创建,其中包含主键、唯一约束和默认值。

要查询 Oracle 表空间大小,请遵循以下步骤:确定表空间名称,方法是运行查询:SELECT tablespace_name FROM dba_tablespaces;查询表空间大小,方法是运行查询:SELECT sum(bytes) AS total_size, sum(bytes_free) AS available_space, sum(bytes) - sum(bytes_free) AS used_space FROM dba_data_files WHERE tablespace_

使用 ALTER TABLE 语句,具体语法如下:ALTER TABLE table_name ADD column_name data_type [constraint-clause]。其中:table_name 为表名,column_name 为字段名,data_type 为数据类型,constraint-clause 为可选的约束。示例:ALTER TABLE employees ADD email VARCHAR2(100) 为 employees 表添加 email 字段。

Oracle 乱码问题可以通过以下步骤解决:检查数据库字符集以确保与数据相匹配。设置客户端字符集以与数据库相匹配。转换数据或修改列字符集以匹配数据库字符集。使用 Unicode 字符集,并避免多字节字符集。检查数据库和客户端的语言设置是否正确。

Oracle 打不开的解决办法包括:1. 启动数据库服务;2. 启动监听器;3. 检查端口冲突;4. 正确设置环境变量;5. 确保防火墙或防病毒软件未阻止连接;6. 检查服务器是否已关闭;7. 使用 RMAN 恢复损坏的文件;8. 检查 TNS 服务名称是否正确;9. 检查网络连接;10. 重新安装 Oracle 软件。

Oracle 提供多种去重查询方法:DISTINCT 关键字返回每列的唯一值。GROUP BY 子句对结果分组并返回每个分组的非重复值。UNIQUE 关键字用于创建仅包含唯一行的索引,查询该索引将自动去重。ROW_NUMBER() 函数分配唯一数字并过滤出仅包含第 1 行的结果。MIN() 或 MAX() 函数可返回数字列的非重复值。INTERSECT 运算符返回两个结果集的公共值(无重复项)。

Oracle 视图加密允许您加密视图中的数据,从而增强敏感信息安全性。步骤包括:1) 创建主加密密钥 (MEk);2) 创建加密视图,指定要加密的视图和 MEk;3) 授权用户访问加密视图。加密视图工作原理:当用户查询加密视图时,Oracle 使用 MEk 解密数据,确保只有授权用户可以访问可读数据。
