Hi,
I have a lot of files of oracle audit Like
ora_1106335.aud ora_1323055.aud ora_1538629.aud ora_579879.aud ora_648475.aud ora_717644.aud ora_786575.aud .. etc
And each file like ora_648493.aud have in the following information :
Audit file /u10/ORADATA/faban9i/audit/ora_648493.aud
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
ORACLE_HOME = /u11/product/oracle92
System name: OSF1
Node name: Amadeus1
Release: V5.1
Version: 2650
Machine: alpha
Instance name: faban9i1
Redo thread mounted by this instance: 1
Oracle process number: 295
Unix process pid: 648493, image: oracle@Amadeus1 (TNS V1-V3)
Thu Feb 19 10:54:10 2009
SESSIONID: "345266242" ENTRYID: "1" STATEMENT: "1" USERID: "AIS2" USERHOST: "1" TERMINAL: "COBRABCO" ACTION: "100" RETURNCODE: "0" COMMENT$TEXT: "Authenticated by: DATABASE; Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=172.20.1.242)(PORT=16 97))" OS$USERID: "AIS2" PRIV$USED: 5
Thu Feb 19 10:54:10 2009
SESSIONID: "345266242" ENTRYID: "1" ACTION: "101" RETURNCODE: "0" LOGOFF$PREAD: "2" LOGOFF$LREAD: "23" LOGOFF$LWRITE: "4" LOGOFF$DEAD: "0" SESSIONCPU: "0"
Audit file /u10/ORADATA/faban9i/audit/ora_648493.aud
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
ORACLE_HOME = /u11/product/oracle92
System name: OSF1
Node name: Amadeus1
Release: V5.1
Version: 2650
Machine: alpha
Instance name: faban9i1
Redo thread mounted by this instance: 1
Oracle process number: 537
Unix process pid: 648493, image: oracle@Amadeus1 (TNS V1-V3)
Fri Feb 20 15:59:19 2009
SESSIONID: "345472470" ENTRYID: "1" STATEMENT: "1" USERID: "AIS2" USERHOST: "1" TERMINAL: "COBRABCO" ACTION: "100" RETURNCODE: "0" COMMENT$TEXT: "Authenticated by: DATABASE; Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=172.20.1.242)(PORT=34 89))" OS$USERID: "AIS2" PRIV$USED: 5
Fri Feb 20 15:59:20 2009
SESSIONID: "345472470" ENTRYID: "1" ACTION: "101" RETURNCODE: "0" LOGOFF$PREAD: "2" LOGOFF$LREAD: "18" LOGOFF$LWRITE: "4" LOGOFF$DEAD: "0" SESSIONCPU: "3"
I need process all files and each file delete lines and each file only must be have the following information what begin with SESSIONID: like :
SESSIONID: "345472470" ENTRYID: "1" STATEMENT: "1" USERID: "AIS2" USERHOST: "1" TERMINAL: "COBRABCO" ACTION: "100" RETURNCODE: "0" COMMENT$TEXT: "Authenticated by: DATABASE; Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=172.20.1.242)(PORT=34 89))" OS$USERID: "AIS2" PRIV$USED: 5
And then the finish the process (delete lines of each file), join all files on only one file.
I need your help.
Thanks.