среда, 27 октября 2010 г.

Oracle Grid Control Agent 11.1.0.1 Installation and Configuration

Agent Installation and Configuration

More detailed documents can be found at
http://download.oracle.com/docs/cd/B16240_01/doc/install.102/e10953/toc.htm

Installation


Method 1: Install agent from local file with silent mode.


This is the fastest method to install agent. Take 11.1.0 agent for example.

1) download Linux_Grid_Control_agent_download_11_1_0_1_0.zip from /ade_autofs/shiphomes_linux/em/11.1.0/100227/agentdownload_only/ , you can execute command in host emqa1-vm9.cn.oracle.com as below
scp -rvp aime@stsdc02-1.us.oracle.com:/ade_autofs/shiphomes_linux/em/11.1.0/100227/agentdownload_only/download Linux_Grid_Control_agent_download_11_1_0_1_0.zip /home/oracle/

2) extract the zip file to local folder, unzip Linux_Grid_Control_agent_download_11_1_0_1_0.zip -d ./agent

3) prepare the additional_agent.rsp file. modify the rsp file as below, the values depend on oms information.
SECURITY_UPDATES_VIA_MYORACLESUPPORT=False
DECLINE_SECURITY_UPDATES=True
SKIP_SOFTWARE_UPDATES=True
ORACLE_AGENT_HOME_LOCATION=”/scratch/aime”
OMS_HOST=smptst-svc1.us.oracle.com
OMS_PORT=1159
AGENT_REGISTRATION_PASSWORD=agent4321

4) install agent with silent mode.
$cd agent_install_home/linux/agent
$./runInstaller -silent -responseFile ~/additional_agent.rsp

5) after installation finished and successfully, run root.sh under agent_home directory

Method 2: Install agent using agent push on oms deploy page.


1) Go to GC console page , click on Deployments, then click on Install Agent under Agent Installation, Click on Fresh Install.

2) Provide the host where you want to install the agent, the credential, Install_dir. Leave port blank ,then it will use a random port so that it won’t fail if the default port 3872 used. Remember provide the Management Server Registration Password and then click on next to the end.

Method 3: Install agent using NFS Agent Installation.

Suppose there is agent installed on emqa1-vm1.cn.oracle.com, the agent_home is /scratch/aime/agent11g , this need get installed on vm9.
1) mount emqa1-vm1.cn.oracle.com:/scratch/aime/agent11g /scratch/aime/agent11g . verify that the folder path is same as the agent_home in vm1.

2) $cd /scratch/aime/agent11g/sysman/install
$./nfsagentinstall -s /scratch/state_dir

3) then the agent will be installed to /scratch/state_dir , you can use emcli start/stop/status agent under /scratch/state_dir/bin

Method 4: Install agent using OUI.

Make sure that the agent installation file is released or it can be installed by oui. It’s the easiest method to install agent.
1) access the host via vnc and then run the runInstaller .

2) provide the information according to the oui and then it’ll be installed successfully.

Configuration


This part describes how to change agent pointing to another oms without re-install.
1) make sure you stop the agent. check the status of agent, /agent_home/bin/emctl status agent , stop the agent /agent_home/bin/emctl stop agent
2) cd agent_home/sysman/emd , delete all files under upload and state
3) cd agent_home/sysman/config , vi emd.properties , modify REPOSITORY_URL and emdWalletSrcUrl .
4) /agent_home/bin/emctl start agent
agent_home/bin/emctl secure agent, provide the register password
agent_home/bin/emctl upload agent
make sure the three command above executed successfully
5) then you’ll see your agent pointing to the new oms.

вторник, 26 октября 2010 г.

Installing Oracle Enterprise Manager Grid Control 11gR1 on Linux

Installing Oracle Enterprise Manager Grid Control 11gR1 on Linux

This document will detail the installation of Oracle Enterprise Manager Grid Control 11gR1 on Oracle Enterprise Linux 5.5.

Oracle WebLogic Server 10.3.2 or higher is required to be installed on the host in which you are going to install Enterprise Manager Grid Control.

The Oracle Database for the repository needs to be Oracle Database 10gR2 (10.2.0.4) or higher. The UNDO table space must have at least 200MB allocated at the time of install. The parameter SESSION_CACHED_CURSORS must be 200 or greater and the parameter PROCESSES must be 500 or greater. If these parameters along with the UNDO table space size are not set at the time of installation they will produce errors on Step 7 Connect to Oracle Database. If the database was created with Database Control enabled you will need to remove the Database Control repository.

To start the installation process execute the runInstaller script.

Enter your My Oracle Support user name and password to set up security update notification and initiate configuration manager. This information is option. Click the Next button to continue.


It is possible to install patches/updates during the installation process. If you choose to apply patches/updates you can either get them on demand using your My Oracle Support login credentials or you can download the patches/updates prior to installation and store them in a central location. After making your choices click the Next button to continue.

