Sunday, 30 December 2012

Oracle information about package , function , procedure


To find out information about package , function , procedure etc :-

SQL> set long 100000
SQL> select TEXT from  dba_source where name = '<package_name>';
SQL> SELECT REFERENCED_NAME,REFERENCED_OWNER,REFERENCED_TYPE,DEPENDENCY_TYPE FROM DBA_DEPENDENCIES WHERE NAME= '<package_name>';

SQL> SELECT REFERENCED_NAME,REFERENCED_OWNER,REFERENCED_TYPE,DEPENDENCY_TYPE FROM DBA_DEPENDENCIES WHERE NAME= '<package_name>' AND REFERENCED_TYPE IN ('TABLE','SYNONYM');

Oracle DB Health Scripts 1 - physical I/O, logical I/O, memory and CPU processes,,Top CPU usage by users,etc.Database Version


This single script provides the overall picture of the database in terms of Waits events, Active/Inactive killed sessions, Top Processes (physical I/O, logical I/O, memory and CPU processes), Top CPU usage by users,etc.Database Version :-

set serveroutput on
declare 
cursor c1 is select version
from v$instance;
cursor c2 is
    select
          host_name
       ,  instance_name
       ,  to_char(sysdate, 'HH24:MI:SS DD-MON-YY') currtime
       ,  to_char(startup_time, 'HH24:MI:SS DD-MON-YY') starttime
     from v$instance;
cursor c4 is
select * from (SELECT count(*) cnt, substr(event,1,50) event
FROM v$session_wait
WHERE wait_time = 0
AND event NOT IN ('smon timer','pipe get','wakeup time manager','pmon timer','rdbms ipc message',
'SQL*Net message from client')
GROUP BY event
ORDER BY 1 DESC) where rownum <6;
cursor c5 is
select round(sum(value)/1048576) as sgasize from v$sga;
cursor c6 is select round(sum(bytes)/1048576) as dbsize
from v$datafile;
cursor c7 is select 'top physical i/o process' category, sid,
       username, total_user_io amt_used,
       round(100 * total_user_io/total_io,2) pct_used
from (select b.sid sid, nvl(b.username, p.name) username,
             sum(value) total_user_io
      from v$statname c, v$sesstat a,
           v$session b, v$bgprocess p
      where a.statistic# = c.statistic#
      and p.paddr (+) = b.paddr
      and b.sid = a.sid
      and c.name in ('physical reads', 'physical writes',
                     'physical reads direct',
                     'physical reads direct (lob)',
                     'physical writes direct',
                     'physical writes direct (lob)')
      and b.username not in ('SYS', 'SYSTEM', 'SYSMAN', 'DBSNMP')
      group by b.sid, nvl(b.username, p.name)
      order by 3 desc),
     (select sum(value) total_io
      from v$statname c, v$sesstat a
      where a.statistic# = c.statistic#
      and c.name in ('physical reads', 'physical writes',
                       'physical reads direct',
                       'physical reads direct (lob)',
                       'physical writes direct',
                       'physical writes direct (lob)'))
where rownum < 2
union all
select 'top logical i/o process', sid, username,
       total_user_io amt_used,
       round(100 * total_user_io/total_io,2) pct_used
from (select b.sid sid, nvl(b.username, p.name) username,
             sum(value) total_user_io
      from v$statname c, v$sesstat a,
           v$session b, v$bgprocess p
      where a.statistic# = c.statistic#
      and p.paddr (+) = b.paddr
      and b.sid = a.sid
      and c.name in ('consistent gets', 'db block gets')
      and b.username not in ('SYS', 'SYSTEM', 'SYSMAN', 'DBSNMP')
      group by b.sid, nvl(b.username, p.name)
      order by 3 desc),
     (select sum(value) total_io
      from v$statname c, v$sesstat a,
           v$session b, v$bgprocess p
      where a.statistic# = c.statistic#
      and p.paddr (+) = b.paddr
 and b.sid = a.sid
      and c.name in ('consistent gets', 'db block gets'))
where rownum < 2
union all
select 'top memory process', sid,
       username, total_user_mem,
       round(100 * total_user_mem/total_mem,2)
