Pages

Thursday, November 24, 2016

Code Example. crontab task to TRUNCATE table on ongoing basis

====================================
General
====================================
Due to a bad application design, debug tables are constantly being written into, without a process that is cleaning these tables.

This example, is a ctrontab task, that activates sh script, that is calling sql script, that generates actual truncate statements, and then executes them.

====================================
Code 
====================================

oracle@my_server:~/scripts>% crontab -l
15 4 * * * /software/oracle/oracle/scripts/delete_old_trace_files.sh
20 4 * * * /software/oracle/oracle/scripts/truncate_sga_w_events.sh

less /software/oracle/oracle/scripts/truncate_sga_w_events.sh
#!/bin/bash
HOME_DIR=/software/oracle/oracle/scripts

cd $HOME_DIR
. $HOME_DIR/.set_profile

export LOG_FILE=${HOME_DIR}/truncate_sga_w_events.log
touch $LOG_FILE
export RUN_TIME=`date "+%Y%m%d"_"%H%M%S"`

echo "----------------------------------------------" >> $LOG_FILE
echo "Starting Truncate at $RUN_TIME" >> $LOG_FILE
echo "----------------------------------------------" >> $LOG_FILE

sqlplus system/xen86pga@igt @truncate_sga_w_events.sql

less TRUNCATE_SGA_W_EVENTS_SQL.sql >> $LOG_FILE
echo "Done " >> $LOG_FILE
echo "----------------------------------------------" >> $LOG_FILE

rm TRUNCATE_SGA_W_EVENTS_SQL.sql


less /software/oracle/oracle/scripts/truncate_sga_w_events.sql
SET HEADING OFF
SET VERIFY OFF 
SET TERMOUT OFF
SET PAGESIZE 0
SET FEEDBACK OFF
spool TRUNCATE_SGA_W_EVENTS_SQL.sql

SELECT 'TRUNCATE TABLE '||OWNER||'.'||SEGMENT_NAME||';' 
  FROM DBA_SEGMENTS 
 WHERE segment_name = 'SGA_W_EVENTS' 
  HAVING ROUND(SUM(bytes)/1024/1024) > 100
  GROUP BY OWNER,SEGMENT_NAME;

spool off

@TRUNCATE_SGA_W_EVENTS_SQL.sql

exit;

TRUNCATE_SGA_W_EVENTS_SQL.sql
TRUNCATE TABLE OWNER1.SGA_W_EVENTS;
TRUNCATE TABLE OWNER2.SGA_W_EVENTS;
TRUNCATE TABLE OWNER3.SGA_W_EVENTS;
TRUNCATE TABLE OWNER4.SGA_W_EVENTS;

truncate_sga_w_events.log
----------------------------------------------
Starting Truncate at 20161124_122549
----------------------------------------------
TRUNCATE TABLE ALB_VODAF_SPARX.SGA_W_EVENTS;                                    
TRUNCATE TABLE MLT_VODAF_SPARX.SGA_W_EVENTS;                                    
TRUNCATE TABLE ROM_VODAF_SPARX.SGA_W_EVENTS;                                    
TRUNCATE TABLE ZAF_VODAC_SPARX.SGA_W_EVENTS;                                    
TRUNCATE TABLE NZL_VODAF_SPARX.SGA_W_EVENTS;                                    
TRUNCATE TABLE GRC_VODAF_SPARX.SGA_W_EVENTS;                                    
TRUNCATE TABLE GHA_VODAF_SPARX.SGA_W_EVENTS;                                    
Done 
----------------------------------------------
Starting Truncate at 20161124_123603
----------------------------------------------
Done 
----------------------------------------------

Wednesday, November 16, 2016

Code example: plsql block in loop, and writing to file

========================
General
========================
Example of bash file calling sql file, which is executing a plsql block.
The plsql block is looping in endless loop, writing to a file.
The purpose is to check database connection.

========================
Code
========================
select_in_loop.sh
select_in_loop.sql

select_in_loop.sh
call sql file 

select_in_loop.sql
loop, and write to file

select_in_loop.sh
less select_in_loop.sh
#!/bin/bash
. .set_profile
sqlplus system/xen86pga@igt @select_in_loop.sql

