SQL Loader - Loading BLOBs - HELP -
06-11-2006
, 09:02 AM
Hello All:
I have just signed up for this newsgroup and have a problem I have been
trying to get working. I am using SQL Loader to try and insert BLOBs into a
table. Below is everything I have setup for performing this process.
CONTROL FILE:
LOAD DATA
INFILE 'F:\MUSIC_DATA_LOB_TEST_1.txt'
BADFILE 'F:\MUSIC_DATA_LOB_TEST_1.bad'
DISCARDFILE 'F:\MUSIC_DATA_LOB_TEST_1.dsc'
APPEND
INTO TABLE "MUSIC_MASTER"
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(
SONG_NO "SONG_NO_SEQ.NEXTVAL",
ARTIST,
ALBUM,
TRACK_NO,
SONG_TITLE,
PHYS_MP3_FILE
)
DATA FILE: (just a small clip of it. - 286 rows to be inserted)
Rush,Test For Echo,1,Test For Echo.mp3,F:\My Music\Rush\Test For Echo\Rush -
Test For Echo - 01 - Test For Echo.mp3
Rush,Test For Echo,2,Driven.mp3,F:\My Music\Rush\Test For Echo\Rush - Test
For Echo - 02 - Driven.mp3
Rush,Test For Echo,3,Half The World.mp3,F:\My Music\Rush\Test For
Echo\Rush - Test For Echo - 03 - Half The World.mp3
Rush,Test For Echo,4,The Color Of Right.mp3,F:\My Music\Rush\Test For
Echo\Rush - Test For Echo - 04 - The Color Of Right.mp3
Rush,Test For Echo,5,Time And Motion.mp3,F:\My Music\Rush\Test For
Echo\Rush - Test For Echo - 05 - Time And Motion.mp3
Rush,Test For Echo,6,Totem.mp3,F:\My Music\Rush\Test For Echo\Rush - Test
For Echo - 06 - Totem.mp3
Rush,Test For Echo,7,Dog Years.mp3,F:\My Music\Rush\Test For Echo\Rush -
Test For Echo - 07 - Dog Years.mp3
Rush,Test For Echo,8,Virtuality.mp3,F:\My Music\Rush\Test For Echo\Rush -
Test For Echo - 08 - Virtuality.mp3
Rush,Test For Echo,9,Resist.mp3,F:\My Music\Rush\Test For Echo\Rush - Test
For Echo - 09 - Resist.mp3
Rush,Test For Echo,10,Limbo.mp3,F:\My Music\Rush\Test For Echo\Rush - Test
For Echo - 10 - Limbo.mp3
Rush,Test For Echo,11,Carve Away The Stone.mp3,F:\My Music\Rush\Test For
Echo\Rush - Test For Echo - 11 - Carve Away The Stone.mp3
TABLE STRUCTURE:
SQL> desc music_master
Name Null? Type
----------------------------------------- -------- ----------------------------
SONG_NO NOT NULL NUMBER(38)
ARTIST NOT NULL VARCHAR2(100 CHAR)
ALBUM NOT NULL VARCHAR2(100 CHAR)
TRACK_NO NOT NULL NUMBER
SONG_TITLE NOT NULL VARCHAR2(100 CHAR)
PHYS_MP3_FILE BLOB
SQL>
TABLE SAMPLE:
SONG_NOARTISTALBUMTRACK_NOSONG_TITLEPHYS_MP3_FILE
257blackhawkBlackHawk1Goodbye Says It All.mp3(HugeBlob)
258blackhawkBlackHawk2Down In Flames.mp3(HugeBlob)
259blackhawkBlackHawk3Every Once In A While.mp3(HugeBlob)
260blackhawkBlackHawk4I Sure Can Smell The Rain.mp3(HugeBlob)
261blackhawkBlackHawk5That's Just About Right.mp3(HugeBlob)
262blackhawkBlackHawk6One More Heartache.mp3(HugeBlob)
263blackhawkBlackHawk7Love Like This.mp3(HugeBlob)
264blackhawkBlackHawk8Between Ragged And Wrong.mp3(HugeBlob)
265blackhawkBlackHawk9Stone By Stone.mp3(HugeBlob)
266blackhawkBlackHawk10Let 'Em Whirl.mp3(HugeBlob)
When I execute this in TOAD I get the following:
SQL*Loader: Release 10.2.0.1.0 - Production on Sun Jun 11 08:45:00 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Control File: D:\oracle\product\10.2.0\Control Files\Music Control
Files\LOAD_MUSIC_LOBS.CTL
Data File: F:\MUSIC_DATA_LOB_TEST_1.txt
Bad File: F:\MUSIC_DATA_LOB_TEST_1.bad
Discard File: F:\MUSIC_DATA_LOB_TEST_1.dsc
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table "MUSIC_MASTER", loaded from every logical record.
Insert option in effect for this table: APPEND
TRAILING NULLCOLS option in effect
Column Name Position Len Term Encl Datatype
------------------------------ ---------- ----- ---- ---- ---------------------
SONG_NO FIRST * , CHARACTER
SQL string for column : "SONG_NO_SEQ.NEXTVAL"
ARTIST NEXT * , CHARACTER
ALBUM NEXT * , CHARACTER
TRACK_NO NEXT * , CHARACTER
SONG_TITLE NEXT * , CHARACTER
PHYS_MP3_FILE NEXT * , CHARACTER
Record 1: Rejected - Error on table "MUSIC_MASTER", column TRACK_NO.
ORA-01722: invalid number
Record 2: Rejected - Error on table "MUSIC_MASTER", column TRACK_NO.
ORA-01722: invalid number
RECORDS 3 - 49 - removed to save space with this email
Record 50: Rejected - Error on table "MUSIC_MASTER", column TRACK_NO.
ORA-01722: invalid number
Record 51: Rejected - Error on table "MUSIC_MASTER", column TRACK_NO.
ORA-01722: invalid number
MAXIMUM ERROR COUNT EXCEEDED - Above statistics reflect partial run.
Table "MUSIC_MASTER":
0 Rows successfully loaded.
51 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 99072 bytes(64 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 64
Total logical records rejected: 51
Total logical records discarded: 0
Run began on Sun Jun 11 08:45:00 2006
Run ended on Sun Jun 11 08:45:00 2006
Elapsed time was: 00:00:00.25
CPU time was: 00:00:00.05
If anyone could please help me, I would greatly appreciate it... The time I
could save by having this work.
Thank you in Advance!
JustAQTCub |