Audit All DML and DDL on an Application Schema

Hello;
I have a requirement to audit all DML and DDL on an Application Schema (Lets say SCOTT). I have set:
ALTER SYSTEM SET audit_trail = XML, EXTENDED scope=spfile; -- Want my audit log on the OS with Bind and SQL.
ALTER SYSTEM SET AUDIT_SYS_OPERATIONS = TRUE scope=spfile; -- Want to audit sysdba and sysoper activity
audit create session; -- Want to see both logins and failed logins
How would I get all DML and DDL on an Application Schema (SCOTT)?
I am using 11iR1 Standard Edition.

Have look at system_privilege_map and find all the options you need to audit...
or you can use the below script..
SELECT 'audit ' ||LOWER(name) || ' by app_user;'
FROM system_privilege_map;
if you want to filter-out the one you have already audited, then use dba_priv_audit_opts ...
Hope this info will be useful to you...
Thanks,

Similar Messages

  • Trigger to audit DML and DDL nor working

    Requirement: Application team complains that everyday within a fixed timeframe, 1 entry from a particular table is being deleted. They are unable to track it, which particular job is it doing it.
    DBA: We had 3 solutions: 1. AUDIT_TRAIL
    2. FGA
    3. Customized TRIGGER to track the DML and DDL.
    After discussion, option 3 has been implemented. Here is the code.
    DML Trigger
    =======
    CREATE OR REPLACE TRIGGER SLCPROD.STORE_TERM_ID_HST_TRG
    BEFORE INSERT OR UPDATE OR DELETE
    ON SLCPROD.STORE_TERM_ID FOR EACH ROW
    BEGIN
    IF UPDATING THEN
    INSERT INTO STORE_TERM_ID_HIST
    ( STR_NUM,
    TERM_ID,
    HOST_ENV,
    USR_TERMINAL,
    SESSION_USR,
    OS_USER,
    ACTION_DATE,
    ACTION_NAME)
    VALUES
    ( TRUNC(:OLD.STR_NUM)||','||:NEW.STR_NUM,
    TRUNC(:OLD.TERM_ID)||','||:NEW.TERM_ID,
    sys_context('USERENV', 'HOST'),
    sys_context('USERENV', 'TERMINAL'),
    sys_context('USERENV', 'SESSION_USER'),
    sys_context('USERENV', 'OS_USER'),
    SYSDATE,
    'UPDATE');
    ELSIF DELETING THEN
    INSERT INTO STORE_TERM_ID_HIST
    ( STR_NUM,
    TERM_ID,
    HOST_ENV,
    USR_TERMINAL,
    SESSION_USR,
    OS_USER,
    ACTION_DATE,
    ACTION_NAME)
    VALUES
    ( :OLD.STR_NUM,
    :OLD.TERM_ID,
    sys_context('USERENV', 'HOST'),
    sys_context('USERENV', 'TERMINAL'),
    sys_context('USERENV', 'SESSION_USER'),
    sys_context('USERENV', 'OS_USER'),
    SYSDATE,
    'DELETE');
    END IF;
    END;
    DDL Trigger
    ========
    CREATE OR REPLACE TRIGGER SLCPROD.STORE_TERM_ID_HST_TRG_TRUNC
    AFTER DDL ON DATABASE
    declare
    object_name varchar2(30);
    BEGIN
    select distinct ora_dict_obj_name into object_name from dual;
    if UPPER(object_name)= 'STORE_TERM_ID'
    then
    INSERT INTO STORE_TERM_ID_HIST
    ( STR_NUM,
    TERM_ID,
    HOST_ENV,
    USR_TERMINAL,
    SESSION_USR,
    OS_USER,
    ACTION_DATE,
    ACTION_NAME)
    VALUES
    ( 'NA',
    'NA',
    sys_context('USERENV', 'HOST'),
    sys_context('USERENV', 'TERMINAL'),
    sys_context('USERENV', 'SESSION_USER'),
    sys_context('USERENV', 'OS_USER'),
    SYSDATE,
    ora_sysevent);
    END IF;
    END;
    TABLE STORE_TERM_ID_HIST DESC
    =======================
    Name Null? Type
    STR_NUM CHAR(25)
    TERM_ID CHAR(25)
    HOST_ENV VARCHAR2(50)
    USR_TERMINAL VARCHAR2(50)
    SESSION_USR VARCHAR2(50)
    OS_USER VARCHAR2(50)
    ACTION_DATE DATE
    ACTION_NAME VARCHAR2(50)
    Though we have these triggers in place, still we can see that 1 record is getting deleted (do not know how as I haven't been able to track it) between 8 AM - 8:50 AM. We have verified it from COUNT and also know which particular record is getting deleted.
    We tried to see if any error logged due to these triggers in ALERT logs, but no error specific to it has been seen. We have tested the TRIGGERs using manuals queries, and they seem to be working fine.
    Could anyone please help what could be happening here? Or any better solution of resolving it.
    Thanks,
    Tapan
    Edited by: TapanKumar Saha on Mar 31, 2013 10:04 PM
    updated the code.

    Thank you all for all the help.
    My issue is resolved now. Here is the analysis:
    Our triggers (both for DML and DDL) were working earlier as well. However, it was not capturing the actions. We could see that last_ddl_date is being updated with the time when we are expecting the mischievous to happen. So, after having internal discussions, we concluded that "ALTER INDEX.." could also update the last_ddl_date. But it has nothing to do with the DELETE. However, to track the INDEX DDLs we added trigger on INDEX as well. Here is the modified code:
    DDL Trigger
    =======
    CREATE OR REPLACE TRIGGER SLCPROD.STORE_TERM_ID_HST_TRG_TRUNC
    AFTER DDL ON DATABASE
    declare
    object_name varchar2(30);
    BEGIN
    select distinct ora_dict_obj_name into object_name from dual;
    if UPPER(object_name)= 'STORE_TERM_ID'
    then
    INSERT INTO STORE_TERM_ID_HIST
    ( STR_NUM,
    TERM_ID,
    HOST_ENV,
    USR_TERMINAL,
    SESSION_USR,
    OS_USER,
    ACTION_DATE,
    ACTION_NAME)
    VALUES
    ( 'NA',
    'NA',
    sys_context('USERENV', 'HOST'),
    sys_context('USERENV', 'TERMINAL'),
    sys_context('USERENV', 'SESSION_USER'),
    sys_context('USERENV', 'OS_USER'),
    SYSDATE,
    ora_sysevent);
    elsif UPPER(object_name)= 'STORE_TERM_ID_PK'
    then
    INSERT INTO STORE_TERM_ID_HIST
    +( STR_NUM,+
    TERM_ID,
    HOST_ENV,
    USR_TERMINAL,
    SESSION_USR,
    OS_USER,
    ACTION_DATE,
    ACTION_NAME)
    VALUES
    +( 'NA',+
    +'NA',+
    sys_context('USERENV', 'HOST'),
    sys_context('USERENV', 'TERMINAL'),
    sys_context('USERENV', 'SESSION_USER'),
    sys_context('USERENV', 'OS_USER'),
    SYSDATE,
    ora_sysevent);
    END IF;
    END;
    It started tracking the TRUNCATE on the table.
    Also, we we increased the length of the data types for the temporary table to avoid any insertion errors. And finally put an INSERT trigger after seeing TRUNCATE DDLs. And we thus we resolved the issue.

  • Rerunning script (DML and DDL) without ora-00001 and ora-00955 errors

    What is the best way to write a DML and DDL script so that it can be run multiple times without these ORA errors:
    ORA-00955: name is already used by an existing object
    ORA-00001: unique constraint (JILL.SYS_C00160247) violated
    I have just joined a product development company using SQL Server as there primary database. They have just completed a port to Oracle.
    Their product release upgrades (given to clients) include sql scripts with database changes (structure and data). They require that the client be able to rerun the scripts more than once with no errors. In SQL Server, the accomplish it this way.
    For DDL:
    if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[MyTab]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    Begin
         CREATE TABLE [dbo].[MyTab] (
              [ID]int IDENTITY(1,1),
              [InvID] uniqueidentifier not null
    For DML:
    IF NOT EXISTS (SELECT 1 FROM [dbo].[mytab] WHERE [Name] = 'Smith' and [ID] = 3)
    BEGIN
    INSERT INTO [dbo].[mytab]
    ([ID] ,[Name]
    VALUES (3,'Smith')
    END
    I am tasked with duplicating this logic on the Oracle side. The only way I can think of so far is using plsql and checking for existence before every insert and create statement. The other options I thought of cannot be used in this case
    - "whenever sqlerror continue" - gives the same response for all errors. True errors should stop the code, so this is too risky.
    - "log errors into ... reject limit unlimited" on the insert - I thought this was my best solution until I found out that it doesn't support lobs.
    Do you know of any more elegant (and more efficient) solution other than plsql cursors to check for existence before running each insert/create?
    Any suggestions would be greatly appreciated.

    select table_name from user_tables will give you the table exist or not.
    all_tables/dba_tables
    http://download.oracle.com/docs/cd/B14117_01/server.101/b10755/statviews_1190.htm#i1592091

  • Require DML and DDL for basic tables

    Hello,
    I want to pursue my oracle certification within 2-3 months. Therefore, I am eager to create basic tables those would provide me holistic idea and basic practices before my real test. Could you provide me basic tables for example, employee table, department table, sales table etc.with DML and DDL details? I do create plethora of DB objects when I build systems for clients; however, additionally, I intend to practice concepts whatever I will acquire after going through oracle books before certification.
    Thanks!

    Here is the sample script i took it from HR & SH Schemas.
    host echo Building Oracle demonstration tables. Please wait.
    set termout off
    DROP TABLE EMP;
    DROP TABLE DEPT;
    DROP TABLE BONUS;
    DROP TABLE SALGRADE;
    DROP TABLE DUMMY;
    DROP TABLE ITEM;
    DROP TABLE PRICE;
    DROP TABLE PRODUCT;
    DROP TABLE ORD;
    DROP TABLE CUSTOMER;
    DROP VIEW SALES;
    DROP SEQUENCE ORDID;
    DROP SEQUENCE CUSTID;
    DROP SEQUENCE PRODID;
    CREATE TABLE DEPT (
    DEPTNO NUMBER(2) NOT NULL,
    DNAME VARCHAR2(14),
    LOC VARCHAR2(13),
    CONSTRAINT DEPT_PRIMARY_KEY PRIMARY KEY (DEPTNO));
    INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');
    INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');
    INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');
    INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');
    CREATE TABLE EMP (
    EMPNO NUMBER(4) NOT NULL,
    ENAME VARCHAR2(10),
    JOB VARCHAR2(9),
    MGR NUMBER(4) CONSTRAINT EMP_SELF_KEY REFERENCES EMP (EMPNO),
    HIREDATE DATE,
    SAL NUMBER(7,2),
    COMM NUMBER(7,2),
    DEPTNO NUMBER(2) NOT NULL,
    CONSTRAINT EMP_FOREIGN_KEY FOREIGN KEY (DEPTNO) REFERENCES DEPT (DEPTNO),
    CONSTRAINT EMP_PRIMARY_KEY PRIMARY KEY (EMPNO));
    INSERT INTO EMP VALUES (7839,'KING','PRESIDENT',NULL,'17-NOV-81',5000,NULL,10);
    INSERT INTO EMP VALUES (7698,'BLAKE','MANAGER',7839,'1-MAY-81',2850,NULL,30);
    INSERT INTO EMP VALUES (7782,'CLARK','MANAGER',7839,'9-JUN-81',2450,NULL,10);
    INSERT INTO EMP VALUES (7566,'JONES','MANAGER',7839,'2-APR-81',2975,NULL,20);
    INSERT INTO EMP VALUES (7654,'MARTIN','SALESMAN',7698,'28-SEP-81',1250,1400,30);
    INSERT INTO EMP VALUES (7499,'ALLEN','SALESMAN',7698,'20-FEB-81',1600,300,30);
    INSERT INTO EMP VALUES (7844,'TURNER','SALESMAN',7698,'8-SEP-81',1500,0,30);
    INSERT INTO EMP VALUES (7900,'JAMES','CLERK',7698,'3-DEC-81',950,NULL,30);
    INSERT INTO EMP VALUES (7521,'WARD','SALESMAN',7698,'22-FEB-81',1250,500,30);
    INSERT INTO EMP VALUES (7902,'FORD','ANALYST',7566,'3-DEC-81',3000,NULL,20);
    INSERT INTO EMP VALUES (7369,'SMITH','CLERK',7902,'17-DEC-80',800,NULL,20);
    INSERT INTO EMP VALUES (7788,'SCOTT','ANALYST',7566,'09-DEC-82',3000,NULL,20);
    INSERT INTO EMP VALUES (7876,'ADAMS','CLERK',7788,'12-JAN-83',1100,NULL,20);
    INSERT INTO EMP VALUES (7934,'MILLER','CLERK',7782,'23-JAN-82',1300,NULL,10);
    CREATE TABLE BONUS (
    ENAME VARCHAR2(10),
    JOB CHAR(9),
    SAL NUMBER,
    COMM NUMBER);
    CREATE TABLE SALGRADE (
    GRADE NUMBER,
    LOSAL NUMBER,
    HISAL NUMBER);
    INSERT INTO SALGRADE VALUES (1,700,1200);
    INSERT INTO SALGRADE VALUES (2,1201,1400);
    INSERT INTO SALGRADE VALUES (3,1401,2000);
    INSERT INTO SALGRADE VALUES (4,2001,3000);
    INSERT INTO SALGRADE VALUES (5,3001,9999);
    CREATE TABLE DUMMY (
    DUMMY NUMBER );
    INSERT INTO DUMMY VALUES (0);
    CREATE TABLE CUSTOMER (
    CUSTID NUMBER (6) NOT NULL,
    NAME VARCHAR2(45),
    ADDRESS VARCHAR2(40),
    CITY VARCHAR2(30),
    STATE VARCHAR2(2),
    ZIP VARCHAR2(9),
    AREA NUMBER (3),
    PHONE VARCHAR2(9),
    REPID NUMBER (4) NOT NULL,
    CREDITLIMIT NUMBER (9,2),
    COMMENTS LONG,
    CONSTRAINT CUSTOMER_PRIMARY_KEY PRIMARY KEY (CUSTID),
    CONSTRAINT CUSTID_ZERO CHECK (CUSTID > 0));
    CREATE TABLE ORD (
    ORDID NUMBER (4) NOT NULL,
    ORDERDATE DATE,
    COMMPLAN VARCHAR2(1),
    CUSTID NUMBER (6) NOT NULL,
    SHIPDATE DATE,
    TOTAL NUMBER (8,2) CONSTRAINT TOTAL_ZERO CHECK (TOTAL >= 0),
    CONSTRAINT ORD_FOREIGN_KEY FOREIGN KEY (CUSTID) REFERENCES CUSTOMER (CUSTID),
    CONSTRAINT ORD_PRIMARY_KEY PRIMARY KEY (ORDID));
    CREATE TABLE ITEM (
    ORDID NUMBER (4) NOT NULL,
    ITEMID NUMBER (4) NOT NULL,
    PRODID NUMBER (6),
    ACTUALPRICE NUMBER (8,2),
    QTY NUMBER (8),
    ITEMTOT NUMBER (8,2),
    CONSTRAINT ITEM_FOREIGN_KEY FOREIGN KEY (ORDID) REFERENCES ORD (ORDID),
    CONSTRAINT ITEM_PRIMARY_KEY PRIMARY KEY (ORDID,ITEMID));
    CREATE TABLE PRODUCT (
    PRODID NUMBER (6) CONSTRAINT PRODUCT_PRIMARY_KEY PRIMARY KEY,
    DESCRIP VARCHAR2(30));
    CREATE TABLE PRICE (
    PRODID NUMBER (6) NOT NULL,
    STDPRICE NUMBER (8,2),
    MINPRICE NUMBER (8,2),
    STARTDATE DATE,
    ENDDATE DATE);
    INSERT INTO CUSTOMER (ZIP, STATE, REPID, PHONE, NAME, CUSTID, CREDITLIMIT,
    CITY, AREA, ADDRESS, COMMENTS)
    VALUES ('96711', 'CA', '7844', '598-6609',
    'JOCKSPORTS',
    '100', '5000', 'BELMONT', '415', '345 VIEWRIDGE',
    'Very friendly people to work with -- sales rep likes to be called Mike.');
    INSERT INTO CUSTOMER (ZIP, STATE, REPID, PHONE, NAME, CUSTID, CREDITLIMIT,
    CITY, AREA, ADDRESS, COMMENTS)
    VALUES ('94061', 'CA', '7521', '368-1223',
    'TKB SPORT SHOP',
    '101', '10000', 'REDWOOD CITY', '415', '490 BOLI RD.',
    'Rep called 5/8 about change in order - contact shipping.');
    INSERT INTO CUSTOMER (ZIP, STATE, REPID, PHONE, NAME, CUSTID, CREDITLIMIT,
    CITY, AREA, ADDRESS, COMMENTS)
    VALUES ('95133', 'CA', '7654', '644-3341',
    'VOLLYRITE',
    '102', '7000', 'BURLINGAME', '415', '9722 HAMILTON',
    'Company doing heavy promotion beginning 10/89. Prepare for large orders during
    winter.');
    INSERT INTO CUSTOMER (ZIP, STATE, REPID, PHONE, NAME, CUSTID, CREDITLIMIT,
    CITY, AREA, ADDRESS, COMMENTS)
    VALUES ('97544', 'CA', '7521', '677-9312',
    'JUST TENNIS',
    '103', '3000', 'BURLINGAME', '415', 'HILLVIEW MALL',
    'Contact rep about new line of tennis rackets.');
    INSERT INTO CUSTOMER (ZIP, STATE, REPID, PHONE, NAME, CUSTID, CREDITLIMIT,
    CITY, AREA, ADDRESS, COMMENTS)
    VALUES ('93301', 'CA', '7499', '996-2323',
    'EVERY MOUNTAIN',
    '104', '10000', 'CUPERTINO', '408', '574 SURRY RD.',
    'Customer with high market share (23%) due to aggressive advertising.');
    INSERT INTO CUSTOMER (ZIP, STATE, REPID, PHONE, NAME, CUSTID, CREDITLIMIT,
    CITY, AREA, ADDRESS, COMMENTS)
    VALUES ('91003', 'CA', '7844', '376-9966',
    'K + T SPORTS',
    '105', '5000', 'SANTA CLARA', '408', '3476 EL PASEO',
    'Tends to order large amounts of merchandise at once. Accounting is considering
    raising their credit limit. Usually pays on time.');
    INSERT INTO CUSTOMER (ZIP, STATE, REPID, PHONE, NAME, CUSTID, CREDITLIMIT,
    CITY, AREA, ADDRESS, COMMENTS)
    VALUES ('94301', 'CA', '7521', '364-9777',
    'SHAPE UP',
    '106', '6000', 'PALO ALTO', '415', '908 SEQUOIA',
    'Support intensive. Orders small amounts (< 800) of merchandise at a time.');
    INSERT INTO CUSTOMER (ZIP, STATE, REPID, PHONE, NAME, CUSTID, CREDITLIMIT,
    CITY, AREA, ADDRESS, COMMENTS)
    VALUES ('93301', 'CA', '7499', '967-4398',
    'WOMENS SPORTS',
    '107', '10000', 'SUNNYVALE', '408', 'VALCO VILLAGE',
    'First sporting goods store geared exclusively towards women. Unusual promotion
    al style and very willing to take chances towards new products!');
    INSERT INTO CUSTOMER (ZIP, STATE, REPID, PHONE, NAME, CUSTID, CREDITLIMIT,
    CITY, AREA, ADDRESS, COMMENTS)
    VALUES ('55649', 'MN', '7844', '566-9123',
    'NORTH WOODS HEALTH AND FITNESS SUPPLY CENTER',
    '108', '8000', 'HIBBING', '612', '98 LONE PINE WAY', '');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('101.4', '08-JAN-87', '610', '07-JAN-87', '101', 'A');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('45', '11-JAN-87', '611', '11-JAN-87', '102', 'B');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('5860', '20-JAN-87', '612', '15-JAN-87', '104', 'C');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('2.4', '30-MAY-86', '601', '01-MAY-86', '106', 'A');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('56', '20-JUN-86', '602', '05-JUN-86', '102', 'B');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('698', '30-JUN-86', '604', '15-JUN-86', '106', 'A');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('8324', '30-JUL-86', '605', '14-JUL-86', '106', 'A');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('3.4', '30-JUL-86', '606', '14-JUL-86', '100', 'A');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('97.5', '15-AUG-86', '609', '01-AUG-86', '100', 'B');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('5.6', '18-JUL-86', '607', '18-JUL-86', '104', 'C');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('35.2', '25-JUL-86', '608', '25-JUL-86', '104', 'C');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('224', '05-JUN-86', '603', '05-JUN-86', '102', '');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('4450', '12-MAR-87', '620', '12-MAR-87', '100', '');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('6400', '01-FEB-87', '613', '01-FEB-87', '108', '');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('23940', '05-FEB-87', '614', '01-FEB-87', '102', '');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('764', '10-FEB-87', '616', '03-FEB-87', '103', '');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('1260', '04-FEB-87', '619', '22-FEB-87', '104', '');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('46370', '03-MAR-87', '617', '05-FEB-87', '105', '');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('710', '06-FEB-87', '615', '01-FEB-87', '107', '');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('3510.5', '06-MAR-87', '618', '15-FEB-87', '102', 'A');
    INSERT INTO ORD (TOTAL, SHIPDATE, ORDID, ORDERDATE, CUSTID, COMMPLAN)
    VALUES ('730', '01-JAN-87', '621', '15-MAR-87', '100', 'A');
    INSERT INTO ITEM (QTY, PRODID, ORDID, ITEMTOT, ITEMID, ACTUALPRICE)
    VALUES ('1', '100890', '610', '58', '3', '58');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ( '1', '100861', '611', '45', '1', '45');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ( '100', '100860', '612', '3000', '1', '30');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ( '1', '200376', '601', '2.4', '1', '2.4');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ( '20', '100870', '602', '56', '1', '2.8');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ( '3', '100890', '604', '174', '1', '58');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ( '2', '100861', '604', '84', '2', '42');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ( '10', '100860', '604', '440', '3', '44');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ( '4', '100860', '603', '224', '2', '56');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ( '1', '100860', '610', '35', '1', '35');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ( '3', '100870', '610', '8.4', '2', '2.8');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ( '200', '200376', '613', '440', '4', '2.2');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ( '444', '100860', '614', '15540', '1', '35');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ( '1000', '100870', '614', '2800', '2', '2.8');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ( '20', '100861', '612', '810', '2', '40.5');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('150', '101863', '612', '1500', '3', '10');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('10', '100860', '620', '350', '1', '35');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('1000', '200376', '620', '2400', '2', '2.4');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('500', '102130', '620', '1700', '3', '3.4');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ( '100', '100871', '613', '560', '1', '5.6');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('200', '101860', '613', '4800', '2', '24');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('150', '200380', '613', '600', '3', '4');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('100', '102130', '619', '340', '3', '3.4');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('50', '100860', '617', '1750', '1', '35');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('100', '100861', '617', '4500', '2', '45');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('1000', '100871', '614', '5600', '3', '5.6');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('10', '100861', '616', '450', '1', '45');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('50', '100870', '616', '140', '2', '2.8');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('2', '100890', '616', '116', '3', '58');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('10', '102130', '616', '34', '4', '3.4');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('10', '200376' , '616', '24', '5', '2.4');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('100', '200380', '619', '400', '1', '4');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('100', '200376', '619', '240', '2', '2.4');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('4', '100861', '615', '180', '1', '45');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('1', '100871', '607', '5.6', '1', '5.6');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('100', '100870', '615', '280', '2', '2.8');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('500', '100870', '617', '1400', '3', '2.8');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('500', '100871', '617', '2800', '4', '5.6');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('500', '100890', '617', '29000', '5', '58');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('100', '101860', '617', '2400', '6', '24');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('200', '101863', '617', '2500', '7', '12.5');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('100', '102130', '617', '340', '8', '3.4');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('200', '200376', '617', '480', '9', '2.4');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('300', '200380', '617', '1200', '10', '4');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('5', '100870', '609', '12.5', '2', '2.5');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('1', '100890', '609', '50', '3', '50');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('23', '100860', '618', '805', '1', '35');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('50', '100861', '618', '2255.5', '2', '45.11');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('10', '100870', '618', '450', '3', '45');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('10', '100861', '621', '450', '1', '45');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('100', '100870', '621', '280', '2', '2.8');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('50', '100871', '615', '250', '3', '5');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('1', '101860', '608', '24', '1', '24');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('2', '100871', '608', '11.2', '2', '5.6');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('1', '100861', '609', '35', '1', '35');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('1', '102130', '606', '3.4', '1', '3.4');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('100', '100861', '605', '4500', '1', '45');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('500', '100870', '605', '1400', '2', '2.8');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('5', '100890', '605', '290', '3', '58');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('50', '101860', '605', '1200', '4', '24');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('100', '101863', '605', '900', '5', '9');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('10', '102130', '605', '34', '6', '3.4');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('100', '100871', '612', '550', '4', '5.5');
    INSERT INTO ITEM ( QTY , PRODID , ORDID , ITEMTOT , ITEMID , ACTUALPRICE)
    VALUES ('50', '100871', '619', '280', '4', '5.6');
    INSERT INTO PRICE (STDPRICE, STARTDATE, PRODID, MINPRICE, ENDDATE)
    VALUES ('4.8', '01-JAN-85', '100871', '3.2', '01-DEC-85');
    INSERT INTO PRICE (STDPRICE, STARTDATE, PRODID, MINPRICE, ENDDATE)
    VALUES ('58', '01-JAN-85', '100890', '46.4', '');
    INSERT INTO PRICE (STDPRICE, STARTDATE, PRODID, MINPRICE, ENDDATE)
    VALUES ('54', '01-JUN-84', '100890', '40.5', '31-MAY-84');
    INSERT INTO PRICE (STDPRICE, STARTDATE, PRODID, MINPRICE, ENDDATE)
    VALUES ('35', '01-JUN-86', '100860', '28', '');
    INSERT INTO PRICE (STDPRICE, STARTDATE, PRODID, MINPRICE, ENDDATE)
    VALUES ('32', '01-JAN-86', '100860', '25.6', '31-MAY-86');
    INSERT INTO PRICE (STDPRICE, STARTDATE, PRODID, MINPRICE, ENDDATE)
    VALUES ('30', '01-JAN-85', '100860', '24', '31-DEC-85');
    INSERT INTO PRICE (STDPRICE, STARTDATE, PRODID, MINPRICE, ENDDATE)
    VALUES ('45', '01-JUN-86', '100861', '36', '');
    INSERT INTO PRICE (STDPRICE, STARTDATE, PRODID, MINPRICE, ENDDATE)
    VALUES ('42', '01-JAN-86', '100861', '33.6', '31-MAY-86');
    INSERT INTO PRICE (STDPRICE, STARTDATE, PRODID, MINPRICE, ENDDATE)
    VALUES ('39', '01-JAN-85', '100861', '31.2', '31-DEC-85');
    INSERT INTO PRICE (STDPRICE, STARTDATE, PRODID, MINPRICE, ENDDATE)
    VALUES ('2.8', '01-JAN-86', '100870', '2.4', '');
    INSERT INTO PRICE (STDPRICE, STARTDATE, PRODID, MINPRICE, ENDDATE)
    VALUES ('2.4', '01-JAN-85', '100870', '1.9', '01-DEC-85');
    INSERT INTO PRICE (STDPRICE, STARTDATE, PRODID, MINPRICE, ENDDATE)
    VALUES ('5.6', '01-JAN-86', '100871', '4.8', '');
    INSERT INTO PRICE (STDPRICE, STARTDATE, PRODID, MINPRICE, ENDDATE)
    VALUES ('24', '15-FEB-85', '101860', '18', '');
    INSERT INTO PRICE (STDPRICE, STARTDATE, PRODID, MINPRICE, ENDDATE)
    VALUES ('12.5', '15-FEB-85', '101863', '9.4', '');
    INSERT INTO PRICE (STDPRICE, STARTDATE, PRODID, MINPRICE, ENDDATE)
    VALUES ('3.4', '18-AUG-85', '102130', '2.8', '');
    INSERT INTO PRICE (STDPRICE, STARTDATE, PRODID, MINPRICE, ENDDATE)
    VALUES ('2.4', '15-NOV-86', '200376', '1.75', '');
    INSERT INTO PRICE (STDPRICE, STARTDATE, PRODID, MINPRICE, ENDDATE)
    VALUES ('4', '15-NOV-86', '200380', '3.2', '');
    CREATE INDEX PRICE_INDEX ON PRICE(PRODID, STARTDATE);
    INSERT INTO PRODUCT (PRODID, DESCRIP)
    VALUES ('100860', 'ACE TENNIS RACKET I');
    INSERT INTO PRODUCT (PRODID, DESCRIP)
    VALUES ('100861', 'ACE TENNIS RACKET II');
    INSERT INTO PRODUCT (PRODID, DESCRIP)
    VALUES ('100870', 'ACE TENNIS BALLS-3 PACK');
    INSERT INTO PRODUCT (PRODID, DESCRIP)
    VALUES ('100871', 'ACE TENNIS BALLS-6 PACK');
    INSERT INTO PRODUCT (PRODID, DESCRIP)
    VALUES ('100890', 'ACE TENNIS NET');
    INSERT INTO PRODUCT (PRODID, DESCRIP)
    VALUES ('101860', 'SP TENNIS RACKET');
    INSERT INTO PRODUCT (PRODID, DESCRIP)
    VALUES ('101863', 'SP JUNIOR RACKET');
    INSERT INTO PRODUCT (PRODID, DESCRIP)
    VALUES ('102130', 'RH: "GUIDE TO TENNIS"');
    INSERT INTO PRODUCT (PRODID, DESCRIP)
    VALUES ('200376', 'SB ENERGY BAR-6 PACK');
    INSERT INTO PRODUCT (PRODID, DESCRIP)
    VALUES ('200380', 'SB VITA SNACK-6 PACK');
    CREATE SEQUENCE ORDID
    INCREMENT BY 1
    START WITH 622
    NOCACHE;
    CREATE SEQUENCE PRODID
    INCREMENT BY 1
    START WITH 200381
    NOCACHE;
    CREATE SEQUENCE CUSTID
    INCREMENT BY 1
    START WITH 109
    NOCACHE;
    CREATE VIEW SALES AS
    SELECT REPID, ORD.CUSTID, CUSTOMER.NAME CUSTNAME, PRODUCT.PRODID,
    DESCRIP PRODNAME, SUM(ITEMTOT) AMOUNT
    FROM ORD, ITEM, CUSTOMER, PRODUCT
    WHERE ORD.ORDID = ITEM.ORDID
    AND ORD.CUSTID = CUSTOMER.CUSTID
    AND ITEM.PRODID = PRODUCT.PRODID
    GROUP BY REPID, ORD.CUSTID, NAME, PRODUCT.PRODID, DESCRIP;

  • Create trigger before any DML or DDL operations on any schema objects

    Dears,
    I need to create a trigger on schema that fire before any DML or DDL operations on any object (table,view,. . . etc) in the schema.
    Can i do this, like "BEFORE insert or update or delete or drop or truncate on SCHEMA" ?
    Thanks & Regards,,

    Dear Peter,_
    Please, i need to say one thing before reading my below simple answers . . .
    You must deal with any issue from others seriously and read it carefully_
    Sorry, you haven't explained anything about your actual problem, we are still left to guessing.Not right, I was clear as i said the below notes:
    1 - I need to create a trigger on schema that fire before any DML or DDL operations on any object.
    2 - We have another simple application is connected also to DB and we must have this application but DB password is must written clear in some files and these files must be shared for business requirements.
    Since I still do not understand your problem, I can only guess of the most relevant:After all of the above clarification, still do not understand . . . How !!!
    1.9 Sweeping privileges. This is always a good exercise
    2.10 Audit and Analyse User access. Who connects as what from where (And later maybe why).
    3.8 Restrict Access from Specific Nodes OnlyYou are right but not valid in my issue.
    3.1 Remove the passwords from scriptsIt seems that you did not read my replies carefully as I said before that DB password is must be written clear in some files and these files must be shared for business requirements.
    Why not spend just a day to get some feeling of the ideas, and find the best match(es) for your situation.I am investigating in my issue a month ago and tried a lot of solutions but found that i will have to apply this trigger solution.
    If you are looking for a short answer in a public forum, I am afraid you won't find it.
    (At least not until we understand what you are trying to do, and why)I know exactly what i need and why. Read again my replies carefully and you will know also.
    Not at allSure, you still do not understand because you did not read my replies carefully !
    Dear All_
    I already created the trigger to prevent any DML or DDL on any schema objects for specific users.
    If all the users now have the super password, i can permit specific users to do (DML & DDL) and the others will not be able at all.
    As a Challenge, i can say the super password now to the public and they will not be able to do any (DML & DDL) . . . I can say now, "I succeeded" :)
    Really, thanks All for greatest support . . . Already i was benefited a lot from your advises.
    Regards,

  • List all users and other information into application

    Hi,
    In the LDAP that we use, it contains - user id and xyz_code (this code is particular to application). Note that for each user_id there exists one xyz_code.
    I can get the user id from IUser and xyz_code from an attribute app_xyz_code.
    String xyzCode = sapume.getValue("app_xyz_code",iuser, true);
    I have a requirement where I need to get user ids for a set of xyz_codes.
    1) Suppose I have 100 xyz_codes I need to get 100 users from LDAP. So 100 times I need to hit LDAP. How do i make a search in LDAP using xyz_code. Is it preferrable to make a search like this?
    2) Another thing I want to know is if it is possible to get all the users and their corresponding xyz_codes from LDAP and store them in a List/Vector/Enumeration. So that I can search in the list for user id corresponding to xyz_code.
    Any code snippets is appreciated.
    Thank you
    Karthika

    Thanks for your reply!
    I tried the following:
    $Users = get-aduser -SearchBase 'OU=Mes Utilisateurs,DC=itced,DC=lan' -filter '*'
    $OU = $User.distinguishedname -split ',',2 | select -last 1
    $output = @()
    Foreach($User in $Users){
    $budgetanalytics = Get-ADOrganizationalUnit -SearchBase $OU -Properties objectGUID
    $Object = New-Object PSObject                                       
    $Object | add-member Noteproperty user $user.name         
    $Object | add-member Noteproperty OU $OU                       
    $Object | add-member Noteproperty objectGUID $objectGUID       
    $output += $Object
    $output
    but I get the following
    user                                             
    OU                                              
    objectGUID                                      
    User1                                            
    OU=Mon OU,OU=Mes Utilisateurs,DC=itced,DC=lan    {Microsoft.PowerShell.Commands.Internal.Forma...
    User2                                            
    OU=Mon OU,OU=Mes Utilisateurs,DC=itced,DC=lan    {Microsoft.PowerShell.Commands.Internal.Forma...
    Why do I get "Microsoft.PowerShell.Commands.Internal.Forma..." instead of the actual objectGUID of the Organizational Unit
    Thanking you in advance

  • Locking All E-Business 12.1.3 application schemas

    All:
    I have a situation where an auditor has come in and we have promised to lock all the E-Business 12.1.3 app schema accounts (i.e.: AR, GL, AP, etc.). Last time I did this things did not work as expected. Is this supported? I know I can change the passwords using FNDCPASS and the ALLORACLE flag but my client would like them locked. Thanks all

    Thanks. My auditors are a bit pushy. I see that the other Categories say that they can be locked but, you are correct, Category 6 does not mention locking as one of the options. Is there in any documentation definitively that states that those accounts cannot be locked? I am sure they can't be locked but I need some sort of Oracle documentation explicitly saying it. Thanks again

  • Auditing all objects...

    currently i m working on AUDITING in Oracle 10g.2
    -- Apply the policy to the SAL column of the EMP table.
    BEGIN
    DBMS_FGA.add_policy(
    object_schema => 'AUDIT_TEST',
    object_name => 'EMP',
    policy_name => 'SAL_AUDIT',
    audit_condition => NULL, -- Equivalent to TRUE
    audit_column => 'SAL',
    statement_types => 'SELECT,INSERT,UPDATE,DELETE');
    END;
    But I want to enable a auditing for AUDIT_TEST schema and all it's objects and columns.
    BEGIN
    DBMS_FGA.add_policy(
    object_schema => 'AUDIT_TEST',
    policy_name => 'ALL_AUDIT_TEST',
    audit_condition => NULL, -- Equivalent to TRUE
    statement_types => 'SELECT,INSERT,UPDATE,DELETE');
    END;
    HOw can we enable auditing for SCHEMA and all it's objects ?
    Regards,
    Rakesh Soni
    http://rakeshocp.blogspot.com/

    Object level auditing can be enabled for specific dml and ddl operation like.
    audit delete table
    audit update table.
    Audit comes with over head so possible audit only required tables for suspicious activities.
    AUDIT SELECT on emp;
    AUDIT SELECT,delete on emp;
    http://download.oracle.com/docs/cd/B19306_01/network.102/b14266/cfgaudit.htm#i1011521

  • Ask about DML Handler for Streams at the Schema level ?

    Hi all !
    I use Oracle version 10.2.0.
    I have two DB is A (at machine A, and it used as source database) and B (at machine B - destination database). Some changes from A will apply to B.
    At B, I installed oracle client to use EMC (Enterprise Manager Console) tool to generate some script, and use them to configure Streams environment, I configured Streams at the Schema level (DML and DDL) => I successed ! But I have two problems is:
    + I write a DML Handler, called "emp_dml_handler" and want set it to EMP table only. So, I must DBMS_STREAMS_ADM.ADD_TABLE_RULES ? (I configured: DBMS_STREAMS_ADM.ADD_SCHEMA_RULES) such as:
    BEGIN
    DBMS_STREAMS_ADM.ADD_SCHEMA_RULES(
    schema_name => '"HOSE"',
    streams_type => 'APPLY',
    streams_name => 'STRMADMIN_BOSCHOSE_REGRES',
    queue_name => 'apply_dest_hose',
    include_dml => true,
    include_ddl => true,
    source_database => 'DEVELOP.REGRESS.RDBMS.DEV.US.ORACLE.COM');
    END;
    and after:
    DECLARE
    emp_rule_name_dml VARCHAR2(50);
    emp_rule_name_ddl VARCHAR2(50);
    BEGIN
    DBMS_STREAMS_ADM.ADD_TABLE_RULES(
    table_name => 'HOSE.EMP,
    streams_type => 'APPLY',
    streams_name => 'STRMADMIN_BOSCHOSE_REGRES',
    queue_name => 'apply_dest_hose',
    include_dml => true,
    include_ddl => true,
    source_database => 'DEVELOP.REGRESS.RDBMS.DEV.US.ORACLE.COM',
    dml_rule_name => emp_rule_name_dml,
    ddl_rule_name => emp_rule_name_ddl);
    DBMS_APPLY_ADM.SET_ENQUEUE_DESTINATION(
    rule_name => emp_rule_name_dml,
    destination_queue_name => 'apply_dest_hose');
    END;
    BEGIN
    DBMS_APPLY_ADM.SET_DML_HANDLER(
    object_name => 'HOSE.EMP',
    object_type => 'TABLE',
    operation_name => 'UPDATE',
    error_handler => false,
    user_procedure => 'strmadmin.emp_dml_handler',
    apply_database_link => NULL,
    apply_name => NULL);
    END;
    ... similar for INSERT and DELETE...
    I think that I only configure streams at the schema level and exclude EMP table, am i right ?
    + At the source, EMP table have a primary key. And I configured:
    ALTER TABLE HOSE.EMP ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;
    ==> So, at the destination, have some works that I must configure the substitute key for EMP table ?
    Have some ideas for my problems ?
    Thanks
    Edited by: changemylife on Sep 24, 2009 10:45 PM

    If you want to discard emp from schema rule, then just add a negative rule, either on capture or apply.
    What is the purpose of :
    DBMS_APPLY_ADM.SET_ENQUEUE_DESTINATION(
    rule_name => emp_rule_name_dml,
    destination_queue_name => 'apply_dest_hose');sound like you are enqueunig into 'apply_dest_hose' all the rows for this table that comes from ... 'apply_dest_hose'
    Next you declare a DML_HANDLER that is attached to nobody :
    BEGIN
    DBMS_APPLY_ADM.SET_DML_HANDLER(
    object_name => 'HOSE.EMP',
    object_type => 'TABLE',
    operation_name => 'UPDATE',
    error_handler => false,
    user_procedure => 'strmadmin.emp_dml_handler',
    apply_database_link => NULL,
    apply_name => NULL);           <----- nobody rules the world!
    END;the sequence of evaluation is normally :
    APPLY_PROCESS (reader)
              |
              | -->  RULE SET
                          |
                          | --> RULE .....
                          | --> RULE
                                     |
                                     | --> evaluate OK then --> exist DML_HANDLER  --> YES --> call DML_HANDLER --> on LCR.execute call coordinator
                                                                                            |
                                                                                            | NO
                                                                                            |                                                                 
                                                                                       Implicit apply (give LCR to coordinator which dispatch to one apply server)    
                                                      Since your dml_handler is attached to null apply process it will never be called by anybody and your LCR for table emp will be implicit applied by its apply process.

  • When I try to put the icon in the applications folder, it says it can't install it because this file is in use: libsoftokn3.dylib. Ihave closed all apps and I have no idea what this is.

    When I try to put the updated Firefox icon into my applications folder, I see this message:
    The operation can’t be completed because the item “libsoftokn3.dylib” is in use.
    I have closed all apps and don't understand what this refers to.
    Thanks!

    https://support.mozilla.com/en-US/questions/795198
    https://support.mozilla.com/en-US/questions/791127
    http://forums.mozillazine.org/viewtopic.php?f=38&t=1955891
    thank you

  • HT1923 This article contains the only thing that worked for me.  I also had to sign out of iCloud and uninstall it.  Then I had to delete all files and folders from all of those applications that were under Program Files, Program Files x86, and Users.

    This article contains the only thing that worked for me.  I also had to sign out of iCloud and uninstall it.  Then I had to delete all files and folders from all of those applications that were under Program Files, Program Files x86, Program Data and Users.  My iPhone 4 will now sync with iTunes both in its USB-connected  mini dock and over Wi-Fi.  It's unfortunate (negligent programming on the part of Apple?) that the upgrade to iTunes 11 did not remove all of those files as part of the upgrade process. 

    I am having the same issue....Same address for years - same as USPS - I tried 5 times (3 macs and 2 iPhones) and now i have 5 CHARGES for 1.00 each on my credit card. I took the credit card info off so they don't charge me anymore. How can they charge me yet still not allow me to download free updates and say I have an invalid address? I'm sure I will spend weeks or months trying to get a credit out of these incompetent idiots.

  • My Mac HD says that I have Quicktime Software, all that I find in my applications is Quicktime Player. And I cannot unlock Quicktime Pro in this program through its preferences.. help?

    My Mac HD says that I have Quicktime Software, all that I find in my applications is Quicktime Player. And I cannot unlock Quicktime Pro in this program through its preferences.. help?

    http://support.apple.com/kb/DL923?viewlocale=en_US&locale=en_US
    Install and register this version. It installs in the Utilities folder.

  • To run an application on iAS6sp1 on HP-Unix, while starting the kjs from command line, it gives a GDS error and crashes. Subsequently, after stopping all services and restarting iAS wouldnot come up.

     

    Hi,
    Not a problem, please post the KJS error logs for me to hunt the
    exact reason for the error.
    Thanks & Regards
    Raj
    Neel John wrote:
    To run an application on iAS6sp1 on HP-Unix, while starting the kjs
    from command line, it gives a GDS error and crashes. Subsequently,
    after stopping all services and restarting iAS wouldnot come up.
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • When downloading an application from the App Store requires a map of all. And I would like the function is deactivated

    When downloading an application from the App Store requires a map of all. And I would like the function is deactivated

    Please post in your native language. This makes no sense.

  • FM to get list of all directories and files on application server..

    Hi All,
    Can anyone tel me FM to get list of all directories and files on application server..i know 'F4_DXFILENAME_TOPRECURSION'
    and '/SAPDMC/LSM_F4_SERVER_FILE' these are working too...but my requirement is when i click F4 i should get list of directories and whn i select one of these the only directory name should display.....and whn click again for 2nd text box field i want file name ...means directory name in one text box field and file name in another....plz help me out..
    helpful answers wil b awarded.
    Thanks,
    Jayshree

    Hi Jayashree
    Please check this FM, SUBST_GET_FILE_LIST. Pass the file path and file name, if it returns an entry in table FILE_LIST, then the filename and path are valid.
    Hope this helps !
    ~ Ranganath

Maybe you are looking for

  • Not able to see GC on web.

    GC 10.2.0.1 DB : 10.2.0.4 OS : AIX 5.3 Hello Folks, I have installed GC on exisiting db, without any issue. After installation EM page is not visible on internet explorer. In emoms.log file I have got below error 2009-01-08 17:02:51,849 [XMLLoader0 7

  • Probelms while replicating Data Source and transport into test system

    I find  the following error messages whilre transporting into test system. DataSource 0EC_PCA_1 does not exist in source system of version A. Mapping between data source 0EC_PCA_1 and source system  is inconsistent. DataSource 0EC_PCA_1 does not exis

  • IPod Touch and 5G not recognized by WinXP Computers

    I am not very good at troubleshooting iPods and I thought this would be the best place to find some help. Thank you in advance for any suggestions. The problem: I have an iPod Touch and iPod 5G that are not recognized by a Windows Computer. I have tr

  • USB Wireless Access Point

    My Touch works great from home where I can access my wireless network. However, we don't have a public wireless network. We do have a dozen machines connected to the internet that are outside the company firewall available for personal use. I'm wonde

  • How to parse jsp file

    What is the way to prase a JSP file which is in the local drive using a parser inorder to extract some information?. For example : <%@ page info=" hello world " %> <html> <head><title>Hello, World</title></head> <body bgcolor="blue" > <%@ include fil