Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2006
    Posts
    11

    Unanswered: Loading data into BFILE column using sqlldr

    Hi All,

    I don't know what's going on here. I have a table called employees that I already populated using sqlldr via Toad. Now I want to populate the bfile column called 'photo' with the employee photos.

    In Toad I created the bfile drectory object as follows:

    Code:
    CREATE OR REPLACE DIRECTORY photos AS 'C:\photos'
    Then I created the control file as follows:

    Code:
    Load data
    Infile photo.dat
    Append
    Into table Employees
    Fields terminated by ','
    (FileName Filler Char(30),
    Photo BFILE(CONSTANT "photos", FileName))
    Now I created the dat file as follows:

    Code:
    EMPID1.bmp,
    EMPID2.bmp,
    EMPID3.bmp,
    EMPID4.bmp,
    EMPID5.bmp,
    EMPID6.bmp,
    EMPID7.bmp,
    EMPID8.bmp,
    The directory where the employee photos are located are on the C Drive as follows: C:\photos.

    When I run sqlldr it says the usual commit point reached, logical record count etc but when I check the 'photo' column has not been populated.

    Can anyone tell me what I'm doing wrong. I'm quite new to Oracle sql and feel I've just walked in half-way through a film.

    Thanks

    S

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    When all else fails, Read The Fine Manual (Utilities Manual) http://download-east.oracle.com/docs...07.htm#1007011
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Nov 2003
    Posts
    2,933
    Provided Answers: 12
    Quote Originally Posted by Seaweed
    In Toad I created the bfile drectory object as follows:

    Code:
    CREATE OR REPLACE DIRECTORY photos AS 'C:\photos'
    You are aware that these must be server side directories, and the .bmp files must reside on the server as well.
    I think sqlldr must be run on the server as well then, but I'm not 100% sure.

    If you just want to upload images from your local harddisk to the server, check out the manual as anacedent recommended.
    There is a nice short description on how to do this here

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •