Reset database Account_Status from Expired(Grace) to OPEN

We know that in database we have different profiles implemented which let our database password expired after sometime {default after 180 days}. Usually it is good practice to change your database users password on regular interval.

Question comes, what If I do not want to change password and reuse the existing one, well in this blog I have explain steps how you can again reset some user’s password to the old one. In my company we sometime we get request when user complaint us the his password has been expired and he wants to re-set the password to same old one.

Here, there is possibility that you might not know his old password. Still you can set his password to the old one.

Step 1: Check and Verify If account password is Expired.

If you know the database username {dksharma} well and good, you can use below mentioned SQL.

select username,account_status from dba_users where username like ‘dks%’

else in general you can verify putting “account_status” under WHERE clause.

select username, account_status from dba_users where account_status like ‘%EXPIRED%’

Once you have verified that, account_status is “EXPIRED(GRACE)”, proceed to next step.

Step 2: Fetching existing password of user.

Now depending on the database version, you query may vary:

For 10g or lower use:

select password from dba_users where username = ‘[username]’

For 11g and higher use:

select spare4 from sys.user$ where name = ‘[username]’

The output of above query will give you encrypted password of the user.

Step 3: Use this encrypted password to set Account_Status to OPEN by resetting it.

alter user [username] identified by values ‘output of query in Step 2’;

Following three simple steps you can reset the old password of any user, without even knowing the actual password.

For sure it will help you somewhere or sometime in your DBA life.

Silent-Install Method for Installation of Agent12c on Windows. {CYGWIN not required.}

In this document I have explained how easily you can install Oracle Agent12c without using “CYGWIN” software. It was recommended that If you have to install Oracle Agent12c on windows server you have to install and configure CYGWIN first. However If you do not want to install CYGWIN there is one alternate method {silent Install} as well.

Using silent install method you can install Oracle Agent on windows either with or without using the “Response file”.

In this example I have installed Agent12c on one of my windows server without using  response file.

OMS Server Name = “”
Windows Server Name = “”
Step 1: Navigate to OMS Home and login and Synchronized to SL using “sysman” credentials.

[ bin]$ pwd

[ bin]$ ./emcli login -username=sysman -password=formula123
Login successful

[ bin]$ ./emcli sync
Synchronized successfully

Step 2: Get the list of available agent softwares for supported platforms.

[ bin]$ ./emcli get_supported_platforms
Getting list of platforms …
Check the logs at /app/oracle/product/middleware/oms12cr2/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/agent.log
About to access self-update code path to retrieve the platforms list..

Getting Platforms list  …
Version =
Platform = Linux x86-64
Version =
Platform = Microsoft Windows (32-bit)
Version =
Platform = Microsoft Windows x64 (64-bit)
Platforms list displayed successfully.

Step 3: Download the Agent software compatible with your Windows Server.

[ bin]$
[ bin]$ ./emcli get_agentimage -destination=/tmp/agent12c_silent/ -platform=”Microsoft Windows x64 (64-bit)” -version=

Platform:Microsoft Windows x64 (64-bit)
=== Partition Detail ===
Space free : 3 GB
Space required : 1 GB
Check the logs at /app/oracle/product/middleware/oms12cr2/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/get_agentimage_2014-12-05_05-56-33-AM.log
Setting property ORACLE_HOME to:/app/oracle/product/middleware/oms12cr2/oms
calling pulloneoffs with arguments:/app/oracle/product/middleware/oms12cr2/oms/data2/oms12cr2/omsshared/54/CF64262D86B08797E040FE0A2401565412.
Check this logs for more information: /app/oracle/product/middleware/oms12cr2/oms/sysman/prov/agentpush/logs

Step 4: Transfer the downloaded ZIP file to a temporary directory on the destination host where you want to install the Management Agent. On the destination host, extract the contents of the ZIP file using the Unzip utility.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
D:\>cd AgentCore
Volume in drive D is New Volume
Volume Serial Number is 04C8-BC5D
Directory of D:\AgentCore
12/05/2014  08:42 AM    <DIR>          .
12/05/2014  08:42 AM    <DIR>          ..
12/05/2014  05:56 AM         6,222,065
12/05/2014  08:10 AM             4,024 agent.rsp
09/01/2014  06:07 AM       248,650,151
09/01/2014  06:07 AM             8,977 agentDeploy.bat
12/05/2014  08:17 AM           806,256 agentDeploy.log
09/01/2014  06:06 AM               206
09/01/2014  06:07 AM           167,936 unzip.exe
7 File(s)    255,859,615 bytes
2 Dir(s)  145,714,135,040 bytes free
Step 5: Install Oracle Agent using the “agentDeploy.bat” file. Below mentioned are 4 parameters which you have to provide.

