No image

Oracle Monitoring Scripts 1

1. .toto

-- writer : ezis.cloud (noname)
-- Description  : 
-- Requirements : 

insert into rslt
--create table rslt tablespace users as
SELECT (sliphid) AS sliphid,
slipdate AS slipdate,
clientcode AS clientcode,
(clientname) AS clientname,
(sliptype) AS sliptype,
(sliptypename) AS sliptypename,
itemcode AS itemcode,
(itemname) AS itemname,
(majorcategory) AS majorcategory,
itemspec AS itemspec,
(brandcode) AS brandcode,
(brandname) AS brandname,
gradename AS gradename,
(storagetype) AS storagetype,
(kindof) AS kindof,
(grqty) AS grqty,
(packingcnt) AS packingcnt,
(grwarehousecode) AS grwarehousecode,
(bondedwhname) AS bondedwhname,
TO_CHAR ( (salesunitprice), '999,999') AS salesunitprice,
(salesamount) AS salesamount,
(purchaseunitprice) AS purchaseunitprice,
(purchaseamount) AS purchaseamount,
(chargename) AS chargename,
saleschargename AS saleschargename,
dealno AS dealno,
(refno) AS refno,
(docno) AS docno,
(importidno) AS importidno,
(feedcode) AS feedcode,
(feedname) AS feedname,
(origin) AS origin,
ESTNO AS ESTNO,
(packingname) AS packingname,
TO_CHAR (TO_DATE (fromexpirydate, 'YYYYMMDD'), 'YY/MM/DD') AS fromexpirydate,
TO_CHAR (TO_DATE (toexpirydate, 'YYYYMMDD'), 'YY/MM/DD') AS toexpirydate,
(remark) AS remark,
0 AS pamount,                                            -- ???? ??
salestype AS salestype,
surtax,
surtaxyn
FROM
(
SELECT w.slip_h_id AS sliphid,
w.slip_date AS slipdate,
w.client_code AS clientcode,
w.client_name AS clientname,
'S' AS sliptype,
(SELECT code_name FROM b_common_code WHERE master_code = 'CD_DOCU' AND code = w.slip_type) AS sliptypename,
d.item_code AS itemcode,
d.item_name_kr AS itemname,
(SELECT code_name FROM b_common_code WHERE     master_code = 'MAJOR_CATEGORY' AND code = i.major_category) AS majorcategory,
d.item_spec AS itemspec,
r.brand_code AS brandcode,
(SELECT code_name FROM b_common_code WHERE master_code = 'BRAND' AND code = r.brand_code) AS brandname,
(SELECT code_name FROM b_common_code WHERE master_code = 'GRADE' AND code = r.grade_code) AS gradename,
CASE WHEN r.storage_type = 'S01' THEN '??' WHEN r.storage_type = 'S02' THEN '??' WHEN r.storage_type = 'S03' THEN '??' END AS storagetype,
CASE WHEN RR.GR_TYPE = '10'
THEN
DECODE (RR.CONTRACT_TYPE, '40', '??', '??')
WHEN RR.GR_TYPE = '20'
THEN
'??'
WHEN RR.GR_TYPE = '30'
THEN
'??'
WHEN RR.GR_TYPE = '40'
THEN
'CTF'
WHEN RR.GR_TYPE = '50'
THEN
'??'
END
AS kindof,
r.gi_qty AS grqty,
d.packing_cnt AS packingcnt,
h.gr_warehouse_code AS grwarehousecode,
(SELECT CLIENT_SNAME
FROM B_CLIENT
WHERE CLIENT_CODE = h.gr_warehouse_code)
AS bondedwhname,
d.unit_price AS salesunitprice,
d.amount AS salesamount,
0 AS purchaseunitprice,
0 AS purchaseamount,
(SELECT user_name
FROM s_user
WHERE user_id = w.charge_id)
AS chargename,
(SELECT user_name
FROM s_user
WHERE user_id = h.sale_charge_id)
AS saleschargename,
r.offer_no AS dealno,
r.bl_no AS refno,
w.doc_no AS docno,
r.import_id_no AS importidno,
r.feed_code AS feedcode,
DECODE (r.feed_code,
'10', 'GF',
'20', 'GS',
'40', 'NA',
'90', '??',
r.feed_code)
AS feedname,
r.ct_code AS origin,
RR.REAL_NO AS ESTNO,
(SELECT code_name
FROM b_common_code
WHERE master_code = 'PACKING' AND code = r.packing_code)
AS packingname,
r.from_expiry_date AS fromexpirydate,
r.to_expiry_date AS toexpirydate,
d.remarks AS remark,
0 AS pamount,
'salesWithCollect' AS salestype,
d.surtax as surtax,
rr.surtax_yn as surtaxyn
FROM w_slip_h w,
w_slip_d d,
w_goods_id r,
w_goods_ih h,
w_goods_r rr,
b_item i
WHERE     w.slip_h_id = d.slip_h_id
AND r.slip_h_id = d.slip_h_id
AND r.slip_d_id = d.slip_d_id
AND h.gi_h_id = r.gi_h_id
AND rr.goods_r_id = r.goods_r_id
AND d.item_code = i.item_code
AND w.slip_type = 15
-------------------------------------------------
UNION ALL
SELECT w.slip_h_id AS sliphid,
w.slip_date AS slipdate,
w.client_code AS clientcode,
w.client_name AS clientname,
'S' AS sliptype,
'???' AS sliptypename,
d.item_code AS itemcode,
d.item_name_kr AS itemname,
(SELECT code_name
FROM b_common_code
WHERE     master_code = 'MAJOR_CATEGORY'
AND code = i.major_category)
AS majorcategory,
d.item_spec AS itemspec,
r.brand_code AS brandcode,
(SELECT code_name
FROM b_common_code
WHERE master_code = 'BRAND' AND code = r.brand_code)
AS brandname,
(SELECT code_name
FROM b_common_code
WHERE master_code = 'GRADE' AND code = r.grade_code)
AS gradename,
CASE
WHEN r.storage_type = 'S01' THEN '??'
WHEN r.storage_type = 'S02' THEN '??'
WHEN r.storage_type = 'S03' THEN '??'
END
AS storagetype,
CASE
WHEN RR.GR_TYPE = '10'
THEN
DECODE (RR.CONTRACT_TYPE, '40', '??', '??')
WHEN RR.GR_TYPE = '20'
THEN
'??'
WHEN RR.GR_TYPE = '30'
THEN
'??'
WHEN RR.GR_TYPE = '40'
THEN
'CTF'
WHEN RR.GR_TYPE = '50'
THEN
'??'
END
AS kindof,
r.gi_qty AS grqty,
d.packing_cnt AS packingcnt,
h.gr_warehouse_code AS grwarehousecode,
(SELECT CLIENT_SNAME
FROM B_CLIENT
WHERE CLIENT_CODE = h.gr_warehouse_code)
AS bondedwhname,
d.unit_price AS salesunitprice,
d.amount AS salesamount,
0 AS purchaseunitprice,
0 AS purchaseamount,
(SELECT user_name
FROM s_user
WHERE user_id = w.charge_id)
AS chargename,
(SELECT de_user (user_id)
FROM b_client_charge
WHERE client_code = w.client_code AND status = 'Y')
AS saleschargename,
r.offer_no AS dealno,
r.bl_no AS refno,
w.doc_no AS docno,
r.import_id_no AS importidno,
r.feed_code AS feedcode,
DECODE (r.feed_code,
'10', 'GF',
'20', 'GS',
'40', 'NA',
'90', '??',
r.feed_code)
AS feedname,
r.ct_code AS origin,
RR.REAL_NO AS ESTNO,
(SELECT code_name
FROM b_common_code
WHERE master_code = 'PACKING' AND code = r.packing_code)
AS packingname,
r.from_expiry_date AS fromexpirydate,
r.to_expiry_date AS toexpirydate,
d.remarks AS remark,
0 AS pamount,
'ship' AS salestype,
d.surtax as surtax,
rr.surtax_yn as surtaxyn
FROM w_slip_h w,
w_slip_d d,
w_goods_id r,
w_goods_ih h,
w_goods_r rr,
b_item i
WHERE     w.slip_h_id = d.slip_h_id
AND r.slip_h_id = d.slip_h_id
AND r.slip_d_id = d.slip_d_id
AND h.gi_h_id = r.gi_h_id
AND rr.goods_r_id = r.goods_r_id
AND d.item_code = i.item_code
AND w.slip_type = 66
AND w.slip_category = '40'
----------------------------------------------------------------------------
UNION ALL
SELECT w.slip_h_id AS sliphid,
w.slip_date AS slipdate,
w.client_code AS clientcode,
w.client_name AS clientname,
'C' AS sliptype,
(SELECT code_name
FROM b_common_code
WHERE master_code = 'CD_DOCU' AND code = w.slip_type)
AS sliptypename,
d.item_code AS itemcode,
d.item_name_kr AS itemname,
(SELECT code_name
FROM b_common_code
WHERE     master_code = 'MAJOR_CATEGORY'
AND code = i.major_category)
AS majorcategory,
d.item_spec AS itemspec,
r.brand_code AS brandcode,
(SELECT code_name
FROM b_common_code
WHERE master_code = 'BRAND' AND code = r.brand_code)
AS brandname,
(SELECT code_name
FROM b_common_code
WHERE master_code = 'GRADE' AND code = r.grade_code)
AS gradename,
CASE
WHEN r.storage_type = 'S01' THEN '??'
WHEN r.storage_type = 'S02' THEN '??'
WHEN r.storage_type = 'S03' THEN '??'
END
AS storagetype,
CASE
WHEN RR.GR_TYPE = '10'
THEN
DECODE (RR.CONTRACT_TYPE, '40', '??', '??')
WHEN RR.GR_TYPE = '20'
THEN
'??'
WHEN RR.GR_TYPE = '30'
THEN
'??'
WHEN RR.GR_TYPE = '40'
THEN
'CTF'
WHEN RR.GR_TYPE = '50'
THEN
'??'
END
AS kindof,
r.gi_qty AS grqty,
d.packing_cnt AS packingcnt,
h.gr_warehouse_code AS grwarehousecode,
(SELECT CLIENT_SNAME
FROM B_CLIENT
WHERE CLIENT_CODE = h.gr_warehouse_code)
AS bondedwhname,
d.unit_price AS salesunitprice,
d.amount AS salesamount,
rr.amount_krw / rr.exchange_rate AS purchaseunitprice,
rr.amount_krw AS purchaseamount,
(SELECT user_name
FROM s_user
WHERE user_id = w.charge_id)
AS chargename,
(SELECT (SELECT user_name
FROM s_user
WHERE user_id = h.sale_charge_id)
FROM b_client_charge a, b_client_branch c
WHERE     c.client_code = a.client_code
AND c.branch_code = w.client_code
AND ROWNUM <= 1
AND a.status = 'Y')
AS saleschargename,
r.offer_no AS dealno,
r.bl_no AS refno,
w.doc_no AS docno,
r.import_id_no AS importidno,
r.feed_code AS feedcode,
DECODE (r.feed_code,
'10', 'GF',
'20', 'GS',
'40', 'NA',
'90', '??',
r.feed_code)
AS feedname,
r.ct_code AS origin,
RR.REAL_NO AS ESTNO,
(SELECT code_name
FROM b_common_code
WHERE master_code = 'PACKING' AND code = r.packing_code)
AS packingname,
r.from_expiry_date AS fromexpirydate, --  ????  from  TO_CHAR (TO_DATE (slip_date, 'YYYYMMDD'), 'YY-MM-DD') AS
r.to_expiry_date AS toexpirydate,                   -- ????
d.remarks AS remark,
0 AS pamount,
'salesWithCollect' AS salestype,
d.surtax as surtax,
rr.surtax_yn as surtaxyn
FROM w_slip_collect_h sch,
w_slip_collect_d scd,
w_slip_h w,
w_slip_d d,
w_goods_id r,
w_goods_ih h,
w_goods_r rr,
b_item i
WHERE     sch.slip_collect_h_id = scd.slip_collect_h_id
AND scd.slip_h_id = w.slip_h_id
AND w.slip_h_id = d.slip_h_id
AND r.slip_h_id = d.slip_h_id
AND r.slip_d_id = d.slip_d_id
AND h.gi_h_id = r.gi_h_id
AND rr.goods_r_id = r.goods_r_id
AND d.item_code = i.item_code
--------------------------------------------------
UNION ALL                                                  -- ????
SELECT w.slip_h_id AS sliphid,
w.slip_date AS slipdate,
w.client_code AS clientcode,
w.client_name AS clientname,
w.slip_type AS sliptype,
(SELECT code_name
FROM b_common_code
WHERE master_code = 'CD_DOCU' AND code = w.slip_type)
AS sliptypename,
d.item_code AS itemcode,
d.item_name_kr AS itemname,
(SELECT code_name
FROM b_common_code
WHERE     master_code = 'MAJOR_CATEGORY'
AND code = i.major_category)
AS majorcategory,
d.item_spec AS itemspec,
r.brand_code AS brandcode,
(SELECT code_name
FROM b_common_code
WHERE master_code = 'BRAND' AND code = r.brand_code)
AS brandname,
(SELECT code_name
FROM b_common_code
WHERE master_code = 'GRADE' AND code = r.grade_code)
AS gradename,
CASE
WHEN r.storage_type = 'S01' THEN '??'
WHEN r.storage_type = 'S02' THEN '??'
WHEN r.storage_type = 'S03' THEN '??'
END
AS storagetype,
CASE
WHEN r.GR_TYPE = '10'
THEN
DECODE (r.CONTRACT_TYPE, '40', '??', '??')
WHEN r.GR_TYPE = '20'
THEN
'??'
WHEN r.GR_TYPE = '30'
THEN
'??'
WHEN r.GR_TYPE = '40'
THEN
'CTF'
WHEN r.GR_TYPE = '50'
THEN
'??'
END
AS kindof,                                         -- ??
-r.gr_qty AS grqty,                                  --????
d.packing_cnt AS packingcnt,                        -- ????
r.gr_warehouse_code AS giwarehousecode,
(SELECT CLIENT_SNAME
FROM B_CLIENT
WHERE CLIENT_CODE = r.gr_warehouse_code)
AS bondedwhname,
-d.unit_price AS salesunitprice,
d.amount AS salesamount,
d.unit_price AS purchaseunitprice,
d.amount AS purchaseamount,
(SELECT user_name
FROM s_user
WHERE user_id = w.charge_id)
AS chargename,
(SELECT (SELECT user_name
FROM s_user
WHERE user_id = a.user_id)
FROM b_client_charge a, b_client_branch c
WHERE     c.client_code = a.client_code
AND c.branch_code = w.client_code
AND ROWNUM <= 1
AND a.status = 'Y')
AS saleschargename,
d.offer_no AS dealno,
r.bl_no AS refno,                                -- bl??? ?
w.doc_no AS docno,
r.import_id_no AS importidno,
r.feed_code AS feedcode,
DECODE (r.feed_code,
'10', 'GF',
'20', 'GS',
'40', 'NA',
'90', '??',
r.feed_code)
AS feedname,
r.ct_code AS origin,
R.REAL_NO AS ESTNO,
(SELECT code_name
FROM b_common_code
WHERE master_code = 'PACKING' AND code = r.packing_code)
AS packingname,
r.from_expiry_date AS fromexpirydate,              --- ????
r.to_expiry_date AS toexpirydate,
d.remarks AS remark,
0 AS pamount,
'return' AS salestype,
d.surtax as surtax,
r.surtax_yn as surtaxyn
FROM w_slip_h w,
w_slip_d d,
w_goods_r r,
b_item i
WHERE     w.slip_h_id = d.slip_h_id
AND r.slip_h_id = d.slip_h_id
AND r.slip_d_id = d.slip_d_id
AND d.item_code = i.item_code
AND w.slip_type = 50)
WHERE 1 = 1 AND sliptype NOT IN ('C')
--    GROUP BY ROLLUP ( (slipdate,
--                       saleschargename,
--                       clientcode,
--                       dealno,
--                       itemcode,
--                       itemspec,
--                       gradename,
--                       importidno,
--                       DOCNO,
--                       salestype))
/*
UNION ALL                                    ----------------  ??? ???? ??
SELECT 0 AS sliphid,
slip_date AS slipdate,
b.CLIENT_CODE AS clientcode,
client_name AS clientname,
'' AS sliptype,
DECODE (trade_sn, NULL, '???????', '???????????') AS sliptypename,
'' AS itemcode,
'' AS itemname,
'' AS majorcategory,
'' AS itemspec,
'' AS brandcode,
'' AS brandname,
'' AS gradename,
'' AS storagetype,
'' AS kindof,
0 AS grqty,
0 AS packingcnt,
'' AS grwarehousecode,
'' AS bondedwhname,
TO_CHAR (0, '999,999,999') AS salesunitprice,
0 AS salesamount,
0 AS purchaseunitprice,
0 AS purchaseamount,
'' AS chargename,
cc.SaleschargeNAME AS saleschargename,
'' AS dealno,
'' AS refno,
b.DOC_NO AS docno,
'' AS importidno,
'' AS feedcode,
'' AS feedname,
'' AS origin,
'' AS estno,
'' AS packingname,
'' AS fromexpirydate,
'' AS toexpirydate,
'' AS remark,
collect_amt AS pamount,
'' AS salestype,
0 as surtax,
'N' as surtaxyn
FROM    w_slip_collect_h b
LEFT JOIN
(  SELECT BCC.client_code,
SUBSTR (MAX (bcc.mod_date || SU.user_name), 9, 8)
SaleschargeNAME
FROM    b_client_charge BCC
INNER JOIN
S_user SU
ON BCC.USER_ID = SU.USER_ID
WHERE BCC.status = 'Y' AND SU.status = 'Y'
GROUP BY bcc.client_code) CC
ON b.client_code = CC.client_code
WHERE COLLECT_GUBUN IN ('16', '34')
AND  SLIP_COLLECT_H_ID IN
(SELECT  SLIP_COLLECT_H_ID FROM W_SLIP_COLLECT_A WHERE ACCOUNT_CODE = '10800')  -- ?????? ??  SLIP_COLLECT_H_ID
UNION ALL                                                     -- ???? ????
SELECT DISTINCT sh.slip_h_id AS SLIPHID,
sh.SLIP_DATE AS SLIPDATE,
sd.CLIENTCODE AS CLIENTCODE,
sd.CLIENTNAME AS CLIENTNAME,
'13' AS SLIPTYPE,
'??' AS SLIPTYPENAME,
'' AS ITEMCODE,
'' AS ITEMNAME,
'' AS MAJORCATEGORY,
'' AS ITEMSPEC,
'' AS BRANDCODE,
'' AS BRANDNAME,
'' AS GRADENAME,
'' AS STORAGETYPE,
'' AS KINDOF,
0 AS GRQTY,
0 AS PACKINGCNT,
'' AS GRWAREHOUSECODE,
'' AS BONDEDWHNAME,
TO_CHAR (0, '999,999,999') AS SALESUNITPRICE,
0 AS SALESAMOUNT,
0 AS PURCHASEUNITPRICE,
0 AS PURCHASEAMOUNT,
'' AS CHARGENAME,
(SELECT de_user (user_id)
FROM b_client_charge
WHERE client_code = sd.clientcode AND status = 'Y')
AS SALESCHARGENAME,
'' AS DEALNO,
'' AS REFNO,
'' AS DOCNO,
'' AS IMPORTIDNO,
'' AS FEEDCODE,
'' AS FEEDNAME,
'' AS ORIGIN,
'' AS ESTNO,
'' AS PACKINGNAME,
'' AS FROMEXPIRYDATE,
'' AS TOEXPIRYDATE,
'' AS REMARK,
SA.A_AMOUNT AS PAMOUNT,
'??' AS SALESTYPE,
0 as surtax,
'N' as surtaxyn
FROM W_SLIP_H SH,
W_SLIP_D SD,
(  SELECT SLIP_H_ID, SUM (AMOUNT) A_AMOUNT
FROM W_SLIP_A
WHERE ACCOUNT_CODE = '10800'
GROUP BY SLIP_H_ID) SA
WHERE     1 = 1
AND SH.SLIP_H_ID = SD.SLIP_H_ID
AND SH.SLIP_H_ID = SA.SLIP_H_ID
AND SH.SLIP_CATEGORY = '99'
AND SH.SLIP_TYPE = '13'
UNION ALL
SELECT SCH.SLIP_COLLECT_H_ID AS slipHId,
SCH.SLIP_DATE AS slipDate,
SCH.CLIENT_CODE AS clientCode,
SCH.CLIENT_NAME AS clientName,
'C' AS slipType,
'??????' AS slipTypeName,
'' AS itemCode,
'' AS itemName,
'' AS majorCategory,
'' AS itemSpec,
'' AS brandCode,
'' AS brandName,
'' AS gradeName,
'' AS storageType,
'' AS kindOf,
0 AS grQty,
0 AS packingCnt,
'' AS grWareHouseCode,
'' AS bondedWhName,
TO_CHAR (0, '999,999,999') AS salesUnitPrice,
0 AS salesAmount,
0 AS purchaseUnitPrice,
0 AS purchaseAmount,
(SELECT USER_NAME
FROM S_USER
WHERE USER_ID = SCH.CHARGE_ID)
AS chargeName,
'' AS salesChargeName,
'' AS dealNo,
'' AS refNo,
SCH.DOC_NO AS docNo,
'' AS importIdNo,
'' AS feedCode,
'' AS feedName,
'' AS origin,
'' AS estNo,
'' AS packingName,
'' AS fromExpiryDate,
'' AS toExpiryDate,
SCH.DOC_NO || '??????' AS remark,
NVL (SCH.COLLECT_AMT, 0) AS pAmount,
'??????' AS salesType,
0 as surtax,
'N' as surtaxyn
FROM W_SLIP_COLLECT_H SCH, W_SLIP_COLLECT_A SCA
WHERE     SCH.SLIP_COLLECT_H_ID = SCA.SLIP_COLLECT_H_ID
AND (SCH.PRE_COLLECT_TYPE = '10' OR SCH.PRE_COLLECT_TYPE = '30')
AND SCH.COLLECT_GUBUN = '56'
AND   SCA.ACCOUNT_TYPE = '1'
*/

 

2. 3sec

-- writer : ezis.cloud (noname)
-- Description  : 
-- Requirements : 

set echo off linesize 100 pagesize 999 verify off termout off

var fr       varchar2(14)
var to_dt    varchar2(14)
exec :fr    := to_char(SYSDATE-TO_CHAR(SYSDATE,'D')-5, 'YYYYMMDD');
exec :to_dt := to_char(SYSDATE-TO_CHAR(SYSDATE,'D')-1, 'YYYYMMDD');

spool  &1._3sec.log
set termout on

SELECT SERVICE_ID, SUM(CALL_CNT) CALL_CNT, TRUNC(SUM(AVG_TIME*CALL_CNT) / SUM(CALL_CNT), 3) AVG_TIME
FROM   ONSVCTIM
WHERE  wrk_dt BETWEEN :fr AND :to_dt
GROUP BY SERVICE_ID
HAVING SUM(AVG_TIME*CALL_CNT) / SUM(CALL_CNT) >= 3
/
spool off

 

3. 10046

-- writer : ezis.cloud (noname)
-- Description  : 
-- Requirements : 

--ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 12';
--ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT OFF';
--ALTER SESSION SET TRACEFILE_IDENTIFIER=;

-- IN SQL*PLUS, ACTIVATE SQL TRACING WITH DBMS_SYSTEM AND SID/SERIAL#  
-- SYNTAX: DBMS_SYSTEM.SET_EV([SID],[SERIAL#],[EVENT],[LEVEL],'') 

-- EXAMPLE TO SQL_TRACE WORKER PROCESS WITH LEVEL 12 (BIND VALUES):   
--EXECUTE SYS.DBMS_SYSTEM.SET_EV(&SID,&SERIAL,10046,&LEVEL,''); 

-- AND STOP TRACING: 
--EXECUTE SYS.DBMS_SYSTEM.SET_EV(150,17,10046,0,'');  

--EVENT 10046, LEVEL 1 = ENABLE STANDARD SQL_TRACE FUNCTIONALITY
--EVENT 10046, LEVEL 4 = AS LEVEL 1, PLUS TRACE THE BIND VALUES
--EVENT 10046, LEVEL 8 = AS LEVEL 1, PLUS TRACE THE WAITS
--EVENT 10046, LEVEL 12 = AS LEVEL 1, PLUS TRACE THE BIND VALUES AND THE WAITS

EXECUTE SYS.DBMS_MONITOR.SESSION_TRACE_ENABLE(SESSION_ID=>'&SID',SERIAL_NUM=>'&SERIAL',WAITS=>TRUE,BINDS=>TRUE);
--EXECUTE SYS.DBMS_MONITOR.SESSION_TRACE_DISABLE(SESSION_ID=>'&SID',SERIAL_NUM=>'&SERIAL');

 

4. 10053

-- writer : ezis.cloud (noname)
-- Description  : 
-- Requirements : 

accept tracefile_identifier      prompt 'Please enter tracefile_identifier  : '

ALTER SESSION SET tracefile_identifier='&tracefile_identifier';
ALTER SESSION SET EVENTS '10053 trace name context forever, level 2';

 

5. 10201

-- writer : ezis.cloud (noname)
-- Description  : 
-- Requirements : 

--alter session set events '10201 trace name context forever, level 8';

-- In SQL*Plus, activate SQL tracing with DBMS_SYSTEM and SID/SERIAL#  
-- Syntax: DBMS_SYSTEM.SET_EV([SID],[SERIAL#],[EVENT],[LEVEL],'') 

-- Example to SQL_TRACE Worker process with level 12 (Bind values):   
--execute sys.dbms_system.set_ev(&sid,&serial,10201,&level,''); 

-- and stop tracing: 
--execute sys.dbms_system.set_ev(150,17,10201,0,'');  

--event 10201, level 1 = enable standard SQL_TRACE functionality
--event 10201, level 4 = as level 1, plus trace the BIND values
--event 10201, level 8 = as level 1, plus trace the WAITs
--event 10201, level 12 = as level 1, plus trace the BIND values and the WAITs

execute sys.dbms_monitor.SESSION_TRACE_ENABLE(&sid,&serial,true,true);
--execute sys.dbms_monitor.SESSION_TRACE_DISABLE(&sid,&serial);

 

6. a

-- writer : ezis.cloud (noname)
-- Description  : 
-- Requirements : 

 column username format a10
  column sid format 999
  column lock_type format a15
  column MODE_HELD format a11
  column MODE_REQUESTED format a10
  column LOCK_ID1 format a8
  column LOCK_ID2 format a8
  select a.sid,
    decode(a.type,
   'MR', 'Media Recovery',
   'RT', 'Redo Thread',
   'UN', 'User Name',
   'TX', 'Transaction',
   'TM', 'DML',
   'UL', 'PL/SQL User Lock',
   'DX', 'Distributed Xaction',
   'CF', 'Control File',
   'IS', 'Instance State',
   'FS', 'File Set',
   'IR', 'Instance Recovery',
   'ST', 'Disk Space Transaction',
   'IR', 'Instance Recovery',
   'ST', 'Disk Space Transaction',
   'TS', 'Temp Segment',
   'IV', 'Library Cache Invalidation',
   'LS', 'Log Start or Switch',
   'RW', 'Row Wait',
   'SQ', 'Sequence Number',
   'TE', 'Extend Table',
   'TT', 'Temp Table',
   a.type) lock_type,
   decode(a.lmode,
   0, 'None',            /* Mon Lock equivalent */
   1, 'Null',            /* N */
   2, 'Row-S (SS)',     /* L */
   3, 'Row-X (SX)',     /* R */
   3, 'Row-X (SX)',     /* R */
   4, 'Share',           /* S */
   5, 'S/Row-X (SSX)', /* C */
   6, 'Exclusive',      /* X */
   to_char(a.lmode)) mode_held,
   decode(a.request,
   0, 'None',            /* Mon Lock equivalent */
   1, 'Null',            /* N */
   2, 'Row-S (SS)',     /* L */
   3, 'Row-X (SX)',     /* R */
   4, 'Share',           /* S */
   5, 'S/Row-X (SSX)', /* C */
   6, 'Exclusive',      /* X */
   to_char(a.request)) mode_requested,
   to_char(a.id1) lock_id1, to_char(a.id2) lock_id2
  from v$lock a
  where (id1,id2) in
      (select b.id1, b.id2 from v$lock b where b.id1=a.id1 and
              b.id2=a.id2 and b.request>0)
/

 

7. access

-- writer : ezis.cloud (noname)
-- Description  : 
-- Requirements : 

col object     for a15
col program    for a40
col module     for a40
col terminal   for a12

set verify off
select distinct a.SID, s.serial#, a.OBJECT, s.module,s.program, s.status, s.terminal
from   gv$access a, gv$session s
where  1=1
and    a.object = upper('&&1')
and    a.sid = s.sid (+)
and    a.INST_ID = s.INST_ID (+)
--and s.status = 'ACTIVE'
/
set verify on

col object     clear
col program    clear
col terminal   clear

 

8. access2

-- writer : ezis.cloud (noname)
-- Description  : 
-- Requirements : 

col object     for a15
col program    for a40
col module     for a40
col terminal   for a12

set verify off
select distinct --a.inst_id, 
a.SID, s.serial#, a.OBJECT, s.module,s.program, s.status, s.terminal
from   v$access a, v$session s
where  a.object in ( select object_name from dba_objects
                      where object_name = upper('&&1') 
                        and object_type like '%TABLE%'
                     union all 
                     select index_name from dba_indexes
                      where table_name = upper('&&1')
                     union all
                     select name from dba_dependencies 
                      where REFERENCED_NAME = upper('&&1'))
and    a.sid = s.sid (+)
and s.status = 'ACTIVE'
--and a.inst_id = s.inst_id
/
set verify on

col object     clear
col program    clear
col terminal   clear

 

9. active

-- writer : ezis.cloud (noname)
-- Description  : monitor active session
-- Requirements : 

set verify off

col    sid            for a11 heading SID|SERIAL#
col    spid           for a10
col    process        for a14
col    program        for a18 truncate
col    module         for a25 truncate
col    username       for a11 truncate
col    terminal       for a10 truncate
col    sql_id         for a14
col    sql_text       for a140
col    event          for a26 truncate
col    elap_tm        for 9999.99 heading ELAPSED|TIME(M)
col    ROW_WAIT_OBJ#  for a36 truncate

set    termout off
col    col_elap       new_value col_elap
col    col_sql_id     new_value col_sql_id
select
       case when version  >= 10 then 'sql_id'
            else                     'sql_hash_value'
       end as col_sql_id
      ,case when version  >= 11 then '(sysdate-sql_exec_start)*24*60'
            else                     'last_call_et'
       end as col_elap
from (select to_number(substr(version,1,instr(version,'.',1,2)-1)) as version from v$instance)
;
col    col_elap       clear
col    col_sql_id     clear
set    termout on

select s.sid||','||s.serial#           as sid
      ,s.process                       -- user proces pid
      ,p.spid                          -- shadow pid
      ,s.program
      ,s.module
      ,s.username||'-'||s.osuser       as username
      ,s.terminal
      ,&col_sql_id
      ,w.event
      ,&col_elap as elap_tm
     ,(select object_name||'.'||SUBOBJECT_NAME from dba_objects where object_id = ROW_WAIT_OBJ# and rownum = 1) as ROW_WAIT_OBJ#
from   v$session      s
      ,v$process      p
      ,v$session_wait w
      ,v$sess_io      si
where  s.paddr  = p.addr
and    s.sid    = w.sid(+)
and    s.sid    = si.sid(+)
and    s.status = upper('active')
and    s.type <> upper('background')
and    w.event != lower('rdbms ipc message')
and    w.event != lower('jobq slave wait') 
and    s.sid   not in ( select sid from v$mystat where rownum =1 )
order by s.module
/

col    sid            clear
col    spid           clear
col    process        clear
col    program        clear
col    module         clear
col    username       clear
col    terminal       clear
col    sql_id         clear
col    sql_text       clear
col    event          clear
col    ROW_WAIT_OBJ#  clear

set verify on

 

10. active_ts

-- writer : ezis.cloud (noname)
-- Description  : 
-- Requirements : 

set verify off heading off pages 0 timing off feedback off

accept TS_NAME      prompt 'Please enter the value for TABLESPACE NAME : '
accept DATAFILE     prompt 'Please enter the value for DATAFILE        : '
accept SIZE         prompt 'Please enter the value for SIZE            : '

alter tablespace &TS_NAME. add datafile '&DATAFILE.' size &SIZE. autoextend off;

--SELECT 
--'alter tablespace &TS_NAME. add datafile '''
--|| file_name
--|| ''' autoextend off;' stmt
--FROM (
--SELECT file_name
--FROM oradba.vgd_data_files a
--WHERE file_name NOT LIKE '%redo%' 
--AND file_name NOT LIKE '%control%' 
--AND file_name NOT LIKE '%undo%' 
--MINUS
--SELECT name
--FROM v$datafile a
--MINUS
--SELECT name
--FROM v$tempfile a
--)
--where file_name like '%' || '&FILE_TYPE.' || '%ora%'
--and rownum <= 50
--;

set verify off heading on pages 9999 timing on feedback on

 

11. alt_ts

-- writer : ezis.cloud (noname)
-- Description  : 
-- Requirements : 

alter tablespace TS10M_PVGD_DATA_001
 add datafile '/dev/vx/rdsk/sddg04/pvgd05_orafile0601' size 5000M;

 

12. alt_ts2

-- writer : ezis.cloud (noname)
-- Description  : 
-- Requirements : 

 alter tablespace TS10M_PVGD_DATA_001 add datafile 
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0602' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0603' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0604' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0605' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0606' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0607' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0608' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0609' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0610' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0611' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0612' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0613' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0614' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0615' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0616' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0617' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0618' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0619' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0620' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0621' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0622' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0623' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0624' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0625' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0626' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0627' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0628' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0629' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0630' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0631' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0632' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0633' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0634' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0635' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0636' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0637' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0638' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0639' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0640' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0641' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0642' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0643' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0644' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0645' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0646' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0647' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0648' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0649' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0650' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0651' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0652' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0653' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0654' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0655' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0656' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0657' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0658' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0659' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0660' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0661' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0662' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0663' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0664' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0665' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0666' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0667' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0668' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0669' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0670' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0671' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0672' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0673' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0674' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0675' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0676' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0677' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0678' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0679' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0680' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0681' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0682' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0683' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0684' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0685' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0686' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0687' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0688' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0689' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0690' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0691' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0692' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0693' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0694' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0695' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0696' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0697' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0698' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0699' size 5000m,
 '/dev/vx/rdsk/sddg04/pvgd05_orafile0700' size 5000m;

 

13. anal_idx

-- writer : ezis.cloud (noname)
-- Description  : 
-- Requirements : 

analyze  index &idx estimate statistics sample 5 percent;

 

14. analyze

-- writer : ezis.cloud (noname)
-- Description  : 
-- Requirements : 

analyze table  CCADMIN.CC2CRGRH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCACCNTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCACCNTM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCACCOPD                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCACCOPH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADCFTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADCTTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADDRTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADDRTM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADDRTT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADDTTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADENTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADENTM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADENTT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADETTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADLNKH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADLNKM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADLNKT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADLNTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADMARC                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADMBTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADMLBH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADMLBM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADMLBT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADRJTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADRJTM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADRJTT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADRSTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADRSTM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADRSTT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADRTTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADSBTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADSBTM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADSBTT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADSCFH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADSCFM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADSCFT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADSECH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADSECM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADSECT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADSETH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADSTTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADTIMH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADTIMM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADTIMT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADTITH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADUMSH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADUMSM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADUMST                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCADUMTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCALARMH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCALARMM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCAUTTRD                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCAUTTRH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCAUTTRM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCBADLSH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCBADLSM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCBADSTZ                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCBASETH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCBASETM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCBLDIDC                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCBLTELH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCBLTELM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCCARDAZ                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCCONACH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCCONACM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCCRDIFD                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCCRDIFM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCCRDIND                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCCRDMBM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCCRDSAC                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCCURUSR                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCCUSGRH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCCUSGRM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCCUSOPD                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCCUSOPH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCCUSTOH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCCUSTOM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCDEPOSH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCDEPOSM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCDICALH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCDICALM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCDOMANH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCDOMANM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCDOMANT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCDOMNTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCDTBSNH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCDTBSNM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCDTCNVM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCEMAILH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCEMAILM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCEMAILT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCEMALTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCENTADH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCENTADM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCENTERH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCENTERM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCENTERT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCENTRTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCEQUPTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCEQUPTM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCEXPACH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCEXPACM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFEEPPD                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFEEPPH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFEEPPT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFPOCLH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFPOCLM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFPOCLT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFPOCTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFPPINH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFPPINM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFPPINT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFPPNTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFRCFTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFRNADD                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFRNADH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFRPCFH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFRPCFM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFRPCFT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFRPLMH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFRPLMM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFRPLMT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCFRPLTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCGAIPOS                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCGDSSPH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCGDSSPM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCGOODSH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCGOODSM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCGROUPH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCGROUPM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCGRPOPD                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCGRPOPH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCGRPPDH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCGRPPDM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCGSFEEH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCGSFEEM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCICTELH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCICTELM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCICTELT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCICTLTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCINGRPH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCINGRPM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCINGRPT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCINGRTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCINTLNH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCINTLNM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCINTTPH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCINTTPM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCIPDCRH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCIPDCRM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCLGLAGH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCLGLAGM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCLIMITH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCLIMITM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCLIMITT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCLIMTTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCMALBXH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCMALBXM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCNOGIVH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCNOGIVM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCODTDRH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCODTDRM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCODTDRT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCONETIH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCONETIM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCOPTONH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCOPTONM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCOTDRTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPKGADH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPKGADM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNBCFH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNBCFM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNBCFT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNCFTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNEQPH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNEQPM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNEQPT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNEQTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNOCLH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNOCLM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNOCLT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNOCSH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNOCSM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNOCST                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNOCTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNOSTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNPCFH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNPCFM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNPCFT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNPFTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNPINH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNPINM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNPINT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNPITH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNPNBH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNPNBM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNPNBT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNPNTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNPTDH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNPTDM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNPTDT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPNPTTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPRCDBH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPRCDBM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPROGAH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPROGAM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPROSPH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCPROSPM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRCPOSD                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRCPOSM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRCPSTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRCPSTM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRECPTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRECPTM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCREPONH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCREPONM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCREPONT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCREPOTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCREQOSD                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCREQOSM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRLCHGH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRLCHGM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRLSVCH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRLSVCM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRNEQPH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRNEQPM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRNEQPT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRNEQTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRSVCFH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRSVCFM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRTNLTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRTNLTM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRVENTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRVENTM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRVSUBH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRVSUBM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRVTELM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRVTSKH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCRVTSKM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSASANS                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSEGCLD                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSEGMTM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSEGOPD                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSEGOPH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSERVCH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSERVCM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSFATH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSFRAH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSFRAM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSFRAT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSFRPH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSFRPM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSFRPT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSFRSH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSFRSM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSFRST                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSFRTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSFSTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSIHSH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSIHSM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSIHST                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSIHTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSIIDH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSIIDM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSIIDT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSIITH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSIPIH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSIPIM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSIPIT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSIPTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSISDH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSISDM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSISDT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSISTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSLINH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSLINM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSLINT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSLNTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSPNBH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSPNBM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSPNBT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSPNTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSPONH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSPONM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSPONT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSPOTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSRLTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSRLYH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSRLYM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSRLYT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSRSTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSRSVH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSRSVM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSRSVT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSTELH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSTELM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSTELT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSTLTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSVIFH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSVIFM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSVIFT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSVITH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSVPNH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSVPNM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSVPNT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSSVPTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSUSUBM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSVCSPH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSVCSPM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSVEQPH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSVEQPM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSVPUMH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCSVPUMM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCTABLEH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCTABLEM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCTDNMTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCTELGDH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCTELGDM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCTELGDT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCTELNKH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCTELNKM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCTELSVH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCTELSVM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCTELTPH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCTELTPM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCTLGDTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCTMDNMH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCTMDNMM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCTMDNMT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCTSKLSH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCTSKLSM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCVPMEMH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCVPMEMM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCVPMEMT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCVPMETH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCVPNAGH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCVPNAGM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCVPNAGT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCVPNATH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCVPNSGH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCVPNSGM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCVPNSGT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCVPNSTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCVPSGDH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCVPSGDM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCVPSGDT                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.CCVPSGTH                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.DTTT_TELCSH                                              
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.DTTT_TELCSM                                              
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.DTTT_TELER                                               
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.DTTT_TELERH                                              
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.DTTT_TELNO                                               
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.LIST                                                     
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.ZZCDHISM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.ZZCOMCDD                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.ZZCOMCDM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.ZZCSSCDD                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.ZZCSSCDM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.ZZDEPCDM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.ZZEMPNOM                                                 
 estimate statistics;                                                           
                                                                                
analyze table  CCADMIN.ZZNATCDM                                                 
 estimate statistics;    

 

15. ap

-- writer : ezis.cloud (noname)
-- Description  : 
-- Requirements : 

col    col1       for a28 heading "Session info1" 
col    col2       for a52 heading "Session info2"
col    sql_text   for a99 wrap

start  arg1
set    verify off long 400

set    termout off
alter  session set nls_date_format='yyyy-mm-dd hh24:mi:ss' ;
set    termout on


select            'sid      : '         ||b.sid||','||b.SERIAL#
       ||chr(10)||'status   : '         ||b.status
       ||chr(10)||'username : '         ||b.username
       ||chr(10)||'process  : '         ||b.process
       ||chr(10)||'spid     : kill -9 ' ||p.spid
       ||chr(10)||'osuser   : '         ||b.osuser
       ||chr(10)||'sql_id   : '         ||sql_id
       ||chr(10)||'LAST_CALL_ET : '     ||LAST_CALL_ET
       col1,
                  'module  : '       ||b.module
       ||chr(10)||'program : '       ||b.program
       ||chr(10)||'action  : '       ||action
       ||chr(10)||'machine : '       ||machine
       ||chr(10)||'LOGON   : '       ||b.LOGON_TIME
       ||chr(10)||'event   : '       ||w.event
       ||chr(10)||'logical reads : ' ||st.value
       ||chr(10)||'command : '               ||decode(b.command,
              0,'n/a', 1,'create cwtable', 2,'insert', 3,'select', 4,'create cluster', 5,'alter cluster', 6,'update',
              7,'delete', 8,'drop cluster', 9,'create index', 10,'drop index', 11,'alter index', 12,'drop table',
              13,'create sequence', 14,'alter sequence', 15,'alter table', 16,'drop sequence', 17,'grant',
              18,'revoke', 19,'create synonym', 20,'drop synonym', 21,'create view', 22,'drop view', 23,'validate index',
              24,'create procedure', 25,'alter procedure', 26,'lock table', 27,'no operation', 28,'rename',
              29,'comment', 30,'audit', 31,'noaudit', 32,'create database link', 33,'drop database link',
              34,'create database', 35,'alter database', 36,'create rollback segment', 37,'alter rollback segment',
              38,'drop rollback segment', 39,'create tablespace', 40,'alter tablespace', 41,'drop tablespace',
              42,'alter session', 43,'alter user', 44,'commit', 45,'rollback', 46,'savepoint', 47,'pl/sql execute',
              48,'set transaction', 49,'alter system switchlog', 50,'explain', 51,'create user', 52,'create role',
              53,'drop user', 54,'set role', 55,'set role', 56,'create schema', 57,'create control file',
              58,'alter tracing', 59,'create trigger', 60,'alter trigger', 61,'drop trigger',
              62,'analyze table', 63,'analyze index', 64,'analyze cluster', 65,'create profile', 66,'drop profile',
              67,'alter profile', 68,'drop procedure', 69,'drop procedure', 70,'alter resource cost', 71,'create snapshot log', 
              72,'alter snapshot log', 73,'drop snapshot log', 74,'create snapshot', 75,'alter snapshot', 76,'drop snapshot',
              79,'alter role', 85,'truncate table', 86,'truncate cluster', 88,'alter view', 91,'create function',
              92,'alter function', 93,'drop function', 94,'create package', 95,'alter package',
              96,'drop package', 97,'create package body', 98,'alter package body', 99,'frop package body', 'UNKNOWN')
       col2,
      (select sql_fulltext from v$sqlarea where address = b.sql_address and hash_value = b.sql_hash_value) sql_text
/*
       ||chr(10)||'physical_reads : '||si.physical_reads 
       ||chr(10)||'block          : '||si.block_gets 
       ||chr(10)||'consistent     : '||si.consistent_gets 
*/
from   v$session b, v$session_wait w, v$sess_io si, v$process p, v$sesstat st
where  1=1
and    b.program like '&1'||'%'
and    b.paddr=p.addr (+)
and    b.sid = w.sid
and    b.sid = si.sid
and    b.sid = st.sid (+)
and    st.STATISTIC# (+) = 9
and    b.sid not in ( select sys_context('userenv','sid') from dual )
/

set    verify on
col    col1       clear
col    col2       clear
col    sql_text   clear

 

16. aplan

-- writer : ezis.cloud (noname)
-- Description  : view execute awr plan
-- Requirements : 

set    verify off head off
set    long 99999 trimspool on

start  arg
define sql_id=&1
define spoolf=.toto.sql
define format='advanced allstats last -alias -outline -projection'
--     define format='advanced allstats last -projection'
--     define format='advanced allstats last'
--     define format='advanced allstats'
       --
select * from table(dbms_xplan.display_awr('&sql_id',null,
       (select case when name = upper('&2') then null else (select dbid from dba_hist_database_instance where db_name = upper('&2') and rownum <=1)end as dbid from v$database),'&format')); 
       --
prompt  
prompt sql_fulltext : &spoolf
prompt format       : &format
set    heading off timing off feedback off pages 0 time off termout off
col    sql_text      clear
col    sql_text      word_wrap
set    long          327670
set    longchunksize 327670
set    lines         32767
spool  &spoolf
select sql_text from DBA_HIST_SQLTEXT where sql_id = '&sql_id' and rownum=1;
spool  off
start  login
.
set    termout on

set    heading on timing on feedback on time on verify on
set    verify on

 

17. arg

-- writer : ezis.cloud (noname)
-- Description  : 
-- Requirements :

--------------------------------------------------
--  argv setting
--------------------------------------------------
set    termout off
col    1       new_value 1
col    2       new_value 2
col    3       new_value 3

select null    as "1"
      ,null    as "2"
      ,null    as "3"
from   dual
where  1=2
/

set    termout on
--------------------------------------------------

 

18. b

-- writer : ezis.cloud (noname)
-- Description  :
-- Requirements :

column username format a10
  column lockwait format a10
  column sql_text format a80
  column object_owner format a14
  column object format a15
  select --+ RULE
  b.username username, c.sid sid, c.owner object_owner,
     c.object object, b.lockwait, a.sql_text SQL
  from v$sqltext a, v$session b, v$access c
  where a.address=b.sql_address and
     a.hash_value=b.sql_hash_value and
     b.sid = c.sid and c.owner != 'SYS';
/

 

19. backup_stat

-- writer : ezis.cloud (noname)
-- Description  :
-- Requirements :

col tablespace_name format a25
col file_name format a45
col status format a10

select a.tablespace_name,a.file_name,a.file_id,b.status from sys.dba_data_files a ,v$backup b where b.file# = a.file_id order by 1,2;
Do you need database performance monitoring? Contact us and we will send you a free quote
[email protected]