Database got halted while inserting rows

I have a 9i database running on solaris not restarted for 15 days.It just got halted or hanged while inserting rows in a table.When restarted everything is just fine and those rows have been inserted in no time!!What might be the reason?Dont tell me 'lock' because I have already checked for ora:60 error in alertlog.Would you please give some direction to drill it down .

Did you met the problem , only when you inserting the rows ? Or is there something else which leads this situation ? most of the occasion when
you found your database halt is because of your archivelogs . I would
still like to know if you running your db in archivelog mode ? It also be the
case that you set archive_log_start = true in the pfile and diden't fire
alter database archivelog at the sql prompt .
Hare Krishna
Alok

Similar Messages

  • Primary Key Conflicts While Inserting Rows

    Hi,
    I am inserting some rows into a table which has primary key constraints on columns 1,2,3. I have set the key columns in my program to 1,2,3. When I try to insert a row it throws a syncresolver exception stating that there is a key conflict. But i don't understand why it is doing this because there is no conflict. I can remove the primary key constraints off the sql table (but still leave them on in the program) and it will insert everything correctly.
    Any ideas?
    Thanks

    Using SQL Server 2005 Drivers.
    import java.sql.*;
    import javax.sql.rowset.*;
    import com.sun.rowset.*;
    public class TestDB {
         public static void main(String[] args){
              String connectionUrl = "jdbc:sqlserver://DBSERVER;DatabaseName=fTrack;user=sa;password=1234";
              // Declare the JDBC objects.
              Connection con = null;
              CachedRowSet crs = null;
              int keys[] = {1,2,3};
              try {
                   // Establish the connection.
                   Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
                   con = DriverManager.getConnection(connectionUrl);
                   // Create and execute an SQL statement that returns some data.
                   String SQL = "SELECT * FROM pt_OMS_Data WHERE Switch=4";
                   crs = new CachedRowSetImpl();
                   crs.setCommand(SQL);
                   crs.execute(con);
                   crs.setKeyColumns(keys);
                   crs.beforeFirst();
                   crs.moveToInsertRow();
                   crs.updateInt(1, 5);
                   crs.updateTimestamp(2, Timestamp.valueOf("2007-07-20 00:00:00"));
                   crs.updateInt(3, 0);
                   crs.insertRow();
                   crs.moveToCurrentRow();
                   crs.moveToInsertRow();
                   crs.updateInt(1, 5);
                   crs.updateTimestamp(2, Timestamp.valueOf("2007-07-20 00:00:00"));
                   crs.updateInt(3, 1);
                   crs.insertRow();
                   crs.moveToCurrentRow();
                   crs.acceptChanges(con);
              // Handle any errors that may have occurred.
              catch (Exception e) {
                   e.printStackTrace();
              } finally {
                   if (crs != null)
                        try {
                             crs.close();
                        } catch (Exception e) {
                   if (con != null)
                        try {
                             con.close();
                        } catch (Exception e) {
    }Layout of DB:
    Switch Date BSC ColA ColB ColC
    Switch, Date, and BSC are the PKs.
    Switch is type Int, Date is type datetime, BSC is type int
    Here is the error which i receive:
    javax.sql.rowset.spi.SyncProviderException: 4 conflicts while synchronizing
         at com.sun.rowset.internal.CachedRowSetWriter.writeData(Unknown Source)
         at com.sun.rowset.CachedRowSetImpl.acceptChanges(Unknown Source)
         at com.sun.rowset.CachedRowSetImpl.acceptChanges(Unknown Source)
         at TestDB.main(TestDB.java:39)
    I inserted the exact same data manually into the DB and it works fine.
    By the way, the program inserts the first row, but not the second. Based on my trials with the original program I am working on the syncproviderexception handler seems to have a conflict on insert row on Switch column. This is why I believe java is not interpreting the PKs as a group but rather as individually.
    Message was edited by:
    bce_developer

  • Error while inserting rows in a table

    Hi,
    We have recently migrated from 9i to 10g. We have a scheduled job out our DB which first deletes all the rows from a table and then inserts them back by selecting rows from 5 tables. This table has a composite primary key based on 6 columns in it. In 9i, when i try to insert rows into the table after deleting all the rows from it, I am able to insert the data successfully . However, in 10g, when i try doing the same operation, it fails with the ORA error:
    ORA-00001: unique constraint violated
    The same query which works perfectly in 9i fails in 10g
    If anybody has some ideas on how to resolve the same, kindly let me know.
    Thanks in advance.

    Hi,
    I was finally able to resolve the reason behind that error message and found it even more weird. The error was because I was using the substr function for extracting the characters 1-4 from a column which is 5 characters long. When i specify the query as:
    select substr(column1, 1, 4)) from table1;
    only the characters 1-3 are retrieved. Now if i change the query to select substr(column1, 1, 5)) from table1, in that case also only 3 characters are retrieved although i have specified the substr to start from 1 and read till 5 characters. Also, when i run the query:
    select length(substr(column1, 1, 4)) from table1 or select length(substr(column1, 1, 5)) from table1
    I get the answer as 3.
    However, the most amazing part is that the query is working perfectly in 9i and is retrieving the data correctly i.e. from substr 1-4.
    Can anyone suggest what the problem could be?
    Thanks
    Edited by: CrazyAnie on May 13, 2009 1:34 AM

  • UI API: Poor performance in Goods Receipt (PO) while inserting rows

    Hi all,
    we wrote small procedure, where we import some data from .txt file into Good Receipt (PO) document. There is no many infos there, we fill only these columns in GR matrix:
    ItemCode, Quantity, Warehouse
    For inserting data into document's row we use this code:
    oItCdCol.Cells(lRow).Specific.Value = Trim(sItm)
    oQtyCol.Cells(lRow).Specific.Value = Trim(sQty)
    oWHSCol.Cells(lRow).Specific.Value = Trim(sWHS)
    lRow = lRow + 1
    but with more than 30 lines in import file the performance is very poor, with cca. 300 lines it takes many hours. The GoodReceipt form is during import freezed of course.
    We use SBO2005 SP01 Patch 22. Is there performance problem with documents generally in this patch or something else?
    Thanks in advice.
    Kind regards
    Libor Mego.

    Are you working with Visual Basic 6 or Visual Basic from Visual Studio?.
    If you response VS, then try to use directly
    oItCdCol.Cells(lRow).Specific.Value = sItm.<b>Trim</b>()
    There is not the same througputh with olders function versus the newest.
    My recomendation is the same from Microsoft, "enjoy" always to use the Class routines like Trim, Integer.parse, <object>.ToString, ....

  • Help in inserting rows into a table

    I have a table called acct_fact,
    I need to insert rows in the table using a script but the problem is there's a column called seq_nbr which has random seq nbr of 14character length like 'ZWX98MGD9MVAD6J','ZWX98MG67RVAD6J' etc.,
    While inserting rows I need to generate such seq_nbr for those columns and insert rows into the table, can I use any such mechanism in my insert query to insert such random nbr's while inserting rows into a table.
    If so please suggest me

    Hi Peter,
    Thankyou for the quick reply:)
    can you suggest me how to implement it here in my script snippet:
    while read var_acct_nbr
    do
    echo "update acct_attr set acct_attr_exp_dt ='$ExpDate' where Acct_Attr_Value_Text='15' and acct_attr_exp_dt is null and person_id='LDCarrBillAgrm' and acct_nbr='$var_acct_nbr' ;" >> ./$DirectoryName/SQLQuery_$TimeStamp.sql
    echo "insert into acct_fact values ('$var_acct_nbr','$ExpDate','$ExpTime','*seq_nbr*','N','ProjTereza','Remoção de acordo d; data de expiração: $ExpDate',null,'1','LDE',null);" >> ./$DirectoryName/SQLQuery_$TimeStamp.sql
    done < ./$DirectoryName/ExpireAccts_$TimeStamp.LOG
    the script takes each acct_nbr nbr form a input file and fires an insert statement.
    The one in bold is the column where such sequence need to be inserted.can you help me in implementing the way you suggested in my script i.e., insert statement
    Thanks in Advance:)
    Edited by: rkrish on Jun 27, 2012 3:04 AM

  • Error while insert into database using DB adpater for Field BLOB

    Hello All
    I am trying to tranfer data from Database A to Database B using Oracle DB adapter.
    Table of databse A contains field BLOB, which cotains the resume /doc file.After transformation in Database B format ,while invoking the DB adapter to insert, I am getting follwing error
    <bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>null</code>
    </part><part name="summary"><summary>file:/u01/bpelvinc/product/10.1.3.1/OracleAS_1/bpel/domains/viapps/tmp/.bpel_ERecuit_Application_New_1.0_d1c2b2149a9e0c7c745279667ad1fc84.tmp/DB_APPL_111.wsdl [ DB_APPL_111_ptt::insert(RtmApplicantCollection) ] - WSIF JCA Execute of operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [DBAPPL111.RtmApplicant]. [Caused by: Error in encoded stream, got 2]
    ; nested exception is:
         ORABPEL-11616
    DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [DBAPPL111.RtmApplicant]. [Caused by: Error in encoded stream, got 2]
    Caused by Exception [TOPLINK-3001] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.ConversionException
    Exception Description: The object [xs:base64Binary 43524541544520544193B0D0A], of class [class java.lang.String], could not be converted to [class java.sql.Timestamp].
    Internal Exception: java.io.IOException: Error in encoded stream, got 2.
    </summary>
    </part><part name="detail"><detail>
    Exception Description: The object [xs:base64Binary 4352E616D65293B0D0A], of class [class java.lang.String], could not be converted to [class java.sql.Timestamp].
    Internal Exception: java.io.IOException: Error in encoded stream, got 2</detail>
    </part></bindingFault>
    Please let me know ,what are the possibilities.
    Thanks
    Satendra

    Hi...
    well... My flow goes like Pl/SQl ---> BPEL,
    Now PL/SQL code reads data from the Database A and Send it to BPEL which inserts into the Database B.
    with respest to above design, I found the problem in pl/sql block.
    Actually I am sending a BLOB field in the soap message. but some how pl/sql now ablt tot handle that or sending some wrong data.
    my question is how to send a blob filed data to bpel using pl/sql block. this the reasion I am getting above error.
    Thanks

  • Row Level Locking while inserting a record.

    It is a good practice to lock the whole table or do the row level locking while performing any DELETE / UPDATE / MODIFY actions on a database table. Is it necessary to do the same thing while inserting a record via INSERT statement?
    One point may arise if two  users are inserting same records at a same time....
    Well i am little bit confused here bcos if a record doen't exist in a table what is the point of locking it.
    Please help me.

    create a lock object using SE11 for that perticular table and include field names in Lock parameters. Then it will generate two FMs one for locking and another for unlocking.
    Call the lock FM before updating the table and pass that row key value(For fields which taken in lock parameters for creating lock objects) to the exporting parameters.
    Then do the updation.
    Reward if useful...................

  • Inserting rows in table while logging errors...Urgent

    Hi all,
    i want to insert rows from temp table to main table.
    if temp table contains 100 rows.then all rows must be inserted
    in main table.if their is any exception while insertion,
    insertion must nt stop and erroring rows along with error no must be inserted in
    error log table.
    How to do this ?
    i used forall save exceptions to achieve this .
    but ws able to save only error no. but not errroing rows in error log table.
    is there any efficient way to achieve this?
    can forall be modified in way that it inserts erroring rows also?????

    Hi,
    1.) does dbms_errorlog works fine in this case?If all of your 807 tables having same columns then i think it will work (NOT TESTED).
    By the way are you also trying to insert rows for all tese 807 tables in a single PL/SQL block?
    Please post how you are trying to insert then we can think about it,
    Oracle ERROR_LOG table allows us to have any number of columns.
    From the Oracle Docs:
    The number of columns in this part of the error logging table can be zero, one, or more, up to the number of columns in the DML table. If a column exists in the error logging table that has the same name as a column in the DML table, the corresponding data from the offending row being inserted is written to this error logging table column. If a DML table column does not have a corresponding column in the error logging table, the column is not logged. If the error logging table contains a column with a name that does not match a DML table column, the column is ignored.
    Regards

  • Oerror while inserting in to 11g database from SOA suite 11g db adaptor

    Hi,
    I am getting following error while inserting in to 11g database from SOA suite 11g database adaptor. Can you please help me on this.
    "{http://schemas.oracle.com/bpel/extension}bindingFault" has been thrown.
    Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception. insert failed. Descriptor name: [LoggerDBInsert.LoggedError]. Caused by java.sql.SQLSyntaxErrorException: ORA-01722: invalid number . ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. ORA-01722: invalid number 1722
    Regards,
    Bharat

    It looks like you try to insert a string-value in a number-column.
    can you check all your assign and their values before you invoke the db-adapter, then you should be able to narrow down the problem.

  • How can we avoid duplication of records in database while inserting records

    Hi,
    In my scenerio,while inserting the same records through idoc duplication of records is happening in database.How can i avoid this.

    Divya,
    First its a wrong data, because you cannot have the same data for any condition. Probably its a data problem. Please check with the datbase team and ask them why is it so? They should handle on their end.
    Anyways if the above dont work and if you ahve duplicate records then probably you need to come up with a query using select distinct. If this doesnot work then if the duplicates comes into mapping, you might selecting some fields which are common. So you can use a splitbyvalue(on value change) for those records, so even if there are three records it takes only one record. If you have 4 or 5 common values then you can concat them and then use the splitbyvalue change.
    Else an adapter module should help you out in sender comm. channel after picking the records.
    For an idea can you rajs response in this thread:
    Duplicate records
    Regards,
    ---Satish

  • WEB SERVCIE TO INSERT ROW ina Table in DATABASE

    Hi ALL
    I want to create a web service to insert row in a table in database.
    As I am new to Web Service.
    Please help me to do it.
    Thanks in advance !

    Hi Just_For_You !
    I have some code snippet, you can refer them ( i use mySql ).
    @WebMethod
    public void InsertData( int INTVAR2, String STRVAR1)
    Connection conn = null;
    Statement stmt = null;
    try {
    String dbURL = "jdbc:mysql://localhost:3306/wsasset"; // url of the mysql database
    String username = "root"; // username of wsasset database
    String password = ""; // password of wsasset database
    Class.forName("com.mysql.jdbc.Driver");
    conn = DriverManager.getConnection(dbURL, username, password);
    String sqlInsert = "insert into TABLENAME (INTVAR2, STRVAR1)
    values (?, ?)";
    stmt = conn.createStatement();
    stmt.executeQuery(sqlInsert);
    Catch(SQLException e)
    System.err.println(e);
    }

  • Insert row into database table via dynamic form -

    I have developed a portlet via Portal. I used a dynamic page. I replaced the default "<ORACLE>select * from scott.emp</ORACLE>" text to call a package procedure that uses HTP.P to render the web page. My goal is to show all rows in a table and allow edits to any row, and also add a checkbox on each row to allow the user to mark for delete. I am successfully using a FOR loop and showing all of the data in a grid. My problem - How do I update and delete the data? I have a submit button with nothing behind it currently. I would ideally like to use pl/sql code to do the updates and/or deletes as marked on the page by the user, but I'm not sure how to hook the submit button to calling a procedure to execute the updates/deletes.
    Any help would be appreciated -
    Thanks -
    Kent

    Hi Patrick - Thanks for your response! I have browsed your page quickly - very informative and I will look in more detail. My form design looks as below (using a simple example with emp id and emp name columns) - perhaps this will have to change, but I wanted the user to be able to insert using html fields id_add and name_add, then update (or mark for deletion) any of the existing rows (they are rendered with for loop in pl/sql - eg, id_1/name_1, id_2/name_2, etc for each row in the table). I was hoping the submit action would call a pl/sql that would look at all rows, and then act if an update or delete were required. This makes it difficult to use parms, I believe - I may be able to change the design to show an "update row" below the current "insert row" so that, as in your example, when the user highlights a row, it populates in the update area where changes can be made, and an update button used to effect the changes to a single row at a time.
    Thanks again, I appreciate your input!
    Kent
    ______________ _________________ <insert_button>
    Emp Id (textbox) Emp Name (textbox) Del_Checkbox
    ______________ _________________ ___ <SUBMIT_BUTTON>
    ------------------------- ----------------------------- ------

  • Problem while inserting into a table which has ManyToOne relation

    Problem while inserting into a table *(Files)* which has ManyToOne relation with another table *(Folder)* involving a attribute both in primary key as well as in foreign key in JPA 1.0.
    Relevent Code
    Entities:
    public class Files implements Serializable {
    @EmbeddedId
    protected FilesPK filesPK;
    private String filename;
    @JoinColumns({
    @JoinColumn(name = "folder_id", referencedColumnName = "folder_id"),
    @JoinColumn(name = "uid", referencedColumnName = "uid", insertable = false, updatable = false)})
    @ManyToOne(optional = false)
    private Folders folders;
    public class FilesPK implements Serializable {
    private int fileId;
    private int uid;
    public class Folders implements Serializable {
    @EmbeddedId
    protected FoldersPK foldersPK;
    private String folderName;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "folders")
    private Collection<Files> filesCollection;
    @JoinColumn(name = "uid", referencedColumnName = "uid", insertable = false, updatable = false)
    @ManyToOne(optional = false)
    private Users users;
    public class FoldersPK implements Serializable {
    private int folderId;
    private int uid;
    public class Users implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer uid;
    private String username;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "users")
    private Collection<Folders> foldersCollection;
    I left out @Basic & @Column annotations for sake of less code.
    EJB method
    public void insertFile(String fileName, int folderID, int uid){
    FilesPK pk = new FilesPK();
    pk.setUid(uid);
    Files file = new Files();
    file.setFilename(fileName);
    file.setFilesPK(pk);
    FoldersPK folderPk = new FoldersPK(folderID, uid);
         // My understanding that it should automatically handle folderId in files table,
    // but it is not…
    file.setFolders(em.find(Folders.class, folderPk));
    em.persist(file);
    It is giving error:
    Internal Exception: java.sql.SQLException: Field 'folderid' doesn't have a default value_
    Error Code: 1364
    Call: INSERT INTO files (filename, uid, fileid) VALUES (?, ?, ?)_
    _       bind => [hello.txt, 1, 0]_
    It is not even considering folderId while inserting into db.
    However it works fine when I add folderId variable in Files entity and changed insertFile like this:
    public void insertFile(String fileName, int folderID, int uid){
    FilesPK pk = new FilesPK();
    pk.setUid(uid);
    Files file = new Files();
    file.setFilename(fileName);
    file.setFilesPK(pk);
    file.setFolderId(folderId) // added line
    FoldersPK folderPk = new FoldersPK(folderID, uid);
    file.setFolders(em.find(Folders.class, folderPk));
    em.persist(file);
    My question is that is this behavior expected or it is a bug.
    Is it required to add "column_name" variable separately even when an entity has reference to ManyToOne mapping foreign Entity ?
    I used Mysql 5.1 for database, then generate entities using toplink, JPA 1.0, glassfish v2.1.
    I've also tested this using eclipselink and got same error.
    Please provide some pointers.
    Thanks

    Hello,
    What version of EclipseLink did you try? This looks like bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=280436 that was fixed in EclipseLink 2.0, so please try a later version.
    You can also try working around the problem by making both fields writable through the reference mapping.
    Best Regards,
    Chris

  • ERROR WHILE INSERTING BLOBS AS PARAMETERS OF EXISTING STORED PROCEDURE

    I have 2 simple tables to keep large application data (as XMLDOCUMENT in one table and BLOB in another):
    SQL> desc bindata_tbl;
    Name Null? Type
    BDATA_ID NOT NULL NUMBER(10)
    BDATA NOT NULL BLOB
    SQL> desc metadata_tbl;
    Name Null? Type
    MDATA_ID NOT NULL NUMBER(10)
    MDATA NOT NULL SYS.XMLTYPE
    and stored preocedure to input new data into those tables:
    "SP_TEST_BIN_META_DATA"
    i_MetaData in METADATA_TBL.MDATA%TYPE,
    i_BinData in BINDATA_TBL.BDATA%TYPE
    as
    begin
    if i_MetaData is not null then
    insert into METADATA_TBL (MDATA_ID, MDATA)
    values (METADATA_SEQ.nextval, i_MetaData);
    end if;
    if i_BinData is not null then
    insert into BINDATA_TBL (BDATA_ID, BDATA)
    values (BINDATA_SEQ.nextval, i_BinData);
    end if;
    COMMIT;
    -- Handle exceptions
    EXCEPTION
    WHEN OTHERS THEN
    ROLLBACK;
    RAISE;
    end;
    I communicate with database from .Net application using "Oracle.DataAccess 10.1.0.200 (Runtime version v1.0.3705)" component.
    Following procesure is a [simplified] examlple of the code I use, which demonstrates the errors while inserting XMLDOCUMENT and BLOB values simultaneously.
    In my application those should be quite big objects (~200 K XML and ~5-25M binary image data), but following sample keeps failing even with very small-sized objects:
    Line Number
    1          private void PureTest()
    2          {
    3               OracleConnection conn = null;
    4               OracleTransaction tx = null;
    5               OracleCommand command = null;
    6
    7               try
    8               {
    9                    // Open connection
    10                    string strConn = "Data Source=AthenaWf; User ID=AthenaWf; Password=Poseidon";
    11                    conn = new OracleConnection( strConn );
    12                    conn.Open();
    13
    14                    // Begin transaction (not sure if really needed)
    15                    tx = conn.BeginTransaction();
    16
    17                    // Create command
    18                    string strSql = "SP_TEST_BIN_META_DATA";
    19                    command = new OracleCommand();
    20                    command.Connection = conn;
    21                    command.CommandText = strSql;
    22                    command.CommandType = CommandType.StoredProcedure;
    23
    24                    // Create parameters
    25                    // 1) XmlType parameter
    26                    string strXml = "<?xml version=\"1.0\"?><configuration testValue=\"123456789\"/>";
    27                    XmlDocument xmlDoc = new XmlDocument();
    28                    xmlDoc.LoadXml( strXml );
    29                    OracleXmlType oraXml = new OracleXmlType( conn, xmlDoc );
    30                    //oraXml = null;
    31                    //
    32                    OracleParameter xmlPrm = new OracleParameter();
    33                    xmlPrm.ParameterName = "i_MetaData";
    34                    xmlPrm.Direction = ParameterDirection.Input;
    35                    xmlPrm.OracleDbType = OracleDbType.XmlType;
    36                    xmlPrm.Value = oraXml;
    37                    command.Parameters.Add( xmlPrm );
    38
    39                    // 2) Blob type
    40                    byte[] buf = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
    41                    OracleBlob oraBlob = new OracleBlob( conn, true );
    42                    //oraBlob.Write( buf, 0, buf.Length );
    43                    oraBlob = null;
    44                    //
    45                    OracleParameter blobPrm = new OracleParameter();
    46                    blobPrm.ParameterName = "i_BinData";
    47                    blobPrm.Direction = ParameterDirection.Input;
    48                    blobPrm.OracleDbType = OracleDbType.Blob;
    49                    blobPrm.Value = oraBlob;
    50                    command.Parameters.Add( blobPrm );
    51
    52
    53                    // Execute command finally
    54                    command.ExecuteNonQuery();
    55                    tx.Commit();
    56               }
    57               catch( Exception ex )
    58               {
    59                    // Clean-up
    60                    if( command != null )
    61                    {
    62                         command.Dispose();
    63                    }
    64                    if( tx != null )
    65                    {
    66                         tx.Dispose();
    67                    }
    68                    if( conn != null )
    69                    {
    70                         conn.Dispose();
    71                    }
    72
    73                    // Display error message
    74                    MessageBox.Show( ex.Message, "Error" );
    75               }
    76          }
    If I try insert only XMLDOCUMENT object (lines 30, 42 are commented out, 43 IS NOT) - everything is OK.
    If I try to insert only BLOB object (lines 30, 42 are NOT COMMENTED OUT, line 43 is commented out) - everything is OK again.
    If I try to insert them both having some values (lines 30, 43 are commented out, 42 is not commented out) - it fails right on "command.ExecuteNonQuery();" (line 54)
    with the following exception:
    "ORA-21500: internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%]".
    Even when I nullify oraBlob before assigning it to OracleParameter value (line 30 is commented out, line 42 and 43 are not) I have the same exception.
    XMLDOCUMENT and DLOB data logically are very coupled objects (in my application), so I really want to insert them simultaneously in one stored procedure in transactional way.
    Is it bug of drivers, server, .net environment, or I miss something in implementation?
    PS. In some articles on Oracle web and in MSDN site I found a mention about necessity of wrapping all write/update operations in a transaction, while working with temporary LOBs. I use it here, but it does not look like changing anything.

    Hello,
    I tested your code with the 10.1.0.4.0 ODP and 10.1.0.4.0 Client and it worked fine.
    Can you please apply the 10.1.0.4.0 patches for both ODP and client to see if this resolves the issue for you.
    Here is the output from the same execution of the ODP application you provided as a testcase. These rows were inserted at the same time when I executed the application and passed the data as parameters to the SP you provided.
    Results of Testing with 10.1.0.4.0
    ==========================
    SQL> select count(*) from BINDATA_TBL
    2 ;
    COUNT(*)
    1
    SQL> select count(*) from METADATA_TBL;
    COUNT(*)
    1
    SQL> select dbms_lob.getlength(bdata) from BINDATA_TBL;
    DBMS_LOB.GETLENGTH(BDATA)
    10
    SQL> select mdata from METADATA_TBL;
    MDATA
    <?xml version="1.0"?><configuration testValue="123456789" />

  • Insert rows from l_qte_rec in to tmp table

    xxx_pre_update_userbook(p_service_request_id number, p_sr_type_id number, p_status_id number,
                             p_resolution_code varchar2, p_bill_to_customer_id number,
                        p_bill_to_cust_account_id number, p_bill_to_customer_site_id number,
                        p_contract_id number, p_contract_line_id number,
                        p_resolution_summary varchar2,
                             x_status out varchar2, x_mesg out varchar2) as
              l_proj_incident_type_id number;
              l_isr_incident_type_id number;
              l_tac_incident_type_id number;
              l_status varchar2(10) := 'S';
              l_sr_closing_flag number;
              l_mesg varchar2(3000) := null;
              err_mesg varchar2(3000) := null;
              L_SO_ID NUMBER;
              L_LINK_REC CS_INCIDENTLINKS_PUB.CS_INCIDENT_LINK_REC_TYPE;
              L_OBJECT_VERSION_NUMBER NUMBER;
              L_RECIPROCAL_LINK_ID NUMBER;
              L_LINK_ID NUMBER;
         l_QTE_REC ASO_QUOTE_PUB.qte_header_rec_type;          
         l_control_REC ASO_ORDER_INT.control_rec_type;          
              l_Order_Header_Rec ASO_ORDER_INT.Order_Header_Rec_Type;
              l_Order_Line_Tbl ASO_ORDER_INT.Order_Line_Tbl_type;
              l_Return_Status VARCHAR2(30);
              l_Msg_Count NUMBER;
              l_Msg_Data VARCHAR2(3000);
              l_Msg_INDEX_OUT NUMBER;
              l_OUT_MESSAGE VARCHAR2(3000);
              l_proj_flag number;
              l_quote_status_id number;
              l_orders_created number;
              l_chargeable_sr_flag number;
              l_sr_close_flag number;
              l_invalid_outage_info number;
         begin
              l_status := 'S';
              l_mesg := null;
              -- MO_GLOBAL.INIT('CS');
              -- Get the Project Service Request Id
              select incident_type_id into l_proj_incident_type_id
              from cs_incident_types_tl
              where name like 'XXX TAC Project'
    --           and language = 'US'
              and rownum < 2;
              -- Get the ISR Service Request Id
              select incident_type_id into l_isr_incident_type_id
              from cs_incident_types_tl
              where name like 'XXX TAC ISR'
    --           and language = 'US'
              and rownum < 2;
              -- Get the TNT TAC Service Request Id
              select incident_type_id into l_tac_incident_type_id
              from cs_incident_types_tl
              where name like 'XXX TAC Service Request'
              and rownum < 2;
    --           and language = 'US';
              select nvl((select 1
              from dual
              where exists( select incident_status_id
                        from cs_incident_statuses_b
                        where incident_status_id = p_status_id
                        and close_flag is not null
                        and close_flag = 'Y')
    and ( p_resolution_code is null
    or (p_resolution_code NOT IN ('CS_SR_CLOSED_AS_DUP', 'XXXXX_SR_CXL', 'XXXXX_SR_INFO', 'XXXXX_SR_MGMT')
         and p_sr_type_id in ( l_isr_incident_type_id )),0) into l_chargeable_sr_flag
         from dual;
              select nvl((select 1
              from dual
              where exists( select incident_status_id
                        from cs_incident_statuses_b
                        where incident_status_id = p_status_id
                        and close_flag is not null
                        and close_flag = 'Y')
    and ( p_resolution_code is null
    or (p_resolution_code NOT IN ('CS_SR_CLOSED_AS_DUP', 'XXXXX_SR_CXL', 'XXXXX_SR_INFO', 'XXXXX_SR_MGMT')
         ),0) into l_sr_closing_flag
         from dual;
         if ( l_sr_closing_flag = 1 and ((p_resolution_summary is null) or (p_resolution_summary = FND_API.G_MISS_CHAR)) ) then
                        x_status := 'F';
                        --x_mesg := 'Resolution Summary can not be empty while closing Service request';
                        fnd_message.set_name ('XXXXX', 'MISSING_RESOLUTION_SUMMARY');     
                        -- fnd_message.set_token ('MESG_PARAM', err_mesg || '::' || l_mesg);
                        fnd_msg_pub.ADD;     
         end if;
              -- Check whether outage information is complete at the time of closure.
         if ( l_sr_closing_flag = 1 ) then
              l_invalid_outage_info := 0;
         select nvl((select 1
    from dual
    where exists ( select 1
                                  from cs_incidents_ext cie, ego_fnd_dsc_flx_ctx_ext grp1
                                  where incident_id = p_service_request_id
                                  and grp1.application_id = 170
                                            and grp1.descriptive_flexfield_name like 'XX_SR_CONTEXT'
                                            and grp1.descriptive_flex_context_code like 'XXXXXOutageTab'
                                            and cie.attr_group_id = grp1.attr_group_id
                                            and ( c_ext_attr1 is null or c_ext_attr2 is null or c_ext_attr3 is null or
                                                 c_ext_attr4 is null or c_ext_attr5 is null or c_ext_attr6 is null or
                                                 c_ext_attr7 is null or n_ext_attr1 is null or n_ext_attr2 is null or
                                                 n_ext_attr3 is null or n_ext_attr4 is null or n_ext_attr5 is null or
                                                 d_ext_attr1 is null or d_ext_attr2 is null or d_ext_attr3 is null)
                             -- if all of them are null then we should ignore
                                            and NOT ( c_ext_attr1 is null and c_ext_attr2 is null and c_ext_attr3 is null and
                                                 c_ext_attr4 is null and c_ext_attr5 is null and c_ext_attr6 is null and
                                                 c_ext_attr7 is null and n_ext_attr1 is null and n_ext_attr2 is null and
                                                 n_ext_attr3 is null and n_ext_attr4 is null and n_ext_attr5 is null and
                                                 d_ext_attr1 is null and d_ext_attr2 is null and d_ext_attr3 is null))), 0) into l_invalid_outage_info
    from dual;
                        if ( l_invalid_outage_info = 1 )     then
                             x_status := 'F';
                             fnd_message.set_name ('XXXXX', 'MISSING_OUTAGE_INFORMATION');     
                             fnd_msg_pub.ADD;     
                        end if;
         end if;
              if ( (p_sr_type_id in ( l_isr_incident_type_id )) and (l_chargeable_sr_flag = 1) ) then
                   if ( ( p_bill_to_customer_id is null or     p_bill_to_cust_account_id is null or
                   p_bill_to_customer_site_id is null )) then
                        x_status := 'F';
                        --x_mesg := 'Bill to customer name/account/site is empty';
                        fnd_message.set_name ('XXXXX', 'ISR_INVALID_BILL_TO');     
                        -- fnd_message.set_token ('MESG_PARAM', err_mesg || '::' || l_mesg);
                        fnd_msg_pub.ADD;
                   else
                        select count(*) into l_orders_created
                        from cs_incident_links
                        where subject_id = p_service_request_id
                        and subject_type = 'SR'
                        and object_type = 'ORDERS';
                        /* If orders are not created for this SR then create the order */
                        if ( l_orders_created = 0 ) then
                        /* Create Order */
                        err_mesg := 'Got the Incident Types and Incidents Status flag';
                        select nvl((select quote_status_id
                        from aso_quote_statuses_tl
                        where language = 'US'
                        and upper(meaning) = 'ENTERED'), 0) into l_quote_Status_id
                        from dual;
                        err_mesg := 'Got the Quote Status Id';
                        l_qte_rec.party_id := p_bill_to_customer_id;
    *                    l_qte_rec.party_id := p_bill_to_customer_id;
    *                    l_qte_rec.cust_party_id := p_bill_to_customer_id;
    *                    l_qte_rec.cust_account_id := p_bill_to_cust_account_id;
    *                    l_qte_rec.INVOICE_TO_CUST_PARTY_ID  := p_bill_to_customer_id;
    *                    l_qte_rec.INVOICE_TO_CUST_ACCOUNT_ID  := p_bill_to_cust_account_id;
    *                    l_qte_rec.INVOICE_TO_PARTY_SITE_ID  := p_bill_to_customer_site_id;
    *                    l_qte_rec.INVOICE_TO_PARTY_ID := p_bill_to_customer_id;
    *                    l_qte_rec.quote_status_id := l_quote_status_id;
    *                    l_qte_rec.quote_status_code := 'ENTERED';
    *                    l_qte_rec.quote_status := 'ENTERED';
    *                    l_control_rec.book_flag := 'N';
    *                    err_mesg := 'set the Quote Header';*
    *                    select nvl((select transaction_type_id*
    *                    from oe_transaction_types_v*
    *                    where name like 'Service Order'), 0 ) into l_qte_rec.order_type_id*
    *                    from dual;*
    *                    err_mesg := 'Got Order Type';*
    *                    l_qte_rec.currency_code := 'USD';
    how to insert rows in tmp table from rec_type which is in bold text .... i want to insert after the last statement .this is for debugging after executing the procedure

    No version number and lots of other missing information.
    That said look at the example here:
    http://www.morganslibrary.org/reference/insert.html
    under "RECORD INSERT."

Maybe you are looking for