Home » SQL & PL/SQL » SQL & PL/SQL » count in SQL*LOADER
count in SQL*LOADER [message #185585] Wed, 02 August 2006 08:08 Go to next message
ora_work
Messages: 4
Registered: July 2006
Junior Member
1.
i am using sql loader to insert records in my table.
i want to count the number of rows the sql loader fetches.

2. is there any way to execute the commands from pl/sql which are supposed to be executed from the command prompt.
e.g we can run sql loader from command prompt, so is there any way to run the command "SQLLDR" from pl/sql?
Re: count in SQL*LOADER [message #185590 is a reply to message #185585] Wed, 02 August 2006 08:34 Go to previous messageGo to next message
navkrish
Messages: 189
Registered: May 2006
Location: NJ,USA
Senior Member

i want to count the number of rows the sql loader fetches


You can get the number of rows from log file..


we can run sql loader from command prompt, so is there any way to run the command "SQLLDR" from pl/sql?


Search for 'External tables'


Naveen
Re: count in SQL*LOADER [message #185652 is a reply to message #185590] Wed, 02 August 2006 21:23 Go to previous message
rleishman
Messages: 3724
Registered: October 2005
Location: Melbourne, Australia
Senior Member
Generally I agree with @navkrish - use External tables if you want to initiate a load from PL/SQL. However there are exceptions: with SQL*Loader, you can defer index maintenance until after the load (for direct path) whereas with external tables you cannot. This means that direct-path loads via external tables are not truly scalable because the index maintenance is done in real-time using rollback-segments.

To get around this, it is possible (though not generally advisable) to launch SQL*Loader from within PL/SQL using DBMS_SCHEDULAR (v10g). There are other ways to execute OS commands from within PL/SQL for prior versions - search this board if you are still interested.

Just to repeat the advice above - use External tables - much easier. And if index maintenance scalability is an issue, it can often be overcome with PARTITION EXCHANGE.

Ross Leishman
Previous Topic: Query help
Next Topic: Numeric data type conversion (Merged)
Goto Forum:
  


Current Time: Sat Dec 10 15:00:20 CST 2016

Total time taken to generate the page: 0.09071 seconds