Home » RDBMS Server » Server Utilities » SQL Ldr
SQL Ldr [message #73032] Tue, 20 January 2004 03:39 Go to next message
Sashi
Messages: 22
Registered: January 2004
Junior Member
Can I get the total number of records in SQL ldr before loading the data.?

Is it possible to track the rec cnt while loading?

I hv a req: Want to skip header and footer record from loading to a table from a set of records.
Re: SQL Ldr [message #73033 is a reply to message #73032] Tue, 20 January 2004 07:11 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
1. You can use any pl/sql routine that uses UTL_FILE to open the text file and count the records

2.
use ROWS option.
it will specify an output, for every rows=n values specified
in first example, an output is displayed for every record
and in second for every two records
bash-2.03$ sqlldr userid=mag/mag control=member.ctl rows=1

SQL*Loader: Release 9.2.0.1.0 - Production on Tue Jan 20 12:00:12 2004

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Commit point reached - logical record count 1
Commit point reached - logical record count 2
Commit point reached - logical record count 3
Commit point reached - logical record count 4

bash-2.03$ sqlldr userid=mag/mag control=member.ctl rows=2

SQL*Loader: Release 9.2.0.1.0 - Production on Tue Jan 20 12:00:45 2004

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Commit point reached - logical record count 2
Commit point reached - logical record count 4

3. u can use some os functionalities to remove the first and last line of the dat file
if the records span the lines, u have to use utl_FIle.
Re: SQL Ldr [message #73034 is a reply to message #73032] Tue, 20 January 2004 10:07 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
if you have a really huge datafile to be loaded...dont use ROW option with a low value..acutally row=n specifies the interval of commit. if rows=1 , sqlldr commits for every record.
Previous Topic: Submitting an Oracle 8i stored procedure from asn MS DOS batch file
Next Topic: Error while duplicating a database - urgent
Goto Forum:
  


Current Time: Mon Jul 01 10:53:40 CDT 2024