sqlloader in cycle [message #182827] |
Tue, 18 July 2006 06:01 |
mape
Messages: 298 Registered: July 2006 Location: Slovakia
|
Senior Member |
|
|
Hello
When I run this script for sqlload at a time, for example two,
script looks as running but nothing to do for and lock table
and I have ti kill the process.
Do you know where the problem could be?
--------------------------------------------------------------
sqlplus -s $CONNECT <<END_SCRIPT
set verify off
set echo off
CREATE TABLE TEMP_MAPE
(
X_EXTERNAL_ID NUMBER,
X_OFFER_ID NUMBER,
SEQ_ID NUMBER NOT NULL
);
COMMIT;
CREATE UNIQUE INDEX IN_MAPE_U01 ON TEMP_MAPE
(SEQ_ID);
COMMIT;
exit
END_SCRIPT
plist=`ps -e -o "pid args"|grep sqlldr |grep -v grep |awk '{print $1}'`
if [ -z "$plist" ]; then
sqlldr userid=$CONNECT control=load.ctl direct=TRUE
sqlplus -s $CONNECT <<END_SCRIPT
CREATE INDEX IN_X1 ON TEMP_MAPE
(X_EXTERNAL_ID);
COMMIT;
exit
END_SCRIPT
fi
-------------------------------------------------------------
Thanks a lot
|
|
|
|
|
Re: sqlloader in cycle [message #182845 is a reply to message #182832] |
Tue, 18 July 2006 06:59 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
I know COMMIT isn't causing this problem. This is ... what? Unix? Unfortunately, I don't know anything about it so it is kind of difficult for me to understand its commands.
SQL part seems to be OK (apart from the fact that, if the table or index already exists, CREATE statement ends with an error saying that object with the same name already exists).
What does "PLIST" command do?
What's in the SQL*Loader control file? Do you APPEND records or REPLACE them? Appending the same input data set would violate unique index.
Does SQL*Loader still work when the "CREATE INDEX in_x1" statement begins? If so, it will run into ORA-00054 (source table is still busy and thus not available for CREATE INDEX statement).
[Updated on: Tue, 18 July 2006 07:01] Report message to a moderator
|
|
|
Re: sqlloader in cycle [message #182847 is a reply to message #182827] |
Tue, 18 July 2006 07:03 |
mape
Messages: 298 Registered: July 2006 Location: Slovakia
|
Senior Member |
|
|
plist only check if the process of sqlldr already run or not.
If not the will start sqlldr.
And scripts runs and has the problem to finish.
|
|
|
|
|