You can either install a new Enterprise Manager system or add an addition management server. Both install options require an existing certified Oracle WebLogic server. For this document we are going to install a new Enterprise Manager system. Click the Next button to continue.

Next are the standard prerequisite checks that are common with Oracle software installs. Click the Next button to continue.

The installer should pickup the location of the middleware home that was used for the installation of Oracle WebLogic Server. If the installer does not find middleware home either type in or browse to the location that contains the Oracle WebLogic Server. You can also provide another location for the Oracle Management Service. Click the Next button to continue.

The installation process will create a WebLogic domain called GCDomain all that we need to provide is the password. Click the Next button to continue.

Now we need to provide the install the connection information for the database to be used as the repository. Provide the hostname, port, SID and SYS password for the database you are going to use for the Grid Control Repository. Click the Next button to continue.

Three table spaces are created to house the Enterprise Manager Grid Control repository. You can either accept the defaults for the data files or provide names that match your naming scheme. You also need to provide a password for the SYSMAN user.


Enter the password to be used to secure the communications between the agents and management service. You can also choose to only allow secure agents to communicate with the repository and to only allow secure access to the console. Both are set by default.


You have the ability to customize the ports used by Enterprise Manager to fit in your environment. Click the Next button to continue.

The Review screen is your last chance to make any changes to previous steps before starting the installation. Click the Install button to start the installation.

Installation steps and progress are displayed on the Install Progress screen.

At the end of the installation you will be asked to run a configuration script as the root user. In a terminal session connect as the root user and run MW_HOME/weblogic/oms11g/allroot.sh. Note I chose not to overwrite any files.

[root@gc ~]# /u02/app/oracle/product/weblogic/oms11g/allroot.sh

After the scripts are complete click the OK button to continue.

Next several configuration assistants will be executed.

After the entire configuration is complete you will get the Finish dialog that will detail the installation and provide the URL to access Enterprise Manager Grid Control.

Possible Errors

Step 7 of 13 Connect to Oracle Database

If the database you are going to use as a repository is configured with Database Control you will receive an error message like the one below.

If you do get this error, click the OK button to dismiss the error and open another terminal session and run the $ORACLE_HOME/bin/emca – deconfig dbcontrol db command. Note: If your repository database is in a RAC cluster you will need to add –cluster after –repos drop.

[oracle@gc ~]$ emca -deconfig dbcontrol db -repos drop -SYS_PWD password -SYSMAN_PWD password


After removing database control from the database you may receive another error such as the one below.

The database to be used as the Grid Control repository needs to have the parameters SESSION_CACHED_CURSORS set to 200 or greater and PROCESSES set to 500 or greater. Setting these parameters will require the database to be bounced in order for the changes to take effect. Click the OK button to dismiss the error and connect to the database to change the parameters.

SQL> alter system set session_cached_cursors=200 scope=spfile;

SQL> alter system set processes=500 scope=spfile;

SQL> shutdown immediate

SQL> startup


UNDO tablespace size has to be at least 200MB



Click the OK button to dismiss the error and resize the data file associated with the undo table space to 200MB or more.

SQL> select file_name from dba_data_files;
FILE_NAME
---------------------------------------------------
/u02/app/oracle/oradata/gcrepo/users01.dbf
/u02/app/oracle/oradata/gcrepo/undotbs01.dbf
/u02/app/oracle/oradata/gcrepo/sysaux01.dbf

SQL> alter database datafile '/u02/app/oracle/oradata/gcrepo/undotbs01.dbf' resize 400M;
Database altered.

воскресенье, 24 октября 2010 г.

How to find log files locations in 11i and R12

The following log files location could help you to find-out issues and errors from your application 11i instance.

Database Tier Logs are

Alert Log File location:
$ORACLE_HOME/admin/$CONTEXT_NAME/bdump/alert_$SID.log

Trace file location:
$ORACLE_HOME/admin/SID_Hostname/udump

Application Tier Logs

Start/Stop script log files location:
$COMMON_TOP/admin/log/CONTEXT_NAME/

OPMN log file location
$ORACLE_HOME/opmn/logs/ipm.log

Apache, Jserv, JVM log files locations:
$IAS_ORACLE_HOME/Apache/Apache/logs/ssl_engine_log
$IAS_ORACLE_HOME/Apache/Apache/logs/ssl_request_log
$IAS_ORACLE_HOME/Apache/Apache/logs/access_log
$IAS_ORACLE_HOME/Apache/Apache/logs/error_log
$IAS_ORACLE_HOME/Apache/JServ/logs

Concurrent log file location:
$APPL_TOP/admin/PROD/log or $APPLLOG/$APPLCSF

Patch log file location:
$APPL_TOP/admin/PROD/log

Worker Log file location:
$APPL_TOP/admin/PROD/log

AutoConfig log files location:
Application Tier:
$APPL_TOP/admin/SID_Hostname/log//DDMMTime/adconfig.log

Database Tier:
$ORACLE_HOME/appsutil/log/SID_Hostname/DDMMTime/adconfig.log

