Control file - Fields terminated by ';' using SQLLOADER

Hi Guys,
Can we load data using semicolon data using sqlloader .(Fields terminated by ';')
Filename : test.csv
Example :
Firstname;secondname;address;address2
hi;abc;Atlanta;GA
ABc;ABC;Atlantal;GA
I would appreicate your help.

Hi, yes you can.
Your control file will look like (adjust to your own table)
load data
infile test.csv'
into table example
fields terminated by ';' optionally enclosed by '"'
(firstname char(5),
secondname char(7),
address char(100),
address2 char(100)
Filename : test.csv
Example :
Firstname;secondname;address;address2
hi;abc;Atlanta;GA
ABc;ABC;Atlantal;GA

Similar Messages

  • Need help in writing the control file for SQLLOADER

    Is it possible to error out the Sqlloader in case the data fields in the data file for a row are more than the fields stated in the control file?
    i.e. My data file is something like
    aaa,bbb,cc
    dd,eee
    And my ctl file has just 2 columns in it. Is it possible to write a control file which will cause the Sqlloader to error out?
    Thanks...

    Nisha,
    Again I posted test example in your other post but here is how can do that
    CREATE TABLE mytest111 (
       col1 NUMBER,
       col2 NUMBER,
       col3 NUMBER
    LOAD DATA
    TRUNCATE INTO TABLE MYTEST111
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    col1 integer external,
    col2 integer external
    #mytest.dat
    1,2,3
    1,2
    SQL*Loader: Release 10.2.0.1.0 - Production on Fri Apr 10 11:40:39 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Control File:   mytest.ctl
    Data File:      mytest.dat
      Bad File:     mytest.bad
      Discard File:  none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array:     64 rows, maximum of 256000 bytes
    Continuation:    none specified
    Path used:      Conventional
    Table USIUSER.MYTEST111, loaded from every logical record.
    Insert option in effect for this table: TRUNCATE
    TRAILING NULLCOLS option in effect
       Column Name                  Position   Len  Term Encl Datatype
    COL1                                FIRST     *   ,  O(") CHARACTER           
    COL2                                 NEXT     *   ,  O(") CHARACTER           
    Table MYTEST111:
      2 Rows successfully loaded.
      0 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.
    Space allocated for bind array:                  33024 bytes(64 rows)
    Read   buffer bytes: 1048576
    Total logical records skipped:          0
    Total logical records read:             2
    Total logical records rejected:         0
    Total logical records discarded:        0
    Run began on Fri Apr 10 11:40:39 2009
    Run ended on Fri Apr 10 11:40:40 2009
    Elapsed time was:     00:00:00.99
    CPU time was:         00:00:00.06
    {code}
    Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • SQLLDR - spec for "fields terminated" clause for tab delimited files

    Does anyone know what the spec for tab delimited files is for the "fields terminated" clause in SQLLDR? See the below example for a comma delimited file:
    FIELDS TERMINATED BY ","
    Thanks in advance!
    Jeff

    Hi Jeff,
    You can try this,
    TERMINATED BY WHITESPACE
    The WHITESPACE option is usefull when, delimiter is any whitespace character including spaces, tabs, blanks, line feeds, form feeds, or carriage returns. (Only used with TERMINATED, not with ENCLOSED.)
    I hope this will help you.
    Thanks,
    Thazul.

  • Restrictions for using sql commands and operators in loader control file

    Hi ,
    It suppose that there is a lot of restrictions and limitations when using sql commands and operators in the loader control files, same as it seems I cannot use (or) when with case statement, also it seems there is certain length for the case,
    So guys, what are the common limitations and restrictions to be avoided in the loader control file ?
    Your efforts are highly appreciated
    Ash

    Hi Ash,
    if you need to do more complicated logic its better to define the file to be loaded as an external table. You can then use any sql function you like against the external table rather than messing around with what you can and can;t do in a sqlldr control file.
    You can use the external_table option of sqldr to generate the definition.
    Regards,
    Harry
    http://dbaharrison.blogspot.com/

  • RMAN backups running slow with Catalog , Running fine using control file.

    I am facing a weird scenario
    RMAN backups are running fine with Control file but are failing using Catalog
    There are other databases configured on the same catalog and they are running fine leaves us to suspect this is issue with Database.
    Can you please suggest what need to be checked in such scenario
    DB: 11.2.0.2
    OS: Aix 6.1
    Catalog : 11.2.0.2

    Hi,
    Basically its not only with backups, simple list incarnation also taking a lot of timeDo sql tracing on your catalog session and target db session while running the 'list incarnation' command for your problem dbs and a normal dbs.
    Regards,
    Tycho

  • Can I have two Data Files in One control file of sql*loader tool

    hi,
    Can someone help me out. is it possible to have two Data Files in one control file of Sql*loader.
    And isit possible to run 10,000 records before lunch and 10,000 records before tea and 10,000 records before evening session by giving breaks after every 10,000 records.
    Thanks
    Ram

    Yes. You can specify two datafiles in one control file and can load using sql loader.
    I give you the sample control file.
    Load DATA
    INFILE 'TEST1.CSV'
    INFILE 'TEST2.CSV'
    TRUNCATE
    INTO TABLE TEST_P
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    (COL_1,
    COL_2,
    COL_n)
    Hope It will help you.
    -Karthik

  • Error on write to control file

    Hi all,
         We are using the database sever version Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    working with windows platform. I saw an error in Alert log as follows,
    ORA-00221: error on write to control file
    Instance terminated by CKPT, pid = 4300
    Few mins later the database opened without error.
         Please anyone suggest me the cause and Solution for this error
    Regards,
    Jai.

    hi,
    Error: ORA 221
    Text: error on write to control file
    Cause: An error occurred when writing to one or more of the control files.
    Action: See accompanying messages.
    can you please post further errors.
    Specific to windows is there any firewalls enabled & antivirus?
    Thanks

  • Creation of control file failed

    Hi all
    when i am trying to create control file my terminal is hanging on following stage
    SQL> @/u02/ORACLE/orcldb/9.2.0/dbs/contrl.sql
    ORACLE instance started.
    Total System Global Area 581506668 bytes
    Fixed Size 452204 bytes
    Variable Size 402653184 bytes
    Database Buffers 167772160 bytes
    Redo Buffers 10629120 bytes
    54
    and in alert log file no error are given

    Hi
    Thanks for your reply
    i am pasting whole sql file here please check it and tell me if any error are there ?
    STARTUP NOMOUNT
    CREATE CONTROLFILE SET DATABASE "ORCL" NORESETLOGS ARCHIVELOG
    -- SET STANDBY TO MAXIMIZE PERFORMANCE
    MAXLOGFILES 32
    MAXLOGMEMBERS 5
    MAXDATAFILES 512
    MAXINSTANCES 8
    MAXLOGHISTORY 7260
    LOGFILE
    GROUP 1 (
    '/u02/ORACLE/orcldata/log01a.dbf',
    '/u02/ORACLE/orcldata/log01b.dbf'
    ) SIZE 10M,
    GROUP 2 (
    '/u02/ORACLE/orcldata/log02a.dbf',
    '/u02/ORACLE/orcldata/log02b.dbf'
    ) SIZE 10M
    -- STANDBY LOGFILE
    DATAFILE
    '/u02/ORACLE/orcldata/system01.dbf',
    '/u02/ORACLE/orcldata/system02.dbf',
    '/u02/ORACLE/orcldata/system03.dbf',
    '/u02/ORACLE/orcldata/system04.dbf',
    '/u02/ORACLE/orcldata/system05.dbf',
    '/u02/ORACLE/orcldata/ctxd01.dbf',
    '/u02/ORACLE/orcldata/owad01.dbf',
    '/u02/ORACLE/orcldata/a_queue02.dbf',
    '/u02/ORACLE/orcldata/odm.dbf',
    '/u02/ORACLE/orcldata/olap.dbf',
    '/u02/ORACLE/orcldata/system10.dbf',
    '/u02/ORACLE/orcldata/system06.dbf',
    '/u02/ORACLE/orcldata/portal01.dbf',
    '/u02/ORACLE/orcldata/system07.dbf',
    '/u02/ORACLE/orcldata/system09.dbf',
    '/u02/ORACLE/orcldata/system08.dbf',
    '/u02/ORACLE/orcldata/system11.dbf',
    '/u02/ORACLE/orcldata/undo01.dbf',
    '/u02/ORACLE/orcldata/a_txn_data01.dbf',
    '/u02/ORACLE/orcldata/a_txn_ind01.dbf',
    '/u02/ORACLE/orcldata/a_ref01.dbf',
    '/u02/ORACLE/orcldata/a_int01.dbf',
    '/u02/ORACLE/orcldata/a_summ01.dbf',
    '/u02/ORACLE/orcldata/a_nolog01.dbf',
    '/u02/ORACLE/orcldata/a_archive01.dbf',
    '/u02/ORACLE/orcldata/a_queue01.dbf',
    '/u02/ORACLE/orcldata/a_media01.dbf',
    '/u02/ORACLE/orcldata/a_txn_data02.dbf',
    '/u02/ORACLE/orcldata/a_txn_data03.dbf',
    '/u02/ORACLE/orcldata/a_txn_ind02.dbf',
    '/u02/ORACLE/orcldata/a_txn_ind03.dbf',
    '/u02/ORACLE/orcldata/a_txn_ind04.dbf',
    '/u02/ORACLE/orcldata/a_txn_ind05.dbf',
    '/u02/ORACLE/orcldata/a_ref02.dbf'
    CHARACTER SET US7ASCII

  • Multiplex control files in Oracle 10g...

    Hi ,
    the Oracle documentation , in one of its books points out....:
    'Once the disk drive is repaired, the damaged control file can be restored using the intact copy of the control file from the other disk and the instance can be restarted'.
    Is it achievable automatically.... or using some kind of sql commands and which , if any.....?????
    Regards,
    Simon

    there's a parameter called
    control_files
    in your spfile/pfile whichever you use.
    You can just multiply as many control files as you wish at OS level (copy) and list them in the parameter, then start your database.

  • Snapshot control file

    Hi,
    I am interested in time of snapshot control file creation.
    I have read that snapshot control file is created before the backup take the place. I have tried to take the simple rman>backup database command, but I have seen that snapshot control file is created after all backup process (I have seen the time of creating the snapshot control file).
    Can anybody tell me about this? When the snapshot control file is created (before backup, maybe in the memory, because I can't see it on the file system).
    Regards,
    Dragan

    Hi,
    I have read this sentence from Oracle Database 10g RMAN Backup & Recovery:
    RMAN needs to get a consistent view of the control file when it sets out to make backup of every datafile. It only needs to know the most recent checkpoint information and file schematic information at the time backup begins. After the backup starts, RMAN needs this information to stay consistent for duration of the backup operation; in other words, it needs a read consistent view of the control file. With the constant updates from the database, this is nearly impossible - unless RMAN were to lock the control file for the duration of the backup. But that would mean the database could not advance checkpoint or switch logs or produce new archive logs. Impossible.
    To get around this, RMAN uses the snapshot control file, an exact copy of your control file that is only used by RMAN during backup and resync operations. At the beginning of these operations, RMAN refreshes the snapshot control file from the actual control file, thus putting a momentary lock on the control file. Then, RMAN switches to the snapshot and uses it for the duration of the backup; in this way, it has read consistency without holding up database activity.
    I must ask you if I am using control file only (not recovery catalog) what is happening when I am executing simple RMAN command> backup database;
    You have said that I don't create snapshot of control file at that moment, only at the end of the backup process (I have also try it in my environment and snapshot is created at the end of the backup process).
    How RMAN knows what to backup (which files), he takes this information from original control file (not from snapshot) I suppose.
    What is happening when he finished backup of some backup set, he writes that information again in original control file I suppose.
    And at the end of all process why he takes snapshot of control file (to backup control file from it, not from original control file, because control file is always changing, need to lock it). In that snapshot control file (and in the its backup) we will have the pointers on files that are made after the backup process started (is this true).
    Thanks,
    Regards
    Dragan

  • How to make the control file consistent when I re-mulitplexing them

    Oracle 10g R2 on the AIX 5.3L
    My current control files (three) from the default set-up are all located in the same directory (/dbbaan/oradata/<SID>/). If I want to change some of the multiplexing of the control file to different directory to avoid the media failure,
    1. I copy one or two control files to different directory.
    2. create a new init_sid.ora from spfile
    2. edit the init_sid.ora file and change the locations of the control file
    3. shutdown/restart the DB using the init_sid.ora.
    4. create the spfile from the pfile
    5 shutdown/restart the DB with new spfile ( "SQL> startup")
    My question is: since there is always time lag between copying and recreating the new init_sid.ora, while the control file(s) are constantly updating, how can Db guarrente the consistency of the DB when I restart the DB (the control file specified in the init_sid.ora may be some time old) ? or does it matter?
    I did above and my DB restart without problem.

    Another problem concerns me. What happen if one of
    multiplexed control file location, which I use a NFS
    of another server, goes down and is not available
    during the operation ( After I restart up the DB)? I
    am sure I will see the error of that control file in
    the alert log.If one of the control files not accessible during operation, Oracle will crash. So you better make sure all of your control file location are reliable and accessible.

  • How to add other 2 control files at ASM in linux RAC

    Hi Experts,
    I am new for RAC .
    the vendor build a RAC for us. I found there are only one control file in system.
    we use oracle 10.2.0.4 at ASM with RAC in redhat linux 5.
    how to add 2 additional control file to ASM for RAC ?
    Please provide a procedur in detail.
    Thanks
    Jim

    Hi damorgan & Friends,
    I could not find some infomration to add control into ASM . I can do this job( see below procedure) in no ASM .
    My question, our database locates at ASM and control file with a system auto-number ( fully qualified filename ) as
    +DATA1/SALE/controlfile/current.256.690290159
    How do I physical copy and rename other 2 contril file in directory and modify location in pfile?
    I saw some paper to use request as an alias (such as +dgroup2/control/ctl.f). i can not image to copy/rename control.
    Please help me!!
    Thanks
    Jim
    ========added control file for no ASM database and works=====================
    1)
    SQL> create pfile from spfile;
    File created.
    2)
    SQL> show parameter control_file
    NAME TYPE VALUE
    control_file_record_keep_time integer 7
    control_files string C:\ORADATA\ORCL\CONTROL01.CTL
    3)
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    4) modify pfile add additional control file2/3 as
    control_files='C:\Oradata\ORCL\control01.ctl','C:\Oradata\ORCL\control02.ctl','C:\Oradata\ORCL\control03.ctl'
    and physical copy control01.ctl and raname as control02.ctl,control03.ctl
    5)
    SQL> startup pfile='C:\oracle\product\10.2.0\db_2\database\initORCL.ora';
    ORACLE instance started.
    Total System Global Area 167772160 bytes
    Fixed Size 1247900 bytes
    Variable Size 62915940 bytes
    Database Buffers 100663296 bytes
    Redo Buffers 2945024 bytes
    Database mounted.
    Database opened.er database mount;
    6)
    SQL> Create spfile from pfile='C:\oracle\product\10.2.0\db_2\database\initORCL.ora';
    File created.
    7) check control file info under pfile environment
    SQL> show parameter control_file
    NAME TYPE VALUE
    control_file_record_keep_time integer 7
    control_files string C:\ORADATA\ORCL\CONTROL01.CTL,
    C:\ORADATA\ORCL\CONTROL02.CTL
    , C:\ORADATA\ORCL\CONTROL03.CT
    L
    8)SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    9) startup as spfile environment.
    SQL> startup
    ORACLE instance started.
    Total System Global Area 167772160 bytes
    Fixed Size 1247900 bytes
    Variable Size 62915940 bytes
    Database Buffers 100663296 bytes
    Redo Buffers 2945024 bytes
    Database mounted.
    Database opened.
    10) check control info for spfile environment
    SQL> show parameter spfile
    NAME TYPE VALUE
    spfile string C:\ORACLE\PRODUCT\10.2.0\DB_2\
    DATABASE\SPFILEORCL.ORA
    SQL> show parameter control_file
    NAME TYPE VALUE
    control_file_record_keep_time integer 7
    control_files string C:\ORADATA\ORCL\CONTROL01.CTL,
    C:\ORADATA\ORCL\CONTROL02.CTL
    , C:\ORADATA\ORCL\CONTROL03.CT
    L

  • How to pass printer name as a parameter to Bursting control file

    We are on 11.5.10.2 using XML Publisher 5.6.3. We ahve a requirement, where we need to print our invoices to different printers.
    How do we pass the printer name as a parameter to Bursting control file. Can the bursting control file be created to use the printer parameter.
    If it can, can you please provide some examples.
    - Vasu -

    Hi.
    I have created Formula column and it is coming in xml data.
    Like this way
    <CP_TAX_NO>CZ27813941</CP_TAX_NO>
    <CP_CUST_TAX_REG>CZ680527617</CP_CUST_TAX_REG>
    <CF_PRINTER_NAME>ABC_hp4250</CF_PRINTER_NAME>
    <C_REQ_ID>12310217</C_REQ_ID>
    </ISOPTWSHRDPAK>
    But while i passed it bursting directory, it is not printing, if i hardcode over there then it is printing.
    Bursting file code
    <xapi:delivery>
         <xapi:print id="printer1" printer="ipp://localhost:631/printers/${CF_PRINTER_NAME}" copies="1" />
    </xapi:delivery>
    In bursting program file It is display like :
    [1]printer-uri:ipp://localhost:631/printers/null
    If i pass hardcode value instead of cf_printer_name then it is working fine
    [1]printer-uri:ipp://localhost:631/printers/ABC_hp4250
    Pls suggest what to do?

  • Multiplex Redo Logs and Control File

    I am wanting to setup an existing Oracle Express 10g instance to multiplex the redo log files and the control file.
    Instance is using Oracle-Managed Files and the Flash Recovery Area.
    With these options being used what are the steps required to setup multiplexing?
    I tried setting the DB_CREATE_ONLINE_LOG_DEST_1 and DB_CREATE_ONLINE_LOG_DEST_2 parameters but this doesn't appear to have worked (I even bounced the db instance).
    BTW, the DB_CREATE_FILE_DEST is set to null and the DB_RECOVERY_FILE_DEST is set to the flash recovery area.
    Any help is much appreciated.
    Regards, Sheila

    Thanks for this. My instance originally had two log groups so I've added a new member to each group into the same flash recovery area directory, but have assigned a name. Is this why when I query v$logfile the is_recovery_dest_file is set to NO? Is it ok to assign a name & directory and if not, how do you add a new memeber and allow Oracle-Managed files to name them?
    Also, how can I check that the multiplexing is working (ie the database is writing to both sets of files)?
    Thanks again.

  • File Fields and ASP

    I have setup an htm page with a file field. We use asp to
    post data. Do I need any additional coding to make the attached
    files show up in the email?
    Here's the link:
    http://krontechnology.com/positions.htm
    Thanks.

    Sorry Rob I am not able to upload the .411  file, , yes, I am interested in learning more about a Meta data Plugin. The JPG file on the original disk  may contain all the info necessary and accessing the .411 file may not be necessary because when the original jpg file is viewed in windows explorer the file creation date and time is equivaliant to the capture date and time.
    I spent most of the afternoon learning more about  the Mavica files and have learned ......
    The .411 files are image files. With each picture taken, the Mavica stores a 64x48 pixel thumbnail as a .411 file in addition to the timestamp.  with each shutter release the Camera writes  2 files to disk : MVC-001F.JPG    MVC-001F.411

Maybe you are looking for

  • Random shutdown then fixed?

    well like alot of other users i got the random shutdown on my macbook the other night. i've been a long time windows user and finally got around to getting myself one of these nice new macbooks just last friday. (my pervious mac being a powerbook 190

  • How do I turn off video autoplay in Internet Explorer?

    I do not want any kind of videos or animations to play unless I choose to click on the "Play" button. This includes Flash, HTML5, GIF, MP4, or any type of video that may be invented. What would be ideal is to have a new set of controls in Internet Op

  • Oracle 9i upgrade to 10g

    Hi I  upgraded sap(SRM) oracle from 9.2.0.8.0 - 64bit Production (AIX) system to oracle 10.2.0.2.0 - 64bit Production by referring document guide: GUIDE_UX_ORA_UPGRADE_210, completed postupgrade activity, Database is running very fine , could not abl

  • Resizing the stage

    Hello all. I animated this little talking head, but now come the end of it, I'd prefer to have more background space behind him, ie; a larger stage. But when I increase the stage size, it increases it all in the bottom-right corner, making my talking

  • How to install hp deskjet 1000 with out the disk, we lost the disc

    hp deskjet 1000 printer j110a need to know how to install without the disc to my laptop