Oracle DBA Tips and Techniques

By Arjun Raja

Archive for April, 2011

11g GRID CONTROL AGENT SILENT INSTALL

Posted by Arjun Raja on April 12, 2011

To install 11g grid agent you have to use the foll options –

1. Push Method.

2. Pull Method.

3. Clone agent home

4. Silent install.

GUI installs using runInstaller are obsolete now.

Example of silent install.

Download 11g grid control agent software and unzip it from
technet.oracle.com –

cd /u01/oracle/stage –

ls -l *.zip

AIX_Grid_Control_agent_download_11_1_0_1_0.zip

unzip AIX_Grid_Control_agent_download_11_1_0_1_0.zip

Creates a new directory aix.

cd /u01/oracle/stage/aix/response

cp additional_agent.rsp /u01/oracle/stage/aix/agent

cd /u01/oracle/stage/aix/agent

edit the file – additional_agent.rsp

Make the following changes- basic changes needed – no uploads to metalink.

SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
INSTALL_UPDATES_SELECTION=”skip”
ORACLE_AGENT_HOME_LOCATION=”/u01/oracle/”
b_silentInstall=true
OMS_HOST=”xxxxxx.xxxxxx.com” – The grid control oms server. OMS_PORT=”4889″
AGENT_REGISTRATION_PASSWORD=”xxxxxxx”
FROM_LOCATION=”/u01/oracle/stage/aix/agent/stage/products.xml”

cd /u01/oracle/stage/aix/agent

./runInstaller -silent
-responseFile /u01/oracle/stage/aix/agent/additional_agent.rsp Starting Oracle Universal Installer…

Checking Temp space: must be greater than 150 MB. Actual 1858 MB Passed
Checking swap space: must be greater than 150 MB. Actual 8192 MB Passed
Preparing to launch Oracle Universal Installer
from /tmp/OraInstall2011-02-02_08-14-12AM. Please
wait …cpsoa1:/u01/oracle/stage/aix/agent> *** Check for updates *** *** Select Installation Type ***
*** Check Prerequisites ***
*** Specify Oracle Management Service Location ***
*** Customize Ports ***
*** Review ***

—————————————————————————–
Summary
Global Settings
Source: /u01/oracle/stage/aix/agent/stage/../stage/products.xml
Oracle Home: /u01/oracle/agent11g (agent11g1)
Installation Type: Complete
Product Languages
English
Space Requirements
/tmp/ Required 77MB (only as temporary space) : Available 1.59GB
/u01/ Required 2.54GB : Available 37.68GB
New Installations (58 products)
Oracle Management Agent 11.1.0.1.0
Agent Virtualization 11.1.0.1.0
Enterprise Manager Agent 11.1.0.1.0
Enterprise Manager Agent Core Files 11.1.0.1.0
Secure Socket Layer 11.1.0.7.0
Oracle Recovery Manager 11.1.0.7.0
Enterprise Manager Common Files 11.1.0.1.0
Enterprise Manager Common Core Files 11.1.0.1.0
Required Support Files 11.1.0.7.0
Oracle RAC Required Support Files-HAS 11.1.0.7.0
Oracle JDBC/THIN Interfaces 11.1.0.7.0
Oracle JDBC/OCI Instant Client 11.1.0.7.0
Oracle Globalization Support 11.1.0.7.0
Oracle Net Required Support Files 11.1.0.7.0
SSL Required Support Files for InstantClient 11.1.0.7.0
LDAP Required Support Files 11.1.0.7.0
Oracle Globalization Support 11.1.0.7.0
Perl Interpreter 5.10.0.0.1
Perl Modules 5.10.0.0.1
Expat libraries 2.0.1.0.1
XML Parser for Java 11.1.0.7.0
Precompiler Required Support Files 11.1.0.7.0
RDBMS Required Support Files 11.1.0.7.0
RDBMS Required Support Files for Instant Client 11.1.0.7.0
Parser Generator Required Support Files 11.1.0.7.0
Platform Required Support Files 11.1.0.7.0a
Patch for Oracle Process Management Notification 10.1.3.4.0
Oracle Process Management Notification 10.1.3.0.0
Agent Required Support Files 10.2.0.4.1
XDK Required Support Files 11.1.0.7.0
SQL*Plus Required Support Files 11.1.0.7.0
Secure Socket Layer 11.1.0.7.0
Oracle Core Required Support Files 11.1.0.7.0
Enterprise Manager Agent for Grid Control 11.1.0.1.0
Installation Common Files 11.1.0.7.0
Oracle Configuration Manager 10.3.2.1.0
Oracle Bali Share 11.1.1.2.0
Enterprise Manager Application Server Integrator Plugin — Agent Support 11.1.0.2.0
Oracle Dynamic Monitoring Service Patch 10.1.2.3.0
Oracle Dynamic Monitoring Service 10.1.2.1.0
Enterprise Manager Application Server Plugin — Agent Support 11.1.0.1.0
Enterprise Manager Application Server Plugin — Common Support 11.1.0.1.0
Enterprise Manager Database Plugin — Agent Support 11.1.0.1.0
Enterprise Manager Siebel Plugin — Agent Support 11.1.0.1.0
Provisioning Advisor Framework Common Files For Agent and OMS 11.1.0.1.0
Common component for Virtualization 11.1.0.1.0
Oracle Notification Service (eONS) 11.2.0.1.0
Enterprise Manager Collaboration Suite Plugin — Agent Support 11.1.0.1.0
Oracle Notification Service 10.1.3.0.0
Oracle Required Support Files 32 bit 11.1.0.7.0
OracleAS HTTP Client 11.1.1.2.0
OracleAS J2EE BULKOPS 11.0.0.0.0
Oracle Wallet Manager 11.1.0.7.0
Oracle Security Developer Tools 11.1.0.7.0
Oracle Universal Installer 11.1.0.8.0
Oracle One-Off Patch Installer 11.1.0.8.0
Installer SDK Component 11.1.0.8.0
Sun JDK 1.6.0.6.0
—————————————————————————–
Installation in progress
…………………………………Installation in progress
……………..
Install successful
Linking in progress
Setup in progress
…..
Setup successful

