Hello People,
We have session auditing switched on.
I want to identify users who don't have database access logging onto the
database with other users ID's.
I can identify these users because the USERNAME will be different to the
OS_USERNAME.
So I tried something similar to the following:
select
username,
os_username,
terminal,
to_char(timestamp,'Dy DD Mon YY hh24:mi') as "Logged On",
to_char(logoff_time,'Dy DD Mon YY hh24:mi') as "Logged Off"
from
dba_audit_session
where
username not in
(select distinct
os_username
from
dba_audit_session
where
os_username != 'SYSTEM' ) and
returncode = 0;
My logic being if the username is not in the os_username then it must be one
of the 'dodgy' users.
But it isn't working as expected and not returning user data I know is in
dba_audit_session.
What am I doing wrong?
Cheers!
Stuart Davison
**********************************************************************
We would like to take this opportunity to send Seasons Greetings to all our customers, suppliers and colleagues and wish you a prosperous New Year. RWE npower will not be sending corporate Christmas cards this year. Instead, we will be making a donation to our chosen corporate charity Macmillan Cancer Relief.
**********************************************************************
This e-mail is provided for general information purposes only and does not constitute investment or transactional advice. For the avoidance of doubt the contents of this email are subject to contract and will not constitute a legally binding contract.
The information contained in this e-mail is confidential and intended only for the use of the addressee. If the reader of this message is not the addressee, you are hereby notified that you have received this e-mail in error and you must not copy, disseminate, distribute, use or take any action as a result of the information contained in it.
If you have received this e-mail in error, please notify [Email address protected] (UK 01384 275454) and delete it immediately from your system.
Neither Npower nor any of the other companies in the RWE Npower group from whom this e-mail originates accept any responsibility for losses or damage as a result of any viruses and it is your responsibility to check attachments (if any) for viruses.
Npower Limited Registered office: Windmill Hill Business Park, Whitehill Way, Swindon SN5 6PB. Registered in England and Wales: number 3653277. This e-mail may be sent on behalf of a member of the RWE Npower group of companies.
**********************************************************************
Oracle LazyDBA home page