Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSchange_repl_job

  No additional text.


Syntax

-- Name:
--		sp_MSchange_repl_job

-- Description:
--		This procedure should be used to update replication jobs.
--		Here we validate that the job being updated is replication
--		related and in certain cases we check to see if the current
--		user is a sysadmin or that the current database context is
--		the same as the one used when creating the job. We also check
--		to ensure that the job exists. If it does not exist we fail
-- 		and exit with error.

-- Parameters:
--		See definition

-- Returns:
--		0 - succeeded
--      1 - failed

-- Result:
--		None

-- Security:
-- Requires Certificate signature for catalog access
--		Procedure is NOT PUBLIC so there are no security checks.
--		We do however ensure that the job being updated is replication
--		related. In certain jobs we also ensure that the user is sysadmin
--		or that the current database context is the same as the on used
--		when creating the job.

CREATE PROCEDURE sys.sp_MSchange_repl_job
(
	@id 							uniqueidentifier,
	@step_uid						uniqueidentifier,
	@name							nvarchar(100) = NULL,
	@frequency_type 				int = NULL,
	@frequency_interval 			int = NULL,
	@frequency_subday				int = NULL,
	@frequency_subday_interval		int = NULL,
	@frequency_relative_interval	int = NULL,
	@frequency_recurrence_factor	int = NULL,
	@active_start_date				int = NULL,
	@active_end_date				int = NULL,
	@active_start_time_of_day		int = NULL,
	@active_end_time_of_day 		int = NULL,
	@login							nvarchar(257) = NULL,
	@password						sysname = NULL,
	@proxy_id                       int = NULL OUTPUT
)
AS
BEGIN
	DECLARE @retcode int

	EXEC @retcode = sys.sp_MSrepl_check_job_access @id 			= @id,
													@step_uid	= @step_uid,
													@name		= @name
	IF @@ERROR <> 0 or @retcode <> 0
	BEGIN
		RETURN 1
	END

	-- call internal change procedure
	EXEC @retcode = sys.sp_MSchange_repl_job_unsafe @id 								= @id,
														@step_uid						= @step_uid,
														@name							= @name,
														@frequency_type 				= @frequency_type,
														@frequency_interval 			= @frequency_interval,
														@frequency_subday				= @frequency_subday,
														@frequency_subday_interval		= @frequency_subday_interval,
														@frequency_relative_interval	= @frequency_relative_interval,
														@frequency_recurrence_factor	= @frequency_recurrence_factor,
														@active_start_date				= @active_start_date,
														@active_end_date				= @active_end_date,
														@active_start_time_of_day		= @active_start_time_of_day,
														@active_end_time_of_day 		= @active_end_time_of_day,
														@login							= @login,
														@password						= @password,
														@proxy_id                       = @proxy_id OUTPUT

	RETURN @retcode
END

 
Last revision 2008RTM
See also

  sp_change_subscription_properties (Procedure)
sp_MSadd_qreader_agent (Procedure)
sp_MSchangedynamicsnapshotjobatdistributor (Procedure)
sp_MSchange_distribution_agent_properties (Procedure)
sp_MSchange_logreader_agent_properties (Procedure)
sp_MSchange_merge_agent_properties (Procedure)
sp_MSchange_repl_job_unsafe (Procedure)
sp_MSchange_snapshot_agent_properties (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