from (select b.sid sid, nvl(b.username, p.name) username,
             sum(value) total_user_mem
      from v$statname c, v$sesstat a,
           v$session b, v$bgprocess p
      where a.statistic# = c.statistic#
      and p.paddr (+) = b.paddr
      and b.sid = a.sid
      and c.name in ('session pga memory', 'session uga memory')
      and b.username not in ('SYS', 'SYSTEM', 'SYSMAN', 'DBSNMP')
      group by b.sid, nvl(b.username, p.name)
      order by 3 desc),
     (select sum(value) total_mem
      from v$statname c, v$sesstat a
      where a.statistic# = c.statistic#
      and c.name in ('session pga memory', 'session uga memory'))
where rownum < 2
union all
select 'top cpu process', sid, username,
       total_user_cpu,
       round(100 * total_user_cpu/greatest(total_cpu,1),2)
from (select b.sid sid, nvl(b.username, p.name) username,
             sum(value) total_user_cpu
      from v$statname c, v$sesstat a,
           v$session b, v$bgprocess p
      where a.statistic# = c.statistic#
      and p.paddr (+) = b.paddr
      and b.sid = a.sid
      and c.name = 'CPU used by this session'
      and b.username not in ('SYS', 'SYSTEM', 'SYSMAN', 'DBSNMP')
      group by b.sid, nvl(b.username, p.name)
      order by 3 desc),
     (select sum(value) total_cpu
      from v$statname c, v$sesstat a,
           v$session b, v$bgprocess p
      where a.statistic# = c.statistic#
      and p.paddr (+) = b.paddr
      and b.sid = a.sid
      and c.name = 'CPU used by this session')
where rownum < 2;


cursor c8 is select username, sum(VALUE/100) cpu_usage_sec
from v$session ss, v$sesstat se, v$statname sn
where se.statistic# = sn.statistic#
and name like '%CPU used by this session%'
and se.sid = ss.sid
and username is not null
and username not in ('SYS', 'SYSTEM', 'SYSMAN', 'DBSNMP')
group by username
order by 2 desc;
begin
dbms_output.put_line ('Database Version');
dbms_output.put_line ('-----------------');
for rec in c1
loop
dbms_output.put_line(rec.version);
end loop;
dbms_output.put_line( chr(13) );
dbms_output.put_line('Hostname');
dbms_output.put_line ('----------');
for rec in c2
loop
     dbms_output.put_line(rec.host_name);
end loop;
dbms_output.put_line( chr(13) );
dbms_output.put_line('SGA Size (MB)');
dbms_output.put_line ('-------------');
for rec in c5
loop
     dbms_output.put_line(rec.sgasize);
end loop;
dbms_output.put_line( chr(13) );
dbms_output.put_line('Database Size (MB)');
dbms_output.put_line ('-----------------');
for rec in c6
loop
     dbms_output.put_line(rec.dbsize);
end loop;
dbms_output.put_line( chr(13) );
dbms_output.put_line('Instance start-up time');
dbms_output.put_line ('-----------------------');
for rec in c2 loop
 dbms_output.put_line( rec.starttime );
  end loop;
dbms_output.put_line( chr(13) );
  for b in
    (select total, active, inactive, system, killed
    from
       (select count(*) total from v$session)
     , (select count(*) system from v$session where username is null)
     , (select count(*) active from v$session where status = 'ACTIVE' and username is not null)


     , (select count(*) inactive from v$session where status = 'INACTIVE')
     , (select count(*) killed from v$session where status = 'KILLED')) loop
dbms_output.put_line('Active Sessions');
dbms_output.put_line ('---------------');
dbms_output.put_line(b.total || ' sessions: ' || b.inactive || ' inactive,' || b.active || ' active, ' || b.system || ' system, ' || b.killed || ' killed ');
  end loop;
  dbms_output.put_line( chr(13) );
 dbms_output.put_line( 'Sessions Waiting' );
  dbms_output.put_line( chr(13) );
dbms_output.put_line('Count      Event Name');
dbms_output.put_line('-----      -----------------------------------------------------');
for rec in c4 
loop
dbms_output.put_line(rec.cnt||'          '||rec.event);
end loop;
dbms_output.put_line( chr(13) );


dbms_output.put_line('-----      -----------------------------------------------------');


