Commitment control  Executing a transfer SQL request

Chapter 7: Issuing Remote Procedure Calls

Creating a transfer SQL request

The client application can create a stored procedure within Adaptive Server that invokes the DB2 access service transfer function. In this case, the DB2 access service receives the transfer command as an RPC event with the arguments shown in the following table:

Table 7-1: Arguments for transfer command

Argument

Definition

Argument 1

The secondary connection information ({to | from} “server userid pw”)

Argument 2

Either the bulk copy target command (for example, with replace into) or the destination-template sourceselectstatement

Argument 3

Either the bulk copy sourceselectstatement or the destination-template sourceselectstatement

Following is an example of a Adaptive Server stored procedure that initiates a bulk copy transfer statement. The DB2 access service executes the transfer statement against DB2, and DB2 receives it as an RPC.

create procedure replauth as
 begin
 	execute servername...transfer
		“to ‘servername2 userid password’;”,
 		“with replace into authors;”,
 		“select * from authors;”
 end

where:





Copyright © 2005. Sybase Inc. All rights reserved. Executing a transfer SQL request

View this book as PDF