How to fix the Oracle error SQL*Loader-00254: Cannot have DISCARDFILE specs here when multiple data files?

In this post, you’ll learn more about the Oracle ErrorSQL*Loader-00254: Cannot have DISCARDFILE specs here when multiple data files with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

SQL*Loader-00254: Cannot have DISCARDFILE specs here when multiple data files

Reason for the Error SQL*Loader-00254: Cannot have DISCARDFILE specs here when multiple data files

The SQL*Loader control file contained multiple INFILE statements and a DISCARDFILE statement was found below the RESUME clause.

How to fix the Error SQL*Loader-00254: Cannot have DISCARDFILE specs here when multiple data files ?

You can fix this error in Oracle by following the below steps

Move the DISCARDFILE statement above the RESUME clause, so it is adjacent to one of the INFILE statements.