- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Filtering aud$ table contents in Oracle !!
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-02-2004 03:01 PM
тАО02-02-2004 03:01 PM
Filtering aud$ table contents in Oracle !!
I would like to know how to specify the critieria for extracting records from the aud$ table according to the following requirements.
1. Retain all terminal column with values (i.e. terminal is not null)
2. Not in the combination of spare1='administrator' and terminal='server01' and userid='scott'
3. Not in the combination of spare1='administrator' and terminal='client01' and userid='peter'
and finally I need to join 1, 2 and 3 criteria together to get the final result sets for my audit report.
I have tried to used parenthesis to hold criteria 2 and 3, e.g. ... AND (spare1='administrator' and terminal='client01' and userid='peter') AND ....
However, the result set excluded all the records owed by 'peter' even the terminal is not 'client01'.
Any idea ?
Cheers,
Chris,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-02-2004 04:09 PM
тАО02-02-2004 04:09 PM
Re: Filtering aud$ table contents in Oracle !!
From your mentioned criteria I understand that you wanted to list all the values provided the terminal is not null and not one of the two ('server01' or 'client01') and the spare1 not = to administrator'.
If that is the case try this where clause.
where terminal is not null
and spare1 <> 'administrator'
and terminal not in ('server01','clinet01');
I hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-02-2004 04:31 PM
тАО02-02-2004 04:31 PM
Re: Filtering aud$ table contents in Oracle !!
Thanks for your input. However, I am afraid the suggested sql statement may not be able to extract record for:
- those spare1 not equal to administrator e.g. peter or scott if they are log in through 'server01' or 'client01'.
What I would like to do is to exclude the combined criteria such that only when spare1='administrator' and terminal='client01' and userid='peter all return turn then I am going to exclude this record.
If spare1='administrator', terminal='client01' and userid='John', then I am going to print this record in my audit report.
I hope this can make the requirement clear.
Thanks for your effort.
Cheers,
Chris,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-02-2004 04:45 PM
тАО02-02-2004 04:45 PM
Re: Filtering aud$ table contents in Oracle !!
where terminal is not null
and (spare1 <> 'administrator' and terminal <> 'server01' and userid <> 'scott')
and (spare1 <> 'administrator' and terminal <> 'client01' and userid <> 'peter');
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-02-2004 07:40 PM
тАО02-02-2004 07:40 PM
Re: Filtering aud$ table contents in Oracle !!
Thanks for your input. However, the result set for
(spare1 <> 'administrator' and terminal <> 'client01' and <> userid <> 'peter') is just the same as without the parenthesis.
Therefore the statement will elborated to =>
1. skip the record for spare1 = administrator
2. then skip the record for terminal = client01
3 and finally skip the record for userid = peter.
under this senario, those records e.g. with the criteria as spare1 = administrator and terminal = client01 but userid not equal to peter will be excluded from the result set.
Cheers,
Chris,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-02-2004 08:08 PM
тАО02-02-2004 08:08 PM
Re: Filtering aud$ table contents in Oracle !!
select * from tab1
where terminal is not null
and userid <> 'peter'
and spare1 not in (select spare1 from tab1 where spare1 <> 'administrator')
and terminal not in (select terminal from tab1 where terminal <> 'client01');
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-02-2004 08:23 PM
тАО02-02-2004 08:23 PM
Re: Filtering aud$ table contents in Oracle !!
select * from tab1
where terminal is not null
and userid not in ('peter', 'scott')
and spare1 not in (select spare1 from tab1 where spare1 <> 'administrator')
and terminal not in (select terminal from tab1 where terminal <> 'client01' and terminal <> 'server01');
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-04-2004 07:16 PM
тАО02-04-2004 07:16 PM
Re: Filtering aud$ table contents in Oracle !!
thanks for your effort !!
I just figured out an easy way to do it !!!
E.g.
.....where terminal is not null and NOT (spare='Administartor' and terminal='server01' and userid='peter') ...
Cheers,
Chris,