SQL Loader / WHEN clause / swich off? / bloated log files

Hallo everyone,
I am loading data from very large source files using SQL-Loader. This all works fine.
However, now, using the WHEN clause (in the control file), I would like to load only a very restricted sub-set of the main data. This also works fine ...
WHEN ARTICLECODE != '000000000000006769'
However, the log file becomes completely bloated with messages telling me of each record which has failed the WHEN clause ...
Record 55078: Discarded - failed all WHEN clauses.
This is becoming a problem because it slows down the process and creates bloated log files which are eating up my disk-space.
There must be a simple command to allow me to switch off thiese messages but, although I have googled on it, I haven't managed to find it.
Any ideas on this one? I'm sure it's simple.
Regards and many thanks,
Alan Searle

Try to add key SILENT=DISCARDS to sqlldr command
Silent means - Suppress messages during run (header,feedback,errors,discards,partitions)

Similar Messages

  • Help on SQL Loader When Clause

    I have 2 Oracle tables of exact same structure.
    ENO NUMBER
    PARENT NUMBER
    CHILD NUMBER
    ENAME VARCHAR2 (50 Byte)
    ADDRESS VARCHAR2 (50 Byte)
    CITY VARCHAR2 (50 Byte)
    SRCFILENAME VARCHAR2 (50 Byte)
    SDATE VARCHAR2 (400 Byte)
    Current_Load VARCHAR2 (1 Byte)
    Have a data file and a loader control file which loads data in these 2 tables.
    I need to do a conditional load using a when clause.
    Condition : when PARENT=CHILD, load in table 2 else load in table 1
    My control file looks like this .
    LOAD DATA
    INFILE 'TEST_20120815.txt'
    APPEND INTO TABLE test1
    fields terminated by "|"
    trailing nullcols
    eno,
    parent,
    child,
    ename,
    address,
    city ,
    sdate "to_date(:sdate,'DD/MM/YYYY')",
    SrcFileName,
    col7 filler,
    "Current_Load" constant 'Y'
    INTO TABLE test2 when (parent=child)
    fields terminated by "|"
    trailing nullcols
    eno position(1),
    parent,
    child,
    ename,
    address,
    city ,
    sdate "to_date(:sdate,'DD/MM/YYYY')",
    SrcFileName,
    col7 filler,
    "Current_Load" constant 'Y'
    ) But this doesn't work. It works fine if I give direct value like PARENT='P'.
    Any idea as how to compare the 2 fields while doing conditional load?

    You cannot compare 2 fields with the WHEN clause in an SQL*Loader control file.
    only literal values as defined by the syntax:
    http://docs.oracle.com/cd/B19306_01/server.102/b14215/ldr_control_file.htm#i1005657
    As already suggested, you would be better to load your data using an external table where you can apply any conditions you want during your SQL query that is fetching the data.

  • HT4177 My mackbook pro suddenly freezed and when I swiched off and on again, a grey screen appeared with an apple logo then a loading circle underneath, and after a few hours, a blue screen appeared. What shall I do with this?

    My mackbook pro suddenly freezed and when I swiched off and on again, a grey screen appeared with an apple logo then a loading circle underneath, and after a few hours, a blue screen appeared. What shall I do with this?

    What operating system version, and do you have any backups of your data off the machine? TimeMachine? Option Key bootable clones? Storage? DVD's?
    A reinstall of the operating system may be in order as a last resort, so if any of these steps on these links get you into the machine, make sure to backup your personal data (Music, Pictures, Documents, Movies) off the machine to a non-encrypted  powered external drive regular storage drive (not TimeMachine as it might be corrupted too) and disconnect as soon as possible.
    Good Luck and report back all what you tried.
    Also report what change occured before this tragedy happened, was there a  Software Update? A EFI firmware update? Etc.
    https://support.apple.com/kb/TS3148
    more:
    https://support.apple.com/kb/TS2570
    http://docs.info.apple.com/article.html?path=Mac/10.6/en/8963.html
    To boot off the 10.6 install disk, hold c or option key while the disk is in the machine.
    To boot into 10.7 Recvoery mode, hold the command and r keys down while booting.
    To use Safe mode, hold down the Shift Key while booting.
    Other assistance
    https://support.apple.com/kb/HT3964
    https://support.apple.com/kb/HT1379
    https://support.apple.com/kb/ht1782
    https://support.apple.com/kb/HT1564

  • SQL Loader and foreign characters in the data file problem

    Hello,
    I have run into an issue which I can't find an answer for. When I run SQL Loader, one of my control files is used to get file content (LOBFILE) and one of the fields in the data file has a path to that file. The control file looks like:
    LOAD DATA
    INFILE 'PLACE_HOLDER.dat'
    INTO TABLE iceberg.rpt_document_core APPEND
    FIELDS TERMINATED BY ','
    doc_core_id "iceberg.seq_rpt_document_core.nextval",
    -- created_date POSITION(1) date "yyyy-mm-dd:hh24:mi:ss",
    created_date date "yyyy-mm-dd:hh24:mi:ss",
    document_size,
    hash,
    body_format,
    is_generic_doc,
    is_legacy_doc,
    external_filename FILLER char(275) ENCLOSED by '"',
    body LOBFILE(external_filename) terminated by EOF
    A sample data file looks like:
    0,2012-10-22:10:09:35,21,BB51344DD2127002118E286A197ECD4A,text,N,N,"E:\tmp\misc_files\index_testers\foreign\شیمیایی.txt"
    0,2012-10-22:10:09:35,17,CF85BE76B1E20704180534E19D363CF8,text,N,N,"E:\tmp\misc_files\index_testers\foreign\ลอบวางระเบิด.txt"
    0,2012-10-22:10:09:35,23552,47DB382558D69F170227AA18179FD0F0,binary,N,N,"E:\tmp\misc_files\index_testers\foreign\leesburgis_á_ñ_é_í_ó_ú_¿_¡_ü_99.doc"
    0,2012-10-22:10:09:35,17,83FCA0377445B60CE422DE8994900A79,binary,N,N,"E:\tmp\misc_files\index_testers\foreign\làm thế nào bạn làm ngày hôm nay"
    The problem is that whan I run this, SQL Loader throws an error that it can't find the file. It appears that it can't interpret the foreign characters in a way that allows it to find that path. I have tried adding a CHARACTERSET (using AL32UTF8 or UTF8) value in the control file but that only has some success with Western languages, not the ones listed above. Also, there is no set of defined languages that could be found in the data file. It essentaially could be any language.
    Does anyone know if there is a way to somehow get SQL Loader to "understand" the file system paths when a folder and/or file name could be in some other langauge?
    Thanks for any thoughts - Peter

    Thanks for the reply Harry. If I try to open the file in various text editors like Wordpad, Notepad, GVIM, andTextpad, they all display the foreign characters differently. Only Notepad comes close to displaying the characters properly. I have a C# app that will read the file and display the contents and it renders it fine. If you look at the directory of files in Windows Explorer, they all are displayed properly. So it seems things like .Net and Windows have some mechanism to understand the characters in order to render them properly. Other applications, again like Wordpad, do not know how to render them properly. It would seem that whatever SQL Loader is using to "read" the data files also is not rendering the characters properly which prevents it from finding the directory path to the file. If I add "CHARACTERSET AL32UTF8" in the control file, all is fine when dealing with Western langauges (ex, German, Spanish) but not for the Eastern languages (ex. Thai, Chinese). So .... telling SQL Loader to use a characterset seems to work, but not in all cases. The AL32UTF8 is the characterset that the Oracle database was created with. I have not had any luck if I try to set the CHARACTERSET to whatever the Thai character set is, for example. There problem there though is that even if that did work, I can't target specific lagauages because the data could come from anywhere. It's like I need some sort of global "super set" characterset to use. It seems like the CHARACTERSET is the right track to follow but I am not sure, and even if it is, is there a way to handle all languages.
    Thanks - Peter

  • How do you turn off the log file?

    How can I turn off the log file for WLS? Don't want the added overhead
    of logging during performance tests.
    Edwin

    The only way I know is:
    # startWebLogic.sh > /dev/null &
    Only if you are running on unix.
    Edwin Marcial wrote:
    Ok, I'll settle for this. How do I stop the echo?
    "Larry L. Presswood Jr." wrote:
    you can also have it not echo to the console as well
    Srikant Subramaniam wrote:
    I don't think you can turn off the system log file (weblogic.log). You can
    disable the HTTP specific logging with the following:
    weblogic.httpd.enableLogFile=<boolean>
    (defaults to true)
    Srikant.
    Edwin Marcial wrote:
    How can I turn off the log file for WLS? Don't want the added overhead
    of logging during performance tests.
    Edwin
    Damon Sicore
    [email protected]

  • Design a report off a log file

    Crystal reports version XI
    I would like to design  a report off a log file (with .log extention).
    How would i go about it? (like data source etc)
    Any input iappreciated.
    Thanks in advance, padie

    Following SAP note could be useful too:
    Follow the link below:
    https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=proxies&adv=false&sortby=cm_rnd_rankvalue&start=1&sortmode=true
    and search for SAP note "1213781 - How to generate a report based on Internet Information Server (IIS) log files"

  • SQL Loader When Condition

    Hi. I'm currently using the When option in my SQL Loader script:
    when (01:07) <> '9000001'But now I'm finding I need to exclude multiple strings '9000001', '9000002','9000003','9000004'. Is there a way to do this? Any help would be greatly appreciated.

    sharpe wrote:
    Awesome. Thanks. One last question...if I have these strings (e.g. '9000001', etc...) stored in a different table is there anyway to reject records where this value is in my table? Something like a nested select statement?
    when (01:07) not in(select mystr from mytable)Let me know is referencing a table is possible or not. Thanks.As far as I know, you can't do that. I believe the operator has to be either = or != and the value to compare has to be a literal, not a select or function or expression. You could use either SQL*Loader (or an external table if your data is on the server not the client) to load the data into a staging table, then use SQL to insert ... where ... not in(select mystr from mytable).

  • SQL LOADER / INFILE filename as variable in .ctl file

    I stumbled over several threads in the OTN-forums regarding this problem, but neither was it finaly solved nor did I find a FAQ that answered my question. Soooo:
    We get several datafiles from several sources and process them via SQL Loader and store 'em in the DB.
    This is done via a CHRON job and a PERL skript, for all datafiles in a specific directory.
    We need the information which file on which date generated the data INSIDE the DB as well.
    So I want to store the filename || SYSDATE combination as well.
    I know, I could parse the .ctl file and replace a key-string with the actual filename and so have it in the input.
    But this seems a bit dirty to me. Isn't there some way, i.e. a keyword or variable for the infile-filename within the SQLLoader that I can access in the .ctl file? Something like:
    INTO TABLE processed_files
    FIELDS TERMINATED BY ';'
    WHEN LOWER(LTRIM(RTRIM(hdr_ftr))) = 'ftr' -- FOOTER??
    (hdr_ftr VARCHAR2(100),
    source INFILE||' on '||TO_CHAR(SYSDATE, 'MM/DD/YYYY'),
    realm VARCHAR2(100),
    version VARCHAR2(20)
    I would be greatfull if you?d share your wisdom with me. ;-))
    Oliver

    I passed this quite similar to 'Ask Tom' and got the advice to put the .ctl's content as a string variable into a Shell skript.
    This shell skript (which had to be written anyway to loop over the datafiles an subsequently call the sqlldr) should then replace the INFILE parameter and the CONSTANTs for the filenames and generate a 'temporarry' .ctl before calling sqlldr!
    That's it, no better and safer way!

  • How to recover the database when some of the archive log file get deleted.

    I am facing a problem with Oracle database, which is related to archivelogs.
    Our development database is running in archivelog mode, but we don't have backups scheduled and have no recovery catalog.
    When the database was in running condition, disk got full, so some archivelogs were deleted manually.
    After this they restarted the DB, and now DB is not coming up. Errors are as follows:
    SQL> startup
    ORACLE instance started.
    Total System Global Area 1444383504 bytes
    Fixed Size 731920 bytes
    Variable Size 486539264 bytes
    Database Buffers 956301312 bytes
    Redo Buffers 811008 bytes
    Database mounted.
    ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
    SQL> alter database open resetlogs;
    alter database open resetlogs
    ERROR at line 1:
    ORA-01113: file 1 needs media recovery
    ORA-01110: data file 1: '/export/home/oracle/dev/ADVFRW/ADVFRW.system'
    SQL> recover datafile '/export/home/oracle/dev/ADVFRW/ADVFRW.system'
    ORA-00283: recovery session canceled due to errors
    ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
    SQL> recover database using backup controlfile;
    ORA-00279: change 215548705 generated at 09/02/2008 17:06:10 needed for thread
    1
    ORA-00289: suggestion :
    /export/home/oracle/dev/ADVFRW/ADVFRW.archivelog1/LOG_ADVFRW_1107_1.ARC
    ORA-00280: change 215548705 for thread 1 is in sequence #1107
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    /export/home/oracle/dev/ADVFRW/ADVFRW.archivelog1/LOG_ADVFRW_1107_1.ARC
    ORA-00308: cannot open archived log
    '/export/home/oracle/dev/ADVFRW/ADVFRW.archivelog1/LOG_ADVFRW_1107_1.ARC'
    ORA-27037: unable to obtain file status
    SVR4 Error: 2: No such file or directory
    Additional information: 3
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    CANCEL
    Media recovery cancelled.
    SQL>
    1. How to recover the database and bring it online
    Any help will be highly appreciated.
    With Regards
    Hemant Joshi
    Edited by: hem_Kec on Sep 7, 2008 9:07 AM

    Hi,
    Archive log files are the copies of redolog files.As redo log files are circularly overwritten,oracle generates archive log file of the corresponding redo logfiles being overwritten.So if you have a backup that dates back to 10 am in the morning and if your database creashed at 3 pm,you cannot use the redo log files alone as they have incomplete information.To completely recover the database upto 3 pm,you need archive log files generated between 10 am to 3 pm. In your case since you are missing one archive log file,you cannot perform complete recovery and hence would suffer data loss.

  • How to refer the SQL*Loader command line parameters in the control file

    The problem I am trying to resolve is to insert the input file name when SQL*Loader is loading the record from the file. I have multiple files to load and it is nice to associate a record with a particular input file.

    Create the control file dynamically (and fill one of the columns with the file name as a constant) before you start SQL*Loader
    Another option is to use external tables
    Re: Data Loading
    Message was edited by:
    Jens Petersen

  • SQL Loader - want to access data from .txt file but don't want to insert

    Hello,
    I have situation where I have some data in .txt file and I have to load that data into one of my table.
    My problem is I have fundtion get_id(a,b,c) in database which I have to call while loading the data to find out value of x.
    I have value of a, b and c in txt file which I can access it using POSITION(N:M) in sql loader, but After accessing that value I just want to past to get_id() function and dont want to insert into sql loader.
    any help

    My control file is as below
    Following field is not in database but I need to pass the value to the function to get a ESC_USER_ID. any help
    OFFICE_NUM      filler POSITION(32:35) ,
    STATION_DESK      filler POSITION(45:48),
    LOAD DATA
    INFILE REFERRALs.TXT
    BADFILE REFERRAL_LOAD.BAD
    DISCARDFILE REFERRAL_LOAD.DIS
    INSERT
    INTO TABLE REFERRAL
    EVALUATE CHECK_CONSTRAINTS REENABLE DISABLED_CONSTRAINTS
    TRAILING NULLCOLS
    ID                    sequence (1,1),
    JOB_ID                    POSITION (16:22) "GET_JOB_ID(:JOB_ID)"      ,
    CUS_ID                    POSITION (23:31) "GET_CUS_ID(:CUS_ID)"     ,
    STATUS_LU               CONSTANT 'F'                    ,     
    REQUEST_USER_TYPE_LU          CONSTANT 'S'                    ,
    OFFICE_NUM      filler POSITION(32:35) ,
    STATION_DESK      filler POSITION(45:48),
    REQUEST_USER_ID          POSITION(143:149) "GET_ESCUSER_ID(OFFICE_NUM,STATION_DESK,:REQUEST_USER_ID)"     ,
    REQUEST_DT               POSITION (37:44) "to_date(:REQUEST_DT,'YYYY/MM/DD')"     ,
    REVIEW_USER_ID               FILLER                         ,
    REVIEW_DT               FILLER                         ,
    REFUSE_REASON_LU          FILLER                         ,
    RESULT_LU               POSITION (97:97)               ,
    NOTIFY_STATUS_LU          FILLER                         ,
    NOTIFY_DT               FILLER                         ,
    APPOINTMENT_DT               POSITION (106:113) "to_date(:APPOINTMENT_DT,'YYYY/MM/DD')"     ,
    RESULT_DT               POSITION (98:105) "to_date(:RESULT_DT,'YYYY/MM/DD')"     ,
    NO_MATCH_IND               CONSTANT 'N'
    )

  • SQL*Loader with ZONED EXTERNAL in a delimited file

    I have a text file delimited with '|' and numeric data with trailing signs, e.g somedata|12.00-|13.01|42.01-
    My table columns are defined as number(9,2) and I defined the datatype in the control file as zoned external. However, I get the dreaded ORA-01722: invalid number error.
    Does anyone have any suggestions?

    As Bravid says, you can't do that from within SQL*Loader, unless the control files are dynamically generated by a script and the filename included as the default value for that particular column as a hardcoded literal.
    It's easier if you use external tables as the table definition contains the "location" which is the list of filenames it is accessing, and the value can be queried as well as being dynamically changed (though if you're dynamically changing it, then you'll programatically know the filename anyway. hint hint!)
    ;)

  • SQL Loader: refer datafile name in the control file

    Hi All:
    Database: 10GR2
    I have a table as following:
    test (
    filename varchar2(100),
    mydata varchar2(1000)
    I am using sql loader to populate data for this table. I also need store the datafile name to column test.filename as part of dataload. How to refer datafile name in the control file?
    Again, I am processing multiple files in a batch mode. I need store datafile name in filename column so that I can know which "mydata" come from which datafile.
    Thanks in advance!
    Kevin

    As Bravid says, you can't do that from within SQL*Loader, unless the control files are dynamically generated by a script and the filename included as the default value for that particular column as a hardcoded literal.
    It's easier if you use external tables as the table definition contains the "location" which is the list of filenames it is accessing, and the value can be queried as well as being dynamically changed (though if you're dynamically changing it, then you'll programatically know the filename anyway. hint hint!)
    ;)

  • Printing all messages when WEBLOGIC starts in its log file

    Hello i am following all these steps
    Step 1. Copy log4j-1.2.9.jar & wllog4j.jar under domain_root/lib folder.
    Step 2. Create log4j.xml and drop it under domain_root folder. If you have log4j.xml inside the application(EAR/WAR), I would recommend to move outside EAR/WAR as
    changing severity (log level) would require re-deployment. To avoid this, we can move log4j.xml into domain root folder but again the server needs to be bounced.
    But there is a fix.
    Step 3. Login to weblogic server console. Go to Servers -> Admin Server-> Logging.
    Click on advanced mode. Change the logging implementation from JDK to Log4J.
    Click save.
    Step 4. Activate changes. Re-start the admin server.
    This should enable log4j and should write logging into log file mentioned in log4j.xml or properties file.
    Hang on! There is a catch here. Say now I want to change the log level from DEBUG into WARN or ERROR.
    How do i do?
    We go to log4j.xml and change the level.
    Now how does this change take into effect? It needs bouncing of the server.
    I have given below sample log4j.xml for your reference...
    log4j.xml:
    <?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE log4j:configuration SYSTEM
    "log4j.dtd">
    <log4j:configuration>
    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern"
    value="%d [%t] %-5p %c - %m%n"/>
    </layout>
    </appender>
    <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="/log/myApp.log"/>
    <param name="Append" value="true"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d{ISO8601} %t %-5p %c{2} - %m%n"/>
    </layout>
    </appender>
    <logger name="org.apache">
    <level value="WARN"/>
    </logger>
    <logger name="org.springframework">
    <level value="WARN"/>
    </logger>
    <root>
    <level value="DEBUG"/>
    <appender-ref ref="FILE"/>
    <!-- <appender-ref ref="CONSOLE"/> -->
    </root>
    </log4j:configuration>
    I Followed all these steps , but finally i am getting an empty file myApp.log at specified destination , i want all log messages inside that file when WEBLOGIC starts , so what needs to be done for that

    I guess the issue here is that somehow the log4j configurations are not getting picked up.
    Please try adding the LOG4j configurations explicitly onto the classpath:-
    set LOG4J_CONFIG_FILE=log4j.xml
    set SAVE_JAVA_OPTIONS=%JAVA_OPTIONS% -Dlog4j.configuration=%LOG4J_CONFIG_FILE%
    @REM set SAVE_CLASSPATH=%CLASSPATH%
    set SAVE_CLASSPATH=%CLASSPATH%;C:\Oracle\Middleware\user_projects\domains\base_domain\config
    -Sandeep

  • Iphoto Images will not Load when trying to attach as a file.

    When trying to attach a Iphoto image to either gmail or facebook, I am able to access Iphoto; however, I receive a message "Loading Iphoto images" but the photos never load. This just recently occurred a few weeks ago and I have never had problems uploading photos from Iphoto in the past. I am able to drag the photo to my desktop and then upload from the desktop folder but am curious why the Iphoto images are no longer being loaded.
    Thanks ~ Marie

    Try repair permissions with Disk Utility.
    Regards
    TD

Maybe you are looking for

  • Conflicting information about external display resolution - please help!

    I have a MacBook Pro (15-inch, Mid 2009) with the non-reflective screen, Mini Display Port and NVIDIA GeForce 9400M Graphics processor. According to these technical specifications (http://support.apple.com/kb/SP544), the built-in NVIDIA GeForce 9400M

  • Tranfer music from one account to another?

    I use my moms itunes account to get my music but i use my account to get songs i want that my mom wouldnt want and to get apps.. im planning on replacing my phone with the kind but was wondering if i could tranferred the music i got from my mom to my

  • Move file to new folder if it does not exist already

    I have tried what feels like a million ways to do this and none of them are working like I want. A file will be placed in folder 1 with a unique case number as the file name. IE 12345675.txt If the data in the file is changed a new file with the same

  • Make DW default for XML files?

    I'm sure there's a way to do this that I'm missing, but I'd like to make DW my default app for XML files.  I know how this can be done on Windows (using "open with" and changing default), but I'm using Mac OSX.  I tried messing with the file types se

  • HT204266 I deleted safari browser from my iPad 2, need to download again?

    I deleted safari browser from my iPad 2, need to download again?