dbms_output.put_line('TOP Physical i/o, logical i/o, memory and CPU processes');
dbms_output.put_line ('---------------');
for rec in c7
loop
dbms_output.put_line (rec.category||': SID '||rec.sid||' User : '||rec.username||': Amount used : '||rec.amt_used||': Percent used: '||rec.pct_used);
end loop;


dbms_output.put_line('------------------------------------------------------------------');


dbms_output.put_line('TOP CPU users by usage');
dbms_output.put_line ('---------------');
for rec in c8
loop


dbms_output.put_line (rec.username||'--'||rec.cpu_usage_sec);
dbms_output.put_line ('---------------');
end loop;


end;
/

Oracle Expdp error ORA-39070,ORA-39002,ORA-29283,ORA-06512,ORA-29283


Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 475
ORA-29283: invalid file operation


Solution : You have to manually create directory  and give writes to specified users on specified path then after you try your operation.


SQL> create directory expbkp as '/opt/oracle/expbkp';

SQL> grant read, write on directory expbkp to <user_name>;

SQL>select * from dba_directories where directory_name = 'EXPBKP';

Otherwise you can use DATA_PUMP_DIR which is defalut in Oracle 10g and Oracle 11g.

A query to show you current sessions generating redo


A query to show you current sessions generating redo:-

select s.sid, n.name, s.value, sn.username, sn.program, sn.type, sn.module
from v$sesstat s
  join v$statname n on n.statistic# = s.statistic#
  join v$session sn on sn.sid = s.sid
where name like '%redo entries%'
order by value desc;


Query V$SESS_IO. This view contains the column BLOCK_CHANGES which indicates
how much blocks have been changed by the session. High values indicate a 
session generating lots of redo.

SQL> SELECT s.sid, s.serial#, s.username, s.program,
     i.block_changes
     FROM v$session s, v$sess_io i
     WHERE s.sid = i.sid
     ORDER BY 5 desc, 1, 2, 3, 4;


Query V$TRANSACTION. This view contains information about the amount of
undo blocks and undo records accessed by the transaction (as found in the 
USED_UBLK and USED_UREC columns).

SQL> SELECT s.sid, s.serial#, s.username, s.program, 
     t.used_ublk, t.used_urec
     FROM v$session s, v$transaction t
     WHERE s.taddr = t.addr
     ORDER BY 5 desc, 6 desc, 1, 2, 3, 4;

Linux count the number of the files in that directory and its subdirectories

count  the number of the files in that directory and its sub directories is:

ls -laR | grep -v ^[.dlt] | grep -v ^$ | wc -l

OR run either of  the below codes  :-

for t in files links directories; do echo `find . -maxdepth 1 -type ${t:0:1} | wc -l` $t; done 2> /dev/null


50 files
0 links
74 directories


for t in files links directories; do echo `find . -type ${t:0:1} | wc -l` $t; done 2>/dev/null

6781 files
0 links
814 directories


converting RAC archive log mode to non archive log mode.


( Note All these steps are just indicative , run these on your test environment , before production )

- shutdown all instance except one

- restart your one instance in mount state which you have left in read - write mode on which you are going to
  perform this

- alter system set cluster_database=false scope=spfile sid='*';

- shutdown immediate

- startup mount;
 
- alter database noarchivelog;

- alter system set log_archive_dest='' scope=spfile sid='*';
 
- alter system set cluster_database=true scope=spfile sid='*' ;

- Startup all instances

monitoring audit


select user_name, audit_option, success, failure
        from sys.dba_stmt_audit_opts;

