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!

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.

  • 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 ?

  • 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

  • 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.

  • 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

  • Execute multiple dml statements concurrently.

    Hi all,
    I have a requirement to execute multiple dml statements at the same time. I tried to achieve this using dbms_job, but failed.
    I scheduled 3 dbms_job at the same time. Each job has a bulk insert statement, inserting into a single target table. The 3 jobs kicked off, but there were close a minute apart.
    Is there any other way to achieve this?

    You can launch 3 separate SQL Plus sessions, but how do you execute the dml statements at the same exact time?From my desktop machine, here's how I'd do it:
    Create a dos batch file (runall.cmd for example) that looks like this:
    start some_command.cmd
    start some_command.cmd
    start some_command.cmd
    Then just double click on it. This will lauch some_command.cmd in 3 separate sessions. Each will be launched but will not wait to complete before launching the next.
    Inside the batch file, some_command.cmd, you can have whatever you want. But it will probably be sqlplus.exe with some command line options (one of them a .sql script).
    This is how I've used Tom Kite's "DIY Parallelization". But I normally would have a parameter (like a range or something) to keep the DMLs mutually exclusive.

  • How to monitor DML statements

    Hi pals,
    I want to know how i can monitor DML statements, i can able to monitor select statments but don't DML statements, is there any way or script in following format:
    Executer,Statement,%Completed,%left,Exec_Time,Time_left
    Where
    Executer is a user who runs the statement
    Statement which statement runs
    %completed how much DML operation completed
    %left how much DML operation left
    Exec_Time elapsed time
    time_left how much time remaining in complete operation
    I really apperciate you pals if you can give me some idea how this can be possible??
    Thanks in advance
    Hassan Khan

    Hi,
    These info can be found in V$SESSION_LOGOPS. But the view isn't populated for every query and sometimes it's a bit weird (I actually had queries that ouput 290% of "work" - parallel query side effect). Also notice that this is for long ops, and not everything will be reported there.
    HTH,
    Yoann.

  • How to trace every dml statement for a schema/ database

    hi,
    how to trace every dml statement for a schema/ database
    PFile Entrie
    init.ora Parameter Example event='1401 trace name errorstack, level 12';
    tkprof orcl_ora_3632.trc b.txt
    after these two steps I am not able to see the sql statements in trace ...
    Please suggest.
    Thanks & Regards,

    Hi,
    Trace Event 1401 will create a trace file and dumps the information when ORA-01401 error occurs. This error occurs when "inserted value too large for column"
    You will see the trace file getting populated only when you encounter ORA-01401 error.
    Regards

  • Golden Gate - DML statements are not replicated to target database

    Hi,
    Testing Environment
    Source:
    OS: RHEL 4.6, Database: 11gR2, Golden Gate 10.4, ASM
    extract ext1
    connection to database
    userid ggate, password qwerty
    hostname and port for trail
    rmthost win2003, mgrport 7800
    path and name for trial
    rmttrail C:\app\admin\GOLDENGATE\dirdat\lt
    EXTTRAIL /u01/oracle/goldengate/dirdat/lt
    --TRANLOGOPTIONS ASMUSER SYS@ASM, ASMPASSWORD sys ALTARCHIVELOGDEST /u03/app/arch/ORCL/archivelog
    --DDL support
    ddl include mapped objname sender.*;
    --DML
    table sender.*;
    Target:
    OS: Windows 2003, Database: 11gR2, Golden Gate 10.4
    --replicate group
    replicat rep1
    --source and target defintions
    ASSUMETARGETDEFS
    --target database login
    userid ggate, password ggate
    --file for discared transaction
    discardfile C:\app\admin\GOLDENGATE\discard\rep1_disc.txt, append, megabytes 10
    --ddl support
    DDL
    --specifying table mapping
    map sender.* ,target receiver.* ;
    I've Successfully setup Oracle Golden Gate test environment as above.
    DDL statements are replicating successfully to target database.
    while DML statements are not being replicated to target database.
    Pl. try to solve the problem
    Regards,
    Edited by: Vihang Astik on Jul 2, 2010 2:33 PM

    Almost ok but how you will handle the overlapping (transactions captured by expdp & captured by Extract too) of transactions for the new table ?
    Metalink doc ID 1332674.1 has the complete steps. Follow the "without HANDLECOLLISIONS" approach.

  • 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;
        }%

  • How to Split the message content?

    Hi ....
        I am having an input File like below format.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_ISO8583 xmlns:ns0="http://axis.com/bank_statement">
       <Field1></Field1> -
    0 to 1
       <Filed2></Filed2> -
    0 to 1
       <Filed3></Filed3> -
    0 to unbounded
    </ns0:MT_ISO8583>
    Here Field 3 is repeating many times. The value in the Field 3 has to be splitted and should be mapped to the target feilds. Field 3 will stop repeating until when the first value in the field 3 is N.
    The length of the field is 142 characters in length.
    The field should be splitted based on the following structure.
    More data flag : 1 char (u2018Yu2019/u2019Nu2019) This indicates whether there are more records for the given criteria.
    Number of statements : 2char (00 to 20) Number of statements in this fetch
    The following are repeated as many number of statements
    Transaction date : 8 char ( YYYYMMDD )
    Transaction Id : 9 char (right justified, left padded with spaces)
    Part tran serial num : 4 char (right justified left padded with spaces)
    Tran Type : 1 char ( C - Cash, T - Transfer, L - Clearing )
    Tran sub type : 2 char ( BI, CI, NP, NR)
    Debit credit indicator : 1 char ( D - Debit, C - Credit )
    Tran value date : 8 char ( YYYYMMDD )
    Transaction Amount : 17 char ( with decimal )
    Transaction particulars : 50 Char (left justified, right padded with spaces)
    Transaction Posted date : 14 char ( YYYYMMDDHHMISS )
    Instrument number : 8 char (right justified, left padded with spaces)
    Balance at the end of the transaction : 17 char ( with decimal )
    Can you help me , how to split the message content in the field3?
    Below is the sample message.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_ISO8583 xmlns:ns0="http://axis.com/bank_statement">
       <Field1>930000</Field1>
       <Filed2>234259901406</Filed2>
       <Filed3><Y0820090127S275433861005TBIC20090127 4872.14EDC/212-213-/M000044375340045 20090127151 959 32663.7620090127S278456264276TBIC20090127 5290.45EDC/214-215-/M000044375340045 20090127205840 37954.2120090131S299799314797TBIC20090131 1883.88EDC/216-216-/M000044375340045 20090131104028 39838.0920090202S31532814 662TBIC20090202 3105.37EDC/217-217-/M00004 4375340045 20090202121514 42943.4620090205S337981634779TBIC20090205 2052.20EDC/2 18-218-/M000044375340045 20090205104040 44995.6620090205 M53898 1CNPD20090205 42000.00TO CASH/SELF 20090205111633 12824 2995.6620090207S354072734740TBIC20 090207 4429.21EDC/219-219-/M000044375340045 20090207112958 7424.8720090209S3671 72631419TB Field 126: IC20090209 7161.55EDC/220-221-/M000044375340045 20090209122637 14586. 42]]></Filed3>
       <Filed3><Y0820090127S275433861005TBIC20090127 4872.14EDC/212-213-/M000044375340045 20090127151 959 32663.7620090127S278456264276TBIC20090127 5290.45EDC/214-215-/M000044375340045 20090127205840 37954.2120090131S299799314797TBIC20090131 1883.88EDC/216-216-/M000044375340045 20090131104028 39838.0920090202S31532814 662TBIC20090202 3105.37EDC/217-217-/M00004 4375340045 20090202121514 42943.4620090205S337981634779TBIC20090205 2052.20EDC/2 18-218-/M000044375340045 20090205104040 44995.6620090205 M53898 1CNPD20090205 42000.00TO CASH/SELF 20090205111633 12824 2995.6620090207S354072734740TBIC20 090207 4429.21EDC/219-219-/M000044375340045 20090207112958 7424.8720090209S3671 72631419TB Field 126: IC20090209 7161.55EDC/220-221-/M000044375340045 20090209122637 14586. 42]]></Filed3>
       <Filed3><Y0820090127S275433861005TBIC20090127 4872.14EDC/212-213-/M000044375340045 20090127151 959 32663.7620090127S278456264276TBIC20090127 5290.45EDC/214-215-/M000044375340045 20090127205840 37954.2120090131S299799314797TBIC20090131 1883.88EDC/216-216-/M000044375340045 20090131104028 39838.0920090202S31532814 662TBIC20090202 3105.37EDC/217-217-/M00004 4375340045 20090202121514 42943.4620090205S337981634779TBIC20090205 2052.20EDC/2 18-218-/M000044375340045 20090205104040 44995.6620090205 M53898 1CNPD20090205 42000.00TO CASH/SELF 20090205111633 12824 2995.6620090207S354072734740TBIC20 090207 4429.21EDC/219-219-/M000044375340045 20090207112958 7424.8720090209S3671 72631419TB Field 126: IC20090209 7161.55EDC/220-221-/M000044375340045 0090209122637 14586. 42]]></Filed3>
       <Filed3><N0820090127S275433861005TBIC20090127 4872.14EDC/212-213-/M000044375340045 20090127151 959 32663.7620090127S278456264276TBIC20090127 5290.45EDC/214-215-/M000044375340045 20090127205840 37954.2120090131S299799314797TBIC20090131 1883.88EDC/216-216-/M000044375340045 20090131104028 39838.0920090202S31532814 662TBIC20090202 3105.37EDC/217-217-/M00004 4375340045 20090202121514 42943.4620090205S337981634779TBIC20090205 2052.20EDC/2 18-218-/M000044375340045 20090205104040 44995.6620090205 M53898 1CNPD20090205 42000.00TO CASH/SELF 20090205111633 12824 2995.6620090207S354072734740TBIC20 090207 4429.21EDC/219-219-/M000044375340045 20090207112958 7424.8720090209S3671 72631419TB Field 126: IC20090209 7161.55EDC/220-221-/M000044375340045 20090209122637 14586. 42]]></Filed3>
    </ns0:MT_ISO8583>
    Thanks & Regards,
    Leela

    using substring to get values you want, and map to corresponding target nodes except:
       fields3 ->count->Number of statement
    Regards.
    Liang

  • Can we do Dml statements on materialize views

    I want to know can we do Dml statements on materialize views .If yes, how

    Can you? Maybe. Depends on how you created the materialized view. Should you? Maybe. Are you running a multi-master environment? Or are you using materialized views for one-way replication? If you are doing one-way replication, do you want your DML changes to be retained beyond the next refresh of the materialized view?
    Justin

  • Sir,how to find the last DML operations

    Hi,
    Please tell me how to find the last DML Operations at least minimum 30 queries.
    Thanks in advance,

    Shared Pool is a memory location in SGA that contains SQL Statement that are submitted to Oracle for execution. This area is common to the entire database. Its not specific to user.
    So what ever Unique SQL statement that is submitted to the SQL Engine will be available here. Shared Pool has a size limit. That is defined by the parameters SHARED_POOL_SIZE and SHARED_POOL_RESERVED_SIZE. So when the Shared pool becomes full the data needs to be removed from it. That is done in FIFO basis.
    Oracle provides a visibility to this area through dictionary view V$SQLAREA. So this view will not only contain the SQL executed by you but also by every one. Even the one executed by oracle itself.
    So in my opinion what you are asking is not possible to get. You must have some logging mechanism in your application to get this information.

  • Constructing Database Update DML Statements

    This is a very common problem I am sure but want to know how others handle it. I am creating a web application via Servlets and JSPs. I am working with Oracle 10g.
    Here's the problem/question.
    When I present an html form to a user to update an existing record, how do I know what has changed in the record to create the dml statement? I could just update the entire record with the values supplied via the POST data on submit but that does not seem right since maybe only 1 out of 10 fields actually changed. This would also write needless audit and logging information to the database. I have thought about comparing the Request parameters sent with the post with the original java bean used to populate the form in the first place by adding it back to the request as an attribute. Is this the only way to do it or is there a better way?
    Thanks everyone,
    -Brian

    What database drivers are you using? I recall there being some bug in
    sp2 that caused delayed transaction commits for a very specific
    combination of transaction settings and database drivers.
    I think it was third-party type II Oracle drivers and local
    transactions, but I'm not sure.
    In any case, I'd contact support as there is a patch available.
    David
    Gurjit wrote:
    Hi all,
    I have posted something of this sort earlier too. The problem is that
    the database is not reflecting what has been updated using queries from the
    application.
    THe structure of the application is as follows.
    DB = Oracel 8.1.6
    Web Server = iPlanet 4.0
    App Server = iPlanet 6.0 sp2
    The database is connected to via the EJB's. No Database transactions are
    being used except for Bean transactions which are container managed. The
    setAutoCommit flag is set to true. Each query is a transaction. The jsp's
    call these ejb's through wrapper classes. As stated earlier the database
    updates (Inserts, update, delete statements) are not getting reflected in
    the database immediately. The updates happen after a gap of about 7-10
    minutes. Why is this sort of behaviour coming up. This is almost like batch
    updates happening on the database. Is there a setting in IPlanet for
    removing this kind of problem.
    Regards,
    Gurjit

Maybe you are looking for

  • Can you use a network share as location for users' home

    I am running a Mac mini with Mountain Lion and Server.app as a home server. For added storage space I have a NAS. I would like to set up the open directory network users' home share on the NAS. Is that even possible? I am able to mount the network sh

  • Disable alert and dialog box in vb script

    Pls. help to disable the alert and dialog box for indesign CS3 in vb script? I have try to add the following code to my vb script: myIndesign.ScriptPreferences.UserInteractionLevel=1699640946 (Indesign still display missing Link alert box) myIndesign

  • How to append a gif to another gif in adobe photosop cs5 extended???

    like i have two gif files and i need to apppend 2 gif file at the end of 1st gif file,,so that i 'll a single gif.

  • Customizing parent folder link options in DiscussionForum Layout set

    Hi All, I have created a forum page with discussionForum layout set.Now, it shows the discussion groups inside it with parent folder link at the top.this parent folder link has some options like view,coolaboration,details etc which I need to customiz

  • Itu00B4s possible use a bapi inside a macro?

    Hello APO experts!! We need to create a macro that will have to get the values of the independent demand of some sku´s and check the capacity of the productive resources...if the demand is less than the capacity, more demand (independent necessities)