sqlldr bulk loading
i'm having a strange problem bulk loading a about 15k+ rows into an existing spatial table.
i use a perl script to 'watch' a directory intto which the usgs pushes a file. The first line in the file gets parsed and entered into a table (no problem here). For the rest of the file i generate a sqlldr control file that appends the data into my table. After the insert i do a transform of the lat, long columns and make an sdo_point like so:
$upstmt = $dbh->prepare("update shake_xyz set shape = dd832utm(lon,lat) where id = ?" );
$upstmt->bind_param(1,$id);
$upstmt->execute() or die "cant update! $DBI::errstr\n";
if a spatial index does not exist on the table, theres no problem.
If one does and i dont use a direct path load, theres no problem (except that this takes waaaaay longer than i'd like).
When i try to do a direct path load with an spatial index, i get the following rather distressing message
SQL*Loader-926: OCI error while uldlfca:OCIDirPathColArrayLoadStream for table SHAKE_XYZ
SQL*Loader-2026: the load was aborted because SQL Loader cannot continue.
SQL*Loader-925: Error while uldlgs: OCIStmtExecute (ptc_hp)
ORA-03114: not connected to ORACLE
SQL*Loader-925: Error while uldlgs: OCIStmtFetch (ptc_hp)
ORA-24338: statement handle not executed
SQL*Loader-925: Error while uldlgs: OCIStmtExecute (pts_hp)
ORA-03114: not connected to ORACLE
SQL*Loader-925: Error while uldlgs: OCIStmtFetch (pts_hp)
ORA-24338: statement handle not executed
SQL*Loader-925: Error while uldlgs: OCIStmtFetch (sbpt_hp)
ORA-24338: statement handle not executed
SQL*Loader-925: Error while uldlgs: OCIStmtExecute (sbpt_hp)
ORA-24338: statement handle not executed
SQL*Loader-925: Error while uldlgs: OCIStmtFetch (pts_hp)
ORA-24338: statement handle not executed
SQL*Loader-925: Error while uldlgs: OCIStmtFetch (sbpt_hp)
ORA-24338: statement handle not executed
ive truncated the message, it keeps repeating for another 50+ lines
here is what my input file looks like:
elvis[kxv4]{8}% head grid-9.xyz
51111345 5.5 39.81 -120.64 AUG 10 2001 20:19:27 GMT -121.883 38.9833 -119.383 40.65 (Process time: Thu Sep 26 09:24:45 2002)
-121.8833 40.6500 0.9135 0.4790 3.0900 1.3490 0.5076 0.1056
-121.8666 40.6500 0.7209 0.3115 2.8600 1.0659 0.3301 0.0688
-121.8500 40.6500 0.7195 0.3110 2.8600 1.0650 0.3297 0.0689
-121.8333 40.6500 0.9087 0.4771 3.0800 1.3465 0.5059 0.1059
-121.8166 40.6500 0.7170 0.3102 2.8600 1.0638 0.3290 0.0690
-121.8000 40.6500 0.7161 0.3100 2.8600 1.0640 0.3287 0.0690
-121.7833 40.6500 0.7156 0.3098 2.8600 1.0649 0.3287 0.0690
-121.7666 40.6500 0.7156 0.3099 2.8600 1.0666 0.3288 0.0690
-121.7500 40.6500 0.7162 0.3103 2.8600 1.0693 0.3292 0.0690
here is what my control file looks like:
elvis[kxv4]{10}% head -20 51111345grid-9.xyz
LOAD DATA
INFILE *
INTO TABLE shake_xyz
APPEND
FIELDS TERMINATED BY ',' TRAILING NULLCOLS
( ID,
LON,
LAT,
PGA,
PGV,
MMI,
PSA1 NULLIF PSA1=BLANKS,
PSA2 NULLIF PSA2=BLANKS,
PSA3 NULLIF PSA3=BLANKS,
OBJECTID SEQUENCE(MAX,1)
)
BEGINDATA
51111345,-121.8833,40.6500,0.9135,0.4790,3.0900,1.3490,0.5076,0.1056
51111345,-121.8666,40.6500,0.7209,0.3115,2.8600,1.0659,0.3301,0.0688
for earthquakes with magnitude less than 5 the PSA% columns are blank ...
i'm woefully ignorant of sqlldr and how it works with indexes
any advice appreciated
thanks
--kassim