Using of bulk insert create problem

How to use the bulk insert statement in my jsp and which should be updated into the database.
I've tried this one:
bulk insert test from test1.txt with (fieldterminator=':')but it gives an error as:
u don't have permission to use bulk statement.
Could any1 get me rid off from this problem.
in advance thanks.....

Most likely the person responsible for permissions in your database could help you out there. If you're here looking for a way to execute commands that you aren't authorized to execute, you are wasting your time.

Similar Messages

  • Proper array size to be used in bulk insert

    What is the proper array size to be used in bulk insert?
    I have around 1 million records. Should I insert them all at a time or distribute them over many iterations.

    I'd generally expect external tables to be more efficient than SQL*Loader if only because you don't have to spend cycles loading data into a staging table. Depending on the file, Oracle may be able to access the data in parallel via the external table interface.
    From a pure efficiency standpoint, it would be best if the processing could be encapsulated into a single multi-table insert statement. Whether that is realistic, of course, depends on your logic, how complicated that SQL statement would be, etc. If you have to resort to PL/SQL, bulk processing is surely the way to go. it doesn't matter too much what LIMIT size you choose-- something like 100 or 1000 is generally appropriate-- but the marginal difference is pretty small. On a load of only 1 million rows, it may not be particularly easy to measure.
    Justin

  • Using the software update created problems

    Ok so I bought Leopard and upgraded from Tiger, then updated using the software update. Now I have a whole bunch of problems. My Apple Works is now missing, the program is just gone. All my Adobe programs now give me the error of Incompatible with current OS or some Your Licensing is not working error. I have a whole load of Adobe programs that should be working, like Contribute CS 3 and Photo Shop and Illustrator and Designer and so on. All of which worked under the 4.11 and the 5.1 OSes but now no longer work. This isn't even touching on the elimination of the Classic environment which i have a lot of programs that will cost way too much money to buy again for the new OS.
    Anybody know how to get back Apple Works and how to get the Adobe products running again?

    First set of problems, I had two software packaged programs go missing. Totally erased from the system. iWeb and Apple Works.
    This would not happen after a software update, unless the directory got damaged somehow*:
    http://www.macmaps.com/directoryfaq.html
    That would give the machine a difficult time trying to find files on the computer.
    Next set of problems my external firewire drive stopped being seen from the system.
    This most commonly happens if a Firewire hard drive does not have the proper firmware to be used with the operating system in question. This is one reason most people recommend dismounting and disconnecting all third party devices before applying updates. This used to be a more common problem with 10.3, but not out of the realm of experience of people with 10.5.
    The next most common cause is the clock battery dying, but not quite dead. Replacing it can fix that problem as well.
    I should say that my system consists of several computers networked together.
    I would have completely disconnected the computers before applying the update.
    I can take my external firewire back up time machine drives and connect them to a PC and see the data. But my macs do not even recognise them, they don't even show up when plugged in.
    This is further evidence the firmware on the hard drive was not yet updated for compatibility with the operating system.
    Third set of problems, all the apple install disks became unreadable by my system.
    This can be commonly caused by a dying optical drive, or bad permissions on the system, or a dying clock battery.
    Fourth set of problems, all the Adobe programs became un-useable and returned errors. Adobe has been working with me on this and have been far more helpful than Apple has been.
    That's a case of corrupt files, or files which were migrated from another system. Migration that is done improperly from a PowerPC to an Intel system may create issues with powerpc plugins on an Intel Mac. If your hard drive got over 85% full and/or the directory was damaged for any reason (especially forced reboots), that can also trigger such a reaction during an update.
    Fifth set of problems just recently discovered, all my stored movies, music and podcast in iTunes is gone.
    This is usually due to a directory issue, but can also be a dying hard drive issue.
    Sounds like you have multiple symptoms pointing towards a few common possible causes. Directory damage, and clock battery malfunctioning, and needing a better firmware on your Firewire hard drive case. Replacing the hard drive case with a compatible one is simple enough. http://www.macsales.com/ makes the right cases. I would not go with LaCie, Western Digital, or Seagate cases. Western Digital and Seagate internal hard drives are fine in of themselves. Replace the MyBook hard drive cases with http://www.macsales.com/ cases and same with the LaCies.
    I have Apple TV and EYE TV and a Midi interface box attached to my G5 mac. My G5 is the one that lost Apple Works and iWeb.
    Remove the Midi interface box. It may help things work better.
    My systems have the super drive on them and I have virtual PC and Softwindows installed.
    Softwindows barely works if at all under Classic, and VirtualPC only works with version 7.0.2 under Leopard. If you got an earlier version working under Leopard you were lucky. You really needed to migrate to a supported emulator under Leopard listed on my FAQ*:
    http://www.macmaps.com/macosxnative.html#WINTEL
    It says you didn't research your options well enough before upgrading to Leopard. This has been well documented in the forums before this.
    Booted up from the Norton disks and repaired disk.
    This is the biggest flaw in your plans, which caused ALL your problems. Norton is not compatible with any version of Mac OS X. It eats directories for breakfast, lunch, and dinner. Only Alsoft Disk Warrior is safe and only after a data recovery attempt with Prosoft Data Rescue II, Subrosasoft Filesalvage, or Boomerang's Boomerang. We have constantly harped on the forums here that Norton is damaging to data. This has been known about since Mac OS X came out. It has even been called "Norton Kevorkian" by some.
    You can't blame Apple for this. Your lack of research and lack of asking in the right places at the right time led to your failures.
    - * Links to my pages may give me compensation.

  • One VO used on two pages creating problem.-Nullpointer error

    Hello All,
    I have extended one VO on one page "ponAwardByQuotePG". I am done with that. But this VO is used on second next page as well.
    After pressing one "AWARD" button on 1st page , it goes to 2nd page "ponAwardQuotePG". Both these pages use same VO which i have extended. Whenever I press Save Award GO button on second page, it throws NULLPOINTER exception error attached herewith. I have also attached the flow of steps along with corresponding VO and AM code.
    I found following thing in 2nd page's CO even though my VO is extended as "XXEGAAwardByQuoteVOEx" , its showing following in CO:
    AwardByQuoteVO awardbyquotevo = (AwardByQuoteVO)awardbyquoteam.findViewObject("AwardByQuoteVO");
    Please guide what could be the reason (Contact me at [email protected] so that i can send you some more document as attachment.)
    Following is the error stack:
    "java.lang.NullPointerException<br /><br /> at oracle.apps.pon.award.creation.webui.AwardQuoteCO.processFormRequest(AwardQuoteCO.java:1710)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:810)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)<br /><br /> at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1159)<br /><br /> at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)<br /><br /> at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)<br /><br /> at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)<br /><br /> at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2676)<br /><br /> at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1683)<br /><br /> at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509)<br /><br /> at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430)<br /><br /> at _oa__html._OA._jspService(_OA.java:84)<br /><br /> at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)<br /><br /> at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)<br /><br /> at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)<br /><br /> at oracle.jsp.JspServlet.internalService(JspServlet.java:186)<br /><br /> at oracle.jsp.JspServlet.service(JspServlet.java:156)<br /><br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)<br /><br /> at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)<br /><br /> at org.apache.jserv.JServConnection.run(JServConnection.java:294)<br /><br /> at java.lang.Thread.run(Thread.java:619)"

    I found following thing in 2nd page's CO even though my VO is extended as "XXEGAAwardByQuoteVOEx" , its showing following in CO:
    AwardByQuoteVO awardbyquotevo = (AwardByQuoteVO)awardbyquoteam.findViewObject("AwardByQuoteVO");controller code won't change when you substitute the VO. You will see it only at the runtime.
    And to verify the substitution at the run time, select the "About this Page" link and expand the "Business Component References Details".
    And to debug the error in the standard controller, you need to decompile the controller file and include it in your project.
    This will show you the exact problem from where you can proceed further. You can use jad tool for decompilation.
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to use BULK INSERT for a data from a cursor?

    Oracle 10G enterprise edition.
    I tried to Bulk insert datas returning from a cursor, its returning error.
    PLS-00302: component 'LAST' must be declared
    I need some help to use the Bulk INSERT here.Can any one help me to specify what error i have made?
    CREATE OR REPLACE PROCEDURE HOT_ADMIN.get_search_keyword_stats_prc
    IS
    CURSOR c_get_scenarios
    IS
    SELECT a.*,ROWNUM rnum
    FROM (
    SELECT TRUNC(r.search_date) sdate,
    r.search_hits hits,
    r.search_type stype,
    r.search_qualification qual,
    r.search_location loc,
    r.search_town stown,
    r.search_postcode pcode,
    r.search_college college,
    r.search_colname colname,
    r.search_text text,
    r.affiliate_id affiliate,
    r.search_study_mode smode,
    r.location_hint hint,
    r.search_posttown ptown,
    COUNT(1) cnt
    FROM w_search_headers r
    WHERE search_text IS NOT NULL
    AND NVL(search_type,' ') <> 'C'
    AND TRUNC(search_date)= TO_DATE(TO_CHAR(SYSDATE-1,'DD-MON-RRRR'))
    GROUP BY TRUNC(r.search_date),
    r.search_hits,
    r.search_type,
    r.search_qualification,
    r.search_location,
    r.search_town,
    r.search_postcode,
    r.search_college,
    r.search_colname,
    r.search_text,
    r.affiliate_id,
    r.search_study_mode,
    r.location_hint,
    r.search_posttown
    ORDER BY cnt desc
    ) a
    WHERE ROWNUM <=1000;
    lc_get_data c_get_scenarios%ROWTYPE;
    BEGIN
    OPEN c_get_scenarios;
    FETCH c_get_scenarios into lc_get_data;
    CLOSE c_get_scenarios;
    FORALL i IN 1..lc_get_data.last
    INSERT INTO W_SEARCH_SCENARIO_STATS VALUES ( i.sdate,
    i.hits,
    i.stype,
    i.qual,
    i.loc,
    i.stown,
    i.pcode,
    i.college,
    i.colname,
    i.text,
    i.affiliate,
    i.smode,
    i.hint,
    i.ptown,
    i.cnt
    COMMIT;
    END;

    This isn't what you asked, but I've generally found it helpful to list the columns in an INSERT statement before the values. It is of course optional, but useful for reference when looking at the statement later

  • SQL Server 2008 - RS -Bulk Insert

    I'am trying to import some flat files to SQL using the following bulk insert:
    cREATE TABLE #temp1
        [field1] [varchar](20) NOT NULL,
        [field2] [datetime] NOT NULL,
        [fields3] [varchar](100) not null
    select * from #temp1
    BULK
    INSERT #temp1
    FROM 'c:\testestes.txt' 
    WITH
    FIELDTERMINATOR = ';',
    ROWTERMINATOR = '\n',
    FIRSTROW = 1
    GO
    INSERT INTO dbo.teste1 ( M_nAME, [Date], Notes)
    Select RTRIM(LTRIM([field1])), RTRIM(LTRIM([field2])), RTRIM(LTRIM([fields3])) From #temp1
    IF EXISTS(SELECT * FROM #temp1) drop table #temp1
    And here is an example of my flat file:
    TESTES11;19-03-2015 16:03:07
    However, some rows have a third column with this aspect:
    TESTES12;27-03-2015 18:03:32;Request timed out.
    And I'm having some issues to import the second and third column to the table that I created (#temp1) because it don't allows me to import a datetime data.

    One solution: import the line as whole into a staging table column. Process it further from the staging table.
    Example of importing an entire line:
    http://www.sqlusa.com/bestpractices2005/notepad/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • Sequence in Bulk Insert

    Hi All
    Just one doubt,
    whether sequence can be used in Bulk insert query ?

    Have you tried creating a test case? See below:
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL > CREATE table test_tab(id NUMBER, ename VARCHAR2(10));
    Table created.
    SQL > CREATE SEQUENCE test_seq;
    Sequence created.
    SQL > DECLARE
      2          TYPE e_list is TABLE OF test_tab.ename%TYPE INDEX BY PLS_INTEGER;
      3
      4          emps e_list;
      5  BEGIN
      6          emps(1) := 'Jeff';
      7          emps(2) := 'Jane';
      8          emps(3) := 'Joe';
      9
    10          FORALL i IN emps.FIRST .. emps.LAST
    11                  INSERT INTO test_tab(id, ename) VALUES(test_seq.NEXTVAL,emps(i));
    12
    13          COMMIT;
    14  END;
    15  /
    PL/SQL procedure successfully completed.
    SQL > SELECT * FROM test_tab;
                      ID ENAME
                       2 Jeff
                       3 Jane
                       4 Joe
    SQL > DROP SEQUENCE test_seq;
    Sequence dropped.
    SQL > DROP TABLE test_tab PURGE;
    Table dropped.

  • Help with BULK Insert

    Hello SQL Buddies,
    I am trying to run a BULK insert.
    Here is my code:
    Code start:
    use Lagerliste
    drop table Import
    use Lagerliste
    create table Import
    TOTALQTY float null,
    PARTNO nvarchar (255) null,
    [DESC] nvarchar (255) null,
    CO nvarchar (255) null,
    BIN nvarchar (255) null,
    PRICE float null,
    DISCOUNT nvarchar (255) null,
    LASTPURC nvarchar (255) null,
    AGECODE nvarchar (255) null,
    MANFPART nvarchar (255) null
    use Lagerliste
    bulk
    insert Import
    from 'D:\FTP\RG\Stockfile.csv'
    with
    formatfile = 'D:\FormatFile\test.xml',
    Errorfile = 'D:\FormatFile\error.txt'
    Code stop..
    My format file code is here:
    Code start:
    <?xml version="1.0"?>
      <BCPFORMAT xmlns = "http://schemas.microsoft.com/sqlserver/2004/bulkload/format"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <RECORD>
          <FIELD ID="1"    xsi:type="CharTerm"        TERMINATOR= ',"'    />
          <FIELD ID="2"    xsi:type="CharTerm"    MAX_LENGTH="255"    TERMINATOR= '","' />
          <FIELD ID="3"    xsi:type="CharTerm"    MAX_LENGTH="255"    TERMINATOR= '","'    />
          <FIELD ID="4"    xsi:type="CharTerm"    MAX_LENGTH="255"    TERMINATOR= '","'    />
          <FIELD ID="5"    xsi:type="CharTerm"    MAX_LENGTH="255"    TERMINATOR= '",'    />
          <FIELD ID="6"    xsi:type="CharTerm"      TERMINATOR= ',"'    />
          <FIELD ID="7"    xsi:type="CharTerm"    MAX_LENGTH="255"    TERMINATOR= '","'    />
          <FIELD ID="8"    xsi:type="CharTerm"    MAX_LENGTH="255"    TERMINATOR= '","'    />
          <FIELD ID="9"    xsi:type="CharTerm"    MAX_LENGTH="255"    TERMINATOR= '","'    />
          <FIELD ID="10"    xsi:type="CharTerm"    MAX_LENGTH="255"    TERMINATOR= '"'        />
        </RECORD>
        <ROW>
          <COLUMN SOURCE="1" NAME="TOTALQTY"    xsi:type="SQLFLT8"/>
          <COLUMN SOURCE="2" NAME="PARTNO"    xsi:type="SQLNVARCHAR"/>
          <COLUMN SOURCE="3" NAME="DESC"        xsi:type="SQLNVARCHAR"/>
          <COLUMN SOURCE="4" NAME="CO"        xsi:type="SQLNVARCHAR"/>
          <COLUMN SOURCE="5" NAME="BIN"        xsi:type="SQLNVARCHAR"/>
          <COLUMN SOURCE="6" NAME="PRICE"        xsi:type="SQLFLT8"/>
          <COLUMN SOURCE="7" NAME="DISCOUNT"    xsi:type="SQLNVARCHAR"/>
          <COLUMN SOURCE="8" NAME="LASTPURC"    xsi:type="SQLNVARCHAR"/>
          <COLUMN SOURCE="9" NAME="AGECODE"    xsi:type="SQLNVARCHAR"/>
          <COLUMN SOURCE="10" NAME="MANFPART"    xsi:type="SQLNVARCHAR"/>
        </ROW>
      </BCPFORMAT>
    Code stop..
    If i run the code it says:
    Msg 4832, Level 16, State 1, Line 20
    Bulk load: An unexpected end of file was encountered in the data file.
    Msg 7399, Level 16, State 1, Line 20
    The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.
    Msg 7330, Level 16, State 2, Line 20
    Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".
    And the error file says:
    Row 473629 File Offset 42503226 ErrorFile Offset 0 - HRESULT 0x80004005
    If i then in my bulk insert adds: "Lastrow = '473629' it works all fine. So it will mean that it gets an error at the last line where there is no more data? But this sql query should run every day, so i have to do so it dont gets the error.
    Can someone help me?
    Looking forward to an answer, i hope someone have a solution.
    Regards Christian.

    Try the below format file,
    <?xml version="1.0"?>
    <BCPFORMAT xmlns = "http://schemas.microsoft.com/sqlserver/2004/bulkload/format"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <RECORD>
    <FIELD ID="1" xsi:type="CharTerm" TERMINATOR= ',"' />
    <FIELD ID="2" xsi:type="CharTerm" MAX_LENGTH="255" TERMINATOR= '","' />
    <FIELD ID="3" xsi:type="CharTerm" MAX_LENGTH="255" TERMINATOR= '","' />
    <FIELD ID="4" xsi:type="CharTerm" MAX_LENGTH="255" TERMINATOR= '","' />
    <FIELD ID="5" xsi:type="CharTerm" MAX_LENGTH="255" TERMINATOR= '",' />
    <FIELD ID="6" xsi:type="CharTerm" TERMINATOR= ',"' />
    <FIELD ID="7" xsi:type="CharTerm" MAX_LENGTH="255" TERMINATOR= '","' />
    <FIELD ID="8" xsi:type="CharTerm" MAX_LENGTH="255" TERMINATOR= '","' />
    <FIELD ID="9" xsi:type="CharTerm" MAX_LENGTH="255" TERMINATOR= '","' />
    <FIELD ID="10" xsi:type="CharTerm" MAX_LENGTH="255" TERMINATOR= '"\r\n' />
    </RECORD>
    <ROW>
    <COLUMN SOURCE="1" NAME="TOTALQTY" xsi:type="SQLFLT8"/>
    <COLUMN SOURCE="2" NAME="PARTNO" xsi:type="SQLNVARCHAR"/>
    <COLUMN SOURCE="3" NAME="DESC" xsi:type="SQLNVARCHAR"/>
    <COLUMN SOURCE="4" NAME="CO" xsi:type="SQLNVARCHAR"/>
    <COLUMN SOURCE="5" NAME="BIN" xsi:type="SQLNVARCHAR"/>
    <COLUMN SOURCE="6" NAME="PRICE" xsi:type="SQLFLT8"/>
    <COLUMN SOURCE="7" NAME="DISCOUNT" xsi:type="SQLNVARCHAR"/>
    <COLUMN SOURCE="8" NAME="LASTPURC" xsi:type="SQLNVARCHAR"/>
    <COLUMN SOURCE="9" NAME="AGECODE" xsi:type="SQLNVARCHAR"/>
    <COLUMN SOURCE="10" NAME="MANFPART" xsi:type="SQLNVARCHAR"/>
    </ROW>
    </BCPFORMAT>
    Refer
    http://stackoverflow.com/questions/8530353/sql-bulk-insert-xml-format-file-with-double-quotes-in-terminator
    http://technet.microsoft.com/en-us/library/ms191234(v=sql.105).aspx
    Regards, RSingh

  • How to pass a parameter into a select statement using a bulk collect

    Using a cursors I can use execute immediate to pass a parameter to specify a table name.
    I have modified the procedure not to use the cursor. I am using a collection using a bulk insert into a nested table. How can I specify the table the table name as a parameter without using the execute immediate statement.
    Thank you

    Hi Donald,
        The functionality of using a parameter in a function is only available in the formula editor and not in SQL Expression. Parameters cannot be passed to the SQL Expression, the main purpose of the SQL Expression is to make use of Database functions to make calculations at the database level but the current functionality of the product only allows you to use Database fields.
    There is an article that talks on SQL Expressions and can be useful http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2016184&sliceId=&dialogID=6018612&stateId=1%200%206020316
    Regards,
    Vinay

  • File access problem while using BULK INSERT

    I'm creating a script to automatically convert a large mess of data.  Here's a test query I was using to bring a file into the database:
    INSERT [ImportTestTable]
    SELECT a.*
    FROM
    OPENROWSET(
    BULK 'D:\TestFile.csv',
    FORMATFILE = 'D:\TestStyle.fmt',
    FIRSTROW = 2
    ) AS a;
    SELECT * FROM ImportTestTable
    I've used queries like this on other networks and machines before, but when I run that query on the particular machine I'm working with now, I get the following error:
    Msg 4861, Level 16, State 1, Line 13
    Cannot bulk load because the file "D:\TestFile.csv" could not be opened. Operating system error code 21
    (The device is not ready.).
    Here's some relevant facts I can think of that might help:
    I am running the query from SQL Server Management Studio on a remote machine running Windows 7 Ultimate.  I am connected to this server using SQL authentication.  I believe we are on the same domain / network.  I am not the DBA.  I do
    have the permission "Administer Bulk Operations" explicitly granted to me by the DBA.  The user I am currently logged in as in windows is capable of opening, editing, and saving the file in windows explorer.  The format file is a NON-XML
    format file.
    Any pointers as to where to look for more detailed information would be greatly appreciated!

    I know this is a little old by now, but this is what I used just this week:
    bulk insert [dbo].[Test_Table]
    from 'C:\Documents and Settings\rshuell\Desktop\Test_File.txt'
    WITH (
    FIELDTERMINATOR=',',
    ROWTERMINATOR = '\n',
    KEEPNULLS,
    FIRSTROW=2
    That worked fine for me.
    Of course, we Naomi stated, the file has to be ON THE SERVER.  Or, if you're using an FTP site, for instance, the path would have to point to the FTP site.
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • 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

  • Bulk Insert using Script Task in SSIS

    Hi guys,
    Please I have about 300Million rows of data I want to load from a remote SQL server into another SQL server. The problem is that the data takes forever to load and I have a time line.
    I was wondering if there is a way in can do bulk insert for this or maybe if I can get a code that I can use to load the data faster.
    Please I really need your help as my job depends on this.
    me

    CREATE TABLE [dbo].[post_tran](
    [post_tran_id] [bigint] NOT NULL,
    [post_tran_cust_id] [bigint] NOT NULL,
    [settle_entity_id] [dbo].[POST_ID] NULL,
    [batch_nr] [int] NULL,
    [prev_post_tran_id] [bigint] NULL,
    [next_post_tran_id] [bigint] NULL DEFAULT ((0)),
    [sink_node_name] [dbo].[POST_NAME] NULL,
    [tran_postilion_originated] [dbo].[POST_BOOL] NOT NULL,
    [tran_completed] [dbo].[POST_BOOL] NOT NULL,
    [message_type] [char](4) NOT NULL,
    [tran_type] [char](2) NULL,
    [tran_nr] [bigint] NOT NULL,
    [system_trace_audit_nr] [char](6) NULL,
    [rsp_code_req] [char](2) NULL,
    [rsp_code_rsp] [char](2) NULL,
    [abort_rsp_code] [char](2) NULL,
    [auth_id_rsp] [varchar](10) NULL,
    [auth_type] [numeric](1, 0) NULL,
    [auth_reason] [numeric](1, 0) NULL,
    [retention_data] [varchar](999) NULL,
    [acquiring_inst_id_code] [varchar](11) NULL,
    [message_reason_code] [char](4) NULL,
    [sponsor_bank] [char](8) NULL,
    [retrieval_reference_nr] [char](12) NULL,
    [datetime_tran_gmt] [datetime] NULL,
    [datetime_tran_local] [datetime] NOT NULL,
    [datetime_req] [datetime] NOT NULL,
    [datetime_rsp] [datetime] NULL,
    [realtime_business_date] [datetime] NOT NULL,
    [recon_business_date] [datetime] NOT NULL,
    [from_account_type] [char](2) NULL,
    [to_account_type] [char](2) NULL,
    [from_account_id] [varchar](28) NULL,
    [to_account_id] [varchar](28) NULL,
    [tran_amount_req] [dbo].[POST_MONEY] NULL,
    [tran_amount_rsp] [dbo].[POST_MONEY] NULL,
    [settle_amount_impact] [dbo].[POST_MONEY] NULL,
    [tran_cash_req] [dbo].[POST_MONEY] NULL,
    [tran_cash_rsp] [dbo].[POST_MONEY] NULL,
    [tran_currency_code] [dbo].[POST_CURRENCY] NULL,
    [tran_tran_fee_req] [dbo].[POST_MONEY] NULL,
    [tran_tran_fee_rsp] [dbo].[POST_MONEY] NULL,
    [tran_tran_fee_currency_code] [dbo].[POST_CURRENCY] NULL,
    [tran_proc_fee_req] [dbo].[POST_MONEY] NULL,
    [tran_proc_fee_rsp] [dbo].[POST_MONEY] NULL,
    [tran_proc_fee_currency_code] [dbo].[POST_CURRENCY] NULL,
    [settle_amount_req] [dbo].[POST_MONEY] NULL,
    [settle_amount_rsp] [dbo].[POST_MONEY] NULL,
    [settle_cash_req] [dbo].[POST_MONEY] NULL,
    [settle_cash_rsp] [dbo].[POST_MONEY] NULL,
    [settle_tran_fee_req] [dbo].[POST_MONEY] NULL,
    [settle_tran_fee_rsp] [dbo].[POST_MONEY] NULL,
    [settle_proc_fee_req] [dbo].[POST_MONEY] NULL,
    [settle_proc_fee_rsp] [dbo].[POST_MONEY] NULL,
    [settle_currency_code] [dbo].[POST_CURRENCY] NULL,
    [icc_data_req] [text] NULL,
    [icc_data_rsp] [text] NULL,
    [pos_entry_mode] [char](3) NULL,
    [pos_condition_code] [char](2) NULL,
    [additional_rsp_data] [varchar](25) NULL,
    [structured_data_req] [text] NULL,
    [structured_data_rsp] [text] NULL,
    [tran_reversed] [char](1) NULL DEFAULT ((0)),
    [prev_tran_approved] [dbo].[POST_BOOL] NULL,
    [issuer_network_id] [varchar](11) NULL,
    [acquirer_network_id] [varchar](11) NULL,
    [extended_tran_type] [char](4) NULL,
    [ucaf_data] [varchar](33) NULL,
    [from_account_type_qualifier] [char](1) NULL,
    [to_account_type_qualifier] [char](1) NULL,
    [bank_details] [varchar](31) NULL,
    [payee] [char](25) NULL,
    [card_verification_result] [char](1) NULL,
    [online_system_id] [int] NULL,
    [participant_id] [int] NULL,
    [opp_participant_id] [int] NULL,
    [receiving_inst_id_code] [varchar](11) NULL,
    [routing_type] [int] NULL,
    [pt_pos_operating_environment] [char](1) NULL,
    [pt_pos_card_input_mode] [char](1) NULL,
    [pt_pos_cardholder_auth_method] [char](1) NULL,
    [pt_pos_pin_capture_ability] [char](1) NULL,
    [pt_pos_terminal_operator] [char](1) NULL,
    [source_node_key] [varchar](32) NULL,
    [proc_online_system_id] [int] NULL,
    [from_account_id_cs] [int] NULL,
    [to_account_id_cs] [int] NULL,
    [pos_geographic_data] [char](5) NULL,
    [payer_account_id] [char](5) NULL,
    [cvv_available_at_auth] [varchar](30) NULL,
    [cvv2_available_at_auth] [varchar](30) NULL
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    me

  • Number of rows inserted is different in bulk insert using select statement

    I am facing a problem in bulk insert using SELECT statement.
    My sql statement is like below.
    strQuery :='INSERT INTO TAB3
    (SELECT t1.c1,t2.c2
    FROM TAB1 t1, TAB2 t2
    WHERE t1.c1 = t2.c1
    AND t1.c3 between 10 and 15 AND)' ....... some other conditions.
    EXECUTE IMMEDIATE strQuery ;
    These SQL statements are inside a procedure. And this procedure is called from C#.
    The number of rows returned by the "SELECT" query is 70.
    On the very first time call of this procedure, the number rows inserted using strQuery is *70*.
    But in the next time call (in the same transaction) of the procedure, the number rows inserted is only *50*.
    And further if we are repeating calling this procedure, it will insert sometimes 70 or 50 etc. It is showing some inconsistency.
    On my initial analysis it is found that, the default optimizer is "ALL_ROWS". When i changed the optimizer mode to "rule", this issue is not coming.
    Anybody faced these kind of issues?
    Can anyone tell what would be the reason of this issue..? any other work around for this...?
    I am using Oracle 10g R2 version.
    Edited by: user13339527 on Jun 29, 2010 3:55 AM
    Edited by: user13339527 on Jun 29, 2010 3:56 AM

    You have very likely concurrent transactions on the database:
    >
    By default, Oracle Database permits concurrently running transactions to modify, add, or delete rows in the same table, and in the same data block. Changes made by one transaction are not seen by another concurrent transaction until the transaction that made the changes commits.
    >
    If you want to make sure that the same query always retrieves the same rows in a given transaction you need to use transaction isolation level serializable instead of read committed which is the default in Oracle.
    Please read http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10471/adfns_sqlproc.htm#ADFNS00204.
    You can try to run your test with:
    set  transaction isolation level  serializable;If the problem is not solved, you need to search possible Oracle bugs on My Oracle Support with keywords
    like:
    wrong results 10.2Edited by: P. Forstmann on 29 juin 2010 13:46

  • How to use bulk insert in utl_file

    i am creating text file of employee list i go huge data i want to use bulk insert with utl_file is it possible if so, how pls help me.

    If what you are asking, in some unknown version of Oracle, is whether using FORALL will increase the speed for writing a file to your hard disk the answer is no.
    BULK COLLECT, however, might help.

  • If your database in Full Recovery mode, can you use Bulk Insert Task to load data

    If your database in Full Recovery mode, can you use Bulk Insert Task to load data

    If your database in Full Recovery mode, can you use Bulk Insert Task to load data
    Yes you can ofourse but dont be in idea that logging will be mininal. Loggign will be as per recovery model full. Every thing will be logged. If you are going to use bulk insert task you can consider switching recovery model to Bulk logged but you will not
    have option to do point in time recovery.
    PS: please dont create duplicate threads
    If you read first Note section in below link it clearly states that yes logging will be full and you can use
    http://technet.microsoft.com/en-us/library/ms191244(v=sql.105).aspx
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

Maybe you are looking for

  • Memory upgrade on Satellite A60-218

    Hi, Is it possible to upgrade the memory for the Satellite A60-218 models? I've heard that the memory is onboard (internal) and cannot be replaced. Is this true? If not, could somebody give me a hint where can I find the memory modules on this model?

  • Maximum font size?

    I am unable to get text larger than fontSize=127 with Flex. This limitation doesn't exist in Flash, what am I missing with Flex? This is a pretty huge problem for what I was doing. The whole text/font system seems to be lacking. Many font families do

  • Design view not working after importing project from Flex Builder

    After importing a project from Flex Builder to Flash Builder I am no longer able to see anything in the design view. I am using the flex 4.5 sdk. Any idea how I can get this design view working? I heard it could have something to do with the metadata

  • Music not appearing on iPhone 4!

    Hey guys, So after syncing some new music (manually managed) onto my iPhone from my MBP, my iPhone completely lost of the its music. The songs (including the ones I just synced) appear just fine in the iPhone tab on iTunes, yet in the iPod app and in

  • Oracle business intelligence enteprise edition

    hi i have installed an oracle OBIEE client in my local machine, created successfully an ODBC connection to an oracle DB. when i try to connect,create repository an import metadata from the Oracle Bi admin tool im getting error message . connection fa