oracle创建em
语法:
emca -config dbcontrol db [-repos (create | recreate)] [-cluster] [-silent] [-backup] [parameters]: configure Database Control for a database
1. 清除em相关配置
--删除db配置
emca -deconfig dbcontrol db
--清除repository
emca -repos drop
2. 配置em
--创建db control
emca -config dbcontrol db -repos recreate
3.启动em
emctl start dbconsole
em控制台地址:
需要添加hosts文件 C:\Windows\System32\drivers\etc\hosts
https://hostname:1158/em/console
https://192.168.17.35:1158/em/console
===============================================================================
SQL> alter user DBSNMP identified by oracle account unlock;
User altered.
SQL> select username ,account_status from dba_users order by user_id ;
USERNAME ACCOUNT_STATUS
------------------------------ --------------------------------
SYS OPEN
SYSTEM OPEN
OUTLN EXPIRED & LOCKED
DIP EXPIRED & LOCKED
ORACLE_OCM EXPIRED & LOCKED
DBSNMP OPEN
APPQOSSYS EXPIRED & LOCKED
TEST OPEN
GGS OPEN
SCOTT OPEN
SYSMAN OPEN
MGMT_VIEW OPEN
12 rows selected.
===========================================================
[oracle@prod ~]$ emca -config dbcontrol db -repos recreate
STARTED EMCA at Sep 20, 2018 7:39:13 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: prod
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/db_1 ]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN 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/db_1
Local hostname ................ prod
Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db_1
Listener port number ................ 1521
Database SID ................ prod
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
Sep 20, 2018 7:41:04 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/prod/emca_2018_09_20_19_39_13.log.
Sep 20, 2018 7:41:05 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Sep 20, 2018 7:41:06 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Sep 20, 2018 7:41:06 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Sep 20, 2018 7:46:14 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Sep 20, 2018 7:46:21 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Sep 20, 2018 7:47:10 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Sep 20, 2018 7:47:14 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Sep 20, 2018 7:47:18 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /u01/app/oracle/product/11.2.0/db_1/bin/emctl config emkey -repos
Sep 20, 2018 7:47:18 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
WARNING: Configuring EM-Key failed.
Sep 20, 2018 7:47:18 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
WARNING: Error securing Database control.
Sep 20, 2018 7:47:18 PM oracle.sysman.emcp.EMDBPostConfig setWarnMsg
INFO: 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) /u01/app/oracle/product/11.2.0/db_1/bin/emctl stop dbconsole
3) /u01/app/oracle/product/11.2.0/db_1/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user >
4) /u01/app/oracle/product/11.2.0/db_1/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user >
5) /u01/app/oracle/product/11.2.0/db_1/bin/emctl start dbconsole
To secure Em Key, run /u01/app/oracle/product/11.2.0/db_1/bin/emctl config emkey -remove_from_repos -sysman_pwd < Password for SYSMAN user >
Sep 20, 2018 7:47:18 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Sep 20, 2018 7:48:59 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Sep 20, 2018 7:48:59 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://prod: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) /u01/app/oracle/product/11.2.0/db_1/bin/emctl stop dbconsole
3) /u01/app/oracle/product/11.2.0/db_1/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user >
4) /u01/app/oracle/product/11.2.0/db_1/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user >
5) /u01/app/oracle/product/11.2.0/db_1/bin/emctl start dbconsole
To secure Em Key, run /u01/app/oracle/product/11.2.0/db_1/bin/emctl config emkey -remove_from_repos -sysman_pwd < Password for SYSMAN user >
[oracle@prod ~]$
[oracle@prod ~]$ exit
logout
s[root@prod ~]# su - oracle
[oracle@prod ~]$ /u01/app/oracle/product/11.2.0/db_1/bin/emctl stop dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
http://prod:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 11g Database Control ...
all attemps to stop oc4j failed... now trying to kill 9
--- Failed to shutdown DBConsole Gracefully ---
... Stopped.
[oracle@prod ~]$ /u01/app/oracle/product/11.2.0/db_1/bin/emctl config emkey -repos -sysman_pwd oracle
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
The Em Key has been configured successfully.
[oracle@prod ~]$ /u01/app/oracle/product/11.2.0/db_1/bin/emctl secure dbconsole -sysman_pwd oracle
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
http://prod:1158/em/console/aboutApplication
DBCONSOLE already stopped... Done.
Agent is already stopped... Done.
Securing dbconsole... Started.
Please enter repository schema password:
Securing dbconsole... Sucessful.
[oracle@prod ~]$
[oracle@prod ~]$ /u01/app/oracle/product/11.2.0/db_1/bin/emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
https://prod:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control .... started.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.2.0/db_1/prod_prod/sysman/log
oracle创建em的更多相关文章
- 如何解决Oracle 11g EM网站报“此网站的安全证书存在问题”
在IE中输入https://localhost:1158/em 接报错,打不开;提示:“证书错误,此网站安全证书有问题”,解决过程如下: 1.删除与重建dbconsole 2.配置必要的环境变量 1. ...
- Oracle创建表空间、用户管理、角色管理
内容:Oracle创建表空间.用户管理.角色管理 1.用系统用户登录Oracle 默认的系统用户: sys/system.sysman.scott sys:权限最大,超级用户,可以完成所有任务, 默认 ...
- oralce 11.2.0.4手动创建EM
安装完oracle,启动dbconsole,失败 [oracle@elearning admin]$ emctl start dbconsole OC4J Configuration issue. / ...
- Oracle 11g EM删除重建的方法
虚拟机里的Oracle 11g好长时间没用了,突然打开之后发现EM无法访问了,EM可以重建,于是也不打算查找原因了,直接使大招 OS:Windows Server 2012 Oracle:11g R2 ...
- oracle创建新数据库
oracle创建新数据库 look here http://www.cnblogs.com/phoenixzq/p/3510854.html windows start menu>Oracle& ...
- 利用Oracle创建表空间和用户
本文仅用于学习交流,商业用途请支持正版!转载请注明:http://www.cnblogs.com/mxbs/p/6217152.html 第一步,创建表空间 以SYS/sys账户和SYSDBA身份登录 ...
- 利用Oracle创建数据库
本文仅用于学习交流,商业用途请支持正版!转载请注明:http://www.cnblogs.com/mxbs/p/6217151.html 数据库的创建 打开"所有程序"-" ...
- Oracle创建数据库
Oracle创建数据库有三种方式:一.使用DBCA(Database Configuration Assistant 数据库配置助手):二.使用 create database指令:三.在安装数据库软 ...
- oracle创建表之前判断表是否存在,如果存在则删除已有表
Mysql 创建表之前判断表是否存在,如果存在则删除已有表 DROP TABLE IF EXISTS sys_area; CREATE TABLE sys_area ( id int NOT NULL ...
随机推荐
- Hibernate session中的createCriteria方法
在应用中获取session对象: Session session= HibernateUtil.getSession(); List list=session.createCriteria(Mete ...
- JAVA的高并发基础认知 二
一.JAVA高级并发 1.5JDK之后引入高级并发特性,大多数的特性在java.util.concurrent 包中,是专门用于多线程发编程的,充分利用了现代多处理器和多核心系统的功能以编写大规模并发 ...
- 功率因数cosφ仪表盘
一.截图 二.说明 本篇博客主要是有三个亮点: ① 刻度标注在仪表盘标线外 ② 仪表盘存在两个刻度值,分别是(正)0.5~1 和(负)-1~-0.5 ③ 仪表盘内标注,分别是“超前”和“滞后” 三.代 ...
- node 跨域问题
node跨域有很多方法 1.引入 中间件cors 我觉的最好的方法 var express=require('express'); var cors=require('cors'); var app= ...
- CDQ分治小结
CDQ分治小结 warning:此文仅用博主复习使用,初学者看的话后果自负.. 复习的时候才发现以前根本就没写过这种东西的总结,简单的扯一扯 cdq分治的经典应用就是解决偏序问题 比如最经典的三维偏序 ...
- [笔记] imooc《JavaScript深入浅出》对象与函数
懒得做草稿了,习惯md也懒得扔印象笔记 主要是之前没去接触这一部分,就随手记下来了 创建对象的方法 对象字面量 new构造器/原型链 Object.create() 属性操作 属性读写(以及读写异常. ...
- CoreCRM 开发实录 —— 基于 AntDesign 的新 UI
上一篇说到,因为有新朋友加入,对前端开发有了新的要求.原来基于 Bootstrap 的 UI 就不要了.在网上(其实是 GitHub 上)逛了几圈,最后使用了 antd-admin 这个框架做为基础模 ...
- Spring@Autowired注解与自动装配(转发)
1 配置文件的方法 我们编写spring 框架的代码时候.一直遵循是这样一个规则:所有在spring中注入的bean 都建议定义成私有的域变量.并且要配套写上 get 和 set方法. Boss ...
- typedef struct LNode命名结构指针(线性表的链式存储)
一.typedef 关键字 1. 简介: typedef工具是一个高级数据特性,利用typedef可以为某一些类型自定义名称. 2. 工作原理: 例如我们定义链表的存储结构时,需要定义结点的存储数据元 ...
- 安卓开发_数据存储技术_SharedPreferences类
SharedPreferences类 供开发人员保存和获取基本数据类型的键值对. 该类主要用于基本类型,例如:booleans,ints,longs,strings.在应用程序结束后,数据仍旧会保存. ...