How to load data in plain-text file into database by using EJB?

Hi,
We need to develop an on-line application which requires us to load input data
from a selected plain-text file on the Web server (iplanet server) into the backend
oracle database. How could I use EJB to make it happen? it seems like using Entity
EJB is not feasible.
Really appreciate your help!
Corona

Hi Corona,
"Corona Fang" <[email protected]> wrote in message
news:3f3b0ea3$[email protected]..
We need to develop an on-line application which requires us to load inputdata
from a selected plain-text file on the Web server (iplanet server) intothe backend
oracle database. How could I use EJB to make it happen? it seems likeusing Entity
EJB is not feasible.If you are talking about loading thousands of records,
the preferable way is using plain JDBC calls utilizing
batch methods.
Regards,
Slava Imeshev

Similar Messages

  • How to import data from a text file into a table

    Hello,
    I need help with importing data from a .csv file with comma delimiter into a table.
    I've been struggling to figure out how to use the "Import from Files" wizard in Oracle 10g web-base Enterprise Manager.
    I have not been able to find a simple instruction on how to use the Wizard.
    I have looked at the Oracle Database Utilities - Overview of Oracle Data Pump and the Help on the "Import: Files" page.
    Neither one gave me enough instruction to be able to do the import successfully.
    Using the "Import from file" wizard, I created a Directory Object using the Create Directory Object button. I Copied the file from which i needed to import the data into the Operating System Directory i had defined in the Create Directory Object page. I chose "Entire files" for the Import type.
    Step 1 of 4 is the "Import:Re-Mapping" page, I have no idea what i need to do on this page. All i know i am not tying to import data that was in one schema into a different schema and I am not importing data that was in one tablespace into a different tablespace and i am not R-Mapping datafiles either. I am importing data from a csv file.
    For step 2 of 4, "Import:Options" page, I selected the same directory object i had created.
    For step 3 of 4, I entered a job name and a description and selected Start Immediately option.
    What i noticed going through the wizard, the wizard never asked into which table do i want to import the data.
    I submitted the job and I got ORA-31619 invalid dump file error.
    I was sure that the wizard was going to fail when it never asked me into which table do i want to import the data.
    I tried to use the "imp" utility in command-line window.
    After I entered (imp), i was prompted for the username and the password and then the buffer size as soon as i entered the min buffer size I got the following error and the import was terminated:
    C:\>imp
    Import: Release 10.1.0.2.0 - Production on Fri Jul 9 12:56:11 2004
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Username: user1
    Password:
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Import file: EXPDAT.DMP > c:\securParms\securParms.csv
    Enter insert buffer size (minimum is 8192) 30720> 8192
    IMP-00037: Character set marker unknown
    IMP-00000: Import terminated unsuccessfully
    Please show me the easiest way to import a text file into a table. How complex could it be to do a simple import into a table using a text file?
    We are testing our application against both an Oracle database and a MSSQLServer 2000 database.
    I was able to import the data into a table in MSSQLServer database and I can say that anybody with no experience could easily do an export/import in MSSQLServer 2000.
    I appreciate if someone could show me how to the import from a file into a table!
    Thanks,
    Mitra

    >
    I can say that anybody with
    no experience could easily do an export/import in
    MSSQLServer 2000.
    Anybody with no experience should not mess up my Oracle Databases !

  • How to get data of tabulated text file into internal table

    hi all,
    i want to get data from tabulated text file(notepad) into internal table. i searched in SCN and got lot of post regarding  how to convert excel file into internal table but i didnt get posts regarding text file.
    thanks
    SAchin

    try:
    DATA: BEGIN OF tabulator,
            x(1) TYPE x VALUE '09',
          END OF tabulator.
      READ DATASET file INTO wa.
    split wa at tabulator into table itab.
    A.

  • How to load content of my text file into a Vector?

    Hi!
    Two questions.
    Let say I have used BufferedReader(new FileReader(c:/java/MyText.txt)) to read from MyText.txt file. I want to know how to load content of this file (every line describe each photo in my photo-set) into a Vector? And how to associate lines of MyText.txt as an elements of the Vector?
    I am trying to do something, but no results.
    try{
    BufferedReader reader = new BufferedReader(new FileReader("c:/java/Applications/MyText.txt"));
    String str=reader.readLine();
    JList myList = new JList();
    StringTokenizer st = new StringTokenizer(str,"\n");
    Vector vr = new Vector(25);
    while(st.hasMoreTokens()){
    String nextToken = st.nextToken();
    vr.addElement(nextToken);
    myList.setListData(vr);
    TA1.setText(TA1.getText()+
    (String)myList.getSelectedValue());
    }catch(IOException evt) {};

    BufferedReader reader = new BufferedReader(new FileReader("c:/java/Applications/MyText.txt"));
    Vector photos = new Vector(0,0);
    while(reader.ready())
       photos.addElement(reader.readLine());
    }good luck,
    Felipe

  • Error while loading data from a text file to a datastore

    Hi all,
    i am a starter in ODI. I am trying to load data from a text file into a datastore. I have put the file on a unix server whose location is defined in the topology manager. when i am trying to "view data" it is giving me error file does not exist at <location where i have put the file>. Please help me

    Hi,
    1. If your files are on a remote File System, you will need to copy one of your files to the machine ODI Designer is running on to allow ODI to retrieve the metadata information of the file.
    2. In Topology create a Physical Schema, the directory you enter for Data and Work Schema should point at this local file.
    3. Then define the File Datastore in ODI Designer. Enter a name, browse and select the file and fill in each filed of the Files tab.
    * If its a Fixed file, click on the grid icon on the Columns tab to enter the columns and have Automatic Adjustment checked.
    * If its a Delimited file, use the Reverse button on the Columns tab to reverse the columns.
    * Right click on the File Datastore select View Data, if you can view data, that means the File Datastore has been defined correctly.
    * If not, check each tab of the File Datastore to make sure everything is defined correctly and retry.
    4. Once View Data is successful, you now change the directories (Data and Work Schema in Topology) to point at the remote File System. These directories must be accessible to the ODI Agent that will be used to run the transformations. The directory can be an absolute path (m:/public/data/files) or relative to the ODI Agent startup directory (../demo/files). It is strongly advised to use a UNC (independent from the execution location) for the path. When running the transformations with "no agent", the directory is relative to the directory where Oracle Data Integrator has been installed.
    You need to have a agent process running at the system where your source file resides .
    Then while running the odi interface choose that agent .
    Thanks,
    Sutirtha

  • How to do import data from the text file into the mathscript window?

    Could anyone tell me how to do import data from text file into mathscript window for labview 8?
    MathScript Window openned, File, Load Data - it has options: custom pattern (*.mlv) or all files. 
    Thanks

    Hi Milan,
    Prior to loading data in Mathscript Window , you have to save the data from the Mathscript window (the default extension of the file is .mlv but you can choose any extension). This means that you cannot load data from a text file  that was not created using the Mathscript window.
    Please let me know if you have any further questions regarding this issue.
    Regards,
    Ankita

  • How to load data from a  flat file which is there in the application server

    HI All,
              how to load data from a  flat file which is there in the application server..

    Hi,
    Firstly you will need to place the file(s) in the AL11 path. Then in your infopackage in "Extraction" tab you need to select "Application Server" option. Then you need to specify the path as well as the exact file you want to load by using the browsing button.
    If your file name keeps changing on a daily basis i.e. name_ddmmyyyy.csv, then in the Extraction tab you have the option to write an ABAP routine that generates the file name. Here you will need to append sy-datum to "name" and then append ".csv" to generate complete filename.
    Please let me know if this is helpful or if you need any more inputs.
    Thanks & Regards,
    Nishant Tatkar.

  • Step by Step details on how to load data from a flat file

    hi can anyone explain how to load data from a flat file. Pls giv me step by step details. thnx

    hi sonam.
    it is very easy to load data from flat file. whn compared with other extrations methods...
    here r the step to load transation data from a flat file.......
    step:1 create a Flat File.
    step:2 log on to sap bw (t.code : rsa1 or rsa13).
    and observe the flat file source system icon. i.e pc icon.
    step:3 create required info objects.
    3.1: create infoarea
         (infoObjects Under Modeling > infoObjects (root node)-> context menu -
    > create infoarea).
    3.2:  create char /keyfig infoObject Catalog.(select infoArea ---.context menu --->create infoObject catalog).
    3.3:   create char.. infoObj and keyFig infoObjects accourding to ur requirement and activate them.
    step:4 create infoSource for transaction data and create transfer structure and maintain communication structure...
        4.1: first create a application component.(select InfoSources Under modeling-->infosources<root node>>context menu-->create  applic...component)
       4.2: create infoSource  for transation data(select appl..comp--.context menu-->create infosource)
    >select O flexible update and give info source name..
    >continue..
    4.4: *IMp* ASSIGN DATASOURCE..
      (EXPAND APPLIC ..COMP..>EXPAND YOUR INFOSOURCE>CONTEXT MENU>ASSIGN DATASOURCE.)
    >* DATASOURCE *
    >O SOURCE SYSTEM: <BROWSE AND CHOOSE YOUR FLAT FILE SOURCE SYSTEM>.(EX:PC ICON).
    >CONTINUE.
    4.5: DEFINE DATASOURCE/TRANSFER STRUCTURE  FOR IN FOSOURCE..
    > SELECT TRANSFER STRUCTURE TAB.
    >FILL THE INFOOBJECT FILLED WITH THE NECESSARY  INFOOBJ IN THE ORDER OR SEQUENCE OF FLAT FILE STRUCTURE.
    4.6: ASSIGN TRANSFER RULES.
    ---> NOW SELECT TRANSFER RULES TAB. AND SELECT PROPOSE TRANSFER RULES SPINDLE LIKE ICON.
    (IF DATA TARGET IS ODS -
    INCLUDE 0RECORDMODE IN COMMUNICATION STRUCTURE.)
    --->ACTIVATE...
    STEP:5  CREATE DATATARGET.(INFOCUBE/ODS OBJECT).
    5.1: CREATE INFO CUBE.
    -->SELECT YOUR INFOAREA>CONTEXT MENU>CREATE INFOCUBE.
    5.2: CREATE INFOCUBE STRUCTURE.
    ---> FILL THE STRUCTURE PANE WILL REQUIRE INFOOBJECTS...(SELECT INFOSOURCE ICON>FIND UR INFOSOURCE >DOUBLE CLICK > SELECT "YES" FOR INFOOBJECT ASSIGNMENT ).
    >MAINTAIN ATLEAST  ON TIME CHAR.......(EX; 0CALDAY).
    5.3:DEFINE AND ASSIGN DIMENSIONS FOR YOUR CHARACTERISTICS..
    >ACTIVATE..
    STEP:6 CREATE UPDATE RULES FOR INFOCUDE USING INFOSOURCE .
    >SELECT UR INFOCUBE >CONTEXT MENU> CREATE UPDATE RULES.
    > DATASOURCE
    > O INFOSOURCE : _________(U R INFOSOURCE). AND PRESS ENTER KEY.......
    >ACTIVATE.....UR UPDATE RULES....
    >>>>SEE THE DATA FLOW <<<<<<<<----
    STEP:7  SCHEDULE / LOAD DATA..
    7.1 CREATE INFOPACKAGE.
    --->SELECT INFOSOURCE UNDER MODELING> EXPAND UR APPLIC.. COMP..> EXPAND UR INFOSOURCE..> SELECT UR DATASOURCE ASSIGN MENT ICON....>CONTEXT MENU> CREAE INFOPACKAGE..
    >GIVE INFOPACKAGE DISCREPTION............_________
    >SELECT YOUR DATA SOURCE.-------> AND PRESS CONTINUE .....
    >SELECT EXTERNAL DATA TAB...
    > SELECT *CLIENT WORKSTATION oR APPLI SERVER  >GIVE FILE NAME > FILE TYPE> DATA SAPARATER>
    >SELECT PROCESSING TAB
    > PSA AND THEN INTO DATATARGETS....
    >DATATARGET TAB.
    >O SELECT DATA TARGETS
    [ ] UPDATE DATATARGET CHECK BOX.....
    --->UPDATE TAB.
    O FULL UPDATE...
    >SCHEDULE TAB..
    >SELECT O START DATA LOAD IMMEDIATELY...
    AND SELECT  "START" BUTTON........
    >>>>>>>>>>
    STEP:8 MONITOR DATA
    > CHECK DATA IN PSA
    CHECK DATA IN DATA TARGETS.....
    >>>>>>>>>>> <<<<<<<<<----
    I HOPE THIS LL HELP YOU.....

  • How can u insert and retrieve text files in any format using forms6i.

    how can u insert and retrieve text files in any format using forms6i.
    can u give me an example of an insert statement, let's assume the file is located in the a:drive.
    and retrieving the files, i would give the user a list of all the files that are in the database, the user would select one, but what command(or piece of code) would open the file in its apppropriate editor.
    e.g .pdf formatted file would open in acrobat.
    any help would be appreciated.
    Thanks
    Hussein Saiger

    the filereference class is for downloading and uploading files.
    if you want to load xml, use the xml class.
    and, if you want to write to an xml file and don't want to use server-side code, wait.

  • Import a text file into database

    If anybody could help me with this, i would GREATLY appreciate it! I need to write a procedure to import a text file into an oracle database table. -Thanks!

    See my response in Re: import a text file into database.
    Cheers, APC

  • How to automate loading data from a text file ?

    Hi,
    I need to load a data form a text file automatically. (for example: every day at 6.p.m) .
    It is possible to use DBMS_SCHEDULER with SQL LOADER ? or maybe u have others idea ?
    regards,

    assuming that the text file resides at the machine where the database is installed at you can create a procedure that use the built-in UTL_FILE package to read and load the data to the oracle tables. then create a job that use the DBMS_JOB or DBMS_SCHEDULER to create an automated schedule to run the job that calls the procedure you have created.
    or assuming that the text file resides or at the local/client machine (example c:\ drive) on a windows xp platform. create a batch file that do a ftp to transfer the text file to the oracle database server and create a schedule job using the windows scheduler. also create a procedure that use the built-in UTL_FILE package to read and load the data to the oracle tables. then create a job that use the DBMS_JOB or DBMS_SCHEDULER to create an automated schedule to run the job that calls the procedure you have created.

  • How to import data from a text file through DTS to Sql Server

    Please don't mistake me as i'm a new comer to sql server,please help me.
    how to import the data present in a plain text file through DTS into sql server and store the data in a temporary table.
    How far the temporary table is stored in the database.
    Please reply me as soon as possible.
    Thank you viewers.

    >
    I can say that anybody with
    no experience could easily do an export/import in
    MSSQLServer 2000.
    Anybody with no experience should not mess up my Oracle Databases !

  • How to load a comma seprated text file which contain address in to sql server table using ssis package

    Hi,
    I want to load a file which is comma separated and contain address .Problem is that address its self comma seprated so how do I differenciate whether comma used for column seprator or it used in address.
    for eg.
    One person having address like
    "c/o AB corp,156 cross lane,USA"
    Thanks.....

    Hi SR_MCTS,
    Based on your description, you want to distinguish a comma is used for column separator or used in address column in a text file, then load the data from the text file to SQL Server table.
    As per my understanding, if you can replace the comma column separator to another delimiter like semicolon (;), just do it. Then we can select Semicolon {;} as Column delimiter for the Flat File Connection Manager. Or ensure all columns are enclosed in double
    quotes ("). Then we can set the double quotes (") as Text qualifier for the Flat File Connection Manager, and the commas will be loaded as part of the string fields.
    If you can't have that done, because computers don't know the context of the data, you would have to come up with some kind of rules that decides when a comma represents a delimiter, and when it is just part of the text. I think a custom script component
    would be necessary to pre-process the data, identify where a comma is part of an address, and then treat that as one field.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How do you read data from a text file into a JTextArea?

    I'm working on a blogging program and I need to add data from a text file named messages.txt into a JTextArea named messages. How do I go about doing this?

    Student_Coder wrote:
    1) Read the file messages.txt into a String
    2) Initialize messages with the String as the textSwing text components are designed to use Unix-style linefeeds (\n) as line separators. If the text file happens to use a different style, like DOS's carriage-return+linefeed (\r\n), it needs to be converted. The read() method does that, and it saves the info about the line separator style in the Document so the write() method can re-convert it.
    lethalwire wrote:
    They have 2 different ways of importing documents in this link:
    http://java.sun.com/docs/books/tutorial/uiswing/components/editorpane.html
    Neither of those methods applies to JTextAreas.

  • How to load data from MS Excel file

    Hello All,
    Please help me regarding:
    how to load data/ insert records from MS Excel spreadsheet into Oracle table without converting that MS Excel file into CSV.
    Thank You in advance.

    Vivek More wrote:
    how to load data/ insert records from MS Excel spreadsheet into Oracle table without converting that MS Excel file into CSV.Setup HS connectivity:
    1. Create ODBC SYSTEM DSN using Microsift Excel driver(xls) and select your excel file as workbook.
    2. Create file initXLS.ora in %ORACLE_HOME%\hs\admin directory contailing the following line:
    HS_FDS_CONNECT_INFO = XLS3. Modify listener.ora file in %ORACLE_HOME%\network\admin directory and add the following lines to SID_LIST under SID_LIST_LISTENER
        (SID_DESC =
          (SID_NAME = XLS)
          (ORACLE_HOME = your-oracle-home)
          (PROGRAM = hsodbc)
        )4. Modify tnsnames.ora file in %ORACLE_HOME%\network\admin directory and add the following lines:
    XLS =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        (CONNECT_DATA =
          (SID = XLS)
        (HS=OK)
      )5. Restart listener.
    6. Create database link (public or private depending on your needs):
    CREATE PUBLIC DATABASE LINK XLS USING 'XLS';7. Now you are all set. For example my file has:
    NAME
    SAM
    JOEDefault sheet name "Sheet1$" is treated as table name (Since excel is case sensitive you need to use quoted name). First row is treated as column name. And select:
    SQL> select * from "Sheet1$"@xls;
    NAME
    SAM
    JOE
    SQL> Now if you do not know excel sheet names you can issue (I renamed excel sheet Sheet1$ to Names$):
    SQL> select table_name from all_tables@xls;
    TABLE_NAME
    Names$
    Sheet2$
    Sheet3$
    SQL> select column_name from all_tab_columns@xls where table_name = 'Names$';
    COLUMN_NAME
    NAME
    SQL> SY.

Maybe you are looking for

  • New features are missing in Photoshop cc update

    My software says Photoshop CC is up to date, However, I don't see the new features: No smart guides No Font view in document when I hover over a font in the selection list.

  • How to recover deleted files on a Network Drive

    I am running the latest OS environment, and I purchased a LaCie Network drive that is attached to my airport. Two nights ago, my house took a power hit/outage. I did not suffer any hardware damage, however, I lost significant data on my network drive

  • IMac won't wake at times

    A couple of times recently, my iMac will not wake from sleep. Not only that, but it will not start from the rear power button. I have to unplug the power cord and then it will start up. Any ideas as to the problem? Model Name: iMac Model Identifier:

  • RSCRM_BAPI and Start Condition after Event

    Hello all I have a process chain set up that loads data to cubes. I wish to run RSCRM_BAPI after a certain cube has loaded. I create the extract in RSCRM_BAPI and for the START condition I use 'After Event' does anyone know if this is correct and if

  • More of a thank you than a complaint.

    Yesterday my original iPhone finally gave up. For over 3 years this phone has been an example of the quality products Apple continues to create, maintain and release. This phone has worked through falling out of a second floor of an apartment, a dip