Red hat AS oracle11g 手工创建OEM
来源:互联网 发布:ai mac版 编辑:程序博客网 时间:2024/05/01 02:04
环境:
Red Hat Enterprise Linux Server release 5.3 (Tikanga)+oracle 11.2.0.3
1.检查密码文件
/u01/app/oracle/product/11.2.0/dbs/orapwocm
[oracle@mydb ~]$ cd /u01/app/oracle/product/11.2.0/dbs/
[oracle@mydb dbs]$ ls -l
total 20
-rw-rw---- 1 oracle oinstall 1544 Oct 10 15:34 hc_ocp.dat
-rw-r--r-- 1 oracle oinstall 2851 May 15 2009 init.ora
-rw-r----- 1 oracle oinstall 24 Oct 10 15:40 lkOCP
-rw-r----- 1 oracle oinstall 1536 Oct 10 21:36 orapwocp
-rw-r----- 1 oracle oinstall 1536 Oct 10 21:29 spfileocp.ora
2.检查hostname
[oracle@mydb dbs]$ hostname
mydb
3.检查system表空间
SQL> select b.tablespace_name,round(sum(b.bytes)/1024/1024,0) sum_MB, round(sum(nvl(a.bytes,0))/1024/1024,0)
2 free_MB,round((sum(b.bytes)-sum(nvl(a.bytes,0)))/sum(b.bytes),4)*100 use_precent
3 from (select tablespace_name,file_id,sum(bytes) bytes from dba_free_space group by tablespace_name,file_id ) a,dba_data_files b
4 where a.file_id(+)=b.file_id and a.tablespace_name(+)=b.tablespace_name
5 group by b.tablespace_name;
TABLESPACE_NAME SUM_MB FREE_MB USE_PRECENT
------------------------------ ---------- ---------- -----------
SYSAUX 325 248 23.69
USERS 50 49 2
UNDOTBS 200 48 76.25
SYSTEM 500 244 51.2
4.检查监听lsnrctl status
[oracle@mydb dbs]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 10-OCT-2013 23:23:12
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 10-OCT-2013 21:20:53
Uptime 0 days 2 hr. 2 min. 18 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u01/app/oracle/diag/tnslsnr/mydb/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=mydb)(PORT=1521)))
Services Summary...
Service "ocp" has 1 instance(s).
Instance "ocp", status READY, has 1 handler(s) for this service...
The command completed successfully
5.查用户DBSNMP/SYSMAN
SQL> select username from dba_users;
USERNAME
------------------------------
OUTLN
SYS
SYSTEM
GYJ
APPQOSSYS
DBSNMP
DIP
ORACLE_OCM
SQL> CREATE USER sysman IDENTIFIED BY oracle;
User created.
SQL> grant dba to sysman;
Grant succeeded.
6.export ORACLE_HOSTNAME=mydb --hostname
7.删除 emca -config dbcontrol db -repos drop
8.新建 emca -config dbcontrol db -repos create
9.重建 emca -config dbcontrol db -repos recreate
[oracle@mydb ocp]$ emca -config dbcontrol db -repos recreate
STARTED EMCA at Oct 10, 2013 9:35:22 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.
Enter the following information:
Database SID: ocp
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0 ]: /u01/app/oracle/product/11.2.0
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0
Local hostname ................ mydb
Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0
Listener port number ................ 1521
Database SID ................ ocp
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Oct 10, 2013 9:36:50 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/ocp/emca_2013_10_10_21_35_22.log.
Oct 10, 2013 9:36:51 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Oct 10, 2013 9:36:51 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Oct 10, 2013 9:36:52 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Oct 10, 2013 9:47:47 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Oct 10, 2013 9:47:55 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Oct 10, 2013 9:49:16 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Oct 10, 2013 9:49:18 PM oracle.sysman.emcp.ParamsManager getLocalListener
WARNING: Error retrieving listener for mydb
Oct 10, 2013 9:49:21 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Oct 10, 2013 9:49:31 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Oct 10, 2013 9:49:31 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Oct 10, 2013 9:50:34 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Oct 10, 2013 9:50:34 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://mydb:1158/em <<<<<<<<<<<
Oct 10, 2013 9:50:37 PM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING:
************************ WARNING ************************
Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted. The encryption key has been placed in the file: /u01/app/oracle/product/11.2.0/mydb_ocp/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost.
***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Oct 10, 2013 9:50:37 PM
10.查看状态
[oracle@mydb ocp]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
https://mydb:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.2.0/mydb_ocp/sysman/log
8.删除 emca -config dbcontrol db -repos drop
9.新建 emca -config dbcontrol db -repos create
- Red hat AS oracle11g 手工创建OEM
- Linux-red hat下安装Oracle11g服务器
- Red Hat Enterprise Linux AS 3 标准版
- red hat 中ES、AS的区别
- red hat AS 4 一般操作
- Linux Red Hat as 5.4 配置 yum
- Red Hat AS 4 安装yum命令
- 手工创建数据库oracle11g r2
- red hat enterprise linux5.0下安装oracle11g
- 虚拟机Red Hat Linux 6.5下安装oracle11g 32位
- Red Hat Enterprise Linux 5 64 位安装oracle11g
- Virtualbox 虚拟机Red Hat Enterprise 6.5 x86_64 安装oracle11g数据库
- 虚拟机下red hat 6.5 linux安装oracle11g
- 从 Red Hat Enterprise Linux 2.1 AS 升级到 Red Hat Enterprise Linux 3
- Red Hat as 4 主DNS和辅助DNS配置
- 解决Red Hat Enterprise Linux AS 4 中文乱码问题
- 在VMware上安装Red Hat Linux AS 3
- 在Red Hat Linux AS 3上安装Oracle92
- JS通过事件的传递来间接调用定义在函数中的函数
- 工厂模式,简单工厂模式,抽象工厂模式三者有什么区别
- cocos2d 坐标系
- Oracle Data Integrator 介绍
- SRM 593 Div1 L1:HexagonalBoard,用染色法判断无向图是否为二分图
- Red hat AS oracle11g 手工创建OEM
- 软件架构师需要掌握哪些知识?
- 最长字符串匹配算法(KMP算法)
- UVA - 10558 A Brief Gerrymander
- 鼠标放上去显示全部文字,不放上去,显示部分文字jquery效果,包括隐藏部分文字
- 怎样找到sql报错的存储过程和触发器及语句
- 设计jquery插件
- STL vector常用的几个成员的用法
- 2 synchronized 和 Lock+Condtion 对比