select sessionid, to_char(ntimestamp#,'DD-MON-YY:HH24:MI:SS') login,
userid, to_char(logoff$time,'DD-MON-YY:HH24:MI:SS') logoff
from sys.aud$ where userid='<schema_name>';

select username, priv_used, ses_actions from dba_audit_object;

select action, action_name, username from dba_audit_trail ;

select * from stmt_audit_option_map;

Some ASH (Active Session History) views


select * from  DBA_HIST_ACTIVE_SESS_HISTORY;
select * from  DBA_HIST_BASELINE;
select * from  DBA_HIST_BG_EVENT_SUMMARY;
select * from  DBA_HIST_BUFFERED_QUEUES;
select * from  DBA_HIST_BUFFERED_SUBSCRIBERS;
select * from  DBA_HIST_BUFFER_POOL_STAT;
select * from  DBA_HIST_COMP_IOSTAT;
select * from  DBA_HIST_CR_BLOCK_SERVER;
select * from  DBA_HIST_CURRENT_BLOCK_SERVER;
select * from  DBA_HIST_DATABASE_INSTANCE;
select * from  DBA_HIST_DATAFILE;
select * from  DBA_HIST_DB_CACHE_ADVICE;
select * from  DBA_HIST_DLM_MISC;
select * from  DBA_HIST_ENQUEUE_STAT;
select * from  DBA_HIST_EVENT_NAME;
select * from  DBA_HIST_FILEMETRIC_HISTORY;
select * from  DBA_HIST_FILESTATXS;
select * from  DBA_HIST_INSTANCE_RECOVERY;
select * from  DBA_HIST_INST_CACHE_TRANSFER;
select * from  DBA_HIST_JAVA_POOL_ADVICE;
select * from  DBA_HIST_LATCH;
select * from  DBA_HIST_LATCH_CHILDREN;
select * from  DBA_HIST_LATCH_MISSES_SUMMARY;
select * from  DBA_HIST_LATCH_NAME;
select * from  DBA_HIST_LATCH_PARENT;
select * from  DBA_HIST_LIBRARYCACHE;
select * from  DBA_HIST_LOG;
select * from  DBA_HIST_METRIC_NAME;
select * from  DBA_HIST_MTTR_TARGET_ADVICE;
select * from  DBA_HIST_OPTIMIZER_ENV;
select * from  DBA_HIST_OSSTAT;
select * from  DBA_HIST_OSSTAT_NAME;
select * from  DBA_HIST_PARAMETER;
select * from  DBA_HIST_PARAMETER_NAME;
select * from  DBA_HIST_PGASTAT;
select * from  DBA_HIST_PGA_TARGET_ADVICE;
select * from  DBA_HIST_PROCESS_MEM_SUMMARY;
select * from  DBA_HIST_RESOURCE_LIMIT;
select * from  DBA_HIST_ROWCACHE_SUMMARY;
select * from  DBA_HIST_RULE_SET;
select * from  DBA_HIST_SEG_STAT;
select * from  DBA_HIST_SEG_STAT_OBJ;
select * from  DBA_HIST_SERVICE_NAME;
select * from  DBA_HIST_SERVICE_STAT;
select * from  DBA_HIST_SERVICE_WAIT_CLASS;
select * from  DBA_HIST_SESSMETRIC_HISTORY;
select * from  DBA_HIST_SESS_TIME_STATS;
select * from  DBA_HIST_SGA;
select * from  DBA_HIST_SGASTAT;
select * from  DBA_HIST_SGA_TARGET_ADVICE;
select * from  DBA_HIST_SHARED_POOL_ADVICE;
select * from  DBA_HIST_SNAPSHOT;
select * from  DBA_HIST_SNAP_ERROR;
select * from  DBA_HIST_SQLBIND;
select * from  DBA_HIST_SQLSTAT;
select * from  DBA_HIST_SQLTEXT;
select * from  DBA_HIST_SQL_BIND_METADATA;
select * from  DBA_HIST_SQL_PLAN;
select * from  DBA_HIST_SQL_SUMMARY;
select * from  DBA_HIST_SQL_WORKAREA_HSTGRM;
select * from  DBA_HIST_STAT_NAME;
select * from  DBA_HIST_STREAMS_APPLY_SUM;
select * from  DBA_HIST_STREAMS_CAPTURE;
select * from  DBA_HIST_STREAMS_POOL_ADVICE;
select * from  DBA_HIST_SYSMETRIC_HISTORY;
select * from  DBA_HIST_SYSMETRIC_SUMMARY;
select * from  DBA_HIST_SYSSTAT;
select * from  DBA_HIST_SYSTEM_EVENT;
select * from  DBA_HIST_SYS_TIME_MODEL;
select * from  DBA_HIST_TABLESPACE_STAT;
select * from  DBA_HIST_TBSPC_SPACE_USAGE;
select * from  DBA_HIST_TEMPFILE;
select * from  DBA_HIST_TEMPSTATXS;
select * from  DBA_HIST_THREAD;
select * from  DBA_HIST_UNDOSTAT;
select * from  DBA_HIST_WAITCLASSMET_HISTORY;
select * from  DBA_HIST_WAITSTAT;
select * from  DBA_HIST_WR_CONTROL;


Both ASH size and the total number of emergency flushes since instance startup can be
monitored by running the following query:

 select total_size,awr_flush_emergency_count from v$ash_info;

Active Session History (ASH) performed an emergency flush. This may mean that ASH is undersized. 
If emergency flushes are a recurring issue, you may consider increasing ASH size by setting 
the value of _ASH_SIZE to a sufficiently large value.

Linux Error Argument list too long


 If you get this  error by deleting log files in any directory :- /bin/rm: Argument list too long

then run the following command :-

 find . -name '*' | xargs rm

 find . -name 'spam-*' | xargs rm

  find . -name '*.trc' | xargs rm

find . -name 'core*' | xargs rm -rf

  find /rpt01/dbs/log/ -name '*.log' -mtime +4 -exec rm {} \; (This will delete 4 days old log files)


how much archive generate per day


SQL> select to_char(completion_time,'DD/MM/YYYY') HOUR,count(*),round(sum(blocks*block_size)/1024/1024/1024,2) size_g from v$archived_log where completion_time>sysdate-30 group by to_char(completion_time,'DD/MM/YYYY') order by to_char(completion_time,'DD/MM/YYYY') asc;


SQL> show parameter db_recovery_file_dest

NAME                                 TYPE                             VALUE
------------------------------------ -------------------------------- ------------------------------
db_recovery_file_dest                string                           /ora/db001/dbfra001/<db_name>
db_recovery_file_dest_size           big integer                      500G

SQL>!df -h | grep /ora/db001/dbfra001
          2.5T  348G  2.1T  15% /ora/db001/dbfra001

redo logs are located on "/ora/db001/redo001/FPD1AP/" and "/ora/db001/redo002/<db_name>/" ,total 15 redo logfiles with total size 92GB. 


SQL> select sum(bytes)/1024/1024 size_m,count(*) from v$log;

    SIZE_M   COUNT(*)
---------- ----------
     92160         15


SQL> !df -h|grep /ora/db001/redo00
                       99G   91G  8.9G  92% /ora/db001/redo002
                      100G   91G  9.8G  91% /ora/db001/redo001




Tuesday, 25 December 2012

ANALYZE statement with the VALIDATE STRUCTURE option


To verify structure of a table, index, materialized view, use the ANALYZE statement with the VALIDATE STRUCTURE option. If the structure is valid, no error is returned. However, if the structure is corrupt, you receive an error message.

For example, in rare cases such as hardware or other system failures, an index can become corrupted and not perform correctly. If index is corrupt, you can drop and re-create it.

If a table, index is corrupt, you should drop it and re-create it. If a materialized view is corrupt, perform a complete refresh and ensure that you have remedied the problem. If the problem is not corrected, drop and re-create the materialized view.

The following statement analyzes the table:

ANALYZE TABLE <table_name> VALIDATE STRUCTURE;
You can validate an object and all dependent objects (for example, indexes) by including the CASCADE option. The following statement validates the table and all associated indexes:
ANALYZE TABLE <table_name>  VALIDATE STRUCTURE CASCADE;
By default the CASCADE option performs a complete validation. Because this operation can be resource intensive, you can perform a faster version of the validation by using the FAST clause. This version checks for the existence of corruptions using an optimized check algorithm, but does not report details about the corruption. If the FAST check finds a corruption, you can then use the CASCADE option without the FAST clause to locate it. The following statement performs a fast validation on the table and all associated indexes:
ANALYZE TABLE emp VALIDATE STRUCTURE CASCADE FAST;
You can specify that you want to perform structure validation online while DML is occurring against the object being validated. There can be a slight performance impact when validating with ongoing DML affecting the object, but this is offset by the flexibility of being able to perform ANALYZE online. The following statement validates the table and all associated indexes online:
ANALYZE TABLE <table_name>  VALIDATE STRUCTURE CASCADE ONLINE;

disable password_verify_function

Sometimes user getting locked again and again after running some procedure or function , then in that case either disable  password_verify_function or alter profile or unlock the user by providing password manually .


select * from dba_profiles;

select * from dba_users where USERNAME like '<USERNAME>';

ALTER PROFILE DEFAULT limit PASSWORD_GRACE_TIME unlimited;


to disable password_verify_function:-


SQL> ALTER PROFILE DEFAULT limit password_verify_function null;


SQL> select profile from dba_users where username='<user_name>';


SQL> select RESOURCE_NAME,RESOURCE_TYPE,LIMIT FROM DBA_PROFILES WHERE PROFILE='<PROFILE_NAME>' AND RESOURCE_NAME='PASSWORD_VERIFY_FUNCTION';


SQL>
ALTER PROFILE <PROFILE_NAME> LIMIT PASSWORD_VERIFY_FUNCTION NULL;

Profile altered.


SQL> alter user <username> identified by <password> account unlock;

User altered.

alter index command for partition table


alter table <schema_name>.<table_name>
  add constraint <contraint_name> primary key (<column_name>, <column_name>)
  using index
  tablespace <tablespce_name>
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 1M
    next 1M
    minextents 1
    maxextents unlimited
    pctincrease 0
  )LOCAL;

