Saturday, December 10, 2016

Dataguard Broker # DMON

Anyway,  steps to configure dataguard broker >
pre req's #
> Add global database name in listener on primary and standby >
> set dg_broker_start=true > and make sure dg_broker_config_file1 & dg_broker_config_file2 are created >

Step 1 > 
Add global database name to listener to both source and target database > 

Source > 

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.103)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = /u01/app/oracle

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = db11g_dgmgrl.localdomain)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME = DB11G)
    )
  )

Target > 

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.104)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = /u01/app/oracle

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = sbydb11g_dgmgrl.localdomain)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME = SBYDB11G)
    )
    (SID_DESC =
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME = delta)
    )
  )

>>> 
Step 2> on both primary and standby > 

sql > alter system set dg_broker_start=true scope=both;

SQL> show parameter dg_broker

NAME               TYPE VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1     string /u01/app/oracle/product/11.2.0/dbhome_1/dbs/dr1DB11G.dat
dg_broker_config_file2     string /u01/app/oracle/product/11.2.0/dbhome_1/dbs/dr2DB11G.dat
dg_broker_start             boolean TRUE

Step 3> Register both primary and standydatabase and Enable configuration  > 

[oracle@dg1 admin]$ dgmgrl
DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
DGMGRL> 
DGMGRL> conn sys       
Unrecognized command "conn", try "help"
DGMGRL> connect sys/oracle@TO_DB11G
Connected.
DGMGRL> 

>>>

DGMGRL> create configuration 'BROKER_P' as primary database is 'DB11G' connect identifier is 'TO_DB11G';
Configuration "BROKER_P" created with primary database "DB11G"

>>>> 

DGMGRL> add database 'SBYDB11G' as connect identifier is 'TO_SBYDB11G' maintained as physical;
Database "SBYDB11G" added
DGMGRL> show configuration;
Configuration - BROKER_P
  Protection Mode: MaxPerformance
  Databases:
    DB11G    - Primary database
    SBYDB11G - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
DISABLED

>>>> 

DGMGRL>  enable configuration;
Enabled.


>>>>

---- Nikhil Tatineni----
how about those chiefs |||||

Tuesday, December 6, 2016

Query's Used to monitor Goldengate Integrated Extract and replicat

Integrated capture GoldenGate views on Source Database >

col CAPTURE_NAME for a20;
col QUEUE_NAME for a15;
col START_SCN for 9999999999;
col STATUS for a10;
col CAPTURED_SCN for 9999999999;
col APPLIED_SCN for 9999999999;
col SOURCE_DATABASE for a10;
col LOGMINER_ID for 9999999;
col REQUIRED_CHECKPOINTSCN for a30;
col STATUS_CHANGE_TIME for a15;
col ERROR_NUMBER for a15;
col ERROR_MESSAGE for a10;
col CAPTURE_TYPE for a10;
col START_TIME for a30

SELECT CAPTURE_NAME, QUEUE_NAME, START_SCN, STATUS,
CAPTURED_SCN, APPLIED_SCN, SOURCE_DATABASE,
LOGMINER_ID, REQUIRED_CHECKPOINT_SCN,
STATUS_CHANGE_TIME, ERROR_NUMBER, ERROR_MESSAGE,
CAPTURE_TYPE, START_TIME
FROM DBA_CAPTURE;

> dynamic statistics from the GoldenGate views 
col state for a30;
SELECT sid, serial#, capture#, CAPTURE_NAME, STARTUP_TIME, CAPTURE_TIME,
state, SGA_USED, BYTES_OF_REDO_MINED,
to_char(STATE_CHANGED_TIME, 'mm-dd-yy hh24:mi') STATE_CHANGED_TIME
FROM V$GOLDENGATE_CAPTURE;

>>>>

col capture_message_create_time for a30;
col enqueue_message_create_time for a27;
col available_message_create_time for a30;

SELECT capture_name,
to_char(capture_time, 'mm-dd-yy hh24:mi') capture_time,
capture_message_number,
to_char(capture_message_create_time ,'mm-dd-yy hh24:mi') capture_message_create_time,
to_char(enqueue_time,'mm-dd-yy hh24:mi') enqueue_time,
enqueue_message_number,
to_char(enqueue_message_create_time, 'mm-dd-yy hh24:mi') enqueue_message_create_time,
available_message_number,
to_char(available_message_create_time,'mm-dd-yy hh24:mi') available_message_create_time
FROM GV$GOLDENGATE_CAPTURE;

>>>

Monitor the number of open transactions and LCRs for each capture processes >

SELECT component_name capture_name, count(*) open_transactions,
sum(cumulative_message_count) LCRs
FROM GV$GOLDENGATE_TRANSACTION
WHERE component_type='CAPTURE'
group by component_name;

>>> >>> 

 LogMiner views for LogMiner sessions and statistics > 

col db_name for a15;

select INST_ID, SESSION_ID,SESSION_NAME,SESSION_STATE, DB_NAME,
NUM_PROCESS,START_SCN,END_SCN,SPILL_SCN, PROCESSED_SCN, PREPARED_SCN,
READ_SCN MAX_MEMORY_SIZE,USED_MEMORY_SIZE PINNED_TXN, PINNED_COMMITTED_TXN
from GV$LOGMNR_SESSION;
SELECT SESSION_ID, NAME, VALUE
FROM V$LOGMNR_STATS;

>>
Integrated Capture >

SQL> select CAPTURE_NAME, QUEUE_NAME, STATUS from DBA_CAPTURE;
SQL> select OWNER, QUEUE_TABLE, QUEUE_TYPE from dba_queues where NAME='OGG$Q_TESTEXT1';


Integrated Replicat >

SQL> select REPLICAT_NAME,SERVER_NAME from DBA_GOLDENGATE_INBOUND;
SQL> select APPLY_NAME, QUEUE_NAME, status from dba_apply;
SQL> select apply_name,state from V$GG_APPLY_COORDINATOR ;


—Oracle In-Memory—

Querys to monitor RAC

following few  Query's will help to find out culprits-  Query to check long running transaction from last 8 hours  Col Sid Fo...