To Capture the DDL and DML statement

Hi,
I have one requirement to capture all the statement (DDL & DML),which will perform on the table.
How can i do implement the same?
Please assit me .
Thanks

I have to capture exact SQL statement along with literal value and to store in a certain table.

Similar Messages

  • Auditing DDL and DML statements of selective IP addresses....

    Hi all,
    DB : 11.2.0.2 64 bit
    OS : RHEL 5.7 64bit
    Hi all,
    I want to audit all DDL and DML statements for some selective IP Addresses or hostnames.
    I read about Fine Grained Audit. I got the following code to enable auditing of nondatabase user's actions(Application users).
    created policy for client identifier.......
    BEGIN
    DBMS_FGA.ADD_POLICY(OBJECT_SCHEMA => 'OE',
    OBJECT_NAME => 'ORDERS',
    POLICY_NAME => 'ORDERS_FGA_POL',
    AUDIT_CONDITION => 'SYS_CONTEXT(''USERENV'', ''CLIENT_IDENTIFIER'') = ''Robert''',
    HANDLER_SCHEMA => NULL,
    HANDLER_MODULE => NULL,
    ENABLE => True,
    STATEMENT_TYPES => 'INSERT,UPDATE,DELETE,SELECT',
    AUDIT_TRAIL => DBMS_FGA.DB + DBMS_FGA.EXTENDED,
    AUDIT_COLUMN_OPTS => DBMS_FGA.ANY_COLUMNS);
    END;
    But I want to audit all DDL and DML statements for a particular schema say ABC from selective IP addresses or hostnames so how can I do this?
    Pl suggest.....
    Regards,
    Andy.

    Hi,
    You could :
    1. create a function, say myfunction, returning 1 if you want to audit, 0 otherwise
    This function would test sys_context('userenv','ip_address') within the desired IP address to be audited
    2. create your fga on the objects you want to audit adding the clause audit_condition=>'myfunction=1'
    Nicolas.

  • HR Schema DDL and DML Statements

    Dear all,
    I want all tables and datas for practicing purpose.(HR Schema)
    In Oracle site where can I get these DDL and DML Statements.
    Can Any one post all statements..
    Thanks in advance.

    Unlocking the Sample Tables
    The Human Resources (HR) Sample Schema is installed as part of the default Oracle Database installation. The HR account is locked by default.
    You need to unlock the HR account before you can use the HR sample schema. To unlock the HR account, log in as the SYSTEM user and enter the following command, where your_password is the password you want to define for the user HR:
    ALTER USER HR IDENTIFIED BY your_password ACCOUNT UNLOCK;
    For further information about unlocking the HR account, see the Oracle Database Sample Schemas guide. The HR user is primarily to enable you to access the HR sample schema and is necessary to enable you to run the examples in this guide.
    Each table in the database is "owned" by a particular user. You may wish to have your own copies of the sample tables to use as you try the examples in this guide. To get your own copies of the HR tables, see your DBA or see the Oracle Database Sample Schemas guide, or you can create the HR tables with the script HR_MAIN.SQL which is located in the following directory on UNIX:
    $ORACLE_HOME/DEMO/SCHEMA/HUMAN_RESOURCES/HR_MAIN.SQL
    And on the following directory on Windows:
    %ORACLE_HOME%\DEMO\SCHEMA\HUMAN_RESOURCES\HR_MAIN.SQL
    To create the HR tables from command-line SQL*Plus, do the following:
    1.
    Ask your DBA for your Oracle Database account username and password.
    2.
    Login to SQL*Plus.
    3.
    On UNIX, enter the following command at the SQL*Plus prompt:
    SQL> @?/DEMO/SCHEMA/HUMAN_RESOURCES/HR_MAIN.SQL
    On Windows, enter the following command at the SQL*Plus prompt:
    SQL> @?\DEMO\SCHEMA\HUMAN_RESOURCES\HR_MAIN.SQL
    To remove the sample tables, perform the same steps but substitute HR_DROP.SQL for HR_MAIN.SQL.
    Regards
    Asif Kabir

  • IP based restriction on DDL and DML statement

    Hi
    I am working oracle 10g daabase.I want to restrict a specific IP for all DML and DDL and the that particular IP should have only select only rights.Kindly let me know if its possible?
    Regards
    Vijay

    Dear friends,
    To be more clear on my requirement,i will explain you entire scenerio.
    Example
    There is person called John,and in a database BANK,there is are
    3 schemas called
    1) ABC (This schema has full privileges on its own schemas)
    2) DEF (This schema has full privileges on its own schemas)
    3) XEF (This schema has full privileges on its own schemas)
    The priveleges of ABC,DEF and XEF cannot be reduced as they are related to application functiaonality,and any
    change in the same will affect the application modules.Neither can we change the passwords for the above schemas,because this needs a bigger activity by incorporating the new password in all applications files.
    Mr John has login creditanals for all there schemas i.e ABC,DEF and XEF.And thus he has full privileges on this schemas.
    So we want John's IP with restriction of only select on this schemas.
    In this example Mr john is the application vendor,and we would give him access to single IP for just one day.
    Regards
    Vijay

  • How to Track DDL and DML Operations happening in Backend into Log Files....

    Hi I have one requirement for Tracking the DDL And DML Operation happening in Backend once the user Inserts or Updates any Table.How to Implement the same can anyone proviode the code for the same.
    Ex: I have multiple tables in my database if any user fires the DDL or DML it should make entry in the Log file as
    Name of the Table Operation Timestamp
    X Insert DD-MM-YYYY HH24:MM:SS
    Y Update DD-MM-YYYY HH24:MM:SS
    Z Delete DD-MM-YYYY HH24:MM:SS
    L Select DD-MM-YYYY HH24:MM:SS
    Is it Possible to Develop it through Procedure,Function or Package,please give me Idea,,,,,

    Please do not post same question in multiple forum. How to Track DDL and DML Operations happening in Backend into Log Files....
    What's wrong with the answers posted in the above forum ? Do you go through the "AUDIT" option as suggested in the above post by various members ?

  • How to Split ddl or dml statement

    Hi guys,
    i'm using oracle 11.2
    i've the following question.
    i've a string that can contains multiple ddl or dml statement and i need to split them in more statement.
    i.e. i can have a string like the below and i need 2 string each one with a statement:
    insert into TEST_KIT_USER1.table1 values (1,'a');
    insert into TEST_KIT_USER1.table1 values (2,'b');
    otherwise i can have a string like the below and i need 2 string each one with a statement:
    create table TEST_KIT_USER1.table2
    name char(10),
    surname CHAR(10 BYTE)
    create table TEST_KIT_USER1.table3
    id number,
    description CHAR(10 BYTE)
    is there a simple way to do this?

    Have you tried using iMovie?
    I know that iMovie HD '06 can do this, I'm not sure if '08 can.
    If you have iLife '08, you can download iMovie HD '06 from apple's site here.
    Good luck!

  • DDL and DML

    hey
    the method executeQuery will return ResultSet then i can use this resultSet to show result but with this method i can't excute the ddl commands (del , insert,..etc)
    executeUpdate can do both , but will not return ResultSet that i use to show result...
    how can i see the results if i use resultUpdate ?
    do i need to creat 2 different methods one to select and one for ddl , or i can use one that will do both ?
    thx

    hey
    the method executeQuery will return ResultSet then i
    can use this resultSet to show result but with this
    method i can't excute the ddl commands (del ,
    insert,..etc)Right.
    >
    executeUpdate can do both , No, just INSERT/UPDATE/DELETE and DML statements.
    but will not return
    ResultSet that i use to show result...If a tree falls in the forest...If you can't get your ResultSet, the method can't do SELECTs.
    executeUpdate can't do both, but execute can. Read more of the javadocs.
    how can i see the results if i use resultUpdate ?
    do i need to creat 2 different methods one to select
    and one for ddl , or i can use one that will do both
    ?Here's how I've done it (just the method, not the entire class):
         * Execute ANY SQL statement
         * @param SQL statement to execute
         * @returns list of row values if a ResultSet is returned,
         * OR an altered row count object if not
         * @throws SQLException if the query fails
        public Object executeSQL(final String sql) throws SQLException
            Object returnValue;
            Statement statement = null;
            ResultSet rs = null;
            try
                statement = this.connection.createStatement();
                boolean hasResultSet    = statement.execute(sql);
                if (hasResultSet)
                    rs                      = statement.getResultSet();
                    ResultSetMetaData meta  = rs.getMetaData();
                    int numColumns          = meta.getColumnCount();
                    List rows               = new ArrayList();
                    while (rs.next())
                        Map thisRow = new LinkedHashMap();
                        for (int i = 1; i <= numColumns; ++i)
                            String columnName   = meta.getColumnName(i);
                            Object value        = rs.getObject(columnName);
                            thisRow.put(columnName, value);
                        rows.add(thisRow);
                    returnValue = rows;
            else
                int updateCount = statement.getUpdateCount();
                returnValue     = new Integer(updateCount);
            finally
                close(rs);
                close(statement);
            return returnValue;
        }%

  • DDL and DML tool for unicode

    Which tool is able to maninupalate UTF-8 encoded data saved in Oracle database?
    (execute DDL and DML commands with non latin text)

    Hi,
    You can easily create your own scripts for creation (and even deletion/drop) of tables and inserts made to those tables. You just need to put the statements in a notepad and save it with a .sql extension. Then run this file from a SQL prompt with @ sign. For example
    SQL >@"c:myscript.sql" .
    Hope this helps
    Regards
    Aditi

  • Will Materialized view log reduces the performance of DML statements on the master table

    Hi all,
    I need to refresh a on demand fast refresh Materialized view in Oracle 11GR2. For this purpose I created a Materialized view log on the table (Non partitioned) in which records will be inserted @ rate of 5000/day as follows.
    CREATE MATERIALIZED VIEW LOG ON NOTES NOLOGGING WITH PRIMARY KEY INCLUDING NEW VALUES;
    This table already has 20L records and adding this Mview log will reduce the DML performance on the table ?
    Please guide me on this.

    Having the base table maintain a materialised view log will have an impact on the speed of DML statements - they are doing extra work, which will take extra time. A more sensible question would be to ask whether it will have a significant impact, to which the answer is almost certainly "no".
    5000 records inserted a day is nothing. Adding a view log to the heap really shouldn't cause any trouble at all - but ultimately only your own testing can establish that.

  • When creating a custom SearchPlugin, is it possible to add more code such as uppercase conversion of the SearchText and IF statements that change the URL depending on what is typed?

    When creating a custom SearchPlugin, is it possible to add more code such as uppercase conversion of the searchTerms and IF statements that change the URL depending on the searchTerms? Every time I try to add something firefox doesn't want to add it as a search plugin. I need to create a more powerful search tool for personal use.

    I've found some external software applications that will do it, so that leads me to believe its not possible within ID CC.

  • How to capture the date and time of  a background job

    Hi experts,
    How to capture the date and time of  a background job?
    How to find whether it is runned succesfully or not?
    If it is not successful how to put error message?
    ASAP
    Thanx in advance,
    Sudha

    To Display the STATUS of the JOB which is exectued in background
      CLEAR : wa_jobsteplist.
      REFRESH : i_jobsteplist.
      WRITE:/ 'DISPLAYING JOB STATUS'.
      CALL FUNCTION 'BP_JOB_READ'
        EXPORTING
          job_read_jobcount           = w_jobcount
          job_read_jobname            = w_jobname
          job_read_opcode             = '20'
        JOB_STEP_NUMBER             =
       IMPORTING
         job_read_jobhead            = wa_jobhead
       TABLES
         job_read_steplist           = i_jobsteplist
    CHANGING
       RET                         =
       EXCEPTIONS
         invalid_opcode              = 1
         job_doesnt_exist            = 2
         job_doesnt_have_steps       = 3
         OTHERS                      = 4
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    To Display the status text as per the status type
      CASE wa_jobhead-status.
        WHEN 'S'. WRITE: / 'Scheduled'.
        WHEN 'R'. WRITE: / 'Released'.
        WHEN 'F'. WRITE: / 'Completed'.
        WHEN 'A'. WRITE: / 'Cancelled'.
        WHEN OTHERS.
      ENDCASE.

  • Can we capture the video and audio using cam and microphone in Edge Animate?

    Hi Everyone,
    I got a new requirement from the client to create a HTML5 based functionality through which one can capture the video and audio using his web-cam/camcorder and microphone. I have researched on internet and found that there is api available (not reliable) http://www.html5rocks.com/en/tutorials/getusermedia/intro/ . I am not a coder by profession and use Edge animate to create HTML 5 based animations and stuff like that. Another problem which i have found that the api only works well with Chrome and Opera and not with Mozilla, IE..
    Can anybody help me out in this, please...
    Thanks & Warm Regards
    Vikas

    Hi, Vikas-
    After a brief bit of research, you're definitely hitting upon the limitation of the browsers.  Not all of the browsers have implemented this part of the HTML5 standard, so you're going to either have to use Flash or be limited to these specific browsers.
    Thanks,
    -Elaine

  • TS1702 Why are my apps updates and apps remaining in the "waiting" and "pause" state?

    I get update notices for my apps but when I click to update my apps remain in the "waiting" and "Pause" state.
    I have tried powering down my phone and restarting it to see if that will resovle the problem but it's not correcting the problem.
    I have deleted several apps just to remove them. 
    Anyone have any suggestions?
    Glam33

    Try tapping the App, so that it changes to Paused instead of Waiting, then tap it again to resume the install.
    Make sure you don't have any paused downloads in other apps either, like the iTunes Store.
    You can also try resetting or restoring the iPhone.
    And, if that doesn't do it, try contacting Apple through Express Lane.

  • Capture the x and y position of a rectangle

    Hi,
    I'm working on a letting a user draw a rectangle to define a position on the stage. Te rectangle draws out ok. My problem is that I need to convert this dimensions and position of the rectangle in dynamic text. Plus, I need to make a way for the user to save these values into a text file.
    Right now, I am able to capture the width and height, however, I can't seem to capture the x and y coordinates of the rectangle. I'd like to get the position of the top left corner if possible.
    Here is what I have so far-
    //Draws the final rectangle and logs the size and position
    var hasRect: Boolean = false;
    var rectHeight: Number;
    var rectWidth: Number;
    var rectXPos: Number;
    var rectYPos: Number;
    imprintHeightLabel.text = "Imprint Height: 0";
    imprintWidthLabel.text = "Imprint Width: 0";
    imprintXPosLabel.text = "Imprint X Position: 0";
    imprintYPosLabel.text = "Imprint Y Position: 0";
    function mUp(MouseEvent):void
    mouseHolding = false;
        if(hasRect == false)
        myDrawing.graphics.lineStyle(2, 0xFF0000, 1);
        myDrawing.graphics.beginFill(0xFF0000, 0.2);
        myDrawing.graphics.drawRect(clickedX, clickedY, mouseX-clickedX, mouseY-clickedY);
        myDrawing.graphics.endFill();
        hasRect = true;
        clearTemp();
        rectHeight = myDrawing.height;
        rectWidth = myDrawing.width;
        rectYPos = myDrawing.y;
        rectXPos = myDrawing.x;
        if(hasRect == true)
            imprintHeightLabel.text = "Imprint Height: " + rectHeight;
            imprintWidthLabel.text = "Imprint Width: " + rectWidth;
            imprintXPosLabel.text = "Imprint X Position: " + rectXPos;
            imprintYPosLabel.text = "Imprint Y Position: " + rectYPos;
        else
            imprintHeightLabel.text = "Imprint Height: 0";
            imprintWidthLabel.text = "Imprint Width: 0";
            imprintXPosLabel.text = "Imprint X Position: 0";
            imprintYPosLabel.text = "Imprint Y Position: 0";

    Here is what I did to get the top left corner. Now, I am trying to populate that value of the x position into a number stepper and then allow adjustments, but it's not working. I've managed to stave off the IO errors I was receiving, though.
    What I want to do is let the user draw a rectangle. Then find the x and y position of the top left cornder of the rectangle along with the rectangle's height and width. These 4 values are updating in dynamic text fields. All of this works now.
    However, I want to make it so the user can see the values update in numeric steppers and allow the user to use the numeric steppers to make tweaks. Eventually I want the user to select and place the rectangle too.
    Here is what I have so far. The numeric stepper sets to it's default value in the variable, but that's all I've got so far.
    import flash.display.Sprite;
    import fl.controls.NumericStepper;
    //Draws a transluscent rectangle
    var temporaryDrawing:Shape = new Shape();
    addChild(temporaryDrawing);
    temporaryDrawing.graphics.lineStyle(2, 0x666666, 1);
    var myDrawing:Shape = new Shape();
    addChild(myDrawing);
    myDrawing.graphics.lineStyle(2, 0xFF0000, 1);
    var mouseHolding:Boolean = false;
    var clickedX:Number;
    var clickedY:Number;
    stage.addEventListener(MouseEvent.MOUSE_DOWN, mDown);
    stage.addEventListener(MouseEvent.MOUSE_UP, mUp);
    var clickDownY:Number = new Number;
    var clickDownX:Number = new Number;
    function mDown(e:MouseEvent):void
    var tempDownX:Number = new Number;
    var tempDownY:Number = new Number;
         tempDownX = e.stageX;
         tempDownY = e.stageY;
         clickDownY = tempDownY;
         clickDownX = tempDownX;
        myDrawing.graphics.clear();
        hasRect = false;
        mouseHolding = true;
        clickedX = mouseX;
        clickedY = mouseY;
    //Draws the final rectangle and logs the size and position
    var hasRect: Boolean = false;
    var rectHeight: Number;
    var rectWidth: Number;
    var rectXPos: Number;
    var rectYPos: Number;
    imprintHeightLabel.text = "Imprint Height: 0";
    imprintWidthLabel.text = "Imprint Width: 0";
    imprintXPosLabel.text = "Imprint X Position: 0";
    imprintYPosLabel.text = "Imprint Y Position: 0";
    var clickUpX: Number = new Number;
    var clickUpY: Number = new Number;
    var absYPos: Number = new Number;
    var absXPos: Number = new Number;
    function mUp(e:MouseEvent):void
         var tempUpX:Number  = new Number;
            var tempUpY:Number = new Number;
         tempUpX = e.stageX;
         tempUpY = e.stageY;
         clickUpY = tempUpY;
         clickUpX = tempUpX;
        mouseHolding = false;
        //compares the mouse_down and mouse_up to see which one creates the top left corner position
        if(hasRect == false)
            myDrawing.graphics.lineStyle(2, 0xFF0000, 1);
            myDrawing.graphics.beginFill(0xFF0000, 0.2);
            myDrawing.graphics.drawRect(clickedX, clickedY, mouseX-clickedX, mouseY-clickedY);
            myDrawing.graphics.endFill();
            hasRect = true;
            clearTemp();
                //Comparison Determines if the "ClickUp or ClickDown is at the top left corner
                if(clickDownY < clickUpY)
                    absYPos = clickDownY;
                else if (clickDownY > clickUpY)
                    absYPos = clickUpY;
                if(clickDownX < clickUpX)
                    absXPos = clickDownX;
                else if (clickDownX > clickUpX)
                    absXPos = clickUpX;
                rectHeight = myDrawing.height;
                rectWidth = myDrawing.width;
                rectYPos = absYPos;
                rectXPos = absYPos;
                if(hasRect == true)
                    imprintHeightLabel.text = "Imprint Height: " + rectHeight;
                    imprintWidthLabel.text = "Imprint Width: " + rectWidth;
                    imprintXPosLabel.text = "Imprint X Position: " + absXPos;
                    imprintYPosLabel.text = "Imprint Y Position: " + absYPos;
                else
                    imprintHeightLabel.text = "Imprint Height: 0";
                    imprintWidthLabel.text = "Imprint Width: 0";
                    imprintXPosLabel.text = "Imprint X Position: 0";
                    imprintYPosLabel.text = "Imprint Y Position: 0";
    stage.addEventListener(MouseEvent.MOUSE_MOVE, mMove);
    function mMove(MouseEvent):void
        if (mouseHolding)
            if(hasRect == false)
            clearTemp();
            temporaryDrawing.graphics.drawRect(clickedX, clickedY, mouseX-clickedX, mouseY-clickedY);
    function clearTemp():void
        temporaryDrawing.graphics.clear();
        temporaryDrawing.graphics.lineStyle(2, 0x666666, 1);
    xPosAdj.addEventListener(Event.CHANGE, adjustXPosition);
    var stepperValue: Number = new Number;
    function adjustXPosition(Evt:Event):void
        stepperValue = xPosAdj.value;
        if (hasRect == true)
            stepperValue = rectXPos;
        else
            stepperValue = 0;

  • URGENT !! Capture the insert and select on database

    Hi,
    I need to capture the inserts and selects on the database.
    What are the options available on 9i?
    Thanks in advance!

    I don;t know how many times I've had to say this, but since I've had to say it to my boss, it bears repeating here:
    The SPFILE makes absolutely zero, null, nought difference to whether or not something is changeable dynamically or not. Not one bit, one whit or one iota.
    Parameters are as static or as dynamic as they were when init.oras rules the roost. Check in V$PARAMETER: if the thing says ISSYSMODIFIABLE is TRUE, then the parameter can be altered with an alter system command -and that's true whether you're using an init.ora or an spfile. If it says ISSYSMODIFIABLE=FALSE, then the parameter CANNOT be altered with an alter system command, and that's true whether you're using an init.ora or an spfile.
    Now comes the subtlety: if you add SCOPE=SPFILE to your alter system command then you aren't actually altering the system at all. All you're doing is asking the instance to edit the spfile. So an alter system set db_block_size=67238 scope=spfile will work, because you're not actually asking to alter the current block size at all. You're merely asking the instance to do what you would otherwise have done with notepad or gedit to a traditional init.ora.
    Only if you SCOPE=MEMORY is your alter system command actually trying to change the currently running instance.
    Of course, the trouble starts when you miss off a SCOPE clause, because then you get SCOPE=BOTH, which means MEMORY+SPFILE. But try that on a parameter which is SYSMODIFIABLE=FALSE: it won't work, because the MEMORY bit trips over the fact that the parameter is not system (dynamically) modifiable. Which just goes to prove that the existence of an SPFILE changes ABSOLUTELY NOTHING about whether a parameter can be dynamically modified or not.
    So no, the sentence "my database is using spfile and I have option to use alter system command" makes zero sense if, by it, you mean "I'm using an spfile so can I change things dynamically which I wouldn't be allowed to if I was stuck using a boring old init.ora"
    The answer is always and forever, "NO"!
    I blame a certain bouffant-haired so-called expert for first promulgating this myth that all parameters suddenly became dynamic in the presence of an spfile. It was never true when he wrote it. It isn't true now. It never will be true. It just happens to be the case that "alter system..scope=spfile" is Oracle's equivalent of "vi init.ora" as far as spfiles are concerned.