some event and wait events of session


SQL> select count(*),event from v$active_session_history where session_id=331 group by event order by count(*) desc;

  COUNT(*) EVENT
---------- ----------------------------------------------------------------
       323 log file sync
       220 db file sequential read
       132 log file switch (checkpoint incomplete)
       110 buffer busy waits

2.            Today, Log File related wait events are not there. Below are the wait events:

SQL> select EVENT,TOTAL_WAITS,TIME_WAITED from v$session_event where sid=331 order by time_waited desc;
                
EVENT                                                            TOTAL_WAITS TIME_WAITED
---------------------------------------------------------------- ----------- -----------
SQL*Net message from dblink                                            32615     1785828
local write wait                                                        2048      199947
enq: RO - fast object reuse                                              154       45023
events in waitclass Other                                                229       22289
db file sequential read                                                33768       17814
db file scattered read                                                  4436        9435


wait events in detail:

a.            SQL*Net message from dblink: This happens when data is fetched using DB links. This
               happenes over Network due to architecture.
b.            local write wait: This arise when consecutive Truncate statements are written.
c.             enq: RO - fast object reuse: this is because of Truncate statements.

creating agent in Oracle


[oracle@cint ~]$ orapwd file=$ORACLE_HOME/dbs/orapwevt01 password=sys entries=5
[oracle@cint ~]$ sqlplus sys/sys as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Mar 19 10:41:00 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> Select username from dba_users where username='SYSMAN';

