Schema level auditing with db_extened parameter....

Hi All,
can anybody tell me,when i have enabled auditing on a user with db_extended parameter.When iam selecting the sqltext from sys.aud$ table,it is giving me lot of unnecessary information....where i performed a simple select statement on table with the audited user.....
Qucik response will be appreciated
Regards,
mohammed

hi,
find the details...
oracle version--10.2.0.4
i have set
sql>alter system set audit_trail=db_extened scope=spfile then restarted the database.
then sal>audit select table,delete table,insert table,update table by username;
then connected to the user & fired the below command
sql>select * from tablename;
then i fired the below command as sysdba
sql>select userid,sqltext,terminal from sys.aud$;
then i found lot of unwanted data.have a look for the data below....
==========================================
SQL> select sqltext from sys.aud$;
SQLTEXT
select 1 from SYS.DBA_OBJECTS where 1=2
select 1 from SYS.DBA_OBJECTS where 1=2
select 1 from SYS.DBA_OBJECTS where 1=2
select 1 from SYS.DBA_OBJECTS where 1=2
select 1 from SYS.DBA_OBJECTS where 1=2
select 1 from SYS.DBA_OBJECTS where 1=2
SELECT USERNAME, DEFAULT_TABLESPACE, TEMPORARY_TABLESPACE FROM SYS.USER_USERS
SELECT USERNAME, DEFAULT_TABLESPACE, TEMPORARY_TABLESPACE FROM SYS.USER_USERS
SELECT USERNAME, DEFAULT_TABLESPACE, TEMPORARY_TABLESPACE FROM SYS.USER_USERS
SELECT USERNAME, DEFAULT_TABLESPACE, TEMPORARY_TABLESPACE FROM SYS.USER_USERS
SELECT USERNAME, DEFAULT_TABLESPACE, TEMPORARY_TABLESPACE FROM SYS.USER_USERS
SQLTEXT
SELECT ROLE FROM SESSION_ROLES
SELECT ROLE FROM SESSION_ROLES
SELECT PRIVILEGE FROM SESSION_PRIVS
SELECT PRIVILEGE FROM SESSION_PRIVS
SELECT PRIVILEGE FROM SESSION_PRIVS
SELECT PRIVILEGE FROM SESSION_PRIVS
SELECT PRIVILEGE FROM SESSION_PRIVS
SELECT DBTIMEZONE FROM DUAL
select parameter,value from nls_session_parameters
union all SELECT 'DB_TIMEZO
SQLTEXT
select parameter,value from nls_session_parameters
union all SELECT 'DB_TIMEZO
select parameter,value from nls_session_parameters
union all SELECT 'DB_TIMEZO
select parameter,value from nls_session_parameters
union all SELECT 'DB_TIMEZO
select parameter,value from nls_session_parameters
union all SELECT 'DB_TIMEZO
SQLTEXT
select parameter,value from nls_session_parameters
union all SELECT 'DB_TIMEZO
select
* from (
SELECT OBJECT_NAME, OBJECT_ID ,'' short_name, 'TRUE' partiti
select
SQLTEXT
* from (
SELECT OBJECT_NAME, OBJECT_ID ,'' short_name, 'TRUE' partiti
select
* from (
SELECT OBJECT_NAME, OBJECT_ID ,'' short_name, 'TRUE' partiti
select
* from (
SQLTEXT
SELECT OBJECT_NAME, OBJECT_ID ,'' short_name, 'TRUE' partiti
select
* from (
SELECT OBJECT_NAME, OBJECT_ID ,'' short_name, 'TRUE' partiti
select
* from (
SELECT OBJECT_NAME, OBJECT_ID ,'' short_name, 'TRUE' partiti
SQLTEXT
select
* from (
SELECT OBJECT_NAME, OBJECT_ID ,'' short_name, 'TRUE' partiti
select
* from (
SELECT OBJECT_NAME, OBJECT_ID ,'' short_name, 'TRUE' partiti
SQLTEXT
select
* from (
SELECT OBJECT_NAME, OBJECT_ID ,'' short_name, 'TRUE' partiti
select
* from (
SELECT OBJECT_NAME, OBJECT_ID ,'' short_name, 'TRUE' partiti
SQLTEXT
select
* from (
SELECT OBJECT_NAME, OBJECT_ID ,'' short_name, 'TRUE' partiti
select * from bro
================================
regards,
mohammed

Similar Messages

  • Schema level auditing

    Hi
    Oracle :9i
    OS : Solaris
    I have a schema in which i have around 1000 tables. and developers frequently modify
    tables by adding columns etc.
    I want to keep a log for the whole schema which table is modified(i.e what column is added)
    we have a view user_objects in which i can find object_name and time.
    I would like to log the added columns too.
    How shall i write a trigger for the whole schema. or any alternative..
    regards,

    Hi,
    Read the fine manual.
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96524/c25audit.htm#6098
    And design your own auditing.
    Edited by: Mohammed Taj on Jul 27, 2009 2:34 PM

  • Schema level tiggers

    hi all,
    is it possible to write a schema level trigger with DCL and DDL commands in it.
    Actually in my database there are more than one (X & Y)schemas with differnt privelages.
    if i create a table in ' X'schema,i have to create a synonym for the same table for the other schema 'Y' and i want to grant select privelage for that table for 'Y' .my verison is 10204
    create or replace
    TRIGGER bcs_trigger
    after  create ON X.SCHEMA
    declare
    Cursor table_cur is
    Select object_id, object_name, object_type, owner
    from DBA_OBJECTS
    where to_date(created,'DD/MM/YYYY')= to_date(SYSDATE,'DD/MM/YYYY');
      type TABLE_collect is table of table_cur %rowtype;
    TACOLL TABLE_collect;
    v_msg varchar2(1000) := 'SYNONYM HAS BEEN CREATED';
    V_error varchar2(1000) := 'ALREADY EXIST';
    BEGIN
    open table_cur;
    loop
              fetch table_cur bulk collect into TACOLL;
               exit when table_cur %notfound;
               end loop;
               close table_cur;
    for i in 1.. TACOLL.count
    loop
    IF
    TACOLL(i). OBJECT_TYPE ='TABLE'
    THEN
    execute immediate 'create synonym '||TACOLL(i).OBJECT_NAME||' for '||TACOLL(i).OBJECT_NAME;
    execute immediate 'grant select on '||TACOLL(i).OBJECT_NAME||' to Y ';
    dbms_output.put_line ('v_msg');
    end if;
    end loop;
    end ;

    Hi Suresh.
    Welcome to OTN Forums!
    I think this help you
    CREATE OR REPLACE TRIGGER bcs_trigger AFTER
    CREATE ON X.SCHEMA
      DECLARE
        V_MSG VARCHAR2(1000) := 'SYNONYM HAS BEEN CREATED';
      BEGIN
        FOR OBJ IN
        (SELECT object_id,
          object_name,
          object_type,
          owner
        FROM DBA_OBJECTS
        WHERE TO_DATE(CREATED,'DD/MM/YYYY')= TO_DATE(SYSDATE,'DD/MM/YYYY'))
        LOOP
          IF OBJ.OBJECT_TYPE = 'TABLE' THEN
            EXECUTE IMMEDIATE 'create or replace synonym '||OBJ.OBJECT_NAME||' for '||OBJ.OBJECT_NAME;
            EXECUTE IMMEDIATE 'grant select on '||OBJ.OBJECT_NAME||' to Y ';
            dbms_output.put_line (V_MSG|| ' : ' ||OBJ_OBJECT_NAME);
          END IF;
        END LOOP;
      END ;

  • Schema level with particular partition tables

    Hi All,
    I need to export all objects ie. schema level option but I need to export the particular partition of a table..
    ie. i need EXCLUDE particular partition data for schema level back up.
    Kindly suggest me how to archive the above..
    Thanks & Regards
    Sami
    Edited by: Sami on Jul 6, 2012 4:41 PM

    Hi All,
    I have used the following option to export schema level with partition tables
    YYYYY/********@devchn schemas=YYYYY EXCLUDE=TABLE:"IN('ACCOUNT_STATEMENT_HISTORY','CUSTOMER_IMAGE','XAPI_ACTIVITY_HISTORY','GL_ACCOUNT_SUMMARY$AUD','GL_ACCOUNT_HISTORY:GL_ACCT_HIST_PART1','GL_ACCOUNT_HISTORY:GL_ACCT_HIST_PART2','GL_ACCOUNT_HISTORY:GL_ACCT_HIST_PART3','GL_ACCOUNT_HISTORY:GL_ACCT_HIST_PART4','GL_ACCOUNT_HISTORY:GL_ACCT_HIST_PART5','GL_ACCOUNT_HISTORY:GL_ACCT_HIST_PART6','GL_ACCOUNT_HISTORY:GL_ACCT_HIST_PART7','DEPOSIT_ACCOUNT_HISTORY:DEP_ACCT_HIST1','DEPOSIT_ACCOUNT_HISTORY:DEP_ACCT_HIST2', 'DEPOSIT_ACCOUNT_HISTORY:DEP_ACCT_HIST3','TXN_JOURNAL:TRX_JOURN_PART1','TXN_JOURNAL:TRX_JOURN_PART2')" directory=DUMPDIR1 dumpfile=MSB_06-July-2012.dmp logfile=exp_MSB_06-July-2012.log but its not work..
    Log file
    . . exported "YYYYY."."TXN_JOURNAL":"TRX_JOURN_PART3"       1.801 GB 6650371 rows
    . . exported "YYYYY."."EVENT_JOURNAL"                       1.533 GB 15930785 rows
    . . exported "YYYYY."."LOAN_ACCOUNT$AUD"                    1.287 GB 6339368 rows
    . . exported "YYYYY."."GL_ACCOUNT_HISTORY":"GL_ACCT_HIST_PART6"  1.212 GB 5860272 rows
    . . exported "YYYYY."."GL_ACCOUNT_HISTORY":"GL_ACCT_HIST_PART5"  1.102 GB 5363721 rows
    . . exported "YYYYY."."DEPOSIT_ACCOUNT_HISTORY":"DEP_ACCT_HIST3"  1.055 GB 5530280 rows
    . . exported "YYYYY."."GL_ACCOUNT_HISTORY":"GL_ACCT_HIST_PART4"  929.4 MB 4513889 rows
    . . exported "YYYYY."."DP_ACCT_INTEREST_HISTORY"            925.0 MB 7002553 rows
    . . exported "YYYYY."."GL_ACCOUNT_HISTORY":"GL_ACCT_HIST_PART2"  909.8 MB 4441940 rows
    . . exported "YYYYY."."GL_ACCOUNT_HISTORY":"GL_ACCT_HIST_PART3"  768.3 MB 3786671 rows
    . . exported "YYYYY."."ACCOUNT$AUD"                         709.8 MB 4348526 rows
    . . exported "YYYYY."."EVENT_CHARGE_JOURNAL"                663.9 MB 5303756 rows
    . . exported "YYYYY."."DP_ACCT_CYCLE_STAT_HIST"             655.4 MB 4389715 rows
    . . exported "YYYYY."."DP_ACCT_PERIOD_CYCLE_STAT_HIST"      569.1 MB 3733176 rows
    . . exported "YYYYY."."DP_ACCT_CHARGE_CYCLE_STAT_HIST"      535.4 MB 3712447 rows
    . . exported "YYYYY."."GL_ACCOUNT_HISTORY":"GL_ACCT_HIST_PART7"  473.3 MB 2238240 rows
    . . exported "YYYYY."."WF_WORK_ITEM_HISTORY"                474.4 MB 1887956 rows
    . . exported "YYYYY."."OFFLINE_OUTBOUND_TXN_LOG"            478.4 MB   32803 rows
    . . exported "YYYYY."."OPERATIONAL_SERVICE_ERROR_LOG"       291.8 MB   55333 rows
    . . exported "YYYYY."."TXN_JOURNAL":"TRX_JOURN_PART1"       350.3 MB 1352267 rows
    . . exported "YYYYY."."DEPOSIT_ACCOUNT_STAT"                313.6 MB  414942 rows
    . . exported "YYYYY."."CORRESPONDENCE_QUEUE_BK"             295.6 MB 1816383 rows
    . . exported "YYYYY."."EXT_TXN_JOURNAL"                     255.6 MB 1234290 rows
    . . exported "YYYYY."."PERSONAL_CUSTOMER$AUD"               244.7 MB 1018705 rows
    . . exported "YYYYY."."GL_ACCOUNT_STAT"                     228.3 MB  873915 rows
    . . exported "YYYYY."."TXN_JOURNAL":"TRX_JOURN_PART2"       228.8 MB  855180 rows
    . . exported "YYYYY."."DEPOSIT_ACCOUNT_HISTORY":"DEP_ACCT_HIST1"  210.5 MB 1119932 rows
    . . exported "YYYYY."."USER_ROLE_ALERT"                     180.9 MB 3059052 rows
    . . exported "YYYYY."."CUSTOMER$AUD"                        172.7 MB 1005897 rows
    . . exported "YYYYY."."DEPOSIT_ACCOUNT_HISTORY":"DEP_ACCT_HIST2"  162.3 MB  837967 rows
    . . exported "YYYYY."."DEPOSIT_ACCOUNT_SUMMARY"             160.7 MB  414942 rows
    . . exported "YYYYY."."CUSTOMER_IMAGE_HISTORY"              142.0 MB   10085 rows
    . . exported "YYYYY."."SYSUSER$AUD"                         137.9 MB  986069 rows
    . . exported "YYYYY."."TXN_BATCH_ITEM$AUD"                  143.9 MB  893961 rows
    . . exported "YYYYY."."ALERT"                               130.8 MB  652573 rows
    . . exported "YYYYY."."EXT_DP_ACCOUNT_SUMMARY"              132.3 MB  336115 rows
    . . exported "YYYYY."."GL_ACCOUNT_HISTORY":"GL_ACCT_HIST_PART1"  132.7 MB  681899 rows
    . . exported "YYYYY."."DEPOSIT_ACCOUNT_INTEREST"            113.0 MB  835126 rows
    . . exported "YYYYY."."EXT_DP_ACCOUNT_INTEREST"             112.3 MB  625117 rows
    . . exported "YYYYY."."GL_ACCOUNT_SUMMARY"                  103.5 MB  873885 rows
    . . exported "YYYYY."."DP_ACCT_INTEREST_TIER_HISTORY"       102.4 MB 1413589 rows
    . . exported "YYYYY."."GL_ACCOUNT_MONTHLY_STAT"             98.52 MB  852631 rows
    . . exported "YYYYY."."GL_ACCOUNT_QUARTERLY_STAT"           98.45 MB  852630 rows
    . . exported "YYYYY."."GL_ACCOUNT_YEARLY_STAT"              98.47 MB  852630 rows
    . . exported "YYYYY."."LN_ACCT_REPMNT_EVENT"                91.53 MB  902496 rows
    . . exported "YYYYY."."WF_WORK_ITEM_CHKLST_RESP"            83.03 MB  538855 rows
    . . exported "YYYYY."."DEPOSIT_ACCOUNT$AUD"                 79.53 MB  450801 rows
    . . exported "YYYYY."."ACCOUNT_CHEQUE_INVENTORY"            73.38 MB  910879 rows
    . . exported "YYYYY."."EXT_DP_ACCOUNT_INTEREST_TIER"        71.44 MB  670870 rows
    . . exported "YYYYY."."PENDING_TXN_JOURNAL"                 44.14 MB    9578 rows
    . . exported "YYYYY."."CUSTOMER"                            67.22 MB  405785 rows
    . . exported "YYYYY."."TXN_BATCH_ITEM"                      66.98 MB  458442 rows
    . . exported "YYYYY."."ACCOUNT"                             58.82 MB  443064 rows
    . . exported "YYYYY."."ACCOUNT_CYCLIC_CHARGE"               56.00 MB  405963 rows
    . . exported "YYYYY."."EXT_CUSTOMER"                        57.16 MB  321364 rows
    . . exported "YYYYY."."EXT_LN_ACCT_REPMNT_EVENT"            61.50 MB  437790 rows
    . . exported "YYYYY."."ORGANISATION_CUSTOMER$AUD"           49.84 MB  241014 rows
    . . exported "YYYYY."."OFFLINE_ASYNCH_QUEUE"                52.14 MB    3562 rows
    . . exported "YYYYY."."OPERATIONAL_SVCE_MAN_RUN_HIST"       47.91 MB  766864 rows
    . . exported "YYYYY."."DEPOSIT_ACCOUNT_INTEREST_TIER"       46.44 MB  670938 rows
    . . exported "YYYYY."."LN_ACCT_PERIOD_CYCLE_STAT_HIST"      42.09 MB  260703 rows
    . . exported "YYYYY."."ADDRESS"                             41.39 MB  411753 rows
    . . exported "YYYYY."."EXT_ACCOUNT_RELATIONSHIP"            41.98 MB  305353 rowsEXCLUDE option is not working for partition tables.. But its working fine for other tables
    examples
    EXCLUDE=TABLE:"IN('ACCOUNT_STATEMENT_HISTORY','CUSTOMER_IMAGE','XAPI_ACTIVITY_HISTORY','GL_ACCOUNT_SUMMARY$AUD'
    {code}
    the above part is working fine..
    But.
    {code}
    EXCLUDE=TABLE:"IN('GL_ACCOUNT_HISTORY:GL_ACCT_HIST_PART5','GL_ACCOUNT_HISTORY:GL_ACCT_HIST_PART6')the above exclude option is not working.. data's from the table are exported into the dump..
    Thanks & Regards
    Sami.

  • SCHEMA/USer Level Auditing

    Hi Experts,
    i need your guidence.. actulay if we enable user level auditing then it will log all DDL n DML in AUDIT_SYS$ table. but if the user being audited execute a procedure and in the procdure the are lot of DDL and DML then is these DDL and DML executed with in Procedure will also logged in AUDIT_SYS$ table or Just it will logged that procedure is executed,???????
    regards,

    Hi Experts,
    i need your guidence.. actulay if we enable user level auditing then it will log all DDL n DML in AUDIT_SYS$ table. but if the user being audited execute a procedure and in the procdure the are lot of DDL and DML then is these DDL and DML executed with in Procedure will also logged in AUDIT_SYS$ table or Just it will logged that procedure is executed,???????
    regards,

  • SQL Trace for schema level

    Hi
    Database 10.1.0.4
    Sql trace file which I have used but didn't get the trace file. I have tried to get per session Id but not able to get the trace file, when ever user logged into application, virtually 6 user get lgged in and you never know about user. So I have desided to capture for schema
    I have used this for tracing
    SQL> ALTER SESSION SET sql_trace=TRUE;
    SQL> ALTER SESSION SET sql_trace=FALSE;
    Or
    SQL> EXEC DBMS_SESSION.set_sql_trace(sql_trace => TRUE);
    SQL> EXEC DBMS_SESSION.set_sql_trace(sql_trace => FALSE);
    or
    SQL> EXEC DBMS_SYSTEM.set_sql_trace_in_session(sid=>123, serial#=>1234, sql_trace=>TRUE);
    SQL> EXEC DBMS_SYSTEM.set_sql_trace_in_session(sid=>123, serial#=>1234, sql_trace=>FALSE);
    I want to get trace file for schema, can anyone suggest how do I get trace file at schema level.
    Thanks for help

    Hi,
    Using instance-level tracing by setting the init.ora/spfile... parameter SQL_TRACE=TRUE, all processes against the instance will create their own trace files. This particular method of tracing should be used with care since it creates a great deal of overhead against the system. In addition, the default value for this parameter is FALSE.
    Cheers
    Legatti

  • How to exclude tables from Schema level replication

    Hi All,
    I am currently trying to setup Oracle Streams (Oracle 11.1.0.6 on RHEL5) to replicate a schema from one instance to another.
    The basic schema level replication is working well, and copying DDL and DML changes without any problems. However there are a couple of tables that I need to exclude from the stream, due to incompatible datatypes.
    Does anybody have any ideas or notes on how I could achieve this?? I have been reading the Oracle documentation and find it difficult to follow and confusing, and I have not found any examples in the internet.
    Thanks heaps.
    Gavin

    When you use SCHEMA level rules for capture and need to skip the replication of a few tables, you create rules in the negative rule set for the table.
    Here is an example of creating table rules in the negative rule set for the capture process.
    begin
    dbms_streams_adm.add_table_rules(
    table_name => 'schema.table_to_be_skipped',
    streams_type => 'CAPTURE',
    streams_name => 'your_capture_name',
    queue_name => 'strmadmin.capture_queue_name',
    include_dml => true,
    include_ddl => true,
    inclusion_rule => false
    end;
    table_name parameter identifies the fully qualified table name (schema.table)
    streams_name identifies the capture process for which the rules are to be added
    queue_name specifies the name of the queue associated with the capture process.
    Inclusion_rule=> false indicates that the create rules are to be placed in the negative rule set (ie, skip this table)
    include_dml=> true indicates DML changes for the table (ie, skip DML changes for this table)
    include_ddl=> true indicates DDL changes for the table (ie, skip DDL changes for this table)

  • Schema Level DML

    I have about 200 tables, and each table has two columns : ( table_name_ID, local_id ).
    example :
    COST ( cost_id, local_id )
    RATES ( rates_id, local_id )
    SALARY ( salary_id, local_id )
    I want the column local_id to be set to same value as table_id. ( local_id = cost_id for COST table; local_id = SALARY_ID in SALARY table etc.)
    The code for trigger on these table will be generic and can be automtically generated.
    But we are talking about 200 tables - means huge amount of testing with existing triggers on all these tables.
    Is there any simpler method.
    BTW - I purused following thread, and it talks about using AUDITING.
    Re: Schema level Database triggers
    But I wonder how AUDITING can be used in place of trigger to modify data ?

    If you are running 11g, you could also replace the "local_id" physical columns with virtual ones (below). Not very pretty, but way cheaper than triggers.
    SQL> CREATE TABLE COST ( cost_id  number
      2                    , local_id number generated always as (cost_id+0) )
      3  /
    Table created
    SQL> insert into cost (cost_id) values (1);
    1 row inserted
    SQL> select * from cost;
       COST_ID   LOCAL_ID
             1          1

  • Schema level

    Can any one suggest the steps for gathering schema level statistics?

    See Gathering Optimizer Statistics in the PL/SQl Packages and Types doc
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_stats.htm
    There is a section for GATHER_SCHEMA_STATS Procedures with an example
    See Table 127-43 GATHER_SCHEMA_STATS Procedure Parameters for the default values for each parameter
    >
    Examples
    Applying an Object Filter List
    The following example specifies that any table with a "T" prefix in the SAMPLE schema and any table in the SYS schema, if stale, will have statistics gathered upon it.
    DECLARE
    filter_lst DBMS_STATS.OBJECTTAB := DBMS_STATS.OBJECTTAB();
    BEGIN
    filter_lst.extend(2);
    filter_lst(1).ownname := 'SAMPLE';
    filter_lst(1).objname := 'T%';
    filter_lst(2).ownname := 'SYS';
    DBMS_STATS.GATHER_SCHEMA_STATS(NULL, obj_filter_list => filter_lst,
    options => 'gather_stale');
    END;
    >
    Did you have specific questions?

  • How to add new tables in Streams for Schema level replication ( 10.2.0.3 )

    Hi,
    I am in process of setting up Oracle Streams schema level replication on version 10.2.0.3. I am able to setup replication for one table properly. Now I want to add 10 more new tables for schema level replication. Few questions regarding this
    1. If I create new tables in source, shall I have to create tables in target database manually or I have to do export STREAMS_INSTANTIATION=Y
    2. Can you tell me metalink note id to read more on this topic ?
    thanks & regards
    parag

    The same capture and apply process can be used to replicate other tables. Following steps should suffice your need:
    Say table NEW is the new table to be added with owner SANTU
    downstr_cap is the capture process which is already running
    downstr_apply is the apply process which is already there
    1. Now stop the apply process
    2. Stop the capture process
    3. Add the new table in the capture process using +ve rule
    BEGIN
    DBMS_STREAMS_ADM.ADD_TABLE_RULES
    table_name      => 'SANTU.NEW',
    streams_type    => 'capture',
    streams_name    => 'downstr_cap',
    queue_name      => 'strmadmin.DOWNSTREAM_Q',
    include_dml     => true,
    include_ddl     => true,
    source_database =>  ' Name of the source database ',
    inclusion_rule  => true
    END;
    4. Take export of the new table with "OBJECT_CONSISTENT=Y" option
    5. Import the table at destination with "STREAMS_INSTANTIATION=Y' option
    6. Start the apply process
    7. Start the capture process

  • What level suplemental logging requires to setup Streams at Schema level

    Hi,
    Working on setting-up streams from 10g to 11g db @ schema level. And the session is hanging with statement "ALTER DATABASE ADD SUPPLEMENTAL LOG DATA" while running following command - generated using DBMS_STREAMS_ADM.MAINTAIN_SCHEMAS.
    Begin
    dbms_streams_adm.add_schema_rules(
    schema_name => '"DPX1"',
    streams_type => 'CAPTURE',
    streams_name => '"CAPTURE_DPX1"',
    queue_name => '"STRMADMIN"."CAPTURE_QUEUE"',
    include_dml => TRUE,
    include_ddl => TRUE,
    include_tagged_lcr => TRUE,
    source_database => 'DPX1DB',
    inclusion_rule => TRUE,
    and_condition => get_compatible);
    END;
    The generated script also setting each table with table-level logging "'ALTER TABLE "DPX1"."DEPT" ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY, FOREIGN KEY, UNIQUE INDEX) COLUMNS'".
    So my question is: Is Database level supplemental logging required to setup schema-level replication? If answer is no then why the following script is invoking "ALTER DATABASE ADD SUPPLEMENTAL LOG DATA" command.
    Thanks in advance.
    Regards,
    Sridhar

    Hi sri dhar,
    From what I found, the "ALTER DATABASE ADD SUPPLEMENTAL LOG DATA" is required for the first capture you create in a database. Once it has been run, you'll see V$DATABASE with the column SUPPLEMENTAL_LOG_DATA_MIN set to YES. It requires a strong level of locking - for example, you cannot run this alter database while an index rebuild is running (maybe an rebuild online?)
    I know it is called implicitly by DBMS_STREAMS_ADM.add_table_rules for the first rule created.
    So, you can just run the statement once in a maintenance window and you'll be all set.
    Minimal Supplemental Logging - http://www.oracle.com/pls/db102/to_URL?remark=ranked&urlname=http:%2F%2Fdownload.oracle.com%2Fdocs%2Fcd%2FB19306_01%2Fserver.102%2Fb14215%2Flogminer.htm%23sthref2006
    NOT to be confused with database level supplemental log group.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14228/mon_rep.htm#BABHHCCC
    Hope this helps,
    Regards,

  • Schema level and table level supplemental logging

    Hello,
    I'm setting up bi- directional DML replication between two oracle databases. I have enabled supplemental logging database level by running this command-
    SQL>alter database add supplemental log data (primary key) columns;
    Database altered.
    SQL> select SUPPLEMENTAL_LOG_DATA_MIN, SUPPLEMENTAL_LOG_DATA_PK, SUPPLEMENTAL_LOG_DATA_UI from v$database;
    SUPPLEME SUP SUP
    IMPLICIT YES NO
    -My question is should I enable supplemental logging table level also(for DML replication only)? should I run the below command also?
    GGSCI (db1) 1> DBLOGIN USERID ggs_admin, PASSWORD ggs_admin
    Successfully logged into database.
    GGSCI (db1) 2> ADD TRANDATA schema.<table-name>
    what is the deference between schema level and table level supplemental logging?

    For Oracle, ADD TRANDATA by default enables table-level supplemental logging. The supplemental log group includes one of the following sets of columns, in the listed order of priority, depending on what is defined on the table:
    1. Primary key
    2. First unique key alphanumerically with no virtual columns, no UDTs, no functionbased
    columns, and no nullable columns
    3. First unique key alphanumerically with no virtual columns, no UDTs, or no functionbased
    columns, but can include nullable columns
    4. If none of the preceding key types exist (even though there might be other types of keys
    defined on the table) Oracle GoldenGate constructs a pseudo key of all columns that
    the database allows to be used in a unique key, excluding virtual columns, UDTs,
    function-based columns, and any columns that are explicitly excluded from the Oracle
    GoldenGate configuration.
    The command issues an ALTER TABLE command with an ADD SUPPLEMENTAL LOG DATA clause that
    is appropriate for the type of unique constraint (or lack of one) that is defined for the table.
    When to use ADD TRANDATA for an Oracle source database
    Use ADD TRANDATA only if you are not using the Oracle GoldenGate DDL replication feature.
    If you are using the Oracle GoldenGate DDL replication feature, use the ADD SCHEMATRANDATA command to log the required supplemental data. It is possible to use ADD
    TRANDATA when DDL support is enabled, but only if you can guarantee one of the following:
    ● You can stop DML activity on any and all tables before users or applications perform DDL on them.
    ● You cannot stop DML activity before the DDL occurs, but you can guarantee that:
    ❍ There is no possibility that users or applications will issue DDL that adds new tables whose names satisfy an explicit or wildcarded specification in a TABLE or MAP
    statement.
    ❍ There is no possibility that users or applications will issue DDL that changes the key definitions of any tables that are already in the Oracle GoldenGate configuration.
    ADD SCHEMATRANDATA ensures replication continuity should DML ever occur on an object for which DDL has just been performed.
    You can use ADD TRANDATA even when using ADD SCHEMATRANDATA if you need to use the COLS option to log any non-key columns, such as those needed for FILTER statements and KEYCOLS clauses in the TABLE and MAP parameters.
    Additional requirements when using ADD TRANDATA
    Besides table-level logging, minimal supplemental logging must be enabled at the database level in order for Oracle GoldenGate to process updates to primary keys and
    chained rows. This must be done through the database interface, not through Oracle GoldenGate. You can enable minimal supplemental logging by issuing the following DDL
    statement:
    SQL> alter database add supplemental log data;
    To verify that supplemental logging is enabled at the database level, issue the following statement:
    SELECT SUPPLEMENTAL_LOG_DATA_MIN FROM V$DATABASE;
    The output of the query must be YES or IMPLICIT. LOG_DATA_MIN must be explicitly set, because it is not enabled automatically when other LOG_DATA options are set.
    If you required more details refer Oracle® GoldenGate Windows and UNIX Reference Guide 11g Release 2 (11.2.1.0.0)

  • Dml_Handler at the Schema Level?

    Hi:
    I'm using 11g R2 and doing a one-way streams replication within the same database. I've got a subset of tables within the same schema setup now for capture and I'm using dml_handlers on apply. The handlers are specified on each table with a package that takes each trapped LCR and writes its data out to a different table than the one that the LCR got captured from. This was done for a bolt-on reporting issue that popped up. This is all working great. Streams rocks!
    Here's my next issue. I want to expand/morph the above approach in the following way. I want to do my capture at the schema level for all tables and also run just one dml_handler to take all LCRs for the specified schema and write them out as XML into a clob column. I've got the XML portion working and I pretty much know how I can get the streams part going as well, using a dml_handler-per-table approach similar to what I did above. What I would like to know is whether there's a way to avoid having to setup a dml_hander for each insert, update, and delete LCR on every table within the specified schema.
    Instead of doing this....
    BEGIN
    DBMS_APPLY_ADM.SET_DML_HANDLER(
    object_name => 'schema.table_a',
    object_type => 'TABLE',
    operation_name => 'INSERT',
    error_handler => false,
    user_procedure => 'package.procedure',
    apply_database_link => NULL,
    apply_name => 'apply_name');
    END;
    BEGIN
    DBMS_APPLY_ADM.SET_DML_HANDLER(
    object_name => 'schema.table_a',
    object_type => 'TABLE',
    operation_name => 'UPDATE',
    error_handler => false,
    user_procedure => 'package.procedure',
    apply_database_link => NULL,
    apply_name => 'apply_name');
    END;
    BEGIN
    DBMS_APPLY_ADM.SET_DML_HANDLER(
    object_name => 'schema.table_a',
    object_type => 'TABLE',
    operation_name => 'DELETE',
    error_handler => false,
    user_procedure => 'package.procedure',
    apply_database_link => NULL,
    apply_name => 'apply_name');
    END;
    Once for each table in the schema
    I'd like to be able to do the following:
    BEGIN
    DBMS_APPLY_ADM.SET_DML_HANDLER(
    schema_name => 'schema', ---This line is totally made up by me. The real argument is object_name
    object_type => 'TABLE',
    operation_name => 'ALL', ---This line is also totally made up by me. The real allowed options are Insert, Update, and Delete.
    error_handler => false,
    user_procedure => 'package.procedure',
    apply_database_link => NULL,
    apply_name => 'apply_name');
    END;
    Is there a way to do this? I don't see a procedure in dbms_apply_adm to accomplish it, or I just missed it. I could also do this within a loop using dynamic SQL but I'm hoping I won't have to.
    Thanks for any help!
    Cheers,
    Mike

    SCHEMA level is not possible with this procedure.
    However, you can set the operation_name to 'DEFAULT' - which indicates all operations (INSERT/UPDATE/DELETE/LOB_UPDATE)

  • OAM multi-level authentication with an OIF SP

    As background, we have 16 Shibboleth IdPs in a federation and users need to access a couple of applications that are protected by OAM (10.1.4.3) using OIF (11g) as the SP. We have a requirement to force re-authentication for a set of URLs protected by OAM. So, if a user accesses application, let's call it LOW, and then attempts to access application called HIGH, we need to reauthenticate the user at the IdP. In OAM, this is the classic use case for multi-level authentication, I think.
    Since OIF acts as a gateway, all of the applications "behind" OIF/OAM use the same authentication scheme in OAM, so I can't use OAM's multi-level authentication as we are configured now. I was told by an OIF person at OracleWorld that a possible approach would be to configure a custom authentication engine in OIF that is basically a copy of the OAM authentication engine and set that up at a different authentication level in OAM. However, looking through the documentation, it looks like the authentication engines are only used when OIF is used as an IdP. Perhaps the person meant that I need to set up a custom SP Integration Module? Or am I misunderstanding the role of the auth engine?
    The OAM SP Integration Module lets me specify Authentication Schemes and Authentication Scheme Levels. We currently are set up to use OIF-unspecified with a level of 1. Since we want to re-authenticate, however, we really want to use the same authentication scheme but at a different authentication level. Is there a way to achieve that? Can I set up a second OAM SP Integration Module with a different policy domain and set the OIF-unspecified authentication scheme to level 2 on that one? How would I go about doing that -- as a custom SP engine?
    Has anyone done anything similar or found a way to force reauthentication using the same authenticator for some applications behind an OIF SP but not others?
    Thanks for any help you can provide.
    --Mike                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi,
    Thanks for the reply.
    “In fact there is not one use case. There are 5 use cases for which we need to provide Second Level of Authentication functionality. And that also with the flexibility of switching this on/off.
    Now as per my understanding we should achieve this through the following flow :
    Store one extra attribute in OID per user per service. And that attribute will store the enable/disable information for that particular service and for that particular user.
    Now ObAuthentication Scheme class of Access Manager API needs to be used for enabling or disabling the Level 2 authentication scheme as per that attribute.
    Is this flow possible.”
    Cheers,
    Sunny

  • FDM Schema update failed with error

    Hi,
    Version: FDM 11.1.1.3
    Database: Oracle 11.2.0.1
    Running schema update on 9.3.0 schema failed with following error:
    Ram the schema upgrade utility (Name: FDMApp Schema Level: 9.3.0)
    The upgrade failed approximately 1 minute into the process with the following error:
    Application [FDMApp] failed, check log file!”
    From the log file:
    …\Applications\FDMApp\Outbox\Logs\FDMApp_Update.log
    ** Begin Schema Update Entry **
    Step 12: Update English Language Code to Standard Local Value Failed!
    -2147217873-Data access error
    SQL where it fails:
    ORA-00001: unique constraint (FDMOWNER.PK_TAPPOBJECT_LOCALE) violated
    UPDATE tSecObject_Locale Set LangKey = 1033 Where (LangKey = 1)
    Anyone have any idea on this???
    Thanks!

    Hello,
    I would suggest you make sure that you run the schema update on an appropriate FDM 9.3.0 application.
    Language records (as the one mentioned in the error) do not exist in FDM 9.3.0 and should not be a problem.
    I would suspect you either don't have a 9.3.0 application; or some other custom modification was made.
    Thank you,

Maybe you are looking for