Posts

Showing posts from March, 2018

Adding Mount Point Details in Database for report

1) Create a Directory in database mkdir directory 2) Give permission to Directory chmod 775 directory/ Sqlplus / as sysdba create or replace directory exec_dir as '/home/oracle/checks/directory'; Create a Table in Database: CREATE TABLE df  ( "FILESYSTEM" VARCHAR2(100),    "BLOCKS" NUMBER, "USED" NUMBER,  "AVAILABLE" NUMBER, "CAPACITY" VARCHAR2(10),    "MOUNT" VARCHAR2(100) ) ORGANIZATION external (   TYPE oracle_loader DEFAULT DIRECTORY exec_dir ACCESS PARAMETERS    ( RECORDS DELIMITED BY NEWLINE CHARACTERSET US7ASCII preprocessor  exec_dir:'run_df.sh' READSIZE 1048576 SKIP 1 FIELDS TERMINATED BY WHITESPACE LDRTRIM      REJECT ROWS WITH ALL NULL FIELDS ( "FILESYSTEM" CHAR(255) TERMINATED BY WHITESPACE,       "BLOCKS" CHAR(255) TERMINATED BY WHITESPACE, "USED" CHAR(255)