“OMS_HOST” {OMS server on which OEM software is installed}
“EM_UPLOAD_PORT” {EM upload port which will be used by agent to connect with OMS}
“AGENT_BASE_DIR” {Location where Oracle agent will be installed}
“AGENT_REGISTRATION_PASSWORD” {Password required to secure/unsecure or to resynchronize an agent}

D:\AgentCore>agentDeploy.bat AGENT_BASE_DIR=D:\app\oracle\product\agent12c EM_UPLOAD_PORT=4904 AGENT_REGISTRATION_PASSWORD=formula1

Present working directory:D:\AgentCore
Archive location:D:\AgentCore  directory
Agent base directory:D:\app\oracle\product\agent12c
Agent base directory:D:\app\oracle\product\agent12c
Agent image loc : “D:\AgentCore”
D:\app\oracle\product\agent12c configonlyfalse
Reading the properties file: “D:\AgentCore”\
1 file(s) copied.
This is the version
This is the type core
This is the aru id 233
“Validating the OMS_HOST & EM_UPLOAD_PORT”

“Executing command : D:\app\oracle\product\agent12c\core\\jdk\bin\java -classpath D:\app\oracle\product\agent12c\core\\jlib\agentInstaller.jar:D:\app\oracle\product\agent12c\core\\oui\jlib\OraInstaller.jar oracle.sysman.agent.installer.AgentInstaller D:\app\oracle\product\agent12c\core\ “D:\AgentCore” D:\app\oracle\product\agent12c -prereq”

Validating oms host & port with url:
Validating oms host & port with url:
Return status:3

“Executing command : D:\app\oracle\product\agent12c\core\\jdk\bin\java -classpath D:\app\oracle\product\agent12c\core\\jlib\OraInstaller.jar:D:\app\oracle\product\agent12c\core\\sysman\jlib\emInstaller.jar:D:\app\oracle\product\agent12c\core\\jlib\xmlparserv2.jar:D:\app\oracle\product\agent12c\core\\jlib\srvm.jar:D:\app\oracle\product\agent12c\core\\jlib\emCfg.jar:D:\app\oracle\product\agent12c\core\\sysman\jlib\agentInstaller.jar oracle.sysman.agent.installer.AgentInstaller D:\app\oracle\product\agent12c\core\”

Executing agent install prereqs…
Executing command: D:\app\oracle\product\agent12c\core\\oui\bin\setup.exe -ignoreSysPrereqs -prereqchecker -silent -ignoreSysPrereqs -waitForCompletion  -prereqlogloc D:\app\oracle\product\agent12c\core\\cfgtoollogs\agentDeploy -entryPoint -detailedExitCodes PREREQ_CONFIG_LOCATION=D:\app\oracle\product\agent12c\core\\prereqs
Prereq Logs Location:D:\app\oracle\product\agent12c\core\\cfgtoollogs\agentDeploy\prereq<timestamp>.log
Agent install prereqs completed successfully

Cloning the agent home…
Executing command: D:\app\oracle\product\agent12c\core\\oui\bin\setup.exe -ignoreSysPrereqs -clone -forceClone -silent -waitForCompletion -nowait ORACLE_HOME=D:\app\oracle\product\agent12c\core\   AGENT_BASE_DIR=D:/app/oracle/product/agent12c AGENT_BASE_DIR=D:/app/oracle/product/agent12c EM_UPLOAD_PORT=4904 AGENT_REGISTRATION_PASSWORD=formula1 -noconfig  ORACLE_HOME_NAME=agent12c1 -force b_noUpgrade=true AGENT_PORT=-1
Clone Action Logs Location:C:\Program Files\Oracle\Inventory\logs\cloneActions<timestamp>.log
Cloning of agent home completed successfully

Attaching sbin home…
Executing command: D:\app\oracle\product\agent12c\core\\oui\bin\setup.exe -ignoreSysPrereqs -attachHome -waitForCompletion -nowait ORACLE_HOME=D:\app\oracle\product\agent12c\sbin ORACLE_HOME_NAME=sbin12c1 -force
Attach Home Logs Location:D:\app\oracle\product\agent12c\core\\cfgtoollogs\agentDeploy\AttachHome<timestamp>.log
Attach home for sbin home completed successfully.

