Overview  Syntax

Chapter 9: Using Bulk Copy Transfer

Transfer process

The following steps describe how bulk copy transfer processes data between two databases:

  1. The client application initiates a transfer request.

  2. The access service receives the transfer request and executes the sourceselectstatement against the source database to retrieve the schema of the result set, including column datatypes, length, precision, and scale.

  3. The access service queries the target table for a description of the target table columns and compares this information to the structure of the result set for these criteria:

    If either of these tests fails, the access service stops processing the transfer and issues an error message.

  4. If the transfer statement includes the with replace or truncate clause, the access service deletes data in the target table, provided the user ID of the person executing the request is authorized to do so. If the user ID is not authorized, the transfer fails.

  5. The access service maps the columns from the result set to the columns in the target table in the order in which they appear. The access service attempts to insert NULL values (if allowable) in all columns in the target table that do not have corresponding columns in the result set.

  6. The access service prepares an insert or equivalent bulk load statement for execution against the target table.

  7. If conversion errors occur as rows are inserted (for example, a value is out of range), the invalid rows are handled according to the values set in the following properties:

  8. The transfer continues processing. If the SendWarningMessages property is set to yes, the access service sends a warning message to the client application.





Copyright © 2005. Sybase Inc. All rights reserved. Syntax

View this book as PDF