Error log file location:
Application Tier:
$APPL_TOP/admin/PROD/log

Database Tier :
$ORACLE_HOME/appsutil/log/SID_Hostname


In Oracle Applications R12, the log files are located in $LOG_HOME (which translates to $INST_TOP/logs)
Below list of log file locations could be helpful for you:

Concurrent Reqeust related logs
$LOG_HOME/appl/conc - > location for concurrent requests log and out files
$LOG_HOME/appl/admin - > location for mid tier startup scripts log files

Apache Logs (10.1.3 Oracle Home which is equivalent to iAS Oracle Home - Apache, OC4J and OPMN)
$LOG_HOME/ora/10.1.3/Apache - > Location for Apache Error and Access log files
$LOG_HOME/ora/10.1.3/j2ee - > location for j2ee related log files
$LOG_HOME/ora/10.1.3/opmn - > location for opmn related log files

Forms & Reports related logs (10.1.2 Oracle home which is equivalent to 806 Oracle Home)
$LOG_HOME/ora/10.1.2/forms
$LOG_HOME/ora/10.1.2/reports

Startup/Shutdown Log files location:
$INST_TOP/apps/$CONTEXT_NAME/logs/appl/admin/log

Patch log files location:
$APPL_TOP/admin/$SID/log/

Clone and AutoConfig log files location in Oracle E-Business Suite Release 12

Logs for the adpreclone.pl are located:
On the database tier:
RDBMS $ORACLE_HOME/appsutil/log/<>/StageDBTier_<>.log

On the application tier:
$INST_TOP/admin/log/StageAppsTier_<>.log

Where the logs for the admkappsutil.pl are located?
On the application tier:
$INST_TOP/admin/log/MakeAppsUtil_<>.log

Logs for the adcfgclone.pl are located:

On the database tier:
RDBMS $ORACLE_HOME/appsutil/log/<>/ApplyDBTier_<>.log

On the application tier:
$INST_TOP/admin/log/ApplyAppsTier_<>.log
.
Logs for the adconfig are located:

On the database tier:
RDBMS $ORACLE_HOME/appsutil/log/<>/<>/adconfig.log
RDBMS $ORACLE_HOME/appsutil/log/<>/<>/NetServiceHandler.log

On the application tier:
$INST_TOP/admin/log/<>/adconfig.log
$INST_TOP/admin/log/<>/NetServiceHandler.log

пятница, 8 октября 2010 г.

Oracle Discoverer 10g How to kown User that ran the report

User that ran the report:

SELECT

DISTINCT QPP.QS_DOC_NAME WORKBOOK_NAME,QPP.QS_DOC_DETAILS WORKSHEET,

QS_DOC_OWNER WORKBOOK_OWNER,

qs_created_date, qs_cost, qs_act_elap_time, qs_act_cpu_time,

QPP.QS_CREATED_BY OWNER, f.user_name

FROM

eul5_us.EUL5_QPP_STATS QPP, fnd_user f

where substr(qs_created_by, 2, 4) = to_char(f.user_id)

вторник, 5 октября 2010 г.

Encountered RMAN-03002 and RMAN-06091 when Deleting Obsolete Backups

Symptoms

When attempting to delete obsolete backups from RMAN using the following command:

RMAN> delete obsolete;

the following error occurs:

RMAN-00571: =======================================
RMAN-00569: ===== ERROR MESSAGE STACK FOLLOWS ====
RMAN-00571: =======================================
RMAN-03002: failure of delete command at 05/07/2008 22:04:21
RMAN-06091: no channel allocated for maintenance (of an appropriate type)


Cause

Tape channel had not being allocated when attempt to delete obsolete backup on tape.

Using the following command to verify that there are backup sets on tape.


RMAN> list backup;
List of Backup Sets
==============

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1 Incr 0 113.25M SBT_TAPE 00:08:35 01-MAR-08
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: HOT_DB_BK_LEVEL0
Handle: bk_4_1_648250152 Media:
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
5 0 Incr 1342657 01-MAR-08 /u01/oracle/app/oracle/undotbs2
75 0 Incr 1342657 01-MAR-08 /u01/oracle/app/oracle/USER_DAT_08_vg3_002
91 0 Incr 1342657 01-MAR-08 /u01/oracle/app/oracle/USER_DAT_12_vg3_002

==>The Device Type is SBT_TAPE.
Solution

To implement the solution, please execute the following steps:

Please run the following commands to delete obsolete backup sets on both disk and tape:

RMAN> allocate channel for maintenance type disk;
RMAN> allocate channel for maintenance device type 'sbt_tape' PARMS '...';
==>Please change '...' to your actual tape params

RMAN> delete obsolete;

If you want to delete obsolete backup sets on disk, you can use the following commands:

RMAN> allocate channel for maintenance type disk;
RMAN> delete obsolete device type disk;
RMAN> delete expired backup of database archivelog all;