Warning: The following configuration scripts needs to be executed as the “root” user
/u01/oracle/agent11g/root.sh
To execute the configuration scripts:
1. Open a new terminal window
2. Login in as “root”
3. Run the scripts

To check progress – cd $AGENT_HOME/cfgtoollogs/cfgfw

cd /u01/oracle/agent11g/cfgtoollogs/cfgfw

tail –f CfmLogger_2011-02-03_08-55-32-AM.log

Final few lines –

Verifying the update…
Inventory check OK: Patch ID 9676134 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 9676134 are present in Oracle Home.

The local system has been patched and can be restarted.

UtilSession: N-Apply done.

OPatch succeeded.

Finished one-offs apply…

Deleting the files…

Finished deleting the above files…

Configuration assistant “Agent Oneoff Patch Application” Succeeded

Running Configuration assistant “Agent Configuration Assistant”

Performing free port detection on host=xxxxxxx.xxxxxxx.com

Securing the agent

Performing targets discovery and agent configuration

Starting the agent

Configuration assistant “Agent Configuration Assistant” Succeeded

AgentPlugIn:agent configuration finished with status = true

Running Configuration assistant “Agent Add-on Plug-in”

Configuration assistant “Agent Add-on Plug-in” Succeeded

CONTROL C to quit –

cd /u01/oracle/agent11g/bin > ./emctl status agent

Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
—————————————————————
Agent Version : 11.1.0.1.0
OMS Version : 10.2.0.5.0
Protocol Version : 10.2.0.5.0
Agent Home : /u01/oracle/agent11g
Agent binaries : /u01/oracle/agent11g
Agent Process ID : 1089764
Parent Process ID : 1581084
Agent URL : https://xxxx.xxxxx.com:3872/emd/main/
Repository URL : https://xxxxxx.xxxxx.com:1159/em/upload
Started at : 2011-02-02 10:53:14
Started by user : ofsax
Last Reload : 2011-02-02 10:54:59
Last successful upload : 2011-02-02 10:55:01
Total Megabytes of XML files uploaded so far : 17.16
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0.00
Available disk space on upload filesystem : 49.58%
Last successful heartbeat to OMS : 2011-02-02 10:55:20
—————————————————————
Agent is Running and Ready
[UAT]xxxxxxx:/u01/xxxxxxx/agent11g/bin>

Get unix team to run root.sh from this area – /u01/oracle/agent11g

Then configure the dbsnmp user in database instances via Grid control.

Posted in Uncategorized | 4 Comments »

DB CONSOLE STARTUP ISSUES FOR 10.2.0.3 AND 10.2.0.4 POST 31 DEC 2010.

Posted by Arjun Raja on April 8, 2011

In Enterprise Manager Database Control with Oracle Database 10.2.0.4 and 10.2.0.5, the root certificate used to secure communications via the Secure Socket Layer (SSL) protocol expired on 31-Dec-2010 00:00:00.

The certificate expiration will cause errors if you attempt to configure Database Control on or after 31-Dec-2010. Existing Database Control configurations are not impacted by this issue.

The following errors may be received when you try to start dbconsole and dbconsole fails to start.

2011-04-08 08:09:50 Thread-1828 ERROR ssl: Open wallet failed, ret = 28750
2011-04-08 08:09:50 Thread-1828 ERROR ssl: nmehlenv_openWallet failed
2011-04-08 08:09:50 Thread-1828 ERROR http: 9: Unable to initialize ssl connection with server, aborting connection attempt
2011-04-08 08:09:50 Thread-1828 ERROR pingManager: nmepm_pingReposURL: Cannot connect to https://xxxu009.xxxxxxxx.com:5501/em/upload/: retStatus=-1

To avoid this error –

Download patch 8350262 from Metalink.

