Sql loader hangs

Hi All,
I have a java program which runs sql loader in a timer. That is the sql loader is used to load some tables with the data contained in a flat file. And I want this to be run every night.
I am using Runtime class to initiate a process which will invoke the sql loader. This works fine when I directly call my function in main.
But since I want this to run every night, I decided to invoke it thru the timer class. And when I do that the sql loader hangs and I have to terminate the process manually.
Is there any solution for the above problem?
Any help will be appreciated.
Regards,
Chitra

Just to give a lil bit more added clarity on the issue.
The requirement is like this. I have a flat file which needs to be uploaded to a database periodically. Every 24hrs. Now I am using Oracles SQL Loader to upload the data flat file. I am calling SQL loader from with a java program using Runtime class. Now I initiated this using a standard Java application and put it in the main class. It works fine. Now since I needed to have this running every 24hrs I used a Timer class to set the timer and to have it running evry 24 hrs. Now if I execute the same class above within the timer class, the SQL loader pops up in a new window and the program does not complete the execution. It just hangs. Which requires for me to terminate the process manually. All the data in the flat file is uploaded to the database but that is shown only after the proecess is treminated. Is there any solution for this ? Or does anyone have any idea as to why this is happenin ?
heres the code that I have written.
public class RmsDataLoader
Toolkit toolkit;
Timer timer;
public RmsDataLoader()
toolkit = Toolkit.getDefaultToolkit();
timer = new Timer();
timer.schedule(new RMSJobThread(),
     0, //initial delay
     24*60*60*1000); //subsequent rate
