31 October 2013

Oracle Operating System Statistics


-- Operating System Statistics
1. CPU Statistics
V$OSSTAT
                - view captures machine-level information in the database, making it easier for you to determine if hardware-level resource issues exist.
V$SYSMETRIC_HISTORY
                - view shows a one-hour history of the Host CPU Utilization metric, a representation of percentage of CPU usage at each one-minute interval
V$SYS_TIME_MODEL
                - view supplies statistics on the CPU usage by the Oracle database. Using both sets of statistics enable you to determine whether the Oracle database or other system activity is the cause of the CPU problems
--
2. Memory
                This command below includes a great deal of detail, including the size of the mapped segment, how much if it is RSS (Real memory), how much of that is shared, the sizes and permissions of the segment. It is the output above that can be ‘compared’ over time to see if a given process is growing, or leaking memory.
                $ pmap -x $$
                where $$ - process ID

3. Disk I/O Statistics
                - Consumer group
                                V$IOSTAT_CONSUMER_GROUP view captures I/O statistics for all consumer groups that are part of the currently enabled resource plan
                - Database file
                                I/O statistics of database files that are or have been accessed are captured in the V$IOSTAT_FILE view
                                select * from V$IOSTAT_FILE
                - Database function
                                I/O statistics for database functions (such as the LGWR and DBWR) are captured in the V$IOSTAT_FUNCTION view.
                                select * from V$IOSTAT_FUNCTION
4. Network Statistics
                V$IOSTAT_NETWORK - network I/O statistics
                select * from V$IOSTAT_NETWORK

Operating System Data Gathering Tools
Table shows the various tools for gathering operating statistics on *NIX.
                Component        | UNIX Tool
                CPU                       | sar, vmstat, mpstat, iostat
                Memory                              | sar, vmstat
                Disk                        | sar, iostat
                Network                              |netstat

15 October 2013

Oracle streams propagation issue ORA-22636

Issue
SQL> SELECT DESTINATION_DBLINK,
  2         STATUS,
  3         ERROR_DATE,
  4         ERROR_MESSAGE
  5    FROM DBA_PROPAGATION;

DESTINATION_DBLINK
----------------------------------------------------------------
ERROR_MESSAGE
----------------------------------------------------------------
TO_FORCL.COM
ORA-22636: Message 22636 not found;  product=RDBMS; facility=ORA

Diagnostic
Run on both sites
SQL> select * from v$timezone_file;

FILENAME                VERSION
-------------------- ----------
timezlrg_14.dat              14
--
SQL> select * from v$timezone_file;

FILENAME                VERSION
-------------------- ----------
timezlrg_11.dat              11

the versions must be the same

Workaround
Update DST file. Follow the document:
Updating the RDBMS DST version in 11g Release 2 (11.2.0.1 and up) using DBMS_DST (Doc ID 977512.1)

lsnodes.bin: struct size 0

Issue
cluster nodes list
when trying to get a node list with lsnodes
lsnodes.bin: struct size 0
Solution
Try
cd $ORACLE_GRID (/u01/app/11.2.0/grid/bin)
./olsnodes