How to add/remove vdisk to/from Guest LDOMS online

Prerequisites In order to add vdisk online to a guest LDOM, the SMF service svc:/platform/sun4v/drd must be online in Guest LDOM : ldom01 # svcs drd STATE STIME FMRI online Feb_12 svc:/platform/sun4v/drd:default 1. Adding ZFS volume primary # zpool list NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT ldom 86.5G 14.6G 71.9G 16% 1.00x ONLINE… Continue reading How to add/remove vdisk to/from Guest LDOMS online

How to Diagnose Slow TNS Listener / Connection Performance

Questions to ask 1. Is the problem intermittent or happening all the time? 2. When did the problem start to happen and what was changed around the time the first slow down was seen? 3. How is the problem resolved, ie kill listener process or sorts itself out, etc? 4. Is the connection model dedicated… Continue reading How to Diagnose Slow TNS Listener / Connection Performance

How To Change the Listener Log Filename Without Stopping the Listener

 Note for 11g and newer installations: This procedure only works if ADR has been disabled in the listener.ora (addition of DIAG_ADR_ENABLED_listenername = OFF) If ADR is enabled and the command in this document is executed, the error “TNS-01251: Cannot set trace/log directory under ADR” will be displayed 10gR2 and earlier instructions: The listener.log filename can… Continue reading How To Change the Listener Log Filename Without Stopping the Listener

Tuning SGA_TARGET Using V$SGA_TARGET_ADVICE

What is the view V$SGA_TARGET_ADVICE The V$SGA_TARGET_ADVICE view provides information that helps you decide on a value for SGA_TARGET. It is new to Oracle10g, and is part of the implementation of Automatic Shared Memory Management (ASMM) of Oracle10g and higher releases. As the database is used, the MMON process gather statistics and updates the view.… Continue reading Tuning SGA_TARGET Using V$SGA_TARGET_ADVICE

Script To Monitor RDBMS Session UGA and PGA Current And Maximum Usage Over Time

set echo off; set feedback off; set heading off; set linesize 128; set show off; set pagesize 55; set trimspool on; set verify off; column “SID AND SERIAL#” FORMAT A19 col SNAP_COLUMN new_value SNAP_TIME col SNAP_EOF_NAME new_value EOF_NAME col SNAP_HOST_NAME new_value THE_HOST_NAME col SNAP_INSTANCE_NAME new_value THE_NAME_OF_THE_INSTANCE col SNAP_RDBMS_VERSION new_value THE_RDBMS_VERSION set term off; select to_char(sysdate,’YYYYMMDD_HH24MISS’) “SNAP_COLUMN” from dual; select trim(host_name) “SNAP_HOST_NAME” from v$instance; select trim(instance_name) “SNAP_INSTANCE_NAME” from v$instance; select trim(version) “SNAP_RDBMS_VERSION” from v$instance; select ‘&THE_NAME_OF_THE_INSTANCE’||’_’||’&SNAP_TIME’||’.LST’ “SNAP_EOF_NAME” from dual; drop table maxpgauga; create table maxpgauga as select s.sid,                                  s2.serial#,                                  n.name,                                  s.value,                                  decode(s2.username,null,s2.program,s2.username) “USERNAME”,                                  s2.logon_time                           from   v$statname n,                                  v$sesstat s,                                  v$session s2                           where  n.statistic# = s.statistic# and                                  (s.sid = s2.sid) and                                  name like ‘session%memory max%’; drop table curpgauga; create table curpgauga as select s.sid,                                  s2.serial#,                                  n.name,                                  s.value,                                  decode(s2.username,null,s2.program,s2.username) “USERNAME”,                                  s2.logon_time                           from   v$statname n,                                  v$sesstat s,                                  v$session s2                           where  n.statistic# = s.statistic# and                                  (s.sid = s2.sid) and                                  name like ‘session%memory’ and                                  name not like ‘session%memory max%’; set term on; spool ORACLE_MEMORY_USAGE_SNAPSHOT_&EOF_NAME select ‘Oracle Memory Usage Report: PGA And UGA Memory Usage Per Session’ from dual; select ‘Host……..: ‘||’&THE_HOST_NAME’ from dual; select ‘Name……..: ‘||’&THE_NAME_OF_THE_INSTANCE’ from dual; select ‘Version…..: ‘||’&THE_RDBMS_VERSION’ from dual; select ‘Startup Time: ‘||to_char(min(logon_time),’YYYY-MM-DD HH24:MI:SS’) from curpgauga; select ‘Current Time: ‘||to_char(sysdate,’YYYY.MM.DD-HH24:MI:SS’) from dual;… Continue reading Script To Monitor RDBMS Session UGA and PGA Current And Maximum Usage Over Time

Script To Monitor Memory Usage By Database Sessions

REM Setting environment variables SET LINESIZE 200 SET PAGESIZE 500 SET FEEDBACK OFF SET VERIFY OFF SET SERVEROUTPUT ON SET TRIMSPOOL ON COL “SESSION” FORMAT A50 COL “PID/THREAD” FORMAT A10 COL ” CURRENT SIZE” FORMAT A18 COL ” MAXIMUM SIZE” FORMAT A18 REM Setting user variables values SET TERMOUT OFF DEFINE sort_order = 3 DEFINE… Continue reading Script To Monitor Memory Usage By Database Sessions

Memory – Tuning the Shared Pool and Tuning Library Cache Latch Contention

Troubleshooting Steps What is the shared pool ? Oracle keeps SQL statements, packages, object information and many other items in an area in the SGA known as the shared pool. This sharable area of memory is managed as a sophisticated cache and heap manager rolled into one. It has 3 fundamental problems to overcome: The… Continue reading Memory – Tuning the Shared Pool and Tuning Library Cache Latch Contention

AIX- Procedure to replace rootvg harddisk

Procedure of replacing rootvg failed hdisk ================================= 1)Ensure all LV in VG are mirrored. (lsvg -l rootvg) 2) unmirrorvg rootvg hdisk1 ( eg for hdisk1 is failed) 3) Check for any more LV on the hdisk to be removed (lspv -l hdiskx) 4) reducevg rootvg hdisk1 (if you receive error) nlxenc06:a207081> reducevg rootvg hdisk1 0516-016… Continue reading AIX- Procedure to replace rootvg harddisk