USERNAME
------------------------------
SYSMAN

SQL> alter user sysman identified by sys account unlock;

User altered.

SQL> alter user dbsnmp identified by sys account unlock;

User altered.

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

[oracle@cint ~]$ emca -repos create (or run the command
./emca -config dbcontrol db -repos create)


STARTED EMCA at Mar 19, 2012 10:44:12 AM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: evt01
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:

Do you wish to continue? [yes(Y)/no(N)]: Y
Mar 19, 2012 10:44:27 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /opt/oracle/product/10.2.0/db_1/cfgtoollogs/emca/evt01/emca_2012-03-19_10-44-12-AM.log.
Mar 19, 2012 10:44:27 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Mar 19, 2012 10:48:48 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Enterprise Manager configuration completed successfully
FINISHED EMCA at Mar 19, 2012 10:48:48 AM
[oracle@cint ~]$ emca -config dbcontrol db

STARTED EMCA at Mar 19, 2012 10:49:38 AM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: evt01
Listener port number: 1521
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /opt/oracle/product/10.2.0/db_1

Database hostname ................ cint.agilis.com
Listener port number ................ 1521
Database SID ................ evt01
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Mar 19, 2012 10:50:03 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /opt/oracle/product/10.2.0/db_1/cfgtoollogs/emca/evt01/emca_2012-03-19_10-49-38-AM.log.
Mar 19, 2012 10:50:04 AM oracle.sysman.emcp.DatabaseChecks performReposChecks
WARNING: 'shared_pool_size' must be greater than or equal to 80 MB.
Mar 19, 2012 10:50:15 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Mar 19, 2012 10:51:53 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Mar 19, 2012 10:51:53 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://hostname(or IP of the hostname):1158/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Mar 19, 2012 10:51:53 AM
[oracle@cint ~]$