Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSfixupsharedagentproperties

  No additional text.


Syntax

create procedure sys.sp_MSfixupsharedagentproperties (
    @publisher sysname,
    @publisher_db sysname,
    @publication sysname,         /* publication name */
    @distributor sysname,       -- default @publisher
    @distributor_security_mode int, -- default 1 -- standard
    @distributor_login sysname, -- default null
    @distributor_password nvarchar(524), -- default null
    @ftp_address sysname,       -- default null
    @ftp_port int,              -- default null
    @ftp_login sysname,         -- default null
    @ftp_password nvarchar(524),      -- default null
    @alt_snapshot_folder nvarchar(255), -- default null
    @working_directory   nvarchar(255), -- default null
    @use_ftp bit,               -- default 0
    @offload_agent bit = 0,         -- default 0
    @offload_server sysname = NULL     -- default @distributor
    )
AS
    DECLARE @subscription_type int
    DECLARE @retcode int
    DECLARE @force_ftp_null bit
    DECLARE @force_alt_snapshot_folder_null bit

    IF @alt_snapshot_folder IS NOT NULL AND @alt_snapshot_folder <> N''
        SELECT @force_ftp_null = 1
    ELSE
        SELECT @force_ftp_null = 0

    IF (@use_ftp = 1)  OR (@ftp_address IS NOT NULL AND @ftp_address <> N'')
        SELECT @force_alt_snapshot_folder_null = 1
    ELSE
        SELECT @force_alt_snapshot_folder_null = 0

    /*
	** Parameter Check: @offloadagent.
	*/
	IF @offload_agent IS NOT NULL
		AND @offload_agent != 0
	BEGIN
		-- "Parameter '@offload_agent' is no longer supported."
		RAISERROR(21698, 16, -1, '@offload_agent')
		RETURN 1
	END

	IF ISNULL(@offload_server, N'') != N''
		AND LOWER(@offload_server) != LOWER(@distributor)
	BEGIN
		-- "Parameter '@offload_server' is no longer supported."
		RAISERROR(21698, 16, -1, '@offload_server')
		RETURN 1
	END

    SELECT @subscription_type = subscription_type
      FROM MSreplication_subscriptions
     WHERE UPPER(publisher) = UPPER(@publisher)
       AND publisher_db = @publisher_db
       AND publication = @publication
    -- No need to fix up the publisher security properties
    -- because they are defined on a per subscription
    -- basis for SyncTran

    EXEC @retcode = sys.sp_MSfixupdistributorinfo
        @publisher = @publisher,
        @publisher_db = @publisher_db,
        @publication = @publication,
        @distributor = @distributor,
        @subscription_type = @subscription_type

    IF @@ERROR <> 0 OR @retcode <> 0
        GOTO FixupFailure

    EXEC @retcode = sys.sp_MSfixupdistributorsecurity
        @publisher = @publisher,
        @publisher_db = @publisher_db,
        @publication = @publication,
        @distributor_login = @distributor_login,
        @distributor_password = @distributor_password,
        @distributor_security_mode = @distributor_security_mode,
        @subscription_type = @subscription_type

    IF @@ERROR <> 0 OR @retcode <> 0
        GOTO FixupFailure

/* Ignore ftp_address, ftp_port, ftp_login, ftp_password on post 7.0 server
    EXEC @retcode = sp_MSfixupftpinfo
        @publisher = @publisher,
        @publisher_db = @publisher_db,
        @publication = @publication,
        @ftp_address = @ftp_address,
        @ftp_port = @ftp_port,
        @ftp_login = @ftp_login,
        @ftp_password = @ftp_password,
        @subscription_type = @subscription_type,
        @force_null = @force_ftp_null

    IF @@ERROR <> 0 OR @retcode <> 0
        GOTO FixupFailure
*/
    EXEC @retcode = sys.sp_MSfixupaltsnapshotfolder
        @publisher = @publisher,
        @publisher_db = @publisher_db,
        @publication = @publication,
        @alt_snapshot_folder = @alt_snapshot_folder,
        @subscription_type = @subscription_type,
        @force_null = @force_alt_snapshot_folder_null

    IF @@ERROR <> 0 OR @retcode <> 0
        GOTO FixupFailure

    EXEC @retcode = sys.sp_MSfixupworkingdirectory
        @publisher = @publisher,
        @publisher_db = @publisher_db,
        @publication = @publication,
        @working_directory = @working_directory,
        @subscription_type = @subscription_type

    IF @@ERROR <> 0 OR @retcode <> 0
        GOTO FixupFailure

    EXEC @retcode = sys.sp_MSfixupuseftp
        @publisher = @publisher,
        @publisher_db = @publisher_db,
        @publication = @publication,
        @use_ftp = @use_ftp,
        @subscription_type = @subscription_type,
        @force_zero = @force_ftp_null

    IF @@ERROR <> 0 OR @retcode <> 0
        GOTO FixupFailure

    RETURN 0

FixupFailure:

    RETURN 1


 
Last revision 2008RTM
See also

  sp_addpullsubscription_agent (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