Changes the properties of a snapshot or transactional push subscription or a pull subscription involved in queued updating transactional replication. To change properties of all other types of pull subscriptions, use sp_change_subscription_properties (Transact-SQL). sp_changesubscription is executed at the Publisher on the publication database.
|When configuring a Publisher with a remote Distributor, the values supplied for all parameters, including job_login and job_password, are sent to the Distributor as plain text. You should encrypt the connection between the Publisher and its remote Distributor before executing this stored procedure. For more information, see Encrypting Connections to SQL Server.|
sp_changesubscription [ @publication = ] 'publication' , [ @article = ] 'article' , [ @subscriber = ] 'subscriber' , [ @destination_db = ] 'destination_db' , [ @property = ] 'property' , [ @value = ] 'value' [ , [ @publisher = ] 'publisher' ]
- [ @publication= ] 'publication'
Is the name of the publication to change. publication is sysname, with no default
- [ @article = ] 'article'
Is the name of the article to change. article is sysname, with no default.
- [ @subscriber = ] 'subscriber'
Is the name of the Subscriber. subscriber is sysname, with no default.
- [ @destination_db = ] 'destination_db'
Is the name of the subscription database. destination_db is sysname, with no default.
- [ @property=] 'property'
Is the property to change for the given subscription. property is nvarchar(30), and can be one of the values in the table.
- [ @value=] 'value'
Is the new value for the specified property. value is nvarchar(4000), and can be one of the values in the table.
Property Value Description
Login for the Microsoft Windows account under which the agent runs.
Password for the Windows account under which the agent runs.
Catalog to be used when making a connection to the OLE DB provider. This property is only valid for non-Microsoft SQL Server Subscribers.
Name of the data source as understood by the OLE DB provider. This property is only valid for non-SQL Server Subscribers.
Location of the database as understood by the OLE DB provider. This property is only valid for non-SQL Server Subscribers.
Login name at the Subscriber.
Strong password for the supplied login.
Use Windows Authentication when connecting to the Subscriber.
Use SQL Server Authentication when connecting to the Subscriber.
Unique programmatic identifier (PROGID) with which the OLE DB provider for the non-SQL Server data source is registered. This property is only valid for non-SQL Server Subscribers.
OLE DB provider-specific connection string that identifies the data source. This property is only valid for non-SQL Server Subscribers.
Is the number of connections allowed per Distribution Agent to apply batches of changes in parallel to a Subscriber. A range of values from 1 to 64 is supported for SQL Server Publishers. This property must be 0 for non-SQL Server Subscribers, Oracle Publishers or peer-to-peer subscriptions.
ODBC data source server
OLE DB provider
- [ @publisher = ] 'publisher'
Specifies a non-SQL Server Publisher. publisher is sysname, with a default of NULL.
Note: publisher should not be specified for a SQL Server Publisher.
sp_changesubscription is used in snapshot and transactional replication.
sp_changesubscription can only be used to modify the properties of push subscriptions or pull subscriptions involved in queued updating transactional replication. To change properties of all other types of pull subscriptions, use sp_change_subscription_properties (Transact-SQL).
After changing an agent login or password, you must stop and restart the agent before the change takes effect.