sp_passthrough procedure

Purpose

To send a SQL statement in passthrough mode.

Syntax

sp_passthrough statement

 

Argument

 

Description

 

 

 

 

 

 

 

 

statement

 

A string containing a statement to be executed in

 

 

 

passthrough mode.

See also

“sp_passthrough_piece procedure” on page 403

 

“sp_passthrough_stop procedure” on page 405

 

“sp_passthrough_subscription procedure” on page 406

 

“sp_passthrough_user procedure” on page 407

 

“PASSTHROUGH statement” on page 368

Description

To send passthrough operations. The recipients of the passthrough statement

 

are determined by previous calls to sp_passthrough_user and

 

sp_passthrough_subscription.

 

The string must be less than 255 characters long. For SQL statements longer

 

than 255 characters, you should execute a sequence of calls to the

 

sp_passthrough_piece procedures, and execute sp_passthrough for the

 

final piece of the statement and to cause the replication to occur.

 

 

 

 

 

 

Caution

 

 

 

 

You should always test your passthrough operations on a test database with

 

a remote database subscribed. You should never run untested passthrough

 

scripts against a production database.

 

 

Example

The following statement sends a create table statement to the current

 

recipients of passthrough statements.

exec sp_passthrough ’CREATE TABLE simple (

id integer NOT NULL, name char(50) )’

go

402

Page 420
Image 420
Sybase DC38133-01-0902-01 manual Sppassthrough procedure