Home » RDBMS Server » Server Utilities » sqlloader in cycle
sqlloader in cycle [message #182827] Tue, 18 July 2006 06:01 Go to next message
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 #182828 is a reply to message #182827] Tue, 18 July 2006 06:05 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I wouldn't know the answer to your question, but could suggest that COMMIT is unnecessary in this case as DDL commands perform implicit commit as they finish.
Re: sqlloader in cycle [message #182832 is a reply to message #182827] Tue, 18 July 2006 06:20 Go to previous messageGo to next message
mape
Messages: 298
Registered: July 2006
Location: Slovakia
Senior Member
All right, I removed the COMMIT. But the proglem still goes on.
Re: sqlloader in cycle [message #182845 is a reply to message #182832] Tue, 18 July 2006 06:59 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I know Smile 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 Go to previous messageGo to next message
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.
Re: sqlloader in cycle [message #182856 is a reply to message #182847] Tue, 18 July 2006 07:22 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
You mention "lock table". Have you determined what is locking the table while this process is running? What does the sqlldr log file contain?
Re: sqlloader in cycle [message #183178 is a reply to message #182856] Wed, 19 July 2006 17:03 Go to previous message
jgarry
Messages: 3
Registered: July 2006
Location: Vista, CA
Junior Member
This can happen if you have white space after the END_SCRIPT, so it never finds the end of the script.
Previous Topic: Need a solution for the next sqlloader action
Next Topic: IMP-00034: Warning: FromUser "I1PB_RW" not found in export file
Goto Forum:
  


Current Time: Thu Jul 04 20:00:07 CDT 2024