select_in_loop.sql
less select_in_loop.sql
SET VERIFY OFF
SET PAGESIZE 0
SET HEADING OFF
SET FEEDBACK ON
SET NEWPAGE NONE
SET TERMOUT ON
SET UNDERLINE OFF
SET LINESIZE 120
SET SERVEROUTPUT OFF

DECLARE
  v_a     NUMBER;
  v_b     NUMBER;
  v_date  VARCHAR2(100);
  v_file  UTL_FILE.FILE_TYPE;
BEGIN
  v_a := 1;
  v_b :=10;
  DBMS_OUTPUT.put_line('Opening File');
  v_file := UTL_FILE.FOPEN('IG_EXP_DIR','connection_test.lst','w');
  UTL_FILE.PUT_LINE(v_file,'Start Loop'); 
  WHILE v_a < v_b LOOP 
    SELECT TO_CHAR(SYSDATE,'YYYYMMDD hh24:mi:ss') INTO v_date FROM DUAL;
    UTL_FILE.PUT_LINE(v_file,'Now time is '||v_date);  
    UTL_FILE.FFLUSH(v_file);
    DBMS_LOCK.sleep(30);
    --v_a := v_a + 1;
  END LOOP;
  UTL_FILE.PUT_LINE(v_file,'Finished Loop');
  UTL_FILE.PUT_LINE(v_file,'Closing File');
  UTL_FILE.FFLUSH(v_file);
  UTL_FILE.FCLOSE(v_file);
EXCEPTION
  WHEN OTHERS THEN
    UTL_FILE.PUT_LINE(v_file,'Unexpected Error: '||SQLERRM);
    UTL_FILE.PUT_LINE(v_file,'Closing File');
    UTL_FILE.FFLUSH(v_file);
    UTL_FILE.FCLOSE(v_file);
END;
/



Example of a procedure doing same thing:
CREATE OR REPLACE PROCEDURE extract_from_db (HEADER_FLAG IN NUMBER) IS
  vDBUser               VARCHAR2(50);
  vFileName             VARCHAR2(50);
  vDirectoryName        VARCHAR2(30);
  vFileHandle           UTL_FILE.FILE_TYPE;

  CURSOR data_cur IS
  SELECT A.country_name, B.network_name,C.operator_group_name 
   FROM GSM_COUNTRIES A, 
        GSM_NETWORKS B, 
        GSM_OPERATOR_GROUPS C, 
        GSM_IMSI_PREFIXES D, 
        GSM_MSC_PREFIXES E, 
        GSM_NDC_PREFIXES F
  WHERE B.country_id=A.country_id 
    AND B.operator_group_id=C.operator_group_id 
    AND B.network_id=D.network_id 
    AND B.network_id=E.network_id 
    AND B.network_id=F.network_id  
ORDER BY country_name, network_name;       

