10 The Sybase Data Provider : Using DataDirect Bulk Load on Sybase

Using DataDirect Bulk Load on Sybase
DataDirect Bulk Load offers a one-stop approach for all of your bulk load needs, with a simple, consistent way to do bulk load operations that works the same for all of the DataDirect Connect products that support this feature (see “Using DataDirect Bulk Load” for information on how to use bulk load). This section contains specific information for Sybase. Some additional database configuration is required when the destination table for a bulk load operation does not have an index defined.
If you are using a destination table that does not have an index defined, you can ask the database operator to execute the following commands:
use master
sp_dboption test, "SELECT INTO/bulkcopy/pllsort", true
This option is required to perform operations that do not keep a complete record of the transaction in the log. For more information, refer to the Sybase documentation.
Alternatively, you can define an index on the destination table.
Failure to properly configure the database results in errors such as the following:
“You cannot run the non-logged version of bulk copy in this database. Please check with the DBO.”
Bulk Copy Operations and Transactions
Sybase does not support a bulk insert within a transaction, and returns an error if a bulk copy operation is attempted in the scope of an existing transaction.
The Sybase server treats each batch of the bulk copy operation as a single transaction. If any rows in the batch are rejected, the entire transaction is rolled back.
Performance Considerations
Sybase defines two bulk copy modes, described in Table 10-7. Sybase automatically selects the appropriate mode at run time. For more information, refer to your Sybase documentation.
 
Native to XML Schema Data Type Mappings
Table 10-8 shows how native SybaseDbTypes are mapped to XML schema data types for the bulk load configuration file.