启动和关闭
查看信息
[oracle@jia ~]$ cat /u01/app/oms12cr5/oms/install/eminstall.info INSTALL_TYPE=NOSEED UPGRADE=false ORACLE_MIDDLEWARE_HOME_LOCATION=/u01/app/oms12cr5 OMS_HOME=/u01/app/oms12cr5/oms AGENT_HOME=/u01/app/agent/core/12.1.0.5.0 AGENT_BASE_DIR=/u01/app/agent [oracle@jia ~]$ cat /u01/app/oms12cr5/oms/install/portlist.ini Enterprise Manager Upload Http Port=4889 Enterprise Manager Upload Http SSL Port=4903 Enterprise Manager Central Console Http SSL Port=7802 Node Manager Http SSL Port=7403 Managed Server Http Port=7202 Enterprise Manager Central Console Http Port=7788 Oracle Management Agent Port=3872 Admin Server Http SSL Port=7102 Managed Server Http SSL Port=7301
启动
sqlplus / as sysdba << EOF startup; quit EOF lsnrctl start /u01/app/oms12cr5/oms/bin/emctl start oms
关闭
sqlplus / as sysdba <<EOF stop; quit EOF /u01/app/oms12cr5/oms/bin/emctl stop oms -all Oracle Enterprise Manager Cloud Control 12c Release 5
登录控制台
https://192.168.87.69:7802/em 用户 sysman ???99
password 180天过期
启动oms失败,提示说数据库没有启动,其实是密码过期,在log文件 /u01/app/gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/logs/EMGC_OMS1.out
中,有下面的提示
<Apr 23, 2020 7:10:33 PM CST> <Warning> <JDBC> <BEA-001129> <Received exception while creating connection for pool "sysman-opss-ds": ORA-28001: the password has expired
Oracle提示错误消息ORA-28001: the password has expired,是由于Oracle11G的新特性所致, Oracle11G创建用户时缺省密码过期限制是180天(即6个月), 如果超过180天用户密码未做修改则该用户无法登录。 Oracle公司是为了数据库的安全性默认在11G中引入了这个默认功能,但是这个默认的功能很容易被DBA或者是开发人员给疏忽,一旦密码180天未修改过,就会出现这样的问题
SQL> select * from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME'; PROFILE -------------------------------------------------------------------------------- RESOURCE_NAME RESOURCE -------------------------------- -------- LIMIT -------------------------------------------------------------------------------- COM --- DEFAULT PASSWORD_LIFE_TIME PASSWORD 180 NO SQL> ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED ; Profile altered. SQL> select * from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME'; PROFILE -------------------------------------------------------------------------------- RESOURCE_NAME RESOURCE -------------------------------- -------- LIMIT -------------------------------------------------------------------------------- COM --- DEFAULT PASSWORD_LIFE_TIME PASSWORD UNLIMITED NO
进行以上步骤之后需要改变密码,否则还会出现password has expired异常
col username form a20 select username, account_status from dba_users; SYSMAN_OPSS EXPIRED SYSMAN OPEN SYSMAN_APM OPEN SYSMAN_MDS OPEN SYSMAN_RO EXPIRED & LOCKED
用原来的密码登录,马上提示修改密码。注意还有用户 SYSMAN_OPSS
QL> select username, account_status from dba_users where username='DBSNMP'; USERNAME -------------------------------------------------------------------------------- ACCOUNT_STATUS -------------------------------- DBSNMP EXPIRED(GRACE) [oracle@jia ~]$ sqlplus dbsnmp/oracle SQL*Plus: Release 12.1.0.2.0 Production on Thu Apr 23 19:41:41 2020 Copyright (c) 1982, 2014, Oracle. All rights reserved. ERROR: ORA-28001: the password has expired Changing password for dbsnmp New password: Retype new password: Password changed Connected to:
安装客户端
在客户端机器上执行: echo “192.168.87.69 jia” >> /etc/hosts
集群数据库链接不上
参见文档:
  EM 12c: Accessing a Cluster Target in Enterprise Manager 12c Cloud Control gives Message: IO Error The Network Adapter could not establish the connection (Doc ID 2037558.1)
listener设置的是ip 数字,在连接是用的hostname。都改成数字即可。
在下面改:
Targets > All Targets > [right-click the cluster database target] > Cluster Database > Target setup > Monitoring Configuration