Maybe you are looking for

  • Unable to check status of Warranty Return

    ) Hi, I recently organised a return for my Zen x-fi 32gb (around 3 weeks ago) Since then I haven't heard anything, so I've tried on numerous occasions to input my RMA number in the 'check status' page but it always tells me it isn't an RMA number, ev

  • FSCM 6.0 and PI

    Hello Experts, We are planning to implement FSCM 6.0 Credit Management and in our scenario Credit Management ,FI-AR,FI-CA and SD are on same system and same client.I have gone through the installation Note 859998 - Installing SAP Credit Management 6.

  • Runtime Error when generating Backend Adapter

    Hi All, I have a problem when im trying to generate a backend adapter for a data object with two nodes. it is just a simple data object with a root node and a child node having sales order header data & item data. when im trying to activate i get a r

  • Downloaded files aren't on my computer (searched everywhere)

    Hi, I am having trouble with some PDF files I downloaded. Completely downloaded about 12 files I needed, but from the download viewer I only moved the 4 I needed to work with into a folder. I figured the rest were stored in some temporary folder and

  • Item Category Lov

    Hi Forum, I have a requirement to modify the lov for the Category field in the Enter Requisition form and add a new field. The item is in the block :LINES.ITEM_CATEGORY. I looked at the form item and its a Text Item with a Lov 'ENABLE_LIST_LAMP' and