Unzip patch and apply the patch to the 10.2.0.4 ORACLE_HOME.

Make sure opatch executable in the PATH –

PATH=$PATH:$ORACLE_HOME/OPatch

echo $PATH
/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/u01/oracle:/u01/local/dbhk/scripts/run:/u01/oracle/product/10.2/db_1/bin:/u01/oracle/product/10.2/db_1/OPatch

Patch Installation Steps:
————————-
1. Shutdown all databases and listeners running out of this ORACLE_HOME .

2. Shutdown EM DB Console using the following command….the process may still be running despite a failed startup attempt.

cd $ORACLE_HOME/bin > ./emctl stop dbconsole

If it does not shutdown cleanly –

cd /u01/oracle/stage/ssl_patch/8350262

export ORACLE_SID=XXXX ( SID in which attempt was made to start dbconsole from )

./killDBConsole

ORACLE_HOME=/u01/oracle/product/10.2/db_1
ORACLE_SID=xxxua3
State directory = /u01/oracle/product/10.2/db_1/xxxu009.xxxxxxxx.com_xxxua3
WatchDog PID = 17170684
DBconsole PID = 22609924
EMAgent PID = 30540002
Killing WatchDog (pid=17170684) …
Successfully killed process 17170684
Killing DBConsole (pid=22609924) …
Successfully killed process 22609924
Killing EMAgent (pid=30540002) …
Successfully killed process 30540002

Set your current directory to the directory where the patch is located:

cd /u01/oracle/stage/ssl_patch/8350262

opatch apply

Once the patch is applied –

Startup databases and listeners.

export ORACLE_SID=xxxua3

xxxua3:/u01/oracle/product/10.2/db_1/bin> ./emctl secure dbconsole -reset
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://xxxu009.xxxxxxxx.com:5501/em/console/aboutApplication
Enter Enterprise Manager Root Password : enter password of sysman user.
DBCONSOLE already stopped… Done.
Agent is already stopped… Done.
Securing dbconsole… Started.
Checking Repository… Done.
Checking Em Key… Done.
Checking Repository for an existing Enterprise Manager Root Key…
WARNING! An Enterprise Manager Root Key already exists in
the Repository. This operation will replace your Enterprise
Manager Root Key.
All existing Agents that use HTTPS will need to be
reconfigured if you proceed. Do you wish to continue and
overwrite your Root Key
(Y/N) ?
Y
Are you sure ? Reset of the Enterprise Manager Root Key
will mean that you will need to reconfigure each Agent
that is associated with this OMS before they will be
able to upload any data to it. Monitoring of Targets
associated with these Agents will be unavailable until
after they are reconfigured.
(Y/N) ?
Y
Generating Enterprise Manager Root Key (this takes a minute)… Done.
Fetching Root Certificate from the Repository… Done.
Updating HTTPS port in emoms.properties file… Done.
Generating Java Keystore… Done.
Securing OMS … Done.
Generating Oracle Wallet Password for Agent…. Done.
Generating wallet for Agent … Done.
Copying the wallet for agent use… Done.
Storing agent key in repository… Done.
Storing agent key for agent … Done.
Configuring Agent…
Configuring Agent for HTTPS in DBCONSOLE mode… Done.
EMD_URL set in /u01/oracle/product/10.2/db_1/xxxu009.xxxxxxxx.com_xxxua3/sysman/config/emd.properties
Done.
Configuring Key store.. Done.
Securing dbconsole… Sucessful.

xxxua3:/u01/oracle/product/10.2/db_1/bin> ./emctl start dbconsole

Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://xxxu009.xxxxxxxx.com:5501/em/console/aboutApplication
ps: invalid list with -o.
ps: illegal option — –
Usage: ps [-ANPaedfklmMZ] [-n namelist] [-F Format] [-o specifier[=header],…]
[-p proclist][-G|-g grouplist] [-t termlist] [-U|-u userlist] [-c classlist] [ -T pid] [ -L pidlist]
[-@ [wparname] ]
Usage: ps [aceglnsuvwxX] [t tty] [ProcessNumber]
Starting Oracle Enterprise Manager 10g Database Control ……………… started.
——————————————————————
Logs are generated in directory /u01/oracle/product/10.2/db_1/xxxu009.xxxxxxxx.com_xxxua3/sysman/log
xxxua3:/u01/oracle/product/10.2/db_1/bin> ./emctl status dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://xxxu009.xxxxxxxx.com:5501/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
——————————————————————
Logs are generated in directory /u01/oracle/product/10.2/db_1/xxxu009.xxxxxxxx.com_xxxua3/sysman/log
xxxua3:/u01/oracle/product/10.2/db_1/bin>

Login – https://xxxu009.xxxxxxxx.com:5501/em

echo $PATH
/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/u01/oracle:/u01/local/dbhk/scripts/run:/u01/oracle/product/10.2/db_1/bin:/u01/oracle/product/10.2/db_1/OPatch

Patch Installation Steps:

Posted in EM Grid Control | Tagged: , , , | 1 Comment »