Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Need Audit script
A script that would show which objects have been created in the past 24 hours would be something like the following:
select owner, object_name, object_type, status, created from dba_objects where created > sysdate - 1;
The Oracle 8i Reference says that the timestamp field, used in your script, is a "timestamp for the specification of the object". Generally this is a few seconds or minutes after the object was created, but occassionally years before. I would be interested in knowing how others use the timestamp field. (Please also send a response by email if you use the timestamp field.)
I find the audit system useful to routinely do three things:
(1) to record sessions (audit sessions), (2) to record activity that should not occur, and (3) to record activity that should not fail.
Logminer is useful for detailed research, as one respondent mentioned, but the quantity of data can make it difficult to use when you are looking for general signs of trouble.
Frank Hubeny
Feldman Roger wrote:
> Oracle people:
>
> Could someone give me a hand and show me a script that shows who has
> made changes(new table entries or other changes) to the DB without
> having to startup the whole "audit" system ?
>
> I've tried a script from my not so handy oracle book- doesn't work and
> I've failed to hack it into shape :-(
>
> Here it is:
>
> -----
> col Owner format a20
> col Object_Name format a30
> col Timestamp format a20
> select Owner, Object_Name, Object_Type, Status, Timestamp
> from DBA_OBJECTS
> where SUBSTR(Timestamp,1,10) = TO_CHAR(sysdate-1,'YYYY-MM-DD')
> order by Owner, Object_Name
> /
>
> ------
>
> Thanks !
>
> Roger
Received on Wed Mar 21 2001 - 01:09:06 CST
![]() |
![]() |