sp_ModifySubscriptionProperty

Advantage SQL Engine

Set the property of an existing subscription in the data dictionary.

Syntax

sp_ModifySubscriptionProperty(

SubscriptionName,CHARACTER,200,

Property,CHARACTER,200,

Value,Memo )

 

Parameters

SubscriptionName (I)

The name of a subscription in the database.

Property (I)

Name of the property to set. See Remarks for allowed values.

Value (I)

Value to be stored in the data dictionary in string format.

Special Return Codes

AE_INVALID_PROPERTY_ID

Either the value supplied in Property is not a valid subscription property, or the specified property cannot be modified.

AE_INVALID_OBJECT_NAME

The subscription specified by SubscriptionName cannot be located in the data dictionary.

Remarks

sp_ModifySubscriptionProperty sets one property for the specified subscription in the database. The new property overwrites the existing property in the data dictionary. The following are the valid values for Property.

Property

Description

COMMENT

Changes the subscription description.

PUBLICATION

Changes the publication that this subscription uses. The value should be the name of an existing publication object in the data dictionary.

TARGET

Changes the target database for the replication updates.

TARGET_USERNAME

Changes the user name that Advantage Database Server uses when making a replication connection to the target.

TARGET_PASSWORD

Changes the password that Advantage Database Server uses when making a replication connection to the target.

FORWARD

Sets the flag that specifies whether or not replication updates are forwarded. The value can be ‘True’ or ‘False’.

ENABLED

Sets the flag that specifies whether or not this subscription is enabled. The value can be ‘True’ or ‘False’.

REPLICATION_QUEUE

Changes the replication queue that stores pending replication updates. If the queue is currently not empty, the error AE_SUBSCRIPTION_QUEUE_NOT_EMPTY will be returned.

OPTIONS

Set the additional options that control the subscription behavior. The value is a 4 byte integer that can contain the following values OR’ed together: ADS_DEFAULT (0), ADS_SUBSCR_QUEUE_IS_STATIC (1), ADS_SUBSCR_AIS_TARGET (2), ADS_SUBSCR_IGNORE_FAILED_REP (4), and ADS_SUBSCR_LOG_FAILED_REP_DATA (8). See sp_CreateSubscription for additional information on the subscription options.

PAUSED

Sets the flag that specifies whether or not this subscription is paused. Paused subscriptions place replication updates in the queue, but the updates do not get sent to the target server until the subscription is un-paused. The value can be ‘True’ or ‘False’.

USER_DEFINED_PROP

Changes the user defined subscription property. The user-defined property is set, read, and interpreted by the application. It is not used by Advantage.

Example

// Turn on forwarding

EXECUTE PROCEDURE sp_ModifySubscriptionProperty( 'mysub', 'forward', 'true' );

 

// change the replication queue name

EXECUTE PROCEDURE sp_ModifySubscriptionProperty( 'mysub',

'replication_queue', 'newqueue.adt' );

 

See Also

sp_CreateSubscription

system.subscriptions