Monday, 29 June 2020

OMS 13.4 silent installation

Below process describe how to install OEM 13.4


Download OEM software for linux 64bit from OTN  here  download all the files and copy to the server.


Step 1: install  12c or 19c database in the server before going to install OEM software.

step 2: install OEM software software only using below rsp file.

RESPONSEFILE_VERSION=2.2.1.0.0
UNIX_GROUP_NAME=linstall
INVENTORY_LOCATION=/u01/app/oracle
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
INSTALL_UPDATES_SELECTION=skip
ORACLE_MIDDLEWARE_HOME_LOCATION=/u01/app/oracle/middleware
ORACLE_HOSTNAME=omsserver
AGENT_BASE_DIR=/u01/app/oracle/agent
b_upgrade=false
EM_INSTALL_TYPE=NOSEED
CONFIGURATION_TYPE=LATER
CONFIGURE_SHARED_LOCATION_BIP=false

Execute the command after creating rsp file.

./em13300_linux64.bin -silent -responseFile /tmp/install.rsp

If you dont have /tmp space sufficient, use temporary location in another FS as below.

./em13300_linux64.bin -silent -responseFile /tmp/install.rsp -J-Djava.io.tmpdir=/u01/tmp/

run root script.

$MW_HOME/allroot.sh

step 3: configure OEM, create rsp file.

RESPONSEFILE_VERSION=2.2.1.0.0
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oracle/oraInstall
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
INSTALL_UPDATES_SELECTION=skip
ORACLE_MIDDLEWARE_HOME_LOCATION=/u01/app/oracle/middleware
ORACLE_HOSTNAME=omsserver
AGENT_BASE_DIR=/u01/app/oracle/agent
WLS_ADMIN_SERVER_USERNAME=weblogic
WLS_ADMIN_SERVER_PASSWORD=weblogic123
WLS_ADMIN_SERVER_CONFIRM_PASSWORD=weblogic1
NODE_MANAGER_PASSWORD=nodemgr987
NODE_MANAGER_CONFIRM_PASSWORD=nodemgr987
ORACLE_INSTANCE_HOME_LOCATION=/u01/app/oracle/gc_inst
CONFIGURE_ORACLE_SOFTWARE_LIBRARY=true
SOFTWARE_LIBRARY_LOCATION=/u01/app/oracle/swlib
DATABASE_HOSTNAME=omsserver
LISTENER_PORT=1521
SERVICENAME_OR_SID=EMDB
SYS_PASSWORD=oradbpwd123
SYSMAN_PASSWORD=orapwd123
SYSMAN_CONFIRM_PASSWORD=orapwd123
DEPLOYMENT_SIZE=MEDIUM
AGENT_REGISTRATION_PASSWORD=orapwd123
AGENT_REGISTRATION_CONFIRM_PASSWORD=orapwd123
PLUGIN_SELECTION={}
b_upgrade=false
EM_INSTALL_TYPE=NOSEED
CONFIGURATION_TYPE=ADVANCED
CONFIGURE_SHARED_LOCATION_BIP=false
MANAGEMENT_TABLESPACE_LOCATION=/u01/app/oracle/oradata/mgmt.dbf
CONFIGURATION_DATA_TABLESPACE_LOCATION=/u01/app/oracle/oradata/mgmt_ecm_depot1.dbf
JVM_DIAGNOSTICS_TABLESPACE_LOCATION=/u01/app/oracle/oradata/mgmt_deepdive.dbf

Run below command to configure OEM.

$MW_HOME/sysman/install/ConfigureGC.sh -silent -responseFile /tmp/config.rsp

It take time around 30 min, at the end you will get the links to OEM cloud console.




Friday, 26 June 2020

steps to change sysman password in OEM 13.4

Below are the process to change sysman password in for OEM, in oms server.

$OMS_HOME/emctl stop oms

$OMS_HOME/emctl start oms -admin_only

$OMS_HOME/emctl config oms -change_repos_pwd -use_sys_pwd -sys_pwd <sys password> -new_pwd <new sysman passowd>

$OMS_HOME/emctl stop oms

$OMS_HOME/emctl start oms


No need to change sysman password in database level.

Wednesday, 17 June 2020

finding queries executed between two timings in oracle 12.2

As DBA we always come accross situation when request comes for queries executed or activities done between two timings. below query works only in enterprise edition and with in awr retention time. modify the timings in the query according to your requirement.


set long 900000
col sql_text for a32767 word_wrapped
COLUMN Sample_Time FOR A25
COLUMN username FOR A20
col MACHINE for a10
COLUMN program FOR A40
COLUMN module FOR A40
SELECT
   sample_time,
   h.MACHINE,
   u.username,
   h.program,
   h.module,
   s.sql_text
FROM
   DBA_HIST_ACTIVE_SESS_HISTORY h,
   DBA_USERS u,
   DBA_HIST_SQLTEXT s
WHERE  sample_time
BETWEEN '10/JUN/2020 08:20:00.000' and '10/JUN/2020 08:30:00.000'
AND
   INSTANCE_NUMBER=1
   AND h.user_id=u.user_id
   AND h.sql_id = s.sql_iD
ORDER BY 1
/

kkjcre1p: unable to spawn jobq slave process,ORA-01034: ORACLE not available,ORA-03114: not connected to ORACLE

I observed the database connections and rman backups failing with below error.

ORA-01034: ORACLE not available 
ORA-27102: out of memory  Linux-x86_64 Error: 12: Cannot allocate memory 

and rman backups failing as below.


RMAN-12001: could not open channel ORA_DISK_1
RMAN-10008: could not create channel context
RMAN-10003: unable to connect to target database
ORA-03114: not connected to ORACLE

But database is running fine, when i check alertlog i found the message like below.

Process J000 died, see its trace file

2020-06-17T07:29:21.805339+02:00
kkjcre1p: unable to spawn jobq slave process



Cause: you might have set MEMORY_TARGET parameter and you may not have sufficient swap space required for the instance. 
Solution: as per oracle note 2356025.1, we need to allocate swap 0.75 times of memory_target size or you may need apply patch 24921392.

In my case i have reduced MEMORY_TARGET. issue got fixed.