Weird problem using load() on a BLOB

I've got a weird bug when trying to load BLOBs via PHP. Here is the code:<P>
<TT>
<?<BR>
// Environment Variables so PHP can find Oracle<BR>
putenv("TWO_TASK=gonk"); // Name of Oracle Server<BR>
putenv("ORACLE_SID=ora10"); // Name of Oracle Instance<BR>
putenv("ORACLE_HOME=/local/apps/oracle/InstantClient");<BR>
putenv("DYLD_LIBRARY_PATH=/local/apps/oracle/InstantClient");<P>
// Oracle username, password and connection string<BR>
define("ORA_CON_UN", "test"); // Oracle Username<BR>
define("ORA_CON_PW", "blahblah"); // Oracle Password<BR>
define("ORA_CON_DB", "ora10"); // Oracle Instance<P>
// Connect to Oracle<BR>
$conn = OCILogon(ORA_CON_UN, ORA_CON_PW, ORA_CON_DB);<P>
// SQL Query to execute<BR>
$query = "SELECT TESTNUM, TESTCHAR, TESTBLOB ";<BR>
$query .= "FROM TESTING WHERE TESTNUM = 1";<BR>
$stmt = OCIParse ($conn, $query);<BR>
OCIExecute($stmt);<BR>
OCIFetchInto($stmt, &$arr, OCI_RETURN_LOBS);<P>
$BlobNum = OCIResult($stmt,1);<BR>
$BlobChar = OCIResult($stmt,2);<BR>
$RawBlobBlob = OCIResult($stmt,3);<BR>
$BlobBlob = $RawBlobBlob->load();<P>
print ("BlobNum:".$BlobNum."\n");<BR>
print ("BlobChar:".$BlobChar."\n");<BR>
print ("RawBlobBlob:".$RawBlobBlob."\n");<BR>
print ("BlobBlob:".$BlobBlob."\n");<BR>
print("***\n");<BR>
?><P>
</TT>
Basically, the program works fine under PHP 4.0.5 on a TRU64 box (yes, the BLOB is displayed as a mess of strange characters, but that's cool - if I include a "header("Content-Type: image/jpeg");" line and only output the BLOB by itself the jpeg image stored in the BLOB is displayed properly). However, when it comes to running exactly the same program under PHP 4.4.1 on a OS X box, the program does not display the BLOB. The program is definitely loading the BLOB, as I can get the program to display how big (in bytes) the data in the BLOB is, but the OCI function load() is returning nothing when it should be displaying the data I have in the BLOB.
<P>
Anyone got any ideas on what could be causing this behaviour ? It's been driving me nuts for nearly a week!
<P>
Cheers,<BR>
Rocky

Glad you fixed it.
See http://www.oracle.com/technology/tech/php/htdocs/php_troubleshooting_faq.html#envvars regarding these lines in your script:
putenv("ORACLE_HOME=/local/apps/oracle/InstantClient");
putenv("DYLD_LIBRARY_PATH=/local/apps/oracle/InstantClient");
-- cj

Similar Messages

  • Weird Problem using Mnemonics

    I have a weird problem with mnemonics:
    When I use the mnemonic for my JMenuItem to open a specific JPanel the first time (e.g.) it works fine, then if I then close it for example and I still have the "Alt" key pressed I get the follwing exception??? :
    java.lang.NullPointerException
    at javax.swing.SwingUtilities.getWindowAncestor(Unknown Source)
    at com.sun.java.swing.plaf.windows.WindowsRootPaneUI$AltProcessor.postProcessKeyEv ent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Hope someone can help.
    Kanita

    The mnemonic are not working because the Window or the Frame on which your components are added have lost the focus while pressing the Alt key.
    I had faced the same problem , but I wanted a focus on JMenuBar which i had added to my frame.
    when i was clicking the JButton using the mnemonic , i used to loss the focus. But afterwards i put a code in the actionPerformed part of the button to bring the focus to the JMenuBar.
    rootFrame.getJMenuBar().getComponent().transferFocus();
    rootFrame is my main frame on which the JMenubar is added.
    I am using java 4 version.

  • Weird problem with loading data from an XML using a for loop

    Hi,
    I have a strange problem. I have encountered this thing many a times but still don't know the proper workaround for it.
    I am trying to load swf file, a video file or an image. They can be present on a local system or on a remote server also. All the entries corresponding to the files to be loaded is made in an XML file. I traverse through the nodes of the XML using a for loop. On the complete event of loader info, example:.
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
    I fill a container with the loaded data.
    My problem is when I am using for loop it doesn't works properly but if i use a statement like this:
    someFunc()
         if(i<arr.length())
         ... do something...
         loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
    private function onComplete(e:Event):void
    ... do something...
    i++;
    All files are loaded properly.
    I think this can be because the for loop processes pretty fast but the content takes time to load, which ultimately leads to some wierd results.
    Please let me know how can this thing be done correctly by using a for loop also.

    You don't want to use a for loop to load several items.  The way you almost appear to have it is the proper approach... load a file and use the completion of its loading to trigger loading the next file.

  • Weird problem using bitwise opertor

    Hi all,
    I have problem with >>> (bitwise logical right shift) operator.
    As an example, the result of this operator on 0x8000 value is not as I expect. As I read about this operator, the result of one bit logical right shift should be 0x4000 but the actual result is 0xC000, and as I see in my test applets there is no difference between >> and >>> operators. I tested this operator on both ST and Gemalto cards and the results were the same.
    short n=(short) 0x8000;
    short x= (short) n >>>1; //Here I expect 0x4000 but the actual result is 0xC000
    short y= (short) n>>1; //Here as I expect the result is 0xC000Would some body please explain such weird action of this operator?
    By the way, Is there any explicit operator for POWER operation in java card or I should use this bitwise operators instead?
    -Thanks a lot
    Edited by: bluefairy on Sep 16, 2010 12:50 AM

    It is quite simple if you know where to look. Open up your Java Card Virtual Machine specification, if you can find it.
    The >>> operator translates to the "sushr" bytecode.
    Let's see what that means...
    Forms
    sushr = 81 (0x51)
    Stack
    &hellip;, value1, value2 &minus;>
    &hellip;, result
    Description
    Both value1 and value2 must be of type short. The values are popped from the operand stack. A short result is calculated by sign-extending value1 to 32 bits (footnote 1) and shifting the result right by s bit positions, with zero extension, where s is the value of the low five bits of value2. The resulting value is then truncated to a 16-bit result. The result is pushed onto the operand stack.
    Footnote 1
    Sign extension to 32 bits ensures that the result computed by this instruction will be exactly equal to that computed by the Java iushr instruction, regardless of the input values. In a Java Card virtual machine the
    expression "0xffff >>> 0x01" yields 0xffff, where ">>>" is performed by the sushr instruction. The same result is rendered by a Java virtual machine.
    So... What does this mean ? This means that your variable is sign-extended to a 32-bit value (meaning that the sign bit is propagated), THEN the right shift is performed.
    See below my comments in the code.
    short n = (short) 0x8000;
    short x = (short) n >>> 1;
    // 0x8000 is extended to 0xFFFF8000
    // Right-shift by 1 bit --> 0xFFFFC000
    // Cast to short --> 0xC000Hope this helps.
    Cheers

  • MISALIGNMENT PROBLEMS USING "LOAD FILES INTO PHOTOSHOP LAYERS" FROM BRIDGE CC

    I'm having a persistent problem which technical support was unable to resolve after being on the phone with them for 1.5 hrs. I was told the issue would be escalated... That was five days ago, and I've heard nothing.
    Here is the problem: In ACR working on a bracketed group of five images shot from a solid tripod in Bridge CC. I carefully synchronize all parameters incl. crop, transform, exposure, etc. Then I go to Tools / Photoshop / Load files into Photoshop layers, and the images open in photoshop in a layered file..., BUT some are knocked out of alignment. Actually they have been cropped slightly smaller than the original file, always by the same number of pixels. Sometimes all layers are affected, sometimes not.
    Photoshop CC & Bridge CC are both up to date, as is the camera raw plugin. I’m on a new iMac i7 4-core, OSX 10.9.4. All software was newly downloaded from Adobe two weeks ago. I have reset preferences, reset tools in Photoshop, even uninstalled and reinstalled Bridge CC 6.1.0.115 all to no avail. Any suggestions? I am desperate for some help.

    I run Windows 7 Ultimate, I have 2.00GB of RAM with 1.74 usable, and I selected 40 images, each about 2MB.

  • Problem with loading file to BLOB column

    I am attempting to load up a .gif gile into a BLOB column in my database.
    I created the directory as below:
    ===
    SQL> create or replace directory example_lob_dir as 'C:\temp';
    Directory created.
    ===
    Next I created the following procedure to load the file into the BLOB column:
    ====
    create or replace procedure load_blob as
    dest_loc blob; -- destination location
    src_loc bfile := bfilename('example_lob_dir', 'example.gif'); -- source location
    begin
    -- Insert intial BLOB value
    insert into test_blob(id, file_name, image)
    values (1, 'test.gif', empty_blob())
    returning image into dest_loc;
    -- Open the source BFILE
    dbms_lob.open(src_loc, dbms_lob.lob_readonly);
    -- Open the LOB (optional)
    dbms_lob.open(dest_loc, dbms_lob.lob_readwrite);
    -- Load the file
    dbms_lob.loadfromfile(
    dest_lob => dest_loc,
    src_lob => src_loc,
    amount => dbms_lob.getlength(src_loc));
    -- Close LOBs
    dbms_lob.close(dest_loc);
    dbms_lob.close(src_loc);
    commit;
    end load_blob;
    ===
    The file is definitely in the C:\temp folder and is named correctly. I am working in WinXP with Oracle10gXE and both server and client are on the same machine.
    The procedure compiles without any errors but when I attempt to run it I get an error message as below:
    ==
    SQL> exec load_blob
    BEGIN load_blob; END;
    ERROR at line 1:
    ORA-22285: non-existent directory or file for FILEOPEN operation
    ORA-06512: at "SYS.DBMS_LOB", line 716
    ORA-06512: at "FTM.LOAD_BLOB", line 14
    ORA-06512: at line 1
    ==
    Any help would be much appreciated.

    When you create objects on the database they are stored in the data dictionary by default in UPPER case.
    So in this line:
    src_loc bfile := bfilename('example_lob_dir', 'example.gif'); -- source location
    you need to reference the name of the directory object in upper case. e.g.
    src_loc bfile := bfilename('EXAMPLE_LOB_DIR', 'example.gif'); -- source location
    ;)

  • Weird problem using "Login" in MaxL script

    Hi there
    I have created a MaxL script for loading som data into an Essbase. The script you can see below.
    login 'user' 'password' on 'nkm18k14';
    import database 'realtest'.'Loadtest'
    data from text data_file '\\nkm18k00\Planning\Loaddata\lonbud.txt'
    using server rules_file 'LonBLoad'
    on error write to '\\nkm18k00\Planning\Errorlogs\realtest.txt';
    When I try to execute it, as it is i get the following error "(3) Syntax error near ['$'], which im guessin is line 3, right?
    When I remove line 1 (the login statement), the script runs just fine. What is goin on, any ideas?
    I as a user have write acces to the network locations specified, could it be that the essbase uses som kind of system user that doesn't have acces to the network location?
    Any valuable input will be appreciated.
    Regards, Jacob

    It's true that they are not "needed" from a security approach, but from a maintenance approach you still end up having to touch a large number of scripts if you store the connection details in them.
    As a system user, you don't even have to change the password -- but if you have someone leave the company you may just want to.
    Either way, I would never want to hard code connectivity details inside dozens of scripts when I can keep it in a single place.
    Here is the MXL_Shell file for Windows -- you can obtain the SendEmail.exe from multiple places, but the syntax should be validated.
    The location of the scripts, log files, and batch items can of course be modified to your liking as well...
    The Errors that are ignored are stored in a file called "IGNORED.TXT" in the Batch directory (see below for what I ignore).
    @echo off
    REM ================================================================
    REM   MXL_Shell.cmd - Wrapper to call EssMsh (MXL) scripts
    REM ----------------------------------------------------------------
    REM   Author: Doug Bliss
    REM   Initial QC: 5/21/2005
    REM ----------------------------------------------------------------
    REM   Script to Execute should be base name (without extension)
    REM   Script should exist in the ..\Scripts directory
    REM   Both StdOut and StdErr are redirected to ..\Logs\<Script>.log
    REM   Call activity is logged to ..\Logs\Daily_ddmmyy.log
    REM   Log file is appended to ..\Logs\<Script>.hst at finish
    REM   Log file is processed for "Error" tokens to determine if
    REM      the result was successful or not
    REM   Notifications are taken from comment blocks in the script:
    REM      /* Notifications:
    REM         ONSUCCESS [email protected]
    REM         ONERR [email protected]
    REM       */
    REM   Localization details: Update the variables set immediately below (typically SRCPATH and EMAIL*)
    REM ================================================================
    SET SRCPATH=C:\Automation
    SET EMAILDOM=<yourcompany.com>
    SET EMAILRELAY=<relay>.%EMAILDOM%
    SET DEVBOX=<devboxname>
    SET IGNORE=%SRCPATH%\Batch\Ignored.txt
    SET MXLFILE=%SRCPATH%\Scripts\%1.mxl
    SET LOGPATH=%SRCPATH%\Logs
    SET LOGFILE=%LOGPATH%\%1.log
    SET ERRFILE=%LOGPATH%\%1.err
    SET HSTFILE=%LOGPATH%\%1.hst
    SET DAYFILE=%LOGPATH%\Daily_%date:~4,2%%date:~7,2%%date:~10,4%.log
    REM ################################## Step 1: Sanity Checks
    IF "%1"=="" EXIT /B 1
    IF NOT EXIST %MXLFILE% EXIT /B 2
    REM ################################## Step 2: Initialize Log entries
    IF NOT EXIST %LOGPATH%\. MKDIR %LOGPATH% >nul
    IF EXIST %ERRFILE% MOVE /Y %ERRFILE% %SRCPATH%\Logs\%1.bak.err >nul
    IF EXIST %LOGFILE% MOVE /Y %LOGFILE% %SRCPATH%\Logs\%1.bak.log >nul
    REM ################################## Step 3: Call the Script
    ECHO %time% -- Calling EssMsh Script: %1.mxl %2 %3 %4 %5 %6 %7 %8 %9 >>%DAYFILE%
    ECHO ============================== ESSBASE SESSION LOG >%LOGFILE%
    ECHO Log Opened: %date% %time% >>%LOGFILE%
    CALL User.cmd
    essmsh.exe -s %COMPUTERNAME% -u %UID% -p %PWD% %MXLFILE% "%2" "%3" "%4" "%5" "%6" "%7" "%8" "%9" >>%LOGFILE% 2>&1
    REM ################################## Step 4: Post Processing
    REM #### Daily Log Entry (return call)
    ECHO %time% -- Returned from Maxl Script: %1.mxl >>%DAYFILE%
    ECHO Log Closed: %date% %time% >>%LOGFILE%
    ECHO ============================== END OF SESSION >>%LOGFILE%
    REM #### Process Error entries and filter via Ignored.txt file
    TYPE %LOGFILE% | FIND "ERROR" >%ERRFILE%
    FOR /f "tokens=1" %%a in (%IGNORE%) DO TYPE %ERRFILE% | FIND /V "%%a" >%ERRFILE%
    FOR %%a in (%ERRFILE%) DO SET /a ErrCount=%%~za >nul
    IF '%COMPUTERNAME%'=='%DEVBOX%' (
         SET TYPE=NON-Production
         SET SVR=development
    ) ELSE (
         SET TYPE=Production
         SET SVR=production
    IF %ErrCount% EQU 0 (
         ERASE /Q %ERRFILE%
         SET SUBJECT=Essbase %TYPE% Script Completed
         SET MESSAGE=Maxl script '%1' has successfully completed on the %SVR% server.
         SET ATTACH=
         SET RESULT=SUCCESS
    ) ELSE (
         REM ################################## ERROR Processing
         SET SUBJECT=Essbase %TYPE% Script Error
         SET MESSAGE=Errors were detected in Maxl script '%1', the job's log and error files are attached.
         SET ATTACH=%LOGFILE% %ERRFILE%
         SET RESULT=ERR
    TYPE %MXLFILE% | FIND "ON%RESULT%" >Notify.tmp
    FOR /f "tokens=2" %%a in (Notify.tmp) DO SendEmail -f %COMPUTERNAME%@%EMAILDOM% -t %%a -u "%SUBJECT%" -m "%MESSAGE%" -s %EMAILRELAY% -a %ATTACH%
    ERASE /Q Notify.tmp
    ECHO. >>%DAYFILE%
    ECHO. >>%HSTFILE%
    TYPE %LOGFILE% >>%HSTFILE%
    :FIN
    ECHO.
    EXIT /B %ERRCOUNT%Here is my IGNORED.TXT file (only the code itself is used, the rest is for reference).
    0000000  This file contains Essbase Error codes which should be ignored by ESS_Shell.cmd or MXL_Shell.cmd
    1051083  This substitution variable does not exist.
    1003029  Encountered formatting error in spreadsheet file [%s]
    1090010  Error in File [%s] Which is a [%s] Spreadsheet
    1051068  Database is not in archive read-only mode

  • Applescript: Problem Using Load Script File. Please Help :-!

    My setup: file 1 is a script object and file 2 is the script that uses the script object in file 1. This seems straightforward, but I'm getting runtime errors when tryig to use the script object, whether looking at its properties or calling its handlers. The whole thing just doesn't work. What am I doing wrong?
    Question 1: Is the 'load script' statement correct in file 2? It took forever and looking at many examples to not get an error in that statement. I don't understand why the path string is 'as alias'.
    Question 2:  When loading a script and specifying its path, is there a way to start with the current path (of the executing script file). All the scripts are stored together, but so far, I've only seen commands for absolute paths or user or desktop, etc. how can I get the path of the currently running script?
    Question 3: Is the cURL syntax ok? I can't even get the script to run to that line, so I don't know if it will even execute.
    Thanks a million, in advance.
    Cheers,
    Mark
    File 1: this is the script library file
    script AR_Redeye
      -- IR Command URLs
              property outside_lights_ON : "http://..."
              property outside_lights_OFF : "http://..."
              on do_command(command_url)
              -- execute the url using cURL
                        set command_status to (do shell script "/usr/bin/curl -s -S  " & command_url) as string
              -- the url (when opened in a web browser) displays 'success' or 'fail'
                        return command_status
              end do_command
    end script
    File 2: The script that calls the handlers in the library file
    set arRedeye to load script (("Macintosh HD:Users:...:AR Redeye Class.scptd") as alias)
    tell arRedeye to do_command("http://...")

    If I may indulge you again, I've cleaned up the scripts according to your advice and made progress, but I am still receiving the following errors:
    Applescript Error:
    «script» doesn’t understand the do_command message.  (see below for where it occurs)
    I also get an error for referencing a property of the script object.
    Might you provide some insight as to why this is occurring?
    Still a little confused.
    Thanks,
    Mark
    =================================
    -- File AR_Redeye.scptd
    -- IR Command URLs
    property outside_lights_ON : "http://redeye..."
    property outside_lights_OFF : "http://redeye..."
    property all_AV_OFF : "http://redeye..."
    property airplay_all_rooms : "http://redeye..."
    on do_command(command_url)
      -- execute the url using cURL
              set command_status to (do shell script "/usr/bin/curl -s -S  " & (command_url as string)) as string
              return command_status
    end do_command
    -- End file
    ==================================
    -- Main Script File
    tell application "Finder" to set appPath to container of (path to me)
    set scriptPath to POSIX path of (appPath as text) & "AR Redeye Class.scptd"
    set arRedeye to (load script scriptPath)
    tell arRedeye to do_command(outside_lights_ON of arRedeye)
    -- the above line returns an error: «script» doesn’t understand the do_command message.
    -- also returns an error related to using the property outside_lights_ON of the arRedeye script object.
    -- Main Script File End

  • Weird problem using external tables

    Hi,
    Please move my message to the correct forum if it is not in the right one.
    Problem:
    I have the following external table definition:
    CREATE TABLE blabla (
         AANSLUITINGSNR_BV NUMBER(15),
         BSN_NR               NUMBER(9),
         DATUM_AANVANG_UKV          DATE,     
         DATUM_EIND_UKV               DATE,
         BEDR_WAO_WERKN_REFJ          number(18),
         BEDR_WAO_WERKG_REFJ          NUMBER(38)                              
    ORGANIZATION EXTERNAL (
    TYPE oracle_loader
    DEFAULT DIRECTORY nood_dir
    ACCESS PARAMETERS (
    RECORDS DELIMITED BY NEWLINE
    FIELDS TERMINATED BY ';'
    MISSING FIELD VALUES ARE NULL
         "AANSLUITINGSNR_BV",
         "BSN_NR",           
         "DATUM_AANVANG_UKV"      DATE "YYYYMMDD",
         "DATUM_EIND_UKV"          DATE "YYYYMMDD",
         "BEDR_WAO_WERKN_REFJ",
         "BEDR_WAO_WERKG_REFJ"
    LOCATION ('myfile.csv')
    REJECT LIMIT UNLIMITED;
    My file looks like this:
    107031035423278;913487654;20010101;20011231;3231729003;8334195582
    128039008378982;117347347;20010101;20011231;1606131689;4468506457
    134740829467773;450263934;20010101;20011231;9568986434;526201096
    141020256280899;782714783;20010101;20011231;33235678;2398903683
    146130347251892;960256796;20010101;20011231;441706397;2622754437
    151020336151123;441010528;20010101;20011231;8183416412;6077359802
    152888977527618;114572066;20010101;20011231;2370992895;6196483262
    But when selecting the following log is stated:
    error processing column BEDR_WAO_WERKG_REFJ in row 1 for datafile /oracle/db/noodscenario/myfile.csv
    ORA-01722: invalid number
    error processing column BEDR_WAO_WERKG_REFJ in row 2 for datafile /oracle/db/noodscenario/myfile.csv
    ORA-01722: invalid number
    Why is number 8334195582 stated as invalid ?
    Thanks,
    Coen
    Message was edited by:
    Coenos1

    Which Oracle version and OS are you on ? It works perfectly to me :
    $ cat myfile.csv
    107031035423278;913487654;20010101;20011231;3231729003;8334195582
    128039008378982;117347347;20010101;20011231;1606131689;4468506457
    134740829467773;450263934;20010101;20011231;9568986434;526201096
    141020256280899;782714783;20010101;20011231;33235678;2398903683
    146130347251892;960256796;20010101;20011231;441706397;2622754437
    151020336151123;441010528;20010101;20011231;8183416412;6077359802
    152888977527618;114572066;20010101;20011231;2370992895;6196483262
    $ sqlplus test/test
    SQL*Plus: Release 10.2.0.2.0 - Production on Fri Aug 24 10:56:30 2007
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> CREATE TABLE blabla (
      2  AANSLUITINGSNR_BV NUMBER(15),
      3  BSN_NR NUMBER(9),
      4  DATUM_AANVANG_UKV DATE,
      5  DATUM_EIND_UKV DATE,
      6  BEDR_WAO_WERKN_REFJ number(18),
      7  BEDR_WAO_WERKG_REFJ NUMBER(38)
      8  )
      9  ORGANIZATION EXTERNAL (
    10  TYPE oracle_loader
    11  DEFAULT DIRECTORY work
    12  ACCESS PARAMETERS (
    13  RECORDS DELIMITED BY NEWLINE
    14  FIELDS TERMINATED BY ';'
    15  MISSING FIELD VALUES ARE NULL
    16  (
    17  "AANSLUITINGSNR_BV",
    18  "BSN_NR",
    19  "DATUM_AANVANG_UKV" DATE "YYYYMMDD",
    20  "DATUM_EIND_UKV" DATE "YYYYMMDD",
    21  "BEDR_WAO_WERKN_REFJ",
    22  "BEDR_WAO_WERKG_REFJ"
    23  )
    24  )
    25  LOCATION ('myfile.csv')
    26  )
    27* REJECT LIMIT UNLIMITED
    SQL> /
    Table created.
    SQL> select * from blabla;
    AANSLUITINGSNR_BV          BSN_NR DATUM_AAN DATUM_EIN BEDR_WAO_WERKN_REFJ BEDR_WAO_WERKG_REFJ
      107031035423278       913487654 01-JAN-01 31-DEC-01          3231729003          8334195582
      128039008378982       117347347 01-JAN-01 31-DEC-01          1606131689          4468506457
      134740829467773       450263934 01-JAN-01 31-DEC-01          9568986434           526201096
      141020256280899       782714783 01-JAN-01 31-DEC-01            33235678          2398903683
      146130347251892       960256796 01-JAN-01 31-DEC-01           441706397          2622754437
      151020336151123       441010528 01-JAN-01 31-DEC-01          8183416412          6077359802
      152888977527618       114572066 01-JAN-01 31-DEC-01          2370992895          6196483262
    7 rows selected.
    SQL>What do you see within the log file ?

  • URGENT: Problems Loading files with SQL Loader into a BLOB column

    Hi friends,
    I read a lot about how to load files into blob columns, but I found errors that I can't solve.
    I've read several notes in these forums, ine of them:
    sql loader: loading external file into blob
    and tried the solutions but without good results.
    Here are some of my tests:
    With this .ctl:
    LOAD DATA
    INFILE *
    INTO TABLE mytable
    REPLACE
    FIELDS TERMINATED BY ','
    number1 INTEGER EXTERNAL,
    cad1 CHAR(250),
    image1 LOBFILE(cad1) TERMINATED BY EOF
    BEGINDATA
    1153,/opt/oracle/appl/myapp/1.0.0/img/1153.JPG,
    the error when I execute sqlldr is:
    SQL*Loader-350: Syntax error at line 9.
    Expecting "," or ")", found "LOBFILE".
    image1 LOBFILE(cad1) TERMINATED BY EOF
    ^
    What problem exists with LOBFILE ??
    (mytable of course has number1 as a NUMBER, cad1 as VARCHAR2(250) and image1 as BLOB
    I tried too with :
    LOAD DATA
    INFILE sample.dat
    INTO TABLE mytable
    FIELDS TERMINATED BY ','
    (cad1 CHAR(3),
    cad2 FILLER CHAR(30),
    image1 BFILE(CONSTANT "/opt/oracle/appl/myapp/1.0.0/img/", cad2))
    sample.dat is:
    1153,1153.JPEG,
    and error is:
    SQL*Loader-350: Syntax error at line 6.
    Expecting "," or ")", found "FILLER".
    cad2 FILLER CHAR(30),
    ^
    I tried too with a procedure, but without results...
    Any idea about this error messages?
    Thanks a lot.
    Jose L.

    > So you think that if one person put an "urgent" in the subject is screwing the problems of
    other people?
    Absolutely. As you are telling them "My posting is more important than yours and deserve faster attention and resolution than yours!".
    So what could a typical response be? Someone telling you that his posting is more important by using the phrase "VERY URGENT!". And the next poster may decide that, no, his problem is evern more import - and use "EXTREMELY URGENT!!" as the subject. And the next one then raises the stakes by claiming his problem is "CODE RED! CRITICAL. DEFCON 4. URGENT!!!!".
    Stupid, isn't it? As stupid as your instance that there is nothing wrong with your pitiful clamoring for attention to your problem by saying it is urgent.
    What does the RFC's say about a meaningful title/subject in a public forum? I trust that you know what a RFC is? After all, you claim to have used public forums on the Internet for some years now..
    The RFC on "public forums" is called The Usenet Article Format. This is what it has to say about the SUBJECT of a public posting:
    =
    The "Subject" line (formerly "Title") tells what the message is about. It should be suggestive enough of the contents of the message to enable a reader to make a decision whether to read the message based on the subject alone. If the message is submitted in response to another message (e.g., is a follow-up) the default subject should begin with the four characters "Re: ", and the "References" line is required. For follow-ups, the use of the "Summary" line is encouraged.
    =
    ([url http://www.cs.tut.fi/~jkorpela/rfc/1036.html]RFC 1036, the Usenet article format)
    Or how about [url http://www.cs.tut.fi/~jkorpela/usenet/dont.html]The seven don'ts of Usenet?
    Point 7 of the Don'ts:
    Don't try to catch attention by typing something foolish like "PLEASE HELP ME!!!! URGENT!!! I NEED YOUR HELP!!!" into the Subject line. Instead, type something informative (using normal mixed case!) that describes the subject matter.
    Please tell me that you are not too thick to understand the basic principles of netiquette, or to argue with the RFCs that governs the very fabric of the Internet.
    As for when I have an "urgent" problem? In my "real" work? I take it up with Oracle Support on Metalink by filing an iTAR/SR. As any non-idiot should do with a real-life Oracle crisis problem.
    I do not barge into a public forum like you do, jump up and down, and demand quick attention by claiming that my problem is more important and more urgent and more deserving of attention that other people's problem in the very same forum.

  • Problem in loading large data to SDE using Shp2sde command

    Hi,
    When we try load data to SDE (Oracle 8.1.5, Sun solaris 2.6)using shp2sde command, we get the following error message and the data is loaded partially:-
    " SDE: Shape #2560 is an invalid entity type for layer station.
    3337 features converted
    3337 features stored "
    The shape file had 4352 features of type point.
    If the same data is splitted into 2 (one having 1906 features and another having 2446 features), there is no problem in loading.
    The giomgr.log file had the following lines corresponding to this
    loading.
    Process 9512, R/T calls 14, features read 0, wrote 3337, locks 0,
    buffers 1, partial 0, buffered features 3337, buffered data 555K
    We suspect this is due some size specified somewhere which limits
    loading of all the data. So our DBA granted SDE user quota unlimited to SDE tablespace. After the granting, everything works fine, we can load the data. But when we restart the server, the same error appear again.
    We are encountering this error in production but not in the devt environment. We urgently need to solve this problem. Anyone has solution to this problem?
    Thanks.
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Gerjan Walrecht ([email protected]):
    What is your commit interval? (-c ...)<HR></BLOCKQUOTE>
    My commit interval is 1000. Even if I reduce the commit to 500, the result is still the same.
    I was wandering is there anywhere where Oracle limit the size of the loading? or Kernel.. etc
    null

  • Beginner Has Problem With Loading JDBC Driver Using MySQL

    Hi, I am having problem with loading JDBC driver, and need your diagnotic help.
    1. I have installed MySQL (C:\mysql), created a databse (soup), and created a littel table (VIDEOS). I am able to see the table in the console:
    sql> select * from videos
    2. I have downloaded the latest version of Connector/J (mysql-connector-java-3.1.0-alpha.zip), and unzip the zip file into my C:\ directory.
    3. I copied the mysql-connector-java-3.1.0-alpha-bin.jar to the C:\j2sdk1.4.1_02\jre\lib\ext folder and it is in my CLASSPATH
    4. MySQL server is running
    C:\> C:\mysql\bin\mysqld-nt --standalone
    5. open another DOS window and use the database
    mysql>USE SOUP
    6. succesfully compiled a Java program (javac Test.java):
    import java.sql.* ;
    public class Test
    public static void main( String[] args )
    try
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    try
    Connection con = DriverManager.getConnection( "jdbc:mysql://localhost:3306/soup" );
    try
    Statement statement = con.createStatement();
    ResultSet rs = statement.executeQuery("SELECT TITLE FROM VIDEOS");
    while ( rs.next() )
    System.out.println( rs.getString( "TITLE" ) );
    rs.close();
    statement.close();
    catch ( SQLException e )
    System.out.println( "JDBC error: " + e );
    finally
    con.close();
    catch( SQLException e )
    System.out.println( "could not get JDBC connection: " + e );
    catch( Exception e )
    System.out.println( "could not load JDBC driver: " + e );
    7. when I run the Java program (java Test), I got
    the message:
    could not load JDBC driver: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
    What am I missing?

    Hi,
    I missed to specify test in my last post.
    Try running your program by explicitly setting the classspath when
    running your program . java -classpath c:\mysql-connector-java-3.1.0-alpha-bin.jar test
    Make sure your jar file contains org.gjt.mm.mysql.Driver class

  • Problem using SQL Loader with ODI

    Hi,
    I am having problems using SQL Loader with ODI. I am trying to fill an oracle table with data from a txt file. At first I had used "File to SQL" LKM, but due to the size of the source txt file (700MB), I decided to use "File to Oracle (SQLLDR)" LKM.
    The error that appears in myFile.txt.log is: "SQL*Loader-101: Invalid argument for username/password"
    I think that the problem could be in the definition of the data server (Physical architecutre in topology), because I have left blank Host, user and password.
    Is this the problem? What host and user should I use? With "File to SQL" works fine living this blank, but takes to much time.
    Thanks in advance

    I tried to use your code, but I couldn´t make it work (I don´t know Jython). I think the problem could be with the use of quotes
    Here is what I wrote:
    import os
    retVal = os.system(r'sqlldr control=E:\Public\TXTODI\PROFITA2/Profita2Final.txt.ctl log=E:\Public\TXTODI\PROFITA2/Profita2Final.txt.log userid=MYUSER/myPassword @ mySID')
    if retVal == 1 or retVal > 2:
    raise 'SQLLDR failed. Please check the for details '
    And the error message is:
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 5, in ?
    SQLLDR failed. Please check the for details
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
         at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.h.y(h.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)

  • Facing problem in loading table using IKM Oracle Slowly Changing Dimension

    Hi,
    I am facing problem in loading dimension table using IKM Oracle Slowly Changing Dimension
    Following is the setup :-
    SRC :- source_table (MSSQL)
    Staging :- staging_table (MSSQL)
    TRGT :- target_table (Oracle)
    -------- source_table
    group_id     int
    group_version_id     int
    name     varchar (255)
    description     varchar (255)
    comments     varchar (2000)
    ref_number     varchar (255)
    is_latest_version     decimal (5)
    is_deleted     decimal (5)
    --------- target_table
    id     number (38,0) - Mapped to <%=odiRef.getObjectName( "L" , "SEQ_NAME" , "D" )%>.nextval
              - Executed on target
              - defined the column as SK in model
    group_id     number (38,0) - defined the column as NK in model     
    group_version_id     number (38,0) - defined the column as NK in model     
    name     varchar (255) - undefined on the model description
    description     varchar (255) - Add row on change
    comments     varchar (2000) - Add row on change
    ref_number     varchar (255) - Add row on change
    is_latest_version     number (1,0) - Add row on change
    is_deleted     number (1,0) - Add row on change
    start_datetime     date     - SYSDATE
                   - Executed on target
                   - Starting Timestamp
    end_datetime     date     - NULL
                   - Executed on target
                   - End Timestamp
    I am using following KM's:-
         LKM SQL to SQL
         IKM Oracle Slowly Changing Dimension
         CKM SQL
    it gives me the following error -
    920:Invalid relational operator

    Hi,
    Yes, this is a run-time error. Currently I am debugging it by checking SNP_SESS_TXT_LOG based on sess_no ID.
    Now, I get the following error.
    I just see the following in the operator:-
    911 : 42000 : java.sql.BatchUpdateException: ORA-00911: invalid character
    911 : 42000 : java.sql.SQLException: ORA-00911: invalid character
    java.sql.BatchUpdateException: ORA-00911: invalid character
         at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:342)
         at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10720)
         at com.sunopsis.sql.SnpsQuery.executeBatch(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    So, I do not get any idea of the exact step that is causing failure.
    Is there any setting in the operator that I am missing on?

  • Hi I just updated from Snow Leopard to Mountain Lion. I write DVD's using Final Cut Pro, creating a DVD that plays HD and Standard Definition on one disk. My problem is when I used load the disk on my G5 it would ask if you want High Definition or Standar

    Hi I just updated from Snow Leopard to Mountain Lion.
    I write DVD's using Final Cut Pro, creating a DVD that plays HD and Standard Definition on one disk.
    My problem is when I used load the disk on my G5 it would ask if you want High Definition or Standard Definition, now it just defaults to Standard Definition.(I'm using Apple's DVD Player)
    Can I fix this problem?

    Addendum: I read on a post here (http://forums.macrumors.com/showthread.php?t=420169) about removing some kext files in order to trick OSX into thinking that there were no FireWire ports.
    I followed the instructions and removed from /System/Library/Extensions/ the following files:
    IOFireWireSerialBusProtocolTransport.kext
    IOFireWireAVC.kext
    IOFireWireFamily.kext
    IOFireWireIP.kext
    IOFireWireSBP2.kext
    I restarted and BAM...Snow Leopard booted crazy fast and the mouse and keyboard worked instantly.
    The System Profiler says "No FireWire ports were found."
    So this tells me that the FW port is probably the culprit and is messing up the installation.
    So how do I hack the Mountain Lion installer and tell it to ignore the FW port, which is obviously quite dead? Or is there something I can do to the Base system that is similar?

Maybe you are looking for