April 13, 2012

sp_addpushsubscription_agent (Transact-SQL MetaData) Definition

Please note: that the following source code is provided and copyrighted by Microsoft and is for educational purpose only.
The meta data is from an SQL 2012 Server.

I have posted alot more, find the whole list here.

Goto Definition or MetaData

Definition:

sys.sp_addpushsubscription_agent(nvarchar @dts_package_name
, nvarchar @dts_package_password
, nvarchar @dts_package_location
, nvarchar @enabled_for_syncmgr
, nvarchar @distribution_job_name
, nvarchar @publisher
, nvarchar @subscriber_provider
, nvarchar @subscriber_datasrc
, nvarchar @subscriber_location
, nvarchar @subscriber_provider_string
, nvarchar @subscriber_catalog
, nvarchar @publication
, nvarchar @subscriber
, nvarchar @subscriber_db
, smallint @subscriber_security_mode
, nvarchar @subscriber_login
, nvarchar @subscriber_password
, nvarchar @job_login
, nvarchar @job_password
, nvarchar @job_name
, int @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)

MetaData:

 CREATE PROCEDURE sys.sp_addpushsubscription_agent  
(
@publication sysname,
@subscriber sysname = NULL,
@subscriber_db sysname = NULL,
@subscriber_security_mode smallint = 1,
@subscriber_login sysname = NULL,
@subscriber_password sysname = NULL,
@job_login nvarchar(257) = NULL,
@job_password sysname = NULL,
@job_name sysname = NULL,
@frequency_type int = 64,
@frequency_interval int = 1,
@frequency_relative_interval int = 1,
@frequency_recurrence_factor int = 0,
@frequency_subday int = 4,
@frequency_subday_interval int = 5,
@active_start_time_of_day int = 0,
@active_end_time_of_day int = 235959,
@active_start_date int = 0,
@active_end_date int = 99991231,
@dts_package_name sysname = NULL,
@dts_package_password sysname = NULL,
@dts_package_location nvarchar(12) = N'distributor',
@enabled_for_syncmgr nvarchar(5) = 'false',
@distribution_job_name sysname = NULL,
@publisher sysname = NULL,
@subscriber_provider sysname = NULL,
@subscriber_datasrc nvarchar(4000) = NULL,
@subscriber_location nvarchar(4000) = NULL,
@subscriber_provider_string nvarchar(4000) = NULL,
@subscriber_catalog sysname = NULL
)
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

IF @retcode <> 0
RETURN (@retcode)

-- Add sp
SET @publisher = UPPER(@publisher) COLLATE DATABASE_DEFAULT
set @cmd = @cmd + N'sys.sp_MSrepl_addpushsubscription_agent'

EXEC @retcode = @cmd @publication,
@subscriber,
@subscriber_db,
@subscriber_security_mode,
@subscriber_login,
@subscriber_password,
@job_login,
@job_password,
@job_name,
@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,
@dts_package_name,
@dts_package_password,
@dts_package_location,
@enabled_for_syncmgr,
@distribution_job_name,
@publisher,
@publisher_type,
@subscriber_provider,
@subscriber_datasrc,
@subscriber_location,
@subscriber_provider_string,
@subscriber_catalog

RETURN (@retcode)
END

No comments:

Post a Comment

Total Pageviews