BEGIN
  vDirectoryName := 'IG_EXP_DIR';
  select user into vDBUser from dual;
    
  --ROAMING INFORMATION EXPORT
  vFileName   := vDBUser||'_RI.csv';
  vFileHandle := UTL_FILE.FOPEN(vDirectoryName, vFileName, 'W');
  IF HEADER_FLAG=1 THEN
    UTL_FILE.PUT_LINE(vFileHandle, 'date,country_name,network_name,operator_group_name);
  END IF;

  FOR data_rec IN data_cur LOOP
    UTL_FILE.PUT_LINE(vFileHandle,SYSDATE||';'||data_rec.country_name||';'||
                      data_rec.network_name||';'||data_rec.operator_group_name);
  END LOOP;

  UTL_FILE.FFLUSH(vFileHandle);  
  UTL_FILE.FCLOSE(vFileHandle);  

Monday, November 14, 2016

Code example: batch files in Windows

===============================
General
===============================
Code examples for batch files
1. Batch file to delete files older than X days.

===============================
1. Batch file to delete files older than X days.
===============================
The batch file is under D:\working_dir\scripts

#ECHO OFF
ECHO Start Delete files older than 30 days under D:\working_dir\old_files
cd D:\working_dir\old_files
forfiles /p "D:\working_dir\old_files" /s /d -30 /c "cmd /c del @file"
ECHO Files Deleted
cd D:\working_dir\scripts


Thursday, November 10, 2016

Oracle by Example: Investigating locks in V$ACTIVE_SESSION_HISTORY

=========================
General
=========================
For some reason, response time from database was very slow.
From several milliseconds response time grew to several seconds
Likely locks were involved.

Checking the performance of single SELECT or UPDATE, the response times were consistently around 0.01-0.02 seconds
How to find out what went wrong?

=========================
Table to look at:
=========================
V$ACTIVE_SESSION_HISTORY

=========================
Investigation
=========================
SELECT event, count(*)
FROM V$ACTIVE_SESSION_HISTORY WHERE sample_time > SYSDATE -1
   AND event IS NOT NULL  
   AND event LIKE 'enq%'
GROUP BY event
ORDER BY count(*) DESC

enq: TX - row lock contention 1590
enq: US - contention 87
enq: KO - fast object checkpoint 62
enq: RO - fast object reuse 18
enq: TM - contention 10
enq: TC - contention 8
enq: JD - contention 7
enq: CF - contention 6
enq: JS - queue lock 5
enq: TQ - DDL contention 1

SELECT distinct session_id, 
       session_serial#, 
       user_id,
       sql_id, 
       blocking_session, 
       blocking_session_serial#
  FROM V$ACTIVE_SESSION_HISTORY 
 WHERE sample_time > SYSDATE -1 
   AND event = 'enq: TX - row lock contention


363 23157 44 2g52c7knzrfpr 390 39507
260 1193 44 cyn6n1hvduxmh 420 54621
613 20 44 cyn6n1hvduxmh 420 54621
280 2806 44 cyn6n1hvduxmh 558 18098
631 53132 44 cyn6n1hvduxmh 420 54621
410 7104 44 cyn6n1hvduxmh 420 54621
349 29520 44 cyn6n1hvduxmh 420 54621
422 54674 44 cyn6n1hvduxmh 420 54621
641 70 44 cyn6n1hvduxmh 420 54621
281 29642 44 cyn6n1hvduxmh 420 54621
558 18098 44 61jfdsgugn6n0 590 14439
475 57553 44 cyn6n1hvduxmh 420 54621
558 18098 44 c05wv95dkr9b4 579 12
579 12 44 cyn6n1hvduxmh 420 54621
267 471 44 cyn6n1hvduxmh 420 54621
290 6424 44 cyn6n1hvduxmh 420 54621
265 7 44 cyn6n1hvduxmh 420 54621
280 2806 44 cyn6n1hvduxmh 420 54621
479 7935 44 cyn6n1hvduxmh 420 54621
590 14439 44 cyn6n1hvduxmh 420 54621
540 7513 44 cyn6n1hvduxmh 420 54621
302 22168 44 cyn6n1hvduxmh 420 54621
586 5 44 cyn6n1hvduxmh 420 54621
266 15832 44 cyn6n1hvduxmh 420 54621
292 32714 44 cyn6n1hvduxmh 420 54621
557 10526 44 cyn6n1hvduxmh 420 54621
598 12 44 cyn6n1hvduxmh 420 54621
570 10 44 cyn6n1hvduxmh 420 54621
359 7551 44 cyn6n1hvduxmh 420 54621

Get the SQL which was locked.
SELECT sql_text FROM V$SQLAREA WHERE sql_id = 'cyn6n1hvduxmh'

Get the SQLs which the locking session was running.
In one case, this session was locked by another session.
SELECT distinct session_id, 
       session_serial#, 
       user_id, 
       sql_id, 
       blocking_session, 
       blocking_session_serial#
  FROM V$ACTIVE_SESSION_HISTORY 
 WHERE sample_time > SYSDATE -1 
   AND session_id = 420
   AND session_serial# = 54621

420 54621 44 673cf65krjps5
420 54621 44 673cf65krjps5 655 5
420 54621 44 3v6w37hcvvmvz
420 54621 44 gmz7xvphdw1av
420 54621 44 15qjfzxtcmsgm
420 54621 44 79nkqzps5jtxg
420 54621 44 cw3y32q9jfj46

One of these SQLs was the locking SQL.
SELECT sql_text FROM V$SQLAREA WHERE sql_id = '673cf65krjps5'

Sunday, November 6, 2016

Oracle by Example: Move Indexes from one tablespace to another

========================================
General
========================================
The tablespace which is storing indexes has grown very big.
The Linux file system is nearly 100% full.
Resize the datafile options does not yield enough space.
The best option would be to move all Indexes, partitioned and non-partitioned to another tablespace.

========================================
Flow of Events
========================================
The flow of events:
- Try to free some space by RESIZE DATAFILE
- Create new temporary Tablespace
- Move all non-partitioned indexes to new temporary Tablespace.
- Move all partitioned indexes to new temporary Tablespace.
- Drop the old tablespace with datafiles.
- Move all indexes back to the tablespace with original name (This was required, because other scripts used hard codded tablespace name)

========================================
Initial situation
========================================
Initial situation
my_user@my_server:~/workarea>% df -hP
Filesystem                      Size Used Avail Use% Mounted on
/dev/mapper/Volume00-LogVol07   16G  4.8G   11G  31% /software/oracle
/dev/vx/dsk/OraDg1/db1          79G   75G  4.3G  95% /oracle_db/db1
/dev/vx/dsk/OraDg2/Ora_Exp     100G   35G   66G  35% /backup/ora_exp
/dev/vx/dsk/OraDg2/Ora_Online  159G   41G  118G  26% /backup/ora_online
/dev/vx/dsk/OraDg3/db2         199G   2.3G 196G   2% /oracle_db/db2



TABLESPACE_NAME      DBA_FREE_SPACE_MB USED_SPACE_MB MAX_SPACE_MB   FREE_PCT ADD_
-------------------- ----------------- ------------- ------------ ---------- ----
DWH_INDEX                         5987            13         6000        100 N
SYSAUX                             512           488         1000         51 N
IGT_TABLE                        11966         18034        30000         40 N
SYSTEM                             632           368         1000         63 N
IGT_INDEX                        44308          2460        46768         95 N
DWH_TABLE                        11963            37        12000        100 N

OWNER               TABLESPACE_NAME       SEGMENT_NAME                    USED_MB
------------------- ---------------------- ------------------------ -------------
DEU_O2QQQ_SPARX     IGT_INDEX             SSU_PSMS_IMSI_IDX                   586
DEU_O2QQQ_SPARX     IGT_INDEX             SFI_CUSTOMER_PROFILE_PK             576
DEU_O2QQQ_SPARX     IGT_INDEX             SSU_PSMS_MSISDN_IDX                 479
DEU_O2DEU_SHARB     IGT_INDEX             COUNTERS_HISTORY_IDX                 72
DEU_O2QQQ_SPARX     IGT_INDEX             SFI_CUSTOMER_OPTIONS_PK              24
DEU_O2QQQ_SPARX     IGT_INDEX             GWCH_TS_LAST_MODIFIED_IDX            24
DEU_O2DEU_SHARB     IGT_INDEX             CH_LAST_UPDATE_TIME_IDX              19
DEU_O2DEU_SHARB     IGT_INDEX             COUNTERS_PROCESS_ID_IDX              12
DEU_O2QQQ_MOCOQ     IGT_INDEX             CDR_PK                                7
DEU_O2DEU_SHARB     IGT_INDEX             VIS_EVENT_PK                          5

SELECT FILE_NAME, ROUND(bytes/1024/1024) AS MB 
  FROM DBA_DATA_FILES WHERE tablespace_name = 'IGT_INDEX';

FILE_NAME                                                   MB
--------------------------------------------------- ----------
/oracle_db/db1/db_igt/ora_igt_index_01.dbf               14000
/oracle_db/db1/db_igt/ora_igt_index_02.dbf               20928


The Linux Storage at mount point  /oracle_db/db1 is 95% full
The IGT_INDEX is occupying 47Gb
But actual segments on IGT_INDEX  occupy only about 2-3Gb

========================================
Code
========================================
First Option: RESIZE DATAFILE.

SQL> ALTER DATABASE DATAFILE '/oracle_db/db1/db_igt/ora_igt_index_01.dbf' RESIZE 11000M;
Database altered.

SQL> ALTER DATABASE DATAFILE '/oracle_db/db1/db_igt/ora_igt_index_01.dbf' RESIZE 10000M;
ALTER DATABASE DATAFILE '/oracle_db/db1/db_igt/ora_igt_index_01.dbf' RESIZE 10000M
*
ERROR at line 1:
ORA-03297: file contains used data beyond requested RESIZE value


SQL> ALTER DATABASE DATAFILE '/oracle_db/db1/db_igt/ora_igt_index_02.dbf' RESIZE 19000M;
ALTER DATABASE DATAFILE '/oracle_db/db1/db_igt/ora_igt_index_02.dbf' RESIZE 19000M
*
ERROR at line 1:
ORA-03297: file contains used data beyond requested RESIZE value

Second Option: Move all indexes from IGT_INDEX to new Tablespace

ALTER SESSION SET DDL_LOCK_TIMEOUT=600;

CREATE TABLESPACE IGT_INDEX2 DATAFILE '/oracle_db/db1/db_igt/ora_igt_index_02.dbf' SIZE 1000M AUTOEXTEND ON MAXSIZE 4000M;

SET LINESIZE 120
SET PAGESIZE 0
SET HEADING OFF
SET VERIFY OFF
SET FEEDBACK OFF

spool move_indexes_tbs.sql
SELECT 'ALTER INDEX '||OWNER||'.'||INDEX_NAME||' REBUILD TABLESPACE IGT_INDEX2;' FROM DBA_INDEXES 
WHERE tablespace_name = 'IGT_INDEX'
  AND index_name NOT IN (SELECT index_name FROM DBA_PART_INDEXES);
spool off
SET FEEDBACK ON

Sample contents of move_indexes_tbs.sql
ALTER INDEX DEU_O2DEU_SHARB.MBS_OPCODES_PK REBUILD TABLESPACE IGT_INDEX2;
ALTER INDEX DEU_O2DEU_SHARB.MTM_OPCODES_PK REBUILD TABLESPACE IGT_INDEX2;
ALTER INDEX DEU_O2DEU_SHARB.SSU_MOCO_SUB_LAST_LU_IDX REBUILD TABLESPACE IGT_INDEX2;
ALTER INDEX DEU_O2DEU_SHARB.PROVACT_PK REBUILD TABLESPACE IGT_INDEX2;
ALTER INDEX DEU_O2DEU_SHARB.PROV_ACCOUNT_SERVICES_PK REBUILD TABLESPACE IGT_INDEX2;
ALTER INDEX DEU_O2DEU_SHARB.USERS_PK REBUILD TABLESPACE IGT_INDEX2;
ALTER INDEX DEU_O2DEU_SHARB.ICA_MT_MESSAGE_TYPE_PK REBUILD TABLESPACE IGT_INDEX2;
ALTER INDEX DEU_O2DEU_SHARB.ICA_MT_APP_MSG_NAME_UK REBUILD TABLESPACE IGT_INDEX2;

@move_indexes_tbs.sql

To move partitioned indexes:

SET LINESIZE 120
SET PAGESIZE 0
SET HEADING OFF
SET VERIFY OFF
SET FEEDBACK OFF

spool move_part_indexes_tbs.sql
SELECT 'ALTER INDEX '||OWNER||'.'||SEGMENT_NAME ||' REBUILD PARTITION '||PARTITION_NAME||' TABLESPACE IGT_INDEX2;' 
FROM  DBA_SEGMENTS 
WHERE SEGMENT_TYPE LIKE '%INDEX%' 
  AND TABLESPACE_NAME = 'IGT_INDEX'
  AND PARTITION_NAME IS NOT NULL;
spool off;

SET FEEDBACK ON

Sample contents of move_part_indexes_tbs.sql
ALTER INDEX DEU_O2QQQ_SPARX.GWCH_TS_LAST_MODIFIED_IDX REBUILD PARTITION P_3 TABLESPACE IGT_INDEX2;
ALTER INDEX DEU_O2QQQ_SPARX.SCO_START_DATE_IDX REBUILD PARTITION SYS_P68 TABLESPACE IGT_INDEX2;
ALTER INDEX DEU_O2QQQ_SPARX.SCO_START_DATE_IDX REBUILD PARTITION SYS_P67 TABLESPACE IGT_INDEX2;
ALTER INDEX DEU_O2QQQ_SPARX.SCO_START_DATE_IDX REBUILD PARTITION SYS_P66 TABLESPACE IGT_INDEX2;
ALTER INDEX DEU_O2QQQ_SPARX.SCO_START_DATE_IDX REBUILD PARTITION SYS_P65 TABLESPACE IGT_INDEX2;
ALTER INDEX DEU_O2QQQ_SPARX.SCO_START_DATE_IDX REBUILD PARTITION SYS_P64 TABLESPACE IGT_INDEX2;
ALTER INDEX DEU_O2QQQ_SPARX.SCO_START_DATE_IDX REBUILD PARTITION SYS_P63 TABLESPACE IGT_INDEX2;
ALTER INDEX DEU_O2QQQ_SPARX.SCO_START_DATE_IDX REBUILD PARTITION SYS_P62 TABLESPACE IGT_INDEX2;
ALTER INDEX DEU_O2QQQ_SPARX.SCO_START_DATE_IDX REBUILD PARTITION SYS_P61 TABLESPACE IGT_INDEX2;

@move_part_indexes_tbs.sql

SELECT * FROM DBA_SEGMENTS WHERE tablespace_name = 'IGT_INDEX';

no rows selected

DROP TABLESPACE IGT_INDEX INCLUDING CONTENTS AND DATAFILES ;
SQL> SELECT file_name FROM DBA_DATA_FILES WHERE file_name LIKE '%index%';
/oracle_db/db1/db_igt/ora_ginindex_01.dbf
/oracle_db/db1/db_igt/ora_dwh_index_01.dbf
/oracle_db/db1/db_igt/ora_igt_index_03.dbf


df -hP
Filesystem            Size  Used Avail Use% Mounted on
/dev/vx/dsk/OraDg1/db1   79G   44G   35G  56% /oracle_db/db1

========================================
Revert back to the original Tablespace name
========================================
Since database maintenance scripts in the instakllation use the string 'IGT_INDEX', move back the indexes from IGT_INDEX2 to IGT_INDEX.

Now to revert back to IGT_INDEX

CREATE TABLESPACE IGT_INDEX DATAFILE '/oracle_db/db1/db_igt/ora_igt_index_01.dbf' SIZE 2000M AUTOEXTEND ON MAXSIZE 6000M;

Tablespace created.

Move Non-partitioned indexes:

SET LINESIZE 120
SET PAGESIZE 0
SET HEADING OFF
SET VERIFY OFF
SET FEEDBACK OFF

spool move_indexes_tbs.sql
SELECT 'ALTER INDEX '||OWNER||'.'||INDEX_NAME||' REBUILD TABLESPACE IGT_INDEX;' FROM DBA_INDEXES WHERE  owner LIKE '%O2%' AND index_name NOT IN (SELECT index_name FROM DBA_PART_INDEXES WHERE  owner LIKE '%O2%');
spool off

SET FEEDBACK ON
@move_indexes_tbs.sql

Now all the non partitioned indexes were moved
To move partitioned indexes:

SET LINESIZE 120
SET PAGESIZE 0
SET HEADING OFF
SET VERIFY OFF
SET FEEDBACK OFF

spool move_part_indexes_tbs.sql
SELECT 'ALTER INDEX '||OWNER||'.'||SEGMENT_NAME ||' REBUILD PARTITION '||PARTITION_NAME||' TABLESPACE IGT_INDEX;' 
FROM  DBA_SEGMENTS WHERE SEGMENT_TYPE LIKE '%INDEX%' AND TABLESPACE_NAME = 'IGT_INDEX2';
spool off;
SET FEEDBACK ON
@move_part_indexes_tbs.sql

Check that there are no left over indexes in IGT_INDEX2
SELECT * FROM DBA_SEGMENTS WHERE TABLESPACE_NAME = 'IGT_INDEX2';
no rows selected

DROP TABLESPACE IGT_INDEX2 INCLUDING CONTENTS AND DATAFILES ;


SQL> SELECT file_name FROM DBA_DATA_FILES WHERE file_name LIKE '%index%';

FILE_NAME
---------------------------------------------
/oracle_db/db1/db_igt/ora_igt_index_01.dbf
/oracle_db/db1/db_igt/ora_ginindex_01.dbf
/oracle_db/db1/db_igt/ora_dwh_index_01.dbf


my_user@my_server:~/workarea>% df -hP
Filesystem                      Size Used Avail Use% Mounted on
/dev/mapper/Volume00-LogVol07   16G  4.8G   11G  31% /software/oracle
/dev/vx/dsk/OraDg1/db1          79G   46G   34G  58% /oracle_db/db1
/dev/vx/dsk/OraDg2/Ora_Exp     100G   35G   66G  35% /backup/ora_exp
/dev/vx/dsk/OraDg2/Ora_Online  159G   41G  118G  26% /backup/ora_online
/dev/vx/dsk/OraDg3/db2         199G   2.3G 196G   2% /oracle_db/db2