Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: sys.aud$
Comments embedded.
<premmehrotra_at_hotmail.com> a écrit dans le message de
news:1107746191.214936.106750_at_c13g2000cwb.googlegroups.com...
| I have archived some data from this table into a table of my
| own called mdbaudarch.
|
| I want to use dba_audit_trail view to combine information from aud$
| and my table.
|
| I have seen following example (slightly modified) in Arup Nanda's book:
|
| # create a combined view
| #set -xv
| sqlplus /nolog << !
| set buffer edit;
| conn / as sysdba;
| create view aud\$_combined
| as
| select * from aud$
| union all
| select * from mdbaudarch.t_mdbaudarch
| ;
|
| create public synonym aud\$ for sys.aud\$_combined;
| !
Don't create any object in SYS schema.
|
| When I do select * from aud$, I do see combined results,
| but when I do select * from dba_audit_trail I only see
| rows from sys.aud$, why.
Because private objects are taken before synonyms. The order of precedence is: private object -> private synonym -> public synonym So in the view definition table sys.aud$ is chosen and not public synonym.
|
| What changes should I make so views such as dab_audit_session,
| dba_audit_trail etc see both tables.
|
Create your own view in your schema.
|
|
| Prem
|
Received on Sun Feb 06 2005 - 22:56:25 CST
![]() |
![]() |