Home » RDBMS Server » Server Utilities » Oracle tools
Oracle tools [message #143436] Thu, 20 October 2005 07:58 Go to next message
prathapsinghs
Messages: 1
Registered: October 2005
Location: India
Junior Member

Can I make sql loader to rollback the transactions and exit, once it encounters an error (e.g. data type mismatch)?
Re: Oracle tools [message #143448 is a reply to message #143436] Thu, 20 October 2005 08:42 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
By default, sqlldr commits every N rows.
With direct load, commit is done at the end.
But you cannot ROLLBACK the inserted data.
what you can do is, load into a staging table.
IF everything is good, move data in staging to target table.
Else
Purge staging table.
Re: Oracle tools [message #143450 is a reply to message #143448] Thu, 20 October 2005 08:44 Go to previous message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>> exit, once it encounters an erro
quoting docs
Quote:

ERRORS (errors to allow)

Default: To see the default value for this parameter, invoke SQL*Loader without any parameters, as described in Invoking SQL*Loader.

ERRORS specifies the maximum number of insert errors to allow. If the number of errors exceeds the value specified for ERRORS, then SQL*Loader terminates the load. To permit no errors at all, set ERRORS=0. To specify that all errors be allowed, use a very high number.

On a single-table load, SQL*Loader terminates the load when errors exceed this error limit. Any data inserted up that point, however, is committed.

SQL*Loader maintains the consistency of records across all tables. Therefore, multitable loads do not terminate immediately if errors exceed the error limit. When SQL*Loader encounters the maximum number of errors for a multitable load, it continues to load rows to ensure that valid rows previously loaded into tables are loaded into all tables and/or rejected rows filtered out of all tables.
Previous Topic: exp file size
Next Topic: Creating a test database as an exact replica of my production database
Goto Forum:
  


Current Time: Thu Dec 26 06:10:58 CST 2024