Updating home dependencies…
Executing command: D:\app\oracle\product\agent12c\core\\oui\bin\setup.exe -ignoreSysPrereqs -updateHomeDeps -waitForCompletion HOME_DEPENDENCY_LIST={D:\app\oracle\product\agent12c\sbin:D:\app\oracle\product\agent12c\core\,} -invPtrLoc D:\app\oracle\product\agent12c\core\\oraInst.loc -force
Update Home Dependencies Location:D:\app\oracle\product\agent12c\core\\cfgtoollogs\agentDeploy\UpdateHomeDeps<timestamp>.log
Update home dependency completed successfully.

Performing the agent configuration…
Executing command: D:\app\oracle\product\agent12c\core\\oui\bin\runConfig.bat ORACLE_HOME=D:\app\oracle\product\agent12c\core\ RESPONSE_FILE=D:\app\oracle\product\agent12c\core\\agent.rsp ACTION=configure MODE=perform COMPONENT_XML={} RERUN=true
Configuration Log Location:D:\app\oracle\product\agent12c\core\\cfgtoollogs\cfgfw\CfmLogger<timestamp>.log
Agent Configuration completed successfully

Agent deployment log location:
Agent deployment completed successfully.

Step 6: Navigate to Agent Home Bin directory and verify the status of Agent using below mentioned command.

D:\AgentCore>cd ..
D:\>cd app\oracle\product\agent12c\agent_inst\bin

D:\app\oracle\product\agent12c\agent_inst\bin>emctl status agent

Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Agent Version     :
OMS Version       :
Protocol Version  :
Agent Home        : D:/app/oracle/product/agent12c/agent_inst
Agent Binaries    : D:\app\oracle\product\agent12c\core\
Agent Process ID  : 4520
Parent Process ID : 4724
Agent URL         :
Repository URL    :
Started at        : 2014-12-05 08:59:25
Started by user   : HANXXX.XXX.COM$
Last Reload       : (none)
Last successful upload                       : 2014-12-05 09:10:36
Last attempted upload                        : 2014-12-05 09:10:36
Total Megabytes of XML files uploaded so far : 0.04
Number of XML files pending upload           : 0
Size of XML files pending upload(MB)         : 0
Available disk space on upload filesystem    : 67.58%
Collection Status                            : Collections enabled
Heartbeat Status                             : Ok
Last attempted heartbeat to OMS              : 2014-12-05 09:10:30
Last successful heartbeat to OMS             : 2014-12-05 09:10:30
Next scheduled heartbeat to OMS              : 2014-12-05 09:11:30
Agent is Running and Ready


You can ask me for any doubt or queries on my email “

OEM12c Installation and Configuration on RedHat Linux 5.10

In this blog I have explain the steps how you can install “Oracle Enterprise Manager 12c” on your Linux box. I already have RedHat Linux 5.10 installed on my VM machine.  To install Enterprise Manager Cloud Control with advanced configuration, follow these steps:

Before we begin the installation there are few Packages Required for Oracle Management Service. To identify the packages already installed on server, run below command

Rpm –qa | grep pkg_name (For Linux only)

If the command does not list the required packages then ask Infra Team to installed required packages on server.

(Check Oracle doc for Required Packages as per OS release and version)

NOTE: You can easily download latest Enterprise Manager Cloud Control software from Oracle Support.

Please follow another important note from Oracle for OEM12c Installation.

NOTE: The Enterprise Manager Cloud Control Installation Wizard installs Java Development Kit (JDK) and Oracle WebLogic Server 11g Release 1 (10.3.6) only if you do not specify the use of existing installations. Oracle strongly recommends using the 12c installation process to install the JDK and Oracle WebLogic Server for use with Enterprise Manager 12c

