Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSrepl_changesubscriber_schedule

  No additional text.


Syntax
create procedure sys.sp_MSrepl_changesubscriber_schedule
(
	@subscriber						sysname,
	@agent_type						smallint,
	@frequency_type					int,
	@frequency_interval				int,
	@frequency_relative_interval	int,
	@frequency_recurrence_factor	int,
	@frequency_subday				int,
	@frequency_subday_interval		int,
	@active_start_time_of_day		int,
	@active_end_time_of_day			int,
	@active_start_date				int,
	@active_end_date				int,
	@publisher						sysname,
	@publisher_type					sysname
)
AS
BEGIN
    DECLARE @distributor sysname
    DECLARE @distribdb sysname
    DECLARE @distproc nvarchar (300)
    DECLARE @msg nvarchar(255)
    DECLARE @retcode int

	-- Set publisher name for SQL Servers
	IF (@publisher IS NULL) AND (@publisher_type = N'MSSQLSERVER')
		SELECT @publisher = publishingservername()

    /*
    ** Security Check: require sysadmin
    */
    IF (ISNULL(IS_SRVROLEMEMBER('sysadmin'),0) = 0)
    BEGIN
        RAISERROR(21089,16,-1)
        RETURN (1)
    END

    /*
    ** Get distribution server information for remote RPC
    ** subscription calls.
    */
    EXEC @retcode = sys.sp_MSrepl_getdistributorinfo	@publisher	= @publisher,
														@rpcsrvname	= @distributor OUTPUT,
														@distribdb	= @distribdb OUTPUT

    IF @@ERROR <> 0 OR @retcode <> 0
	BEGIN
		RAISERROR (14071, 16, -1)
		RETURN (1)
	END

    /*
    ** Update MSsubscriber_info
    */
    SELECT	@distproc = QUOTENAME(RTRIM(@distributor)) + '.' +
						QUOTENAME(RTRIM(@distribdb)) + '.dbo.sp_MSupdate_subscriber_schedule'

    EXEC @retcode = @distproc
					@publisher,
					@subscriber,
					@agent_type,
					@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

    IF @@ERROR <> 0 OR @retcode <> 0
    BEGIN
        RAISERROR (14048, 16, -1, @subscriber)
        RETURN (1)
	END

    RETURN (0)
END

 
Last revision 2008RTM
See also

  sp_changesubscriber_schedule (Procedure)
sp_MSdrop_replcom (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