By Administrator on 2010-01-24 17:05:01
Category - Data Loading
SQL Loader - how to commit after a batch size
While SQL loading often we are faced with situation where we need to specify a batch size i.e. say while data loading commit after every 10,000 records. This can be done by ROWS clause in OPTIONS area. This can be done by - 

-----------------------------------------------
OPTIONS(ROWS=10000)
LOAD DATA
INFILE 'data.txt' "str '^B'"  -- Your data file
BADFILE 'data.bad'
DISCARDFILE 'data.dsc'
DISCARDMAX 1000
APPEND
INTO TABLE mytable
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(
your comma separated column names here ....
)
-----------------------------------------------

Note the first line where ROWS has been specified. This when loaded would be committing after every 10,000 records loaded.


Please login first to post a comment on this thread OR to create a new thread...
Google best Oracle sites right from here >