I have installed and configure Oracle database 11g(, which will be used as OEM Repository. So make sure you have your database already setup before you being installation.

Step 1:  Invoke the Enterprise Manager Cloud Control Installation Wizard

# ./<Software_Location>/runInstaller

Note: When you invoke runInstaller, if the Enterprise Manager Cloud Control Installation Wizard does not appear, then it is possible that you do not have read and write access to /stage, which a subdirectory in the <Software_Location> directory of the Enterprise Manager software.

Step 2:  (Optional) Enter My Oracle Support Details:

(Optional) On the My Oracle Support Details screen, enter your My Oracle Support credentials to enable Oracle Configuration Manager. Here we do not want to enable Oracle Configuration Manager now.


Step 3:  Install Software Updates:

These options are to search for update or to apply the latest software updates, here we select skip option because we can do it offline or enable later after installation. Click Next

NOTE : If Enterprise Manager Cloud Control is the first Oracle product you are installing on the host that is running on UNIX operating system, then the Oracle Inventory screen appears. Otherwise Check Prerequisites screen appears


Step 4:  Check Prerequisites

On the Prerequisite Checks screen, check the status of the prerequisite checks run by the installation wizard, and verify whether your environment meets all the minimum requirements for a successful installation. Click Next


The status of the prerequisite check can be either Warning, Failed, or Succeeded. If some checks result in Warning or Failed status, then investigate and correct the problems before you proceed with the installation.

Step 5:  Installation Types

On the Installation Types screen, select Create a New Enterprise Manager System, then select Advanced. Click Next


Step 6:  Installation Details

On the Installation Details screen, do the following:

  1. Enter the absolute path to the Middleware home where you want to install the OMS and other core components.
  2. Enter the absolute path to the agent base directory, a location outside the Oracle Middleware home where the Management Agent can be installed
  3. Enter the name of Host where you are configuring OMS

Click Next

NOTE : Ensure that this location is empty and has write permission and number of characters in the middleware home path does not exceed 70 characters


Step 6:  Deploy Plugins:

The pre-selected rows are mandatory plug-ins that will be installed by default. Select the optional ones you want to install

Click next


Step 6:  Enter WebLogic Server Configuration Details:

On the WebLogic Server Configuration Details screen, enter the credentials for the WebLogic Server user account and the Node Manager user account, and validate the path to the Oracle Management Service instance base location

Note: Ensure that your password contains at least 8 characters without any spaces, begins with a letter, and includes at least one numeric value.

Click Next


Step 7:  Enter Database Connection Details:

On the Database Connection Details screen, do the following:

  1. Provide details of the existing, certified database where the Management Repository needs to be created.
  2. Select the deployment size from the Deployment Size list to indicate the number of targets you plan to monitor, the number of Management Agents you plan to have, and the number of concurrent user sessions you plan to have. Click Next


Step 8:  Enterprise Manager Configuration Details:

  1. For SYSMAN Password, enter a password for creating the SYSMAN user account.
  2. For Registration Password, enter a password for registering the new Management Agents that join the Enterprise Manager system.
  3. For Tablespace, enter the full path to the location where the data file for management, configuration and JVM Diagnostic Data tablespace can be stored.
  4. Enter the absolute on the OMS host where the Software Library can be configured.


Step 9:  Port Configuration Details:

NOTE: If all the ports on this screen appear as -1, then it indicates that the installer is unable to bind the ports on the host. To resolve this issue, exit the installer, verify the host name and the IP configuration of this host (ensure that the IP address of the host is not being used by another host), restart the installer, and try again.

To verify if a port is free, run the following command:

netstat -an | grep <port no>


Step 10:  Review and Install:

On the Review screen, review the details you provided for the selected installation type.

  1. If you want to change the details, click Back repeatedly until you reach the screen where you want to make the changes.
  2. After you verify the details, if you are satisfied, click Install to begin the installation process.


Step 11:  Track the Progress:

On the Install Progress screen, view the overall progress (in percentage) of the installation and the status of each of the Configuration Assistants. Configuration Assistants are run for configuring the installed components of Enterprise Manager Cloud Control.

Note: If you accidently exit the installer before clicking Retry, then do NOT restart the installer to reach the same screen; instead, invoke the script from the OMS home to rerun the Configuration Assistant in silent mode.

$<OMS_HOME>/oui/bin/ ORACLE_HOME=<absolute_path_to_OMS_home> MODE=perform ACTION=configure COMPONENT_XML={encap_oms.1_0_0_0_0.xml}

If the script fails, then clean up your environment and redo the installation.

Step 12: Run Scripts

Once the software binaries are copied and configured, you are prompted to run the script and the script if this is the first Oracle product installation on the host. Open another window, log in as root, and manually run the scripts.

Step 13:  End the Installation


I hope this will help you to install and setup Oracle enterprise Manager 12c cloud control . If you have any doubts any questions you can reach up to me anytime via email. My email address is