public static void main(String[] args)
RmsDataLoader rms = new RmsDataLoader();
class RMSJobThread extends TimerTask
public RMSJobThread()
public void run()
RMSJob rmsjob = new RMSJob();
rmsjob.runJob();
and the function in runJob is
public void runJob (String errorlog) {
try {
// Validation 1 : The datafile exists and the file size is not 0
String strDataFile = "W:\\rms_amps\\" + todayDate + "\\inv_company_label.dat";
File dataFile = new File(strDataFile);
if(!dataFile.exists()){
rmsExp.createLog(filename, filename, " Data File does not exist", todayDate);
} else {
long len = dataFile.length();
if (len <= 0) {
rmsExp.createLog(filename, filename, " File size is 0 ", todayDate);
// End of Validation 1
// create a process to invoke sql loader
Process process = Runtime.getRuntime().exec("sqlldr USERID=scott@umidb/tiger CONTROL=load_company_label.ctl LOG=load_company_label.log BAD=inv_company_label.bad DATA=inv_company_label.dat");
return ;
} catch (Exception ei) {
rmsExp.createLog(filename, filename, ei.getMessage() , todayDate);
ei.printStackTrace();
System.out.println (" Error while initiating the data loading " );
return ;

Similar Messages

  • SQL Loader step hangs in unix script

    Hi,
    We have a nightly job that separately truncates 6 tables and then loads them with flat file data. It works fine almost always.
    Eight months ago and then yesterday, one of the 6 load steps(not the same table) hung up and did nothing.
    Reruns ran fine.
    We have a web page that looks at this data. I'm wondering if a user hitting enter just as sql loader wanted to truncate the table might be the problem. Or maybe too many connections are being requested at the time.
    Is there any sort of retry capability within sql loader or anything else worth attempting?
    We have to run this in the evening, not late at night.
    thanks
    Steve

    Hi Steve,
    Then you must have scheduled job using Cron or some other scheduler.
    You can create one more job and you can schedule it after current job. If you have one of the advanced scheduler then you will be able to set dependency. So, that as first job (of truncating and reloading data) completes, second job will start. Otherwise you can take in consideration the expected completion time and schedule second job after that amount of time.
    Then you need to grep the log to find out which tables reload completed and which didn't. ReRun the job for tables which didn't run in first run.
    Hope it helps!
    Regards,
    Arpit
    Edited by: arpit_shah4u on Oct 6, 2008 2:03 PM

  • SQL Developer hangs when expanding table node

    Hello All,
    One of my schemas has 3035 tables. When I expand the "Other Users" node, then the schema owner, then expand "Tables", SQL Developer hangs. I have allowed it to run (as it indicates it is working) for 45 minutes, but it never returns.
    I have one user with nearly the same behavior, but theirs returns after waiting 5 minutes.
    Any ideas?
    About
    Oracle SQL Developer 1.5.1
    Version 1.5.1
    Build MAIN-5440
    Copyright © 2005,2008 Oracle. All Rights Reserved.
    IDE Version: 11.1.1.0.22.49.35
    Product ID: oracle.sqldeveloper
    Product Version: 11.1.1.54.40
    Version
    Component     Version
    =========     =======
    Java(TM) Platform     1.5.0_06
    Oracle IDE     1.5.1.54.40
    Versioning Support     1.5.1.54.40
    Properties
    Name     Value
    ====     =====
    apple.laf.useScreenMenuBar     true
    awt.toolkit     sun.awt.windows.WToolkit
    class.load.environment     oracle.ide.boot.IdeClassLoadEnvironment
    class.load.log.level     CONFIG
    class.transfer     delegate
    com.apple.macos.smallTabs     true
    com.apple.mrj.application.apple.menu.about.name     "SQL_Developer"
    com.apple.mrj.application.growbox.intrudes     false
    file.encoding     Cp1252
    file.encoding.pkg     sun.io
    file.separator     \
    http.agent     Mozilla/5.0 (Java 1.5.0_06; Windows XP 5.1 x86; en_US) ICEbrowser/v6_1_3
    ice.browser.forcegc     false
    ice.pilots.html4.ignoreNonGenericFonts     true
    ice.pilots.html4.tileOptThreshold     0
    ide.AssertTracingDisabled     true
    ide.bootstrap.start     624463503772965
    ide.build     MAIN-5440
    ide.conf     C:\oracle\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
    ide.config_pathname     C:\oracle\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
    ide.debugbuild     false
    ide.devbuild     false
    ide.extension.search.path     sqldeveloper/extensions:jdev/extensions:ide/extensions
    ide.firstrun     false
    ide.java.minversion     1.5.0
    ide.launcherProcessId     66660
    ide.main.class     oracle.ide.boot.IdeLauncher
    ide.patches.dir     ide/lib/patches
    ide.pref.dir     C:\Documents and Settings\ckell\Application Data\SQL Developer
    ide.pref.dir.base     C:\Documents and Settings\ckell\Application Data
    ide.product     oracle.sqldeveloper
    ide.shell.enableFileTypeAssociation     C:\oracle\sqldeveloper\sqldeveloper.exe
    ide.splash.screen     splash.gif
    ide.startingArg0     C:\oracle\sqldeveloper\sqldeveloper.exe
    ide.startingcwd     C:\Oracle\sqlDeveloper
    ide.user.dir     C:\Documents and Settings\ckell\Application Data\SQL Developer
    ide.user.dir.var     IDE_USER_DIR
    ide.work.dir     q:\\SQL Developer
    ide.work.dir.base     q:\
    java.awt.graphicsenv     sun.awt.Win32GraphicsEnvironment
    java.awt.printerjob     sun.awt.windows.WPrinterJob
    java.class.path     ..\..\ide\lib\ide-boot.jar
    java.class.version     49.0
    java.endorsed.dirs     C:\oracle\sqldeveloper\jdk\jre\lib\endorsed
    java.ext.dirs     C:\oracle\sqldeveloper\jdk\jre\lib\ext
    java.home     C:\oracle\sqldeveloper\jdk\jre
    java.io.tmpdir     c:\temp\
    java.library.path     C:\oracle\sqldeveloper;.;C:\WINDOWS\system32;C:\WINDOWS;C:\oracle\DevSuite\bin;C:\oracle\DevSuite\jdk\jre\bin\classic;C:\oracle\DevSuite\jdk\jre\bin;C:\oracle\DevSuite\jdk\jre\bin\client;C:\oracle\DevSuite\jlib;C:\oracle\DevSuite\jre\1.4.2\bin\client;C:\oracle\DevSuite\jre\1.4.2\bin;C:\Program Files\Java\jre1.6.0_03;C:\oracle\Client10g\bin;c:\oracle\10g\jdk\jre\bin\classic;c:\oracle\10g\jdk\jre\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32\nls;C:\WINDOWS\system32\nls\ENGLISH;C:\Program Files\Novell\ZENworks\;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\Diskeeper Corporation\Diskeeper\;C:\Program Files\IDM Computer Solutions\UltraEdit-32;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\IDM Computer Solutions\UltraEdit-32\;C:\Program Files\CollabNet Subversion Server
    java.naming.factory.initial     oracle.javatools.jndi.LocalInitialContextFactory
    java.runtime.name     Java(TM) 2 Runtime Environment, Standard Edition
    java.runtime.version     1.5.0_06-b05
    java.specification.name     Java Platform API Specification
    java.specification.vendor     Sun Microsystems Inc.
    java.specification.version     1.5
    java.util.logging.config.file     logging.conf
    java.vendor     Sun Microsystems Inc.
    java.vendor.url     http://java.sun.com/
    java.vendor.url.bug     http://java.sun.com/cgi-bin/bugreport.cgi
    java.version     1.5.0_06
    java.vm.info     mixed mode
    java.vm.name     Java HotSpot(TM) Client VM
    java.vm.specification.name     Java Virtual Machine Specification
    java.vm.specification.vendor     Sun Microsystems Inc.
    java.vm.specification.version     1.0
    java.vm.vendor     Sun Microsystems Inc.
    java.vm.version     1.5.0_06-b05
    jdbc.library     /C:/oracle/sqldeveloper/jdbc/lib/ojdbc5.jar
    line.separator     \r\n
    oracle.home     C:\oracle\sqldeveloper
    oracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG     true
    oracle.translated.locales     de,es,fr,it,ja,ko,pt_BR,zh_CN,zh_TW
    oracle.xdkjava.compatibility.version     9.0.4
    orai18n.library     /C:/oracle/sqldeveloper/jlib/orai18n.jar
    os.arch     x86
    os.name     Windows XP
    os.version     5.1
    path.separator     ;
    reserved_filenames     con,aux,prn,lpt1,lpt2,lpt3,lpt4,lpt5,lpt6,lpt7,lpt8,lpt9,com1,com2,com3,com4,com5,com6,com7,com8,com9,conin$,conout,conout$
    sun.arch.data.model     32
    sun.boot.class.path     C:\oracle\sqldeveloper\jdk\jre\lib\rt.jar;C:\oracle\sqldeveloper\jdk\jre\lib\i18n.jar;C:\oracle\sqldeveloper\jdk\jre\lib\sunrsasign.jar;C:\oracle\sqldeveloper\jdk\jre\lib\jsse.jar;C:\oracle\sqldeveloper\jdk\jre\lib\jce.jar;C:\oracle\sqldeveloper\jdk\jre\lib\charsets.jar;C:\oracle\sqldeveloper\jdk\jre\classes
    sun.boot.library.path     C:\oracle\sqldeveloper\jdk\jre\bin
    sun.cpu.endian     little
    sun.cpu.isalist     
    sun.desktop     windows
    sun.io.unicode.encoding     UnicodeLittle
    sun.java2d.ddoffscreen     false
    sun.jnu.encoding     Cp1252
    sun.management.compiler     HotSpot Client Compiler
    sun.os.patch.level     Service Pack 2
    user.country     US
    user.dir     C:\oracle\sqldeveloper\sqldeveloper\bin
    user.home     C:\Documents and Settings\ckell
    user.language     en
    user.name     ckell
    user.timezone     America/New_York
    user.variant     
    windows.shell.font.languages     
    Extensions
    Name     Identifier     Version     Status
    ====     ==========     =======     ======
    Check For Updates     oracle.ide.webupdate     11.1.1.0.22.49.35     Loaded
    Code Editor     oracle.ide.ceditor     11.1.1.0.22.49.35     Loaded
    Database Connection Support     oracle.jdeveloper.db.connection     11.1.1.0.22.49.35     Loaded
    Database Object Explorers     oracle.ide.db.explorer     11.1.1.0.22.49.35     Loaded
    Database UI     oracle.ide.db     11.1.1.0.22.49.35     Loaded
    Diff/Merge     oracle.ide.diffmerge     11.1.1.0.22.49.35     Loaded
    Extended IDE Platform     oracle.javacore     11.1.1.0.22.49.35     Loaded
    External Tools     oracle.ide.externaltools     11.1.1.0.22.49.35     Loaded
    Feedback     oracle.ide.feedback     11.1.1.0.22.49.35     Loaded
    File Support     oracle.ide.files     11.1.1.0.22.49.35     Loaded
    File System Navigator     oracle.sqldeveloper.filenavigator     11.1.1.53.38     Loaded
    Help System     oracle.ide.help     11.1.1.0.22.49.35     Loaded
    History Support     oracle.jdeveloper.history     11.1.1.0.22.49.35     Loaded
    Import/Export Support     oracle.ide.importexport     11.1.1.0.22.49.35     Loaded
    Log Window     oracle.ide.log     11.1.1.0.22.49.35     Loaded
    Mac OS X Adapter     oracle.ideimpl.apple     11.1.1.0.22.49.35     Loaded
    Navigator     oracle.ide.navigator     11.1.1.0.22.49.35     Loaded
    Object Gallery     oracle.ide.gallery     11.1.1.0.22.49.35     Loaded
    Object Viewer     oracle.sqldeveloper.oviewer     11.1.1.54.40     Loaded
    Oracle IDE     oracle.ide     11.1.1.0.22.49.35     Loaded
    Oracle Microsoft Access Browser     oracle.sqldeveloper.thirdparty.access     11.1.1.54.40     Loaded
    Oracle Migration Workbench     oracle.sqldeveloper.migration     11.1.1.54.40     Loaded
    Oracle Migration Workbench - MS Access     oracle.sqldeveloper.migration.msaccess     11.1.1.53.38     Loaded
    Oracle Migration Workbench - MySQL     oracle.sqldeveloper.migration.mysql5     11.1.1.53.38     Loaded
    Oracle Migration Workbench - SQLServer     oracle.sqldeveloper.migration.sqlserver2005     11.1.1.53.38     Loaded
    Oracle Migration Workbench - Translation Core     oracle.sqldeveloper.migration.translation.core     11.1.1.54.44     Loaded
    Oracle Migration Workbench - Translation MS Access     oracle.sqldeveloper.migration.translation.msaccess     11.1.1.54.40     Loaded
    Oracle Migration Workbench - Translation MS SQL Server     oracle.sqldeveloper.migration.translation.sqlserver     11.1.1.54.40     Loaded
    Oracle Migration Workbench - Translation MySQL     oracle.sqldeveloper.migration.translation.mysql     11.1.1.54.40     Loaded
    Oracle Migration Workbench - Translation Sybase     oracle.sqldeveloper.migration.translation.sybase     11.1.1.54.44     Loaded
    Oracle Migration Workbench - Translation UI     oracle.sqldeveloper.migration.translation.gui     11.1.1.54.40     Loaded
    Oracle MySQL Browser     oracle.sqldeveloper.thirdparty.mysql     11.1.1.54.40     Loaded
    Oracle SQL Developer     oracle.sqldeveloper     11.1.1.54.40     Loaded
    Oracle SQL Developer Extras     oracle.sqldeveloper.extras     11.1.1.54.40     Loaded
    Oracle SQL Developer Reports     oracle.sqldeveloper.report     11.1.1.54.40     Loaded
    Oracle SQL Developer SearchBar     oracle.sqldeveloper.searchbar     11.1.1.54.40     Loaded
    Oracle SQL Developer TimesTen     oracle.sqldeveloper.timesten     1.5.1.1.2     Loaded
    Oracle SQL Server Browser     oracle.sqldeveloper.thirdparty.sqlserver     11.1.1.54.40     Loaded
    Oracle Sybase Browser     oracle.sqldeveloper.thirdparty.sybase     1.2.1.54.40     Loaded
    Oracle XML Schema Support     oracle.sqldeveloper.xmlschema     11.1.1.54.40     Loaded
    PROBE Debugger     oracle.jdeveloper.db.debug.probe     11.1.1.0.22.49.35     Loaded
    Peek     oracle.ide.peek     1.0     Loaded
    Replace With     oracle.ide.replace     11.1.1.0.22.49.35     Loaded
    Runner     oracle.ide.runner     11.1.1.0.22.49.35     Loaded
    SQL Worksheet Window     oracle.sqldeveloper.sqlworksheet     11.1.1.54.40     Loaded
    Search Bar     oracle.ide.searchbar     11.1.1.0.0     Loaded
    Snippet Window     oracle.sqldeveloper.snippet     11.1.1.54.40     Loaded
    Sybase 12     oracle.sqldeveloper.migration.sybase12     11.1.1.53.38     Loaded
    Sybase 15     oracle.sqldeveloper.migration.sybase15     11.1.1.53.38     Loaded
    Tuning     oracle.sqldeveloper.tuning     11.1.1.54.40     Loaded
    VHV     oracle.ide.vhv     11.1.1.0.22.49.35     Loaded
    Versioning Support     oracle.jdeveloper.vcs     11.1.1.0.22.49.35     Loaded
    Versioning Support for CVS     oracle.jdeveloper.cvs     11.1.1.0.22.49.35     Disabled by user
    Versioning Support for Subversion     oracle.jdeveloper.subversion     11.1.1.0.22.49.35     Loaded
    Web Browser and Proxy     oracle.ide.webbrowser     11.1.1.0.22.49.35     Loaded
    oracle.ide.dependency     oracle.ide.dependency     11.1.1.0.22.49.35     Loaded
    oracle.ide.indexing     oracle.ide.indexing     11.1.1.0.22.49.35     Loaded

    hi...
    Same problem, but as many tables as Chris.
    Pat
    CVS Version     Internal to Oracle SQL Developer (client-only)
    Java(TM) Platform     1.5.0_06
    Oracle IDE     1.5.1.54.40
    Versioning Support     1.5.1.54.40
    here is the dump
    Full thread dump Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode):
    "ProgressBarThread" prio=6 tid=0x04665e20 nid=0x2ac8 runnable [0x079af000..0x079
    af9e8]
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at oracle.net.ns.Packet.receive(Packet.java:239)
    at oracle.net.ns.DataPacket.receive(DataPacket.java:92)
    at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:172)
    at oracle.net.ns.NetInputStream.read(NetInputStream.java:117)
    at oracle.net.ns.NetInputStream.read(NetInputStream.java:92)
    at oracle.net.ns.NetInputStream.read(NetInputStream.java:77)
    at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1023)
    at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:999)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:584)
    at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.
    java:191)
    at oracle.jdbc.driver.T4CCallableStatement.executeForDescribe(T4CCallabl
    eStatement.java:782)
    at oracle.jdbc.driver.T4CCallableStatement.executeMaybeDescribe(T4CCalla
    bleStatement.java:857)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
    nt.java:1186)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePrep
    aredStatement.java:3381)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePrepare
    dStatement.java:3425)
    - locked <0x11eaa750> (a oracle.jdbc.driver.T4CConnection)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(Oracle
    PreparedStatementWrapper.java:1202)
    at oracle.dbtools.db.DBUtil.executeOracleQuery(DBUtil.java:512)
    at oracle.dbtools.db.DBUtil.executeQuery(DBUtil.java:540)
    at oracle.dbtools.raptor.navigator.ObjectQueryInstance.executeQuery(Obje
    ctQueryInstance.java:76)
    at oracle.dbtools.raptor.navigator.xml.XmlFolderInstance.getChildren(Xml
    FolderInstance.java:122)
    at oracle.dbtools.raptor.navigator.xml.XmlFolderInstance.listChildren(Xm
    lFolderInstance.java:67)
    at oracle.dbtools.raptor.navigator.ObjectFilter$1Loader.doWork(ObjectFil
    ter.java:147)
    at oracle.ide.dialogs.ProgressRunnable.run(ProgressRunnable.java:161)
    at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:615)
    at java.lang.Thread.run(Thread.java:595)
    "TextBufferScavenger" prio=6 tid=0x03a86620 nid=0x2ac4 in Object.wait() [0x078af
    000..0x078afa68]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x11f73798> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
    - locked <0x11f73798> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
    at oracle.ide.model.TextNode$FacadeBufferReference$PollingThread.run(Tex
    tNode.java:1886)
    "pool-1-thread-1" prio=6 tid=0x04a1eee8 nid=0x29f8 waiting on condition [0x071af
    000..0x071afa68]
    at sun.misc.Unsafe.park(Native Method)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
    .await(AbstractQueuedSynchronizer.java:1767)
    at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.jav
    a:359)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.ja
    va:470)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
    .java:674)
    at java.lang.Thread.run(Thread.java:595)
    "IconOverlayTracker Timer" prio=6 tid=0x039b5878 nid=0x29f4 in Object.wait() [0x
    070af000..0x070afae8]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x11971f98> (a java.util.TaskQueue)
    at java.lang.Object.wait(Object.java:474)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x11971f98> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "Timer-2" prio=6 tid=0x04a21540 nid=0x29f0 in Object.wait() [0x06faf000..0x06faf
    b68]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x11972010> (a java.util.TaskQueue)
    at java.lang.Object.wait(Object.java:474)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x11972010> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "Native Directory Watcher" prio=2 tid=0x047c64c8 nid=0x29d4 runnable [0x05a8f000
    ..0x05a8fd68]
    at oracle.ide.natives.NativeHandler.enterWatcherThread(Native Method)
    at oracle.ide.natives.NativeHandler$2.run(NativeHandler.java:252)
    at java.lang.Thread.run(Thread.java:595)
    "IconOverlayTracker Timer" prio=6 tid=0x048b01d8 nid=0x29cc in Object.wait() [0x
    0528f000..0x0528f9e8]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x1105d9f0> (a java.util.TaskQueue)
    at java.lang.Object.wait(Object.java:474)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x1105d9f0> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "IconOverlayTracker Timer" prio=6 tid=0x03876cc8 nid=0x29c8 in Object.wait() [0x
    04fbf000..0x04fbfa68]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x1105da68> (a java.util.TaskQueue)
    at java.lang.Object.wait(Object.java:474)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x1105da68> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "TimerQueue" daemon prio=6 tid=0x03b23470 nid=0x2954 in Object.wait() [0x0436f00
    0..0x0436fb68]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x10733728> (a javax.swing.TimerQueue)
    at javax.swing.TimerQueue.run(TimerQueue.java:233)
    - locked <0x10733728> (a javax.swing.TimerQueue)
    at java.lang.Thread.run(Thread.java:595)
    "AWT-EventQueue-0" prio=6 tid=0x03b047a0 nid=0x2950 in Object.wait() [0x041ff000
    ..0x041ffbe8]
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:474)
    at java.awt.EventQueue.getNextEvent(EventQueue.java:345)
    - locked <0x106c2968> (a java.awt.EventQueue)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:189)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:163)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:153)
    at java.awt.Dialog$1.run(Dialog.java:515)
    at java.awt.Dialog.show(Dialog.java:536)
    at java.awt.Component.show(Component.java:1300)
    at java.awt.Component.setVisible(Component.java:1253)
    at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
    at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
    at oracle.ide.dialogs.ProgressBar.start(ProgressBar.java:361)
    at oracle.ide.dialogs.ProgressBar.start(ProgressBar.java:208)
    at oracle.ide.dialogs.ProgressRunnable.start(ProgressRunnable.java:116)
    at oracle.dbtools.raptor.navigator.ObjectFilter.getChildren(ObjectFilter
    .java:192)
    at oracle.ideimpl.explorer.BaseTreeExplorer.addChildren(BaseTreeExplorer
    .java:358)
    at oracle.ideimpl.explorer.BaseTreeExplorer.open(BaseTreeExplorer.java:1
    016)
    at oracle.ideimpl.explorer.BaseTreeExplorer$4.run(BaseTreeExplorer.java:
    2003)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    "AWT-Windows" daemon prio=6 tid=0x03ad7188 nid=0x2948 runnable [0x03fff000..0x03
    fffce8]
    at sun.awt.windows.WToolkit.eventLoop(Native Method)
    at sun.awt.windows.WToolkit.run(WToolkit.java:269)
    at java.lang.Thread.run(Thread.java:595)
    "AWT-Shutdown" prio=6 tid=0x03ad6cb0 nid=0x2944 in Object.wait() [0x03eff000..0x
    03effd68]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x106c2a60> (a java.lang.Object)
    at java.lang.Object.wait(Object.java:474)
    at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
    - locked <0x106c2a60> (a java.lang.Object)
    at java.lang.Thread.run(Thread.java:595)
    "Java2D Disposer" daemon prio=6 tid=0x03acf268 nid=0x2940 in Object.wait() [0x03
    dff000..0x03dff9e8]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x106c2ae8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
    - locked <0x106c2ae8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
    at sun.java2d.Disposer.run(Disposer.java:107)
    at java.lang.Thread.run(Thread.java:595)
    "Low Memory Detector" daemon prio=6 tid=0x00c64a48 nid=0x2934 runnable [0x000000
    00..0x00000000]
    "CompilerThread0" daemon prio=6 tid=0x00865008 nid=0x2930 waiting on condition [
    0x00000000..0x034df84c]
    "Signal Dispatcher" daemon prio=6 tid=0x00c612b0 nid=0x292c waiting on condition
    [0x00000000..0x00000000]
    "Finalizer" daemon prio=8 tid=0x00c58e58 nid=0x2928 in Object.wait() [0x032df000
    ..0x032dfce8]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x106601f0> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
    - locked <0x106601f0> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
    "Reference Handler" daemon prio=6 tid=0x00c583b8 nid=0x2924 in Object.wait() [0x
    031df000..0x031dfc68]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x10660270> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:474)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
    - locked <0x10660270> (a java.lang.ref.Reference$Lock)
    "main" prio=6 tid=0x00868828 nid=0x2914 waiting on condition [0x00000000..0x0012
    fb70]
    "VM Thread" prio=6 tid=0x00c188f0 nid=0x2920 runnable
    "VM Periodic Task Thread" prio=6 tid=0x00c60fb8 nid=0x2938 waiting on condition

  • Sql loader - Data loading issue with no fixed record length

    Hi All,
    I am trying to load the following data through sql loader. However the records # 1, 3 & 4 are only loading succesfully into the table and rest of the records showing as BAD. What is missing in my syntax?
    .ctl file:
    LOAD DATA
    INFILE 'C:\data.txt'
    BADFILE 'c:\data.BAD'
    DISCARDFILE 'c:\data.DSC' DISCARDMAX 50000
    INTO TABLE icap_gcims
    TRAILING NULLCOLS
         CUST_NBR_MAIN          POSITION(1:9) CHAR NULLIF (CUST_NBR_MAIN=BLANKS),
         CONTACT_TYPE          POSITION(10:11) CHAR NULLIF (CONTACT_TYPE=BLANKS),
         INQUIRY_TYPE          POSITION(12:13) CHAR NULLIF (INQUIRY_TYPE=BLANKS),
         INQUIRY_MODEL          POSITION(14:20) CHAR NULLIF (INQUIRY_MODEL=BLANKS),
         INQUIRY_COMMENTS     POSITION(21:60) CHAR NULLIF (INQUIRY_COMMENTS=BLANKS),
         OTHER_COLOUR POSITION(61:75) CHAR NULLIF (OTHER_COLOUR=BLANKS),
         OTHER_MAKE          POSITION(76:89) CHAR NULLIF (OTHER_MAKE=BLANKS),
         OTHER_MODEL_DESCRIPTION POSITION(90:109) CHAR NULLIF (OTHER_MODEL_DESCRIPTION=BLANKS),
         OTHER_MODEL_YEAR POSITION(110:111) CHAR NULLIF (OTHER_MODEL_YEAR=BLANKS)
    data.txt file:
    000000831KHAN
    000000900UHFA WANTS NEW WARRANTY ID 000001017OHAL
    000001110KHAP
    000001812NHDE231291COST OF SERVICE INSPECTIONS TOO HIGH MAXIMA 92 MK
    000002015TPFA910115CUST UPSET WITH AIRPORT DLR. $200 FOR PLUGS,OIL,FILTER CHANGE. FW
    Thanks,

    Hi,
    Better if you have given the table structure, I check your script it was fine
    11:39:01 pavan_Real>create table test1(
    11:39:02   2  CUST_NBR_MAIN  varchar2(50),
    11:39:02   3  CONTACT_TYPE varchar2(50),
    11:39:02   4  INQUIRY_TYPE varchar2(50),
    11:39:02   5  INQUIRY_MODEL varchar2(50),
    11:39:02   6  INQUIRY_COMMENTS varchar2(50),
    11:39:02   7  OTHER_COLOUR varchar2(50),
    11:39:02   8  OTHER_MAKE varchar2(50),
    11:39:02   9  OTHER_MODEL_DESCRIPTION varchar2(50),
    11:39:02  10  OTHER_MODEL_YEAR varchar2(50)
    11:39:02  11  );
    Table created.
    11:39:13 pavan_Real>select  * from test1;
    no rows selected
    C:\Documents and Settings\ivy3905>sqlldr ara/ara@pavan_real
    control = C:\control.ctl
    SQL*Loader: Release 9.2.0.1.0 - Production on Sat Sep 12 11:41:27 2009
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Commit point reached - logical record count 5
    11:42:20 pavan_Real>select count(*) from test1;
      COUNT(*)                                                                     
             5    control.ctl
    LOAD DATA
    INFILE 'C:\data.txt'
    BADFILE 'c:\data.BAD'
    DISCARDFILE 'c:\data.DSC' DISCARDMAX 50000
    INTO TABLE test1
    TRAILING NULLCOLS
    CUST_NBR_MAIN POSITION(1:9) CHAR NULLIF (CUST_NBR_MAIN=BLANKS),
    CONTACT_TYPE POSITION(10:11) CHAR NULLIF (CONTACT_TYPE=BLANKS),
    INQUIRY_TYPE POSITION(12:13) CHAR NULLIF (INQUIRY_TYPE=BLANKS),
    INQUIRY_MODEL POSITION(14:20) CHAR NULLIF (INQUIRY_MODEL=BLANKS),
    INQUIRY_COMMENTS POSITION(21:60) CHAR NULLIF (INQUIRY_COMMENTS=BLANKS),
    OTHER_COLOUR POSITION(61:75) CHAR NULLIF (OTHER_COLOUR=BLANKS),
    OTHER_MAKE POSITION(76:89) CHAR NULLIF (OTHER_MAKE=BLANKS),
    OTHER_MODEL_DESCRIPTION POSITION(90:109) CHAR NULLIF (OTHER_MODEL_DESCRIPTION=BLANKS),
    OTHER_MODEL_YEAR POSITION(110:111) CHAR NULLIF (OTHER_MODEL_YEAR=BLANKS)
    data.txt
    000000831KHAN
    000000900UHFA WANTS NEW WARRANTY ID 000001017OHAL
    000001110KHAP
    000001812NHDE231291COST OF SERVICE INSPECTIONS TOO HIGH MAXIMA 92 MK
    000002015TPFA910115CUST UPSET WITH AIRPORT DLR. $200 FOR PLUGS,OIL,FILTER CHANGE. FW
    CUST_NBR_MAIN     CONTACT_TYPE     INQUIRY_TYPE     INQUIRY_MODEL     INQUIRY_COMMENTS     OTHER_COLOUR     OTHER_MAKE     OTHER_MODEL_DESCRIPTION     OTHER_MODEL_YEAR
    000000831     KH     AN     NULL     NULL     NULL     NULL     NULL     NULL
    000000900     UH     FA      WANTS     NEW WARRANTY ID 000001017OHAL     NULL     NULL     NULL     NULL
    000001110     KH     AP     NULL     NULL     NULL     NULL     NULL     NULL
    000001812     NH     DE     231291C     OST OF SERVICE INSPECTIONS TOO HIGH MAXI     MA 92 MK     NULL     NULL     NULL
    000002015     TP     FA     910115C     UST UPSET WITH AIRPORT DLR. $200 FOR PLU     GS,OIL,FILTER C     HANGE. FW     NULL     NULL- Pavan Kumar N
    Edited by: Pavan Kumar on Sep 12, 2009 11:46 AM

  • Loading hanging every few days.

    Hi experts,
    I have a scheduled loading of stored procedure, its loading normally, but today it is hanging at some step to loading a physical table. this is not the first time for this issue. this issue occurred multiple time recently. it normally occurred after successfully loading multiple times. for this time, procedure loading successful for 24/25/26/27/28/29 Aug 2012. on 30 Aug 2012, its loading hanging at step 2 to loading some physical table. will you please tell me how to check issue cause ? I am not DBA, just a procedure developer. so will you please recommend some method suited for me?
    appreciate very much.

    918440 wrote:
    Hi experts,
    I have a scheduled loading of stored procedure, its loading normally, but today it is hanging at some step to loading a physical table. this is not the first time for this issue. this issue occurred multiple time recently. it normally occurred after successfully loading multiple times. for this time, procedure loading successful for 24/25/26/27/28/29 Aug 2012. on 30 Aug 2012, its loading hanging at step 2 to loading some physical table. will you please tell me how to check issue cause ? I am not DBA, just a procedure developer. so will you please recommend some method suited for me?
    appreciate very much.This forum is for SQL*PLUS issues. Yours is a detailed situation with a stored procedure and you will get a better, faster answer in the SQL and PL/SQL forum.
    Something is happening to make the procedure run slowly on the dates you listed. You will have to analyze the program to find inefficies. Check the SQL very carefully (slow programs are usually due to SQL) but there are analysis tools like DBMS_PROFILER (older) and the Heirarchical profler (newer) that can help you find the slow points in your program

  • Odd SQL Loader problem

    I have Oracle 8.0.3 on my Windows 2K client machine and am using sql loader to load a flat file into an 8i database. When I execute the command in a Dos window, the load runs, but the DOS window hangs and won't return me to the c:\ prompt. As a result, I can't run a bat file to load multiple tables, as the sqlldr80 command won't continue past the first table loaded.
    Any ideas? thanks

    The application is about processing CDRs (Call Details) and data is huge and need to be processed very quickly.
    One process is uploading the data coming from different files into the partitioned table and other process works in parallel to proces the available data and it need not to wait for end of upload.
    I can do some IPC to synchronize the act of both processes but this will delay the whole thing because I will have to drop/recreate indexes many times on huge data.
    So is there any features available that I can use or any other suggestion

  • Load two input file into One Target table through SQL LOADER

    Hi Expert,
    I have 2 .cvs files.
    1st file having cols as account_no & first name
    2nd file having cols as account_no & last name
    There is a table called temp has 3 cols accounts_number first name & last name
    accounts number in both files are same
    Now I wann upload these 2 files in to table temp
    how do I do that
    Pls suggest
    Thx
    Umesh Goel

    UG wrote:
    I dont want truncate my table bcoz account no and first name from first file and last name from second file.
    so pls suggest something else....Hang on, I'll go find you some glasses. I think you're having trouble reading.
    First file : Control file truncates and loads data
    Second file : Control file does not truncate and loads data
    2 Calls to SQL*Loader
    Is that a little clearer?
    Are you saying there is a relationship between the data in the two files?
    How do you know which last name relates to which first name in the first file? Is there a reference key between the records on the two files?
    Perhaps you'd better show us an example of the contents of the files so we can see what you are trying to do.

  • Sql loader problem - thread appears to be hung

    Sorry to ask such a strang question but I am not sure which direction to go with this one. Hoping someone might have an idea.
    I am running oracle 10g on windows. I have 3 servers all patched at the same levels. All 3 servers run a purchased utility called dbutility which copies data from a dms database to an oracle database using oracle's sql*loader. On one server the dbutility hangs when the dbutility program tries to start sql*loader. I must close the dos window to end the job - ctl c does not work.
    If I let the job sit long enought, it eventually gets the message:"BULK LOADER thread appears to be hung: main thread waiting".
    I called the company which supports the dbutility program and they think it is a windows or oracle problem.
    I can get the dbutility to work if I start the dbutility in verbose (trace) mode. For some reason slowing the dbutility down before starting the sql*load program fixes the problem.
    Has anyone ever had issues starting sql*loader?
    Does anyone have any ideas what might be causing this problem?
    Do you think reinstalling the sql*loader might help?
    Thank you!
    Confused:)

    Try to built a test case on your own.
    Make a little test creating an sql*loader ctl and try to load the file on a test table.
    If that work you should ask againg with your tool support.
    load data
    infile 'YOUR_FILE_HERE'
    badfile 'BAD_FILE'
    append
    into table test_ldr
    fields terminated by "," optionally enclosed by '"'          
    (caracter1,caracter2,caracter3,caracter4,caracter5)
    caraterN = your table column name.
    sqlldr.exe userid=username/password@db rows=1000 control=conrtol.ctl log=log.log errors=200 direct=y

  • How to load a default value in to a column when using sql loader

    Im trying to load from a flat file using sql loader.
    for 1 column i need to update using a default value
    how to go about this?

    Hi!
    try this code --
    LOAD DATA
       INFILE 'sample.dat'
       REPLACE
       INTO TABLE emp
       empno   POSITION(01:04) INTEGER EXTERNAL NULLIF empno=BLANKS,
       ename   POSITION(06:15)  CHAR,
       job         POSITION(17:25)  CHAR,
       mgr       POSITION(27:30)  INTEGER EXTERNAL NULLIF mgr=BLANKS,
       sal        POSITION(32:39)  DECIMAL EXTERNAL NULLIF sal=BLANKS,
       comm   POSITION(41:48)  DECIMAL EXTERNAL DEFAULTIF comm = 100,
       deptno  POSITION(50:51)  INTEGER EXTERNAL NULLIF deptno=BLANKS,
       hiredate POSITION(52:62) CONSTANT SYSDATE
      )-hope this will solve ur purpose.
    Regards.
    Satyaki De.

  • How can we tell if SQL*Loader is working on a TABLE?

    We have a process that requires comparing batches with LDAP information. Instead of using an LDAP lookup tool, we get a nightly directory file, and import the two COLUMNs we want via SQL*Loader (REPLACE) into an IOT. Out of three cases, two just check the first COLUMN, and the third needs the second COLUMN as well.
    We did not think of using External TABLEs, because we cannot store files on the DB server itself.
    The question arises, what to do while the file is being imported. The file is just under 300M, so it takes a minute or so to replace all the data. We found SQL*Loader waits until a transaction is finished before starting, but a query against the TABLE only waits while it is actually importing the data. At the beginning of SQL*Loader's process, however, a query against the TABLE returns no rows.
    The solution we are trying right now is, to have the process that starts SQL*Loader flip a flag in another TABLE denoting that it is unavailable. When it is done, it flips it back, and notes the date. Then, the process that queries the information, exits if the flag is currently 'N'.
    The problem, is, what if SQL*Loader starts inbetween the check of the flag, and the query against the TABLE. How do we guarantee that it is still not being imported.
    I can think of three solutions:
    1) LOCK the ldap information TABLE before checking the flag.
    2) LOCK the record that the process starting SQL*Loader flips.
    3) Add a clause to the query against the TABLE checks that there are records in the TABLE (AND EXISTS(SELECT * FROM ldap_information).
    The problem with 3) is that the process has already tagged the batches (via a COLUMN). It could, technically reset them afterwards, but that seems a bit backwards.

    Just out of curiosity, are you aware that Oracle supplies a DBMS_LDAP package for pulling information from LDAP sources? It would obviously be relatively easy to have a single transaction that deletes the existing data, loads the new data via DBMS_LDAP, and commits, which would get around the problem you're having with SQL*Loader truncating the table.
    You could also have SQL*Loader load the data into a staging table and then have a second process either MERGE the changes from the staging table into the real table (again in a transactionally consistent manner) or just delete and insert the data.
    Justin

  • Loading two tables at same time with SQL Loader

    I have two tables I would like to populate from a file C:\my_data_file.txt.
    Many of the columns I am loading into both tables but there are a handful of columns I do not want. The first column I do not want for either table. My problem is how I can direct SQL Loader to go back to the first column and skip over it. I had tried using POSITION(1) and FILLER for the first column while loading the second table but I got THE following error message:
    SQL*Loader-350: Syntax error at line 65
    Expecting "," or ")" found keyword Filler
    col_a Poistion(1) FILLER INTEGER EXTERNALMy control file looks like the following:
    LOAD DATA
    INFILE 'C:\my_data_file.txt'
    BADFILE 'C:\my_data_file.txt'
    DISCARDFILE 'C:\my_data_file.txt'
    TRUNCATE INTO TABLE table_one
    WHEN (specific conditions)
    FIELDS TERMINATED BY ' '
    TRAILING NULLCOLS
    col_a FILLER INTEGER EXTERNAL,
    col_b INTEGER EXTERNAL,
    col_g FILLER CHAR,
    col_h CHAR,
    col_date DATE "yyyy-mm-dd"
    INTO TABLE table_two
    WHEN (specific conditions)
    FIELDS TERMINATED BY ' '
    TRAILING NULLCOLS
    col_a POSITION(1) FILLER INTEGER EXTERNAL,
    col_b INTEGER EXTERNAL,
    col_g FILLER CHAR,
    col_h CHAR,
    col_date DATE "yyyy-mm-dd"
    )

    Try adapting this for your scenario.
    tables for the test
    create table test1 ( fld1 varchar2(20), fld2 integer, fld3 varchar2(20) );
    create table test2 ( fld1 varchar2(20), fld2 integer, fld3 varchar2(20) );
    control file
    LOAD DATA
    INFILE "test.txt"
    INTO TABLE user.test1 TRUNCATE
    WHEN RECID = '1'
    FIELDS TERMINATED BY ' '
    recid filler integer external,
    fld1 char,
    fld2 integer external,
    fld3 char
    INTO TABLE user.test2 TRUNCATE
    WHEN RECID <> '1'
    FIELDS TERMINATED BY ' '
    recid filler position(1) integer external,
    fld1 char,
    fld2 integer external,
    fld3 char
    data for loading [text.txt]
    1 AAAAA 11111 IIIII
    2 BBBBB 22222 JJJJJ
    1 CCCCC 33333 KKKKK
    2 DDDDD 44444 LLLLL
    1 EEEEE 55555 MMMMM
    2 FFFFF 66666 NNNNN
    1 GGGGG 77777 OOOOO
    2 HHHHH 88888 PPPPP
    HTH
    RK

  • Creating SQL-Loader script for more than one table at a time

    Hi,
    I am using OMWB 2.0.2.0.0 with Oracle 8.1.7 and Sybase 11.9.
    It looks like I can create SQL-Loader scripts for all the tables
    or for one table at a time. If I want to create SQL-Loader
    scripts for 5-6 tables, I have to either create script for all
    the tables and then delete the unwanted tables or create the
    scripts for one table at a time and then merge them.
    Is there a simple way to create migration scripts for more than
    one but not all tables at a time?
    Thanks,
    Prashant Rane

    No there is no multi-select for creating SQL-Loader scripts.
    You can either create them separately or create them all and
    then discard the one you do not need.

  • SQL Loader (Oracle 8.1.5 on Suse 6.3) Internal Error

    Hi all,
    I try to insert data with SQL Loader on Linux (Suse 6.3) and get the following message:
    SQL*Loader-704: Internal error: ulmtsyn: OCIStmtExecute (tabhp) [-1073747572]
    ORA-00942: table or view does not exist
    The control file and data file did work on another platform.
    Please help me!
    Thanks,
    Thies Mauker

    Lee Bennett (guest) wrote:
    :Hi
    :I have successfully installed Oracle 8.1.5 Enterprise edition
    on
    :Suse 6.2 and applied the 8.1.5.0.1 patch set,
    NO!
    SuSe 6.2 have a patch file for Oracle made from their developers.
    Never use Oracle 8.1.5.0.1 patch file that doesn't work because
    us bugged.
    Use SuSe 6.2 Oracle patch set.
    (don't remember the web page where you can download it but a
    search with word "oracle" from SuSe homepage will lead you to
    it)
    -Stefano
    null

  • Decode Not working in sql loader

    I had a requirement of loading flatfile into staging table using SQL Loader, One of the columns in the the Flat file is having values FALSE or TRUE and my requirement is that I load 0 for FALSE and 1 for TRUE which can be achieved by simple DECODE function...I did use decode and tried to load several times but did not work. What might be the problem
    LOAD DATA
    INFILE 'sql_4ODS.txt'
    BADFILE 'SQL_4ODS.badtxt'
    APPEND
    INTO TABLE members
    FIELDS TERMINATED BY "|"
    ( Person_ID,
    FNAME,
    LNAME,
    Contact,
    status "decode(:status, 'TRUE', '1','FALSE','0')"
    I did try putting a trim as well as SUBSTR but did not work....the cloumn just doent get any values in the output (just null or say free space)
    Any help would be great.....

    Hello user8937215.
    Please provide a create table statement and a sample of data file contents. I would expect DECODE or CASE to work based on the information provided.
    Cheers,
    Luke
    Please mark the answer as helpful or answered if it is so. If not, provide additional details.
    Always try to provide create table and insert table statements to help the forum members help you better.

  • SQL*Loader and DECODE function

    Hi All,
    I am loading data from data files into oracle tables and while loading the data using SQL*Loader, the following requirement needs to be fulfilled.
    1) If OQPR < 300, RB = $ 0-299, SC = "SC1"
    2) If 300 < OQPR < 1200, RB = $ 300-1199, SC = "SC2"
    3) If 1200 < OQPR < 3000, RB = $ 1200-2999, SC = "SC3"
    4) If OQPR > 3000 USD, RB = > $3000, SC = "SC4"
    Here OPQR is a field in the data file.
    Can anyone suggest how do we handle this using DECODE function? Triggers and PL/SQL functions are not to be used.
    TIA.
    Regards,
    Ravi.

    The following expression gives you different values for your different intervals and boundaries :
    SIGN(:OQPR - 300) + SIGN(:OQPR - 1200) + SIGN(:OQPR - 3000)

Maybe you are looking for

  • Fatal Error in Report Generation.

    Hi, When i am trying to run the report from Jdeveloper, i am getting the following error in JSPX page Page Error: The page you are trying to access is having some problems and the following is the log is created in jdeveloper server console. javax.fa

  • How to move projects from one computer to another?

    Hi, What is the best way to move a project in labview signalexpress from one computer to anotherone and include all log files? As i try i get the error mistake ""the project that you just opened contains logs which are linked to the following deleted

  • New MacBook Pro can't connect to D-link router

    Hi everyone! I just upgraded from an early 2007 MacBook Pro to the latest 15" MacBook Pro with Core i7 chip. Did a full migration with the Migration Assistant. Everything went fine. Could connect effortlessly with my Airport Extreme Base Station at h

  • Opening Raw files saved as DNG?

    Having had some great assistance in the Elements HowTo forum I can now load Raw files to Organizer and edit them with ACR 5.2 ( I'm shooting them with a Panasonics FZ28)When I save them I get two options .DNG or .dng Whichever one I use (and I'm not

  • Applescript and Airport Admin Utility

    Am looking for an Applescript that would automate my daily task of configuring Base Station to allow (and delete) Access Control for my son's iMac. Any geniuses out there who have already written such a script?