Suggestion required regarding BULK INSERT usage

Hi All,
There is one table i.e., Markets and it contains 2 million records. I wanted inflate the same data for 10 times so, that count goes to 20 million records. I have written the following script to achieve this...
create or replace procedure mrkts_infltn(val number)
is
type markets_type is table of markets%rowtype;
l_markets markets_type;
begin
select * bulk collect into l_markets from markets;
for n in 1..val
loop
forall i in l_markets.first..l_markets.last
insert into markets values l_markets(i);
end loop;
end;
The above procedure is working fine...Now my question is, there is one column in markets table that is mrkt_id, I wanted to call sequence value for mrkt_id column (I don't want to insert the existng values for mrkt_id column). So, later we can easily delete the inflated data from the markets table by using sequnce value.
Any Help would be appreciated
Thanks,

Try selecting the sequence number in the select statement itself. So while select instead of doing select * from use Select <Seq_no.nextval>, <col1>, <col2> ... ;
Be careful that you select <Seq_no.nextval> instead of the id.
Hi All,
There is one table i.e., Markets and it contains 2
million records. I wanted inflate the same data for
10 times so, that count goes to 20 million records. I
have written the following script to achieve this...
create or replace procedure mrkts_infltn(val number)
is
type markets_type is table of markets%rowtype;
l_markets markets_type;
begin
select * bulk collect into l_markets from markets;
for n in 1..val
loop
forall i in l_markets.first..l_markets.last
insert into markets values l_markets(i);
end loop;
end;
The above procedure is working fine...Now my question
is, there is one column in markets table that is
mrkt_id, I wanted to call sequence value for mrkt_id
column (I don't want to insert the existng values for
mrkt_id column). So, later we can easily delete the
inflated data from the markets table by using sequnce
value.
Any Help would be appreciated
Thanks,

Similar Messages

  • ODBC, bulk inserts and dynamic SQL

    I am writing an application running on Windows NT 4 and using the oracle ODBC driver (8.01.05.00, that inserts many rows at a time (10000+) into an oracle 8i database.
    At present, I am using a stored procedure to insert each row into the database. The stored procedure uses dynamic SQL because I can only determine the table and field names at run time.
    Due to the large number of records, it tends to take a while to perform all the inserts. I have tried a number of solutions such as using batches of SQL statements (e.g. "INSERT...;INSERT...;INSERT..."), but the oracle ODBC driver only seems act on the first statement in the batch.
    I have also considered using the FOR ALL statement and SQL*Loader utility.
    My problem with FOR ALL is that I'm not sure it works on dynamic SQL statements and even if it did, how do I pass an array of statements to the stored procedure.
    I ruled out SQL* Loader because I could not find a way to invoke it it from an ODBC statement. Secondly, it requires the spawining of a new process.
    What I am really after is something similar the the SQL Server (forgive me!) BULK INSERT statement where you can simply create an input file with all the records you want to insert, and pass it along in an ODBC statement such as "BULK INSERT <filename>".
    Any ideas??
    null

    Hi,
    I faced this same situation years ago (Oracle 7.2!) and had the following alternatives.
    1) Use a 3rd party tool such as Sagent or CA Info pump (very pricey $$$)
    2) Use VisualC++ and OCI to hook into the array insert routines (there are examples of these in the Oracle Home).
    3) Use SQL*Loader (the best performance, but no real control of what's happening).
    I ended up using (2) and used the Rouge Wave dbtools.h++ library to speed up the development.
    These days, I would also suggest you take a look at Perl on NT (www.activestate.com) and the DBlib modules at www.perl.org. I believe they will also do bulk loading.
    Your problem is that your program is using Oracle ODBC, when you should be using Oracle OCI for best performance.
    null

  • Bulk inserts and dynamic SQL

    I am writing an application running on Windows NT 4 and using the oracle ODBC driver (8.01.05.00, that inserts many rows at a time (10000+) into an oracle 8i database.
    At present, I am using a stored procedure to insert each row into the database. The stored procedure uses dynamic SQL because I can only determine the table and field names at run time.
    Due to the large number of records, it tends to take a while to perform all the inserts. I have tried a number of solutions such as using batches of SQL statements (e.g. "INSERT...;INSERT...;INSERT..."), but the oracle ODBC driver only seems act on the first statement in the batch.
    I have also considered using the FOR ALL statement and SQL*Loader utility.
    My problem with FOR ALL is that I'm not sure it works on dynamic SQL statements and even if it did, how do I pass an array of statements to the stored procedure.
    I ruled out SQL* Loader because I could not find a way to invoke it it from an ODBC statement. Secondly, it requires the spawining of a new process.
    What I am really after is something similar the the SQL Server (forgive me!) BULK INSERT statement where you can simply create an input file with all the records you want to insert, and pass it along in an ODBC statement such as "BULK INSERT <filename>".
    Any ideas??
    null

    Hi,
    I faced this same situation years ago (Oracle 7.2!) and had the following alternatives.
    1) Use a 3rd party tool such as Sagent or CA Info pump (very pricey $$$)
    2) Use VisualC++ and OCI to hook into the array insert routines (there are examples of these in the Oracle Home).
    3) Use SQL*Loader (the best performance, but no real control of what's happening).
    I ended up using (2) and used the Rouge Wave dbtools.h++ library to speed up the development.
    These days, I would also suggest you take a look at Perl on NT (www.activestate.com) and the DBlib modules at www.perl.org. I believe they will also do bulk loading.
    Your problem is that your program is using Oracle ODBC, when you should be using Oracle OCI for best performance.
    null

  • First Row Record is not inserted from CSV file while bulk insert in sql server

    Hi Everyone,
    I have a csv file that needs to be inserted in sql server. The csv file will be format will be like below.
    1,Mr,"x,y",4
    2,Mr,"a,b",5
    3,Ms,"v,b",6
    While Bulk insert it coniders the 2nd column as two values (comma separte) and makes two entries .So i used filelterminator.xml.  
    Now, the fields are entered into the column correctly. But now the problem is, the first row of the csv file is not reading in sql server. when i removed the  terminator,  i can get the all records. But i must use the above code terminator. If
    am using means, am not getting the first row record.
    Please suggests me some solution.
    Thanks,
    Selvam

    Hi,
    I have a csv file (comma(,) delimited) like this which is to be insert to sql server. The format of the file when open in notepad like below:
    Id,FirstName,LastName,FullName,Gender
    1,xx,yy,"xx,yy",M
    2,zz,cc,"zz,cc",F
    3,aa,vv,"aa,vv",F
    The below is the bulk insert query which is used for insert above records,
    EXEC(BULK INSERT EmployeeData FROM '''+@FilePath+'''WITH
    (formatfile=''d:\FieldTerminator.xml'',
    ROWTERMINATOR=''\n'',
    FIRSTROW=2)'
    Here, I have used format file for the "Fullname" which has comma(,) within the field. The format file is:
    The problem is , it skip the first record (1,xx,yy,"xx,yy",M) when i use the format file. When i remove the format file from the query, it takes all the records but the "fullName" field makes the problem because of comma(,) within the
    field. So i must use the format file to handle this. So please suggest me , why the first record skipped always when i use the above format file.
    If i give the "FirstRow=1" in bulk insert, it shows the "String or binary data would be truncated.
    The statement has been terminated." error. I have checked the datatype length.
    Please update me the solution.
    Regards,
    Selvam. M

  • JDBC Bulk Insert to MS Access

    I am trying to do bulk insert to MS Access database from text file. One of the solutions recommended by bbritta is as follows
    import java.sql.*;
    public class Test3 {
      public static void main(String[] arghs) {
        try {
          Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          String filename = "C:/DB1.mdb";
          String database =
              "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=C:/DB1.MDB";
          Connection con = DriverManager.getConnection(database, "", "");
          Statement statement = con.createStatement();
          statement.execute("INSERT INTO Table1 SELECT * FROM [Text;Database=C:\\;HDR=YES].[TextFile.txt]");
          statement.close();
          con.close();
        } catch (Exception e) { e.printStackTrace(); }
    }Whenever I try to use that approach, I get error message
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Number of query values and destination fields are not the same.
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3111)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:338)
    Fields in Access destination tables are exactly the same as in text field and I still get an error message. I could manually import to Access from same file without any problem.
    I was wondering if someone out there could suggest another approach.

    >
    1) Is there a type-4 JDBC connector available to
    connect directly to MS Access databases and if so
    would it be difficult to implement or migrate to?
    This is important because dbAnywhere does not appear
    to be supported on Windows 2000, which is the
    platform we are migrating to. We need to eliminate
    dbAnywhere if possible.
    By definition no such driver can exist. A type 4 driver is java only and connects directly to the database. Excluding file writes the only connection method is via sockets and there is nothing for a socket to connect to in a MS Access database - MS Access doesn't work that way.
    You can look into type 3 driver. I believe there are a number of them. They use an intermediate server. Search here http://industry.java.sun.com/products/jdbc/drivers
    You could implement your own using RmiJdbc at http://www.objectweb.org/. However I personally would think that that would require a serious long look at security issues before exposing a solution to the internet.

  • Bulk insert into oracle using ssis

    Hi ,
    Can someone please suggest me the way to Bulk insert data into oracle database? I'm using oledb which doesnt support bulk insert into oracle.
    Pls note I cant use Oracle ATTUnity as it requires enterprise edition but i have only Standard edition and hence that option is ruled out.
    Is there any other way that I can accompolish BULK insert?
    Please help me out.
    Thanks,
    Prabhu

    Hi Prabhu,
    I am very late to help you solve the query but following is the solution to 'Bulk Insert into Oracle' that worked for me.
    To use below code for SSIS 2008 R2 in a
    Script Task component you would need following API references.
    Prerequisites:
    1. C:\Program Files (x86)\Microsoft SQL Server\100\SDK\Assemblies\Microsoft.SQLServer.DTSRuntimeWrap.dll
    2. Install "Oracle Data Provider For .NET 11.2.0.1.0" and add a reference to
    Oracle.DataAccess.dll.
       Microsoft SQL Server Integration Services Script Task
       Write scripts using Microsoft Visual C# 2008.
       The ScriptMain is the entry point class of the script.
     *  Description : SQL to Oracle Bulk Copy/Insert
     *  Created By  : Mitulkumar Brahmbhatt
     *  Created Date: 08/14/2014
     *  Modified Date   Modified By     Description
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    using Oracle.DataAccess.Client;
    using Microsoft.SqlServer.Dts.Runtime.Wrapper;
    using System.Data.OleDb;
    namespace ST_6e18a76102dd4312868504c4ef95279d.csproj
        [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
        public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
            #region VSTA generated code
            enum ScriptResults
                Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
                Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
            #endregion
            public void Main()
                ConnectionManager cm;
                IDTSConnectionManagerDatabaseParameters100 cmParams;
                OleDbConnection oledbConn;
                DataSet ds = new DataSet();
                string sql;
                try
                    /********** Pull Sql Source Data into a Dataset *************/
                    cm = Dts.Connections["SRC_CONN"];
                    cmParams = cm.InnerObject as IDTSConnectionManagerDatabaseParameters100;
                    oledbConn = (OleDbConnection)cmParams.GetConnectionForSchema() as OleDbConnection;
                    sql = @"Select * from [sourcetblname]'';
                    OleDbCommand sqlComm = new OleDbCommand(sql, oledbConn);
                    OleDbDataAdapter da = new OleDbDataAdapter(sqlComm);
                    da.Fill(ds);
                    cm.ReleaseConnection(oledbConn);
                    /***************** Bulk Insert to Oracle *********************/
                    cm = Dts.Connections["DEST_CONN"];
                    cmParams = cm.InnerObject as IDTSConnectionManagerDatabaseParameters100;
                    string connStr = ((OleDbConnection)cmParams.GetConnectionForSchema() as OleDbConnection).ConnectionString;
                    cm.ReleaseConnection(oledbConn);
                    sql = "destinationtblname";
                    using (OracleBulkCopy bulkCopy = new OracleBulkCopy(connStr.Replace("Provider=OraOLEDB.Oracle.1", "")))
                        bulkCopy.DestinationTableName = sql;
                        bulkCopy.BatchSize = 50000;
                        bulkCopy.BulkCopyTimeout = 20000;
                        bulkCopy.WriteToServer(ds.Tables[0]);
                    /***************** Return Result - Success *********************/
                    Dts.TaskResult = (int)ScriptResults.Success;
                catch (Exception x)
                    Dts.Events.FireError(0, "BulkCopyToOracle", x.Message, String.Empty, 0);
                    Dts.TaskResult = (int)ScriptResults.Failure;
                finally
                    ds.Dispose();
    Mitulkumar Brahmbhatt | Please mark the post(s) that answered your question.

  • FDM bulk insert error

    Hello,
    i'm trying to bulk insert data into planning and i get an error. As i can understand it seems related to some bad settings regarding decimal separator. I'm from italy where default decimal separator is ",". As far as i can check everything is set on english including Oracle Client (... sqlldr).
    As you can see in datafile.log i get oracle ORA-01722 error.
    Any ideas?
    Thank you in advance,
    Daniele
    S.O: windows2008
    FDM Version: 11.1.2.1
    REPOSITORY: Oracle 11.2.0.1.0 - 64bit
    Here are log files:
    admin.log:
    ** Begin FDM Runtime Error Log Entry [2011-09-07 16:50:18] **
    ERROR:
    Code............................................. 4003
    Description...................................... Oracle (SQL-Loader) data load failed, please see processing log for details!
    Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
    Component........................................ upsWObjectsDM
    Version.......................................... 1112
    Thread........................................... 4040
    IDENTIFICATION:
    User............................................. admin
    Computer Name.................................... IPEREPMA00
    App Name......................................... FDMAuchan
    Client App....................................... WebClient
    CONNECTION:
    Provider......................................... ORAOLEDB.ORACLE
    Data Server......................................
    Database Name.................................... HYPTEST
    Trusted Connect.................................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location......................................... LOADACTSAP
    Location ID...................................... 750
    Location Seg..................................... 4
    Category......................................... SAP
    Category ID...................................... 13
    Period........................................... Jan - 2011
    Period ID........................................ 1/31/2011
    POV Local........................................ False
    Language......................................... 1033
    User Level....................................... 1
    All Partitions................................... True
    Is Auditor....................................... False
    datafile.log
    +2011-09-07 16:50:16+
    User ID...........     admin
    Location..........     LOADACTSAP
    Source File.......     D:\Oracle\Middleware\EPMSystem11R1\products\FinancialDataQuality\SharedComponents\APPS\FDMAuchan\Inbox\LOADACTSAP\SAP_1101_Prova.txt
    Processing Codes:
    BLANK............. Line is blank or empty.
    ESD............... Excluded String Detected, SKIP Field value was found.
    NN................ Non-Numeric, Amount field contains non numeric characters.
    RFM............... Required Field Missing.
    TC................ Type Conversion, Amount field could be converted to a number.
    ZP................ Zero Suppress, Amount field contains a 0 value and zero suppress is ON.
    Create Output File Start: [2011-09-07 16:50:16]
    +[Blank] -      +
    Excluded Record Count..............0
    Blank Record Count.................1
    Total Records Bypassed.............1
    Valid Records......................477
    Total Records Processed............478
    Begin Oracle (SQL-Loader) Process (477): [2011-09-07 16:50:16]
    Oracle (SQL-Loader) Log File Contents:
    SQL*Loader: Release 11.2.0.1.0 - Production on Mer Set 7 16:50:16 2011
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Control File:   C:\Users\INSTAL~1\AppData\Local\Temp\tWadmin154840402517.ctl
    Character Set UTF16 specified for all input.
    Using character length semantics.
    First primary datafile C:\Users\INSTAL~1\AppData\Local\Temp\tWadmin154840402517.tmp has a
    little endian byte order mark in it.
    Data File:      C:\Users\INSTAL~1\AppData\Local\Temp\tWadmin154840402517.tmp
    Bad File:     C:\Users\INSTAL~1\AppData\Local\Temp\tWadmin154840402517.bad
    Discard File:  none specified
    +(Allow all discards)+
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Continuation:    none specified
    Path used:      Direct
    Load is UNRECOVERABLE; invalidation redo is produced.
    Table TWADMIN154840402517, loaded from every logical record.
    Insert option in effect for this table: APPEND
    TRAILING NULLCOLS option in effect
    Column Name                  Position   Len  Term Encl Datatype
    DATAKEY                                                   SEQUENCE (1, 1)
    PARTITIONKEY                        FIRST     *           CHARACTER
    Terminator string : '~|'
    CATKEY                               NEXT     *           CHARACTER
    Terminator string : '~|'
    PERIODKEY                            NEXT     *           DATE YYYYMMDD
    Terminator string : '~|'
    DATAVIEW                             NEXT     *           CHARACTER
    Terminator string : '~|'
    ACCOUNT                              NEXT     *           CHARACTER
    Terminator string : '~|'
    ENTITY                               NEXT     *           CHARACTER
    Terminator string : '~|'
    ICP                                  NEXT     *           CHARACTER
    Terminator string : '~|'
    UD1                                  NEXT     *           CHARACTER
    Terminator string : '~|'
    UD2                                  NEXT     *           CHARACTER
    Terminator string : '~|'
    UD3                                  NEXT     *           CHARACTER
    Terminator string : '~|'
    UD4                                  NEXT     *           CHARACTER
    Terminator string : '~|'
    UD5                                  NEXT     *           CHARACTER
    Terminator string : '~|'
    UD6                                  NEXT     *           CHARACTER
    Terminator string : '~|'
    UD7                                  NEXT     *           CHARACTER
    Terminator string : '~|'
    UD8                                  NEXT     *           CHARACTER
    Terminator string : '~|'
    UD9                                  NEXT     *           CHARACTER
    Terminator string : '~|'
    UD10                                 NEXT     *           CHARACTER
    Terminator string : '~|'
    UD11                                 NEXT     *           CHARACTER
    Terminator string : '~|'
    UD12                                 NEXT     *           CHARACTER
    Terminator string : '~|'
    UD13                                 NEXT     *           CHARACTER
    Terminator string : '~|'
    UD14                                 NEXT     *           CHARACTER
    Terminator string : '~|'
    UD15                                 NEXT     *           CHARACTER
    Terminator string : '~|'
    UD16                                 NEXT     *           CHARACTER
    Terminator string : '~|'
    UD17                                 NEXT     *           CHARACTER
    Terminator string : '~|'
    UD18                                 NEXT     *           CHARACTER
    Terminator string : '~|'
    UD19                                 NEXT     *           CHARACTER
    Terminator string : '~|'
    UD20                                 NEXT     *           CHARACTER
    Terminator string : '~|'
    DESC1                                NEXT     *           CHARACTER
    Terminator string : '~|'
    DESC2                                NEXT     *           CHARACTER
    Terminator string : '~|'
    ATTR1                                NEXT     *           CHARACTER
    Terminator string : '~|'
    ATTR2                                NEXT     *           CHARACTER
    Terminator string : '~|'
    ATTR3                                NEXT     *           CHARACTER
    Terminator string : '~|'
    ATTR4                                NEXT     *           CHARACTER
    Terminator string : '~|'
    ATTR5                                NEXT     *           CHARACTER
    Terminator string : '~|'
    ATTR6                                NEXT     *           CHARACTER
    Terminator string : '~|'
    ATTR7                                NEXT     *           CHARACTER
    Terminator string : '~|'
    ATTR8                                NEXT     *           CHARACTER
    Terminator string : '~|'
    ATTR9                                NEXT     *           CHARACTER
    Terminator string : '~|'
    ATTR10                               NEXT     *           CHARACTER
    Terminator string : '~|'
    ATTR11                               NEXT     *           CHARACTER
    Terminator string : '~|'
    ATTR12                               NEXT     *           CHARACTER
    Terminator string : '~|'
    ATTR13                               NEXT     *           CHARACTER
    Terminator string : '~|'
    ATTR14                               NEXT     *           CHARACTER
    Terminator string : '~|'
    MEMOKEY                              NEXT     *           CHARACTER
    Terminator string : '~|'
    AMOUNT                               NEXT     *           CHARACTER
    Terminator string : '~|'
    CALCACCTTYPE                                              CONSTANT
    Value is '9'
    CHANGESIGN                                                CONSTANT
    Value is '0'
    AMOUNTX                                                   CONSTANT
    Value is '0'
    ACCOUNTR                                                  CONSTANT
    Value is '0'
    ACCOUNTF                                                  CONSTANT
    Value is '0'
    ENTITYR                                                   CONSTANT
    Value is '0'
    ENTITYF                                                   CONSTANT
    Value is '0'
    ICPR                                                      CONSTANT
    Value is '0'
    ICPF                                                      CONSTANT
    Value is '0'
    UD1R                                                      CONSTANT
    Value is '0'
    UD1F                                                      CONSTANT
    Value is '0'
    UD2R                                                      CONSTANT
    Value is '0'
    UD2F                                                      CONSTANT
    Value is '0'
    UD3R                                                      CONSTANT
    Value is '0'
    UD3F                                                      CONSTANT
    Value is '0'
    UD4R                                                      CONSTANT
    Value is '0'
    UD4F                                                      CONSTANT
    Value is '0'
    UD5R                                                      CONSTANT
    Value is '0'
    UD5F                                                      CONSTANT
    Value is '0'
    UD6R                                                      CONSTANT
    Value is '0'
    UD6F                                                      CONSTANT
    Value is '0'
    UD7R                                                      CONSTANT
    Value is '0'
    UD7F                                                      CONSTANT
    Value is '0'
    UD8R                                                      CONSTANT
    Value is '0'
    UD8F                                                      CONSTANT
    Value is '0'
    UD9R                                                      CONSTANT
    Value is '0'
    UD9F                                                      CONSTANT
    Value is '0'
    UD10R                                                     CONSTANT
    Value is '0'
    UD10F                                                     CONSTANT
    Value is '0'
    UD11R                                                     CONSTANT
    Value is '0'
    UD11F                                                     CONSTANT
    Value is '0'
    UD12R                                                     CONSTANT
    Value is '0'
    UD12F                                                     CONSTANT
    Value is '0'
    UD13R                                                     CONSTANT
    Value is '0'
    UD13F                                                     CONSTANT
    Value is '0'
    UD14R                                                     CONSTANT
    Value is '0'
    UD14F                                                     CONSTANT
    Value is '0'
    UD15R                                                     CONSTANT
    Value is '0'
    UD15F                                                     CONSTANT
    Value is '0'
    UD16R                                                     CONSTANT
    Value is '0'
    UD16F                                                     CONSTANT
    Value is '0'
    UD17R                                                     CONSTANT
    Value is '0'
    UD17F                                                     CONSTANT
    Value is '0'
    UD18R                                                     CONSTANT
    Value is '0'
    UD18F                                                     CONSTANT
    Value is '0'
    UD19R                                                     CONSTANT
    Value is '0'
    UD19F                                                     CONSTANT
    Value is '0'
    UD20R                                                     CONSTANT
    Value is '0'
    UD20F                                                     CONSTANT
    Value is '0'
    ARCHIVEID                                                 CONSTANT
    Value is '774'
    HASMEMOITEM                                               CONSTANT
    Value is '0'
    STATICDATAKEY                                             CONSTANT
    Value is '0'
    Referential Integrity Constraint/Trigger Information:
    NULL, UNIQUE, and PRIMARY KEY constraints are unaffected.
    Trigger FDMAUCHAN."TWADMIN154840402517_AK" was disabled before the load.
    Record 1: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 2: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 3: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 4: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 5: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 6: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 7: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 8: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 9: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 10: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 11: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 12: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 13: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 14: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 15: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 16: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 17: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 18: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 19: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 20: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 21: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 22: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 23: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 24: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 25: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 26: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 27: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 28: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 29: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 30: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 31: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 32: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 33: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 34: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 35: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 36: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 37: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 38: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 39: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 40: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 41: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 42: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 43: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 44: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 45: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 46: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 47: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 48: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 49: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 50: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    Record 51: Rejected - Error on table TWADMIN154840402517, column AMOUNT.
    ORA-01722: numero non valido
    FDMAUCHAN."TWADMIN154840402517_AK" was re-enabled.
    MAXIMUM ERROR COUNT EXCEEDED - Above statistics reflect partial run.
    Table TWADMIN154840402517:
    +0 Rows successfully loaded.+
    +51 Rows not loaded due to data errors.+
    +0 Rows not loaded because all WHEN clauses were failed.+
    +0 Rows not loaded because all fields were null.+
    Bind array size not used in direct path.
    Column array  rows :    3000
    Stream buffer bytes:  256000
    Read   buffer bytes:18576000
    Total logical records skipped:          0
    Total logical records rejected:        51
    Total logical records discarded:        0
    Total stream buffers loaded by SQL*Loader main thread:        1
    Total stream buffers loaded by SQL*Loader load thread:        0
    Run began on Mer Set 07 16:50:16 2011
    Run ended on Mer Set 07 16:50:17 2011
    Elapsed time was:     00:00:00.56
    CPU time was:         00:00:00.24
    Oracle (SQL-Loader) Bad File Contents:
    +750~|13~|20110131~|YTD~|701306~|1854~|~|153~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|711200~|0355~|~|190~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|711260~|1822~|~|119~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|711260~|1858~|~|142~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|711261~|3601~|~|160~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|711302~|5308~|~|999~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|711383~|1748~|~|010~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|711383~|1857~|~|010~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|711458~|1608~|~|191~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|711468~|0355~|~|181~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|711468~|0392~|~|181~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|711468~|1565~|~|181~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|711468~|1784~|~|181~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|711468~|1823~|~|181~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|711468~|1848~|~|181~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|711468~|1853~|~|181~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|711605~|2644~|~|555~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|711606~|3601~|~|555~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|711641~|2389~|~|999~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|711655~|2649~|~|116~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|721330~|1161~|~|155~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|721330~|1852~|~|010~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|721330~|3539~|~|999~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|721330~|5158~|~|999~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|721340~|3473~|~|190~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|721341~|4263~|~|999~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|721341~|5617~|~|999~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|730001~|3898~|~|010~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|730003~|0355~|~|192~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|730003~|0392~|~|140~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|730003~|1565~|~|142~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|730003~|1795~|~|134~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|730003~|1848~|~|126~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|732000~|1823~|~|130~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|734001~|3601~|~|151~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|761202~|1748~|~|180~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|761205~|5309~|~|181~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|761206~|1608~|~|181~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|761206~|1823~|~|181~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|761210~|1857~|~|181~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|761210~|7347~|~|181~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|H11468~|1854~|~|181~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|H11468~|2644~|~|181~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|H11468~|5309~|~|181~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|H11473~|1784~|~|191~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|H11605~|2644~|~|151~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|H21330~|1161~|~|123~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|H21330~|1161~|~|156~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|H21340~|3898~|~|154~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|H30000~|1854~|~|177~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +750~|13~|20110131~|YTD~|H30000~|1854~|~|188~|SAP~|DEF_ATT~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|0~|100.00+
    +[RDMS Bulk Load Error Begin]+
    +     Message:      (4003) - Oracle (SQL-Loader) data load failed, please see processing log for details!+
    +     See Bulk Load File:      C:\Users\INSTAL~1\AppData\Local\Temp\tWadmin154840402517.tmp+
    +[RDMS Bulk Load Error End]+

    Hi Daniele,
    Can i know the steps to resolve this issue.
    I am also facing the same issue. Below is the error message.
    [RDMS Bulk Load Error Begin]
    Message: (4003) - Oracle (SQL-Loader) data load failed, please see processing log for details!
    See Bulk Load File: C:\temp\tWthinad824889961810.tmp
    [RDMS Bulk Load Error End]
    I am using the Essbase as the Target adaptor. Your reply will be very helpful for me.
    Thanks
    Dhinesh Kumar T

  • Bulk Insert, Domain Based Attributes

    Hi
    I have a product model similar to the ProductSamplemodel that ships with MDS. i.e. Product Category, Product Sub Category entities. Both of these entities have been created to automatically generate a code - as a code does not exist in the business only a description.
    The product entity has both the category and sub category attributes as domain-based attributes which results in storing the code physically and also displaying the description.
    From a bulk insert scenario where the business has a number of new products that they want to add (due to a new range) I was suggesting that they use the Excel AddIn. This would allow them to cut and paste the data into the product entity. However as the category
    and sub category are domain-based Attributes they will need to know the ID – they will only know the name.
    From a MDS functionality point of view is it possible to get it to look up the code from the name?
    My current understanding on how to achieve this would mean I would need to have both code and name attributes on the Product entity for Category and Sub. The name attributes would be free text and the code attribute would be populated from a business rule.
    Downside to this approach is that you lose out on the nice dropdown pick list and the user does not know what a valid entry is as they can no longer select one.
    How is this usually implemented or handled in MDS?
    Cheers
    Kevin

    Hi Kevin,
    Another approach (if the one above does NOT suit you).
    Once again, as Reza suggested and  I agree with him totally, this is a job for SSIS.
    For what it's worth...
    Whilst I understand what you are trying to do, may I suggest another approach. What concerns me is users adding data willy-nilly and that YOU have no control as to what is going on. Secondly, what is more disconcerting is the thought of losing relational
    integrity, especially if you are using derived hierarchies within MDS. 
    I would handle this in a different manner, using SSIS and a filesystem watcher.
    Let the users submit their spreadsheets (with their updates) to a common directory on the server. Implement a .NET FileSystemWatcher (this takes 10 minutes for a Newbie). This file system watcher will launch a DOS batch file on the arrival of a spreadsheet
    within the given directory. The DOS batch file  fires a DTS exec to start an SSIS package. This package together with SQL Server procedures will ensure that the correct codes are obtained and the attribute data is correctly inserted into the correct Entities(with
    the correct relationships).
    While this sounds vague, I do it all the time. I am more than prepared to help you get going, should wish any assistance. I KNOW that this is not the answer that you are looking for HOWEVER it is perhaps the most effective.
    sincerest regards
    Steve Simon SQL Server MVP
    [email protected]

  • Query on Bulk Insert

    I am using bulk insert to load data into some tables.What limit i should specify for commit to be done, in order to have the best possible performance.

    I don't think there is any fixed sort of rule is there to identify the limit numbers.
    As Morgan suggested 2500 or the mentioned number for your purpose.
    Kindly check the following links ->
    http://www.psoug.org/reference/array_processing.html
    http://www.oracle.com/technology/oramag/oracle/08-mar/o28plsql.html
    http://www.dba-oracle.com/plsql/t_plsql_limit_clause.htm
    Regards.
    Satyaki De.

  • Bulk Insert Error message

    I have tried to enable bulk insert on a location. SQL* Loader is installed and appears to work, but I get an error when it tries to load the temp table into my Oracle database. Here's the output from the load file log:
    2011-05-12-10:43:09
    User ID...........     xxx
    Location..........     xxx
    Source File.......     xxx
    Processing Codes:
    BLANK............. Line is blank or empty.
    ESD............... Excluded String Detected, SKIP Field value was found.
    NN................ Non-Numeric, Amount field contains non numeric characters.
    RFM............... Required Field Missing.
    TC................ Type Conversion, Amount field could be converted to a number.
    ZP................ Zero Suppress, Amount field contains a 0 value and zero suppress is ON.
    Create Output File Start: [2011-05-12-10:43:10]
    Begin Oracle (SQL-Loader) Process (42386): [2011-05-12-10:43:17]
    Oracle (SQL-Loader) Log File Contents:
    SQL*Loader: Release 10.2.0.1.0 - Production on Thu May 12 10:43:17 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Control File: C:\WINDOWS\TEMP\tWrobert358876967263.ctl
    Character Set UTF16 specified for all input.
    Using character length semantics.
    First primary datafile C:\WINDOWS\TEMP\tWrobert358876967263.tmp has a
    little endian byte order mark in it.
    Data File: C:\WINDOWS\TEMP\tWrobert358876967263.tmp
    Bad File: C:\WINDOWS\TEMP\tWrobert358876967263.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Continuation: none specified
    Path used: Direct
    Load is UNRECOVERABLE; invalidation redo is produced.
    Table TWROBERT358876967263, loaded from every logical record.
    Insert option in effect for this table: APPEND
    TRAILING NULLCOLS option in effect
    Column Name Position Len Term Encl Datatype
    DATAKEY SEQUENCE (1, 1)
    PARTITIONKEY FIRST * CHARACTER
    Terminator string : '~|'
    CATKEY NEXT * CHARACTER
    Terminator string : '~|'
    PERIODKEY NEXT * DATE YYYYMMDD
    Terminator string : '~|'
    DATAVIEW NEXT * CHARACTER
    Terminator string : '~|'
    ACCOUNT NEXT * CHARACTER
    Terminator string : '~|'
    ENTITY NEXT * CHARACTER
    Terminator string : '~|'
    ICP NEXT * CHARACTER
    Terminator string : '~|'
    UD1 NEXT * CHARACTER
    Terminator string : '~|'
    UD2 NEXT * CHARACTER
    Terminator string : '~|'
    UD3 NEXT * CHARACTER
    Terminator string : '~|'
    UD4 NEXT * CHARACTER
    Terminator string : '~|'
    UD5 NEXT * CHARACTER
    Terminator string : '~|'
    UD6 NEXT * CHARACTER
    Terminator string : '~|'
    UD7 NEXT * CHARACTER
    Terminator string : '~|'
    UD8 NEXT * CHARACTER
    Terminator string : '~|'
    UD9 NEXT * CHARACTER
    Terminator string : '~|'
    UD10 NEXT * CHARACTER
    Terminator string : '~|'
    UD11 NEXT * CHARACTER
    Terminator string : '~|'
    UD12 NEXT * CHARACTER
    Terminator string : '~|'
    UD13 NEXT * CHARACTER
    Terminator string : '~|'
    UD14 NEXT * CHARACTER
    Terminator string : '~|'
    UD15 NEXT * CHARACTER
    Terminator string : '~|'
    UD16 NEXT * CHARACTER
    Terminator string : '~|'
    UD17 NEXT * CHARACTER
    Terminator string : '~|'
    UD18 NEXT * CHARACTER
    Terminator string : '~|'
    UD19 NEXT * CHARACTER
    Terminator string : '~|'
    UD20 NEXT * CHARACTER
    Terminator string : '~|'
    DESC1 NEXT * CHARACTER
    Terminator string : '~|'
    DESC2 NEXT * CHARACTER
    Terminator string : '~|'
    ATTR1 NEXT * CHARACTER
    Terminator string : '~|'
    ATTR2 NEXT * CHARACTER
    Terminator string : '~|'
    ATTR3 NEXT * CHARACTER
    Terminator string : '~|'
    ATTR4 NEXT * CHARACTER
    Terminator string : '~|'
    ATTR5 NEXT * CHARACTER
    Terminator string : '~|'
    ATTR6 NEXT * CHARACTER
    Terminator string : '~|'
    ATTR7 NEXT * CHARACTER
    Terminator string : '~|'
    ATTR8 NEXT * CHARACTER
    Terminator string : '~|'
    ATTR9 NEXT * CHARACTER
    Terminator string : '~|'
    ATTR10 NEXT * CHARACTER
    Terminator string : '~|'
    ATTR11 NEXT * CHARACTER
    Terminator string : '~|'
    ATTR12 NEXT * CHARACTER
    Terminator string : '~|'
    ATTR13 NEXT * CHARACTER
    Terminator string : '~|'
    ATTR14 NEXT * CHARACTER
    Terminator string : '~|'
    MEMOKEY NEXT * CHARACTER
    Terminator string : '~|'
    AMOUNT NEXT * CHARACTER
    Terminator string : '~|'
    CALCACCTTYPE CONSTANT
    Value is '9'
    CHANGESIGN CONSTANT
    Value is '0'
    AMOUNTX CONSTANT
    Value is '0'
    ACCOUNTR CONSTANT
    Value is '0'
    ACCOUNTF CONSTANT
    Value is '0'
    ENTITYR CONSTANT
    Value is '0'
    ENTITYF CONSTANT
    Value is '0'
    ICPR CONSTANT
    Value is '0'
    ICPF CONSTANT
    Value is '0'
    UD1R CONSTANT
    Value is '0'
    UD1F CONSTANT
    Value is '0'
    UD2R CONSTANT
    Value is '0'
    UD2F CONSTANT
    Value is '0'
    UD3R CONSTANT
    Value is '0'
    UD3F CONSTANT
    Value is '0'
    UD4R CONSTANT
    Value is '0'
    UD4F CONSTANT
    Value is '0'
    UD5R CONSTANT
    Value is '0'
    UD5F CONSTANT
    Value is '0'
    UD6R CONSTANT
    Value is '0'
    UD6F CONSTANT
    Value is '0'
    UD7R CONSTANT
    Value is '0'
    UD7F CONSTANT
    Value is '0'
    UD8R CONSTANT
    Value is '0'
    UD8F CONSTANT
    Value is '0'
    UD9R CONSTANT
    Value is '0'
    UD9F CONSTANT
    Value is '0'
    UD10R CONSTANT
    Value is '0'
    UD10F CONSTANT
    Value is '0'
    UD11R CONSTANT
    Value is '0'
    UD11F CONSTANT
    Value is '0'
    UD12R CONSTANT
    Value is '0'
    UD12F CONSTANT
    Value is '0'
    UD13R CONSTANT
    Value is '0'
    UD13F CONSTANT
    Value is '0'
    UD14R CONSTANT
    Value is '0'
    UD14F CONSTANT
    Value is '0'
    UD15R CONSTANT
    Value is '0'
    UD15F CONSTANT
    Value is '0'
    UD16R CONSTANT
    Value is '0'
    UD16F CONSTANT
    Value is '0'
    UD17R CONSTANT
    Value is '0'
    UD17F CONSTANT
    Value is '0'
    UD18R CONSTANT
    Value is '0'
    UD18F CONSTANT
    Value is '0'
    UD19R CONSTANT
    Value is '0'
    UD19F CONSTANT
    Value is '0'
    UD20R CONSTANT
    Value is '0'
    UD20F CONSTANT
    Value is '0'
    ARCHIVEID CONSTANT
    Value is '2260'
    HASMEMOITEM CONSTANT
    Value is '0'
    STATICDATAKEY CONSTANT
    Value is '0'
    Referential Integrity Constraint/Trigger Information:
    NULL, UNIQUE, and PRIMARY KEY constraints are unaffected.
    Trigger FDMAPP2."TWROBERT358876967263_AK" was disabled before the load.
    SQL*Loader-951: Error calling once/load initialization
    ORA-00942: table or view does not exist
    Processing Complete... [2011-05-12-10:43:18]

    Hi rjgideon,
    At the very end it says "ORA-00942: table or view does not exist". Looks like SQL*Loader is trying to insert data into a table that doesn't exist.
    Take a look at the control file: C:\WINDOWS\TEMP\tWrobert358876967263.ctl
    You might find a hint in there.
    Regards,
    Matt

  • Bulk inserts on Solaris slow as compared to windows

    Hi Experts,
    Looking for tips in troubleshooting 'Bulk inserts on Solaris'. I have observed the same bulk inserts are quite fast on Windows as compared to Solaris. Is there known issues on Solaris?
    This is the statement:
    I have 'merge...insert...' query which is in execution since long time more than 12 hours now:
    merge into A DEST using (select * from B SRC) SRC on (SRC.some_ID= DEST.some_ID) when matched then update ...when not matched then insert (...) values (...)Table A has 600K rows with unique identifier some_ID column, Table B has 500K rows with same some_id column, the 'merge...insert' checks if the some_ID exists, if yes then update query gets fired, when not matched then insert query gets fired. In either case it takes long time to execute.
    Environment:
    The version of the database is 10g Standard 10.2.0.3.0 - 64bit Production
    OS: Solaris 10, SPARC-Enterprise-T5120
    These are the parameters relevant to the optimizer:
    SQL>
    SQL> show parameter sga_target
    NAME                                 TYPE                VALUE
    sga_target                           big integer           4G
    SQL>
    SQL> show parameter sga_target
    NAME                                 TYPE                 VALUE
    sga_target                          big integer           4G
    SQL>
    SQL>  show parameter optimizer
    NAME                                        TYPE        VALUE
    optimizer_dynamic_sampling       integer        2
    optimizer_features_enable          string         10.2.0.3
    optimizer_index_caching             integer        0
    optimizer_index_cost_adj            integer       100
    optimizer_mode                          string         ALL_ROWS
    optimizer_secure_view_merging   boolean     TRUE
    SQL>
    SQL> show parameter db_file_multi
    NAME                                             YPE        VALUE
    db_file_multiblock_read_count        integer     16
    SQL>
    SQL> show parameter db_block_size
    NAME                                        TYPE        VALUE
    db_block_size                           integer     8192
    SQL>
    SQL> show parameter cursor_sharing
    NAME                                 TYPE        VALUE
    cursor_sharing                    string      EXACT
    SQL>
    SQL> column sname format a20
    SQL> column pname format a20
    SQL> column pval2 format a20
    SQL>
    SQL> select sname, pname, pval1, pval2 from sys.aux_stats$;
    SNAME                PNAME                     PVAL1               PVAL2
    SYSSTATS_INFO        STATUS                                    COMPLETED
    SYSSTATS_INFO        DSTART                                    07-12-2005 07:13
    SYSSTATS_INFO        DSTOP                                      07-12-2005 07:13
    SYSSTATS_INFO        FLAGS                  1
    SYSSTATS_MAIN        CPUSPEEDNW       452.727273
    SYSSTATS_MAIN        IOSEEKTIM           10
    SYSSTATS_MAIN        IOTFRSPEED         4096
    SYSSTATS_MAIN        SREADTIM
    SYSSTATS_MAIN        MREADTIM
    SYSSTATS_MAIN        CPUSPEED
    SYSSTATS_MAIN        MBRC
    SYSSTATS_MAIN        MAXTHR
    SYSSTATS_MAIN        SLAVETHR
    13 rows selected.
    Following is the error messages being pushed into oracle alert log file:
    Thu Dec 10 01:41:13 2009
    Thread 1 advanced to log sequence 1991
      Current log# 1 seq# 1991 mem# 0: /oracle/oradata/orainstance/redo01.log
    Thu Dec 10 04:51:01 2009
    Thread 1 advanced to log sequence 1992
      Current log# 2 seq# 1992 mem# 0: /oracle/oradata/orainstance/redo02.logPlease provide some tips to troubleshoot the actual issue. Any pointers on db_block_size,SGA,PGA which are the reasons for this failure?
    Regards,
    neuron

    SID, SEQ#,           EVENT,          WAIT_CLASS_ID,     WAIT_CLASS#, WAIT_TIME, SECONDS_IN_WAIT,      STATE
    125   24235    'db file sequential read'           1740759767                         8                -1               *58608     *   'WAITED SHORT TIME'Regarding the disk, I am not sure what needs to be checked, however from output of iostat it does not seem to be busy, check last three row's and %b column is negligible:
    tty         cpu
    tin tout  us sy wt id
       0  320   3  0  0 97
                        extended device statistics
        r/s    w/s   kr/s   kw/s wait actv wsvc_t asvc_t  %w  %b device
        0.0    0.0    0.0    0.0  0.0  0.0    0.0    0.0   0   0 ramdisk1
        0.0    2.5    0.0   18.0  0.0  0.0    0.0    8.3   0   1 c1t0d0
        0.0    0.0    0.0    0.0  0.0  0.0    0.0    0.0   0   0 c1t1d0
        0.0    0.0    0.0    0.0  0.0  0.0    0.0    0.0   0   0 c0t0d0

  • Bulk Insert Task Cannot bulk load because the file could not be opened.operating system error error code 3(The system cannot find the path specified.)

    Following error i am getting after i chnaged the Path in Config File from
    \\vs01\d$\\Deployment\Files\temp.txt
    to
    C:\Deployment\Files\temp.txt
    [Bulk Insert Task] Error: An error occurred with the following error message: "Cannot bulk load because the file "C:\Deployment\Files\temp.txt" could not be opened. Operating system error code 3(The system cannot find the path specified.).". 

    I think i know whats going on. The Bulk Insert task runs by executing sql command (bulk insert) internally from the target sql server to load the file. This means that the SQL Server Agent of the target sql server should have permissions on the file you trying to load. This also means that you need to use UNC path instead to specify the file path (if the target server in on different machine)
    Also from BOL (see section Usage Considerations - last bullet point)
    http://msdn.microsoft.com/en-us/library/ms141239.aspx
    * Only members of the sysadmin fixed server role can run a package that contains a Bulk Insert task.
    Make sure you take care of this as well.
    HTH
    ~Mukti
    Mukti

  • Bulk insert into a table

    What is the counter part for sql server BULK insert in Oracle.
    I have gone through an existing thread for the same question Bulk Insert CSV file in Oracle 9i But here it is suggested to read from a file into and external table and then to create my own table reading from external table.
    But I want to read directly from a file to an existing table in my database. How do I achieve this?
    Thank you,
    Praveen.

    Refer to
    http://download.oracle.com/docs/cd/B14117_01/server.101/b10825/ldr_modes.htm#i1008078
    "During Direct Path load through SQL Loader, some constaints and all db triggers are disabled. With the conventional path load method, arrays of rows are inserted with standard SQL INSERT statements—integrity constraints and insert triggers are automatically applied.
    After the rows are loaded and indexes rebuilt, any triggers that were disabled are automatically reenabled. The log file lists all triggers that were disabled for the load. There should not be any errors reenabling triggers."

  • SQL Server 2012 Express bulk Insert flat file 1million rows with "" as delimeter

    Hi,
    I wanted to see if anyone can help me out. I am on SQL server 2012 express. I cannot use OPENROWSET because my system is x64 and my Microsoft office suit is x32 (Microsoft.Jet.OLEDB.4.0).
    So I used Import wizard and is not working either. 
    The only thing that let me import this large file, is:
    CREATE TABLE #LOADLARGEFLATFILE
    Column1
    varchar(100), Column2 varchar(100), Column3 varchar(100),
    Column4 nvarchar(max)
    BULK INSERT
    #LOADLARGEFLATFILE
    FROM 'C:\FolderBigFile\LARGEFLATFILE.txt'
    WITH 
    FIRSTROW = 2,
    FIELDTERMINATOR ='\t',
    ROWTERMINATOR ='\n'
    The problem with CREATE TABLE and BULK INSERT is that my flat file comes with text qualifiers - "". Is there a way to prevent the quotes "" from loading in the bulk insert? Below is the data. 
    Column1
    Column2
    Column3
    Column4
    "Socket Adapter"
    8456AB
    $4.25
    "Item - Square Drive Socket Adapter | For "
    "Butt Splice" 
    9586CB
    $14.51
    "Item - Butt Splice"
    "Bleach"
    6589TE
    $27.30
    "Item - Bleach | Size - 96 oz. | Container Type"
    Ed,
    Edwin Lopera

    Hi lgnusLumen,
    According to your description, you use BULK INSERT to import data from a data file to the SQL table. However, to be usable as a data file for bulk import, a CSV file must comply with the following restrictions:
    1. Data fields never contain the field terminator.
    2. Either none or all of the values in a data field are enclosed in quotation marks ("").
    In your data file, the quotes aren't consistent, if you want to prevent the quotes "" from loading in the bulk insert, I recommend you use SQL Server Import and Export Wizard tools in SQL Server Express version. area, it will allow to strip the
    double quote from columns, you can review the following screenshot.
    In other SQL Server version, we can use SQL Server Integration Services (SSIS) to import data from a flat file (.csv) with removing the double quotes. For more information, you can review the following article.
    http://www.mssqltips.com/sqlservertip/1316/strip-double-quotes-from-an-import-file-in-integration-services-ssis/
    In addition, you can create a function to convert a CSV to a usable format for Bulk Insert. It will replace all field-delimiting commas with a new delimiter. You can then use the new field delimiter instead of a comma. For more information, see:
    http://stackoverflow.com/questions/782353/sql-server-bulk-insert-of-csv-file-with-inconsistent-quotes
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Using Bulk insert or SQL Loader in VB6

    Hi,
    I am quite new to the Oracle world and also forums. But I am looking for some directions in how i get a dataset of 10000 records into a table the quickest way. I have the recordset in an ADO Recordset (or a textfile if that is easier) and I want to insert them in an empty Oracle table. The problem is - I don't know how to.
    Situation
    The Oracle DB is on another computer I have nothing special installed on the computer running the VB6 application.
    Can anyone please provide code example or guidelines...
    Regards,
    Christian

    This may not be "bulk insert" by your definition, but it can transfer data as you want.
    A simple VB code for demo purpose:
    Dim con As New ADODB.Connection
    Dim con2 As New ADODB.Connection
    Dim rst As New ADODB.Recordset
    Dim rst2 As New ADODB.Recordset
    Dim rst3 As New ADODB.Recordset
    con.ConnectionString = "Provider=OraOLEDB.Oracle.1;User ID=scott;Password=tiger;Data Source=db_one;"
    con.Open
    rst.Open "select * from dept", con, adOpenDynamic, adLockOptimistic
    'save to a file using ADTG format. You may choose other format.
    rst.Save "c:\myfile.txt", adPersistADTG
    'dept2 is an empty table with the same table definition as dept. You can create it using SQL*Plus.
    'add rows by reading from the saved file.
    con2.ConnectionString = "Provider=OraOLEDB.Oracle.1;User ID=xyz;Password=xyz;Data Source=db_two;"
    con2.Open
    'open the saved file
    rst2.Open "c:\myfile.txt"
    'rst3 is an empty recordset because dept2 is empty at this time.
    rst3.Open "select * from dept2", con2, adOpenDynamic, adLockOptimistic
    'adding rows into dept2.
    Do Until rst2.EOF
    rst3.AddNew Array("deptno", "dname", "loc"), Array(rst2.Fields("deptno"), rst2.Fields("dname"), rst2.Fields("loc"))
    rst2.MoveNext
    Loop
    rst.Close
    rst2.Close
    rst3.Close
    con.Close
    con2.Close
    Sinclair

Maybe you are looking for