Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_changesubstatus

  No additional text.


Syntax
create procedure sys.sp_changesubstatus
(
    @publication					sysname = '%',
    @article						sysname = '%',
    @subscriber						sysname = '%',	
    @status							sysname,
    @previous_status				sysname = NULL,
    @destination_db					sysname = '%',
    @frequency_type					int = NULL,
    @frequency_interval				int = NULL,
    @frequency_relative_interval	int = NULL,
    @frequency_recurrence_factor	int = NULL,
    @frequency_subday				int = NULL,
    @frequency_subday_interval		int = NULL,
    @active_start_time_of_day		int = NULL,
    @active_end_time_of_day			int = NULL,
    @active_start_date				int = NULL,
    @active_end_date				int = NULL,
    @optional_command_line			nvarchar(4000) = NULL,
    @distribution_jobid				binary(16) = NULL OUTPUT,
    @from_auto_sync					bit = 0,
    @ignore_distributor				bit = 0,
    -- Agent offload
    @offloadagent					bit = 0,
    @offloadserver					sysname = NULL,
    @dts_package_name				sysname = NULL,
    @dts_package_password			nvarchar(524) = NULL,
    @dts_package_location			int = 0,
    @skipobjectactivation			int = 0,
    @distribution_job_name			sysname = NULL,
    @publisher						sysname = NULL
	,@ignore_distributor_failure bit = 0
) AS
BEGIN
	DECLARE @cmd			nvarchar(4000)
	DECLARE @retcode		int
	DECLARE	@publisher_type	sysname

	SET @retcode = 0
	
	EXEC @retcode = sys.sp_MSrepl_getpublisherinfo	@publisher		= @publisher,
													@rpcheader		= @cmd OUTPUT,
													@publisher_type	= @publisher_type OUTPUT,
													@skipSecurityCheck	= 1
	IF @retcode <> 0
		RETURN (@retcode)

	-- Add sp
	SET @publisher = UPPER(@publisher) COLLATE DATABASE_DEFAULT
	set @cmd = @cmd + N'sys.sp_MSrepl_changesubstatus'
	
	EXEC @retcode = @cmd
					@publication,
					@article,
					@subscriber,
					@status,
					@previous_status,
					@destination_db,
					@frequency_type,
					@frequency_interval,
					@frequency_relative_interval,
					@frequency_recurrence_factor,
					@frequency_subday,
					@frequency_subday_interval,
					@active_start_time_of_day,
					@active_end_time_of_day,
					@active_start_date,
					@active_end_date,
					@optional_command_line,
					@distribution_jobid OUTPUT,
					@from_auto_sync,
					@ignore_distributor,
					-- Agent offload
					@offloadagent,
					@offloadserver,
					@dts_package_name,
					@dts_package_password,
					@dts_package_location,
					@skipobjectactivation,
					@distribution_job_name,
					@publisher,
					@publisher_type
					,@ignore_distributor_failure

	RETURN (@retcode)
END

 
Last revision 2008RTM
See also

  sp_MSactivate_auto_sub (Procedure)
sp_MSdrop_repltran (Procedure)
sp_MSrepl_addsubscription_article (Procedure)
sp_MSrepl_changesubstatus (Procedure)
sp_MSrepl_reinitsubscription (Procedure)
sp_MSupdate_subscription (Procedure)
       



News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash