DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Loader Images

  1. #1
    Join Date
    Dec 2000
    Location
    Brazil / São Paulo
    Posts
    97

    Question Loader Images

    Help me, please (again)

    I have 1400 images (photos) that necessary to insert in the data base, however, in the documentation, vi as to insert one by one, do not have form to insert all of a time?


    Steps to load binary files into a raw field.

    1. Create your table with a raw field.

    SQLWKS>create table ImageTable (FileName varchar(30), BinaryFile long raw);
    Statement processed.
    SQLWKS> desc imagetable
    Column Name Null? Type
    ------------------------------ -------- ----
    FILENAME VARCHAR2(30)
    BINARYFILE LONG RAW

    2. Create your control file using the 'FIX' file processing option.
    Note: The 'FIX' size is the size of the binary file. This
    processing option is mentioned in the Oracle7 Server Getting Started
    manual for Windows NT

    C:\TEMP> TYPE LOADBIN.CTL
    load data infile data.dat "fix12350"
    APPEND into table ImageTable (fileName constant 'DATA.DAT',BinaryFile raw (12350))

    3. Run SQL*Loader to insert data.
    C:\TEMP> SQLLDR73 SCOTT/TIGER CONTROL=CONTROL.CTL
    SQL*Loader : Release 7.3.3.0.0 - Production on Mon May 26 14:39:13 1997
    Copyright (c) Oracle Corporation 1979, 1996. All rights reserved
    Commit point reached - logical record count 1
    Márcio de Souza Almeida
    DBA Oracle / SQLServer / PostgreSQL
    Rua Cupa, 139 Apto 85 A
    Penha - São Paulo - SP
    03640-000 - Brasil
    http://www.directory.com.br

  2. #2
    Join Date
    Nov 2002
    Posts
    170
    I'm not sure if 8i and 9i supports long raw data anymore, try using LOB's.

  3. #3
    Join Date
    Dec 2000
    Location
    Brazil / São Paulo
    Posts
    97
    The problem is not the TYPE of data and yes the insertion of many images (each image is an archive JPG)
    Márcio de Souza Almeida
    DBA Oracle / SQLServer / PostgreSQL
    Rua Cupa, 139 Apto 85 A
    Penha - São Paulo - SP
    03640-000 - Brasil
    http://www.directory.com.br

Posting Permissions

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


Click Here to Expand Forum to Full Width