Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSfixupdistributorsecurity

  No additional text.


Syntax

create procedure sys.sp_MSfixupdistributorsecurity (
    @publisher sysname,
    @publisher_db sysname,
    @publication sysname,
    @distributor_security_mode int, -- default 1 -- standard
    @distributor_login sysname, -- default null
    @distributor_password nvarchar(524), -- default null
    @subscription_type int
    )
AS
    DECLARE @local_distributor_security_mode int
    DECLARE @local_distributor_login sysname
    DECLARE @local_distributor_password nvarchar(524)
    DECLARE @retcode INT

    -- Check to ensure a login is provided if security mode is SQL Server authentication.
    select @distributor_login = rtrim(ltrim(isnull(@distributor_login, '')))
    if @distributor_security_mode = 0 and @distributor_login = ''
    begin
        -- '@distributor_login cannot be null or empty when @distributor_security_mode is set to 0 (SQL Server authentication).'
        raiserror(21694, 16, -1, '@distributor_login', '@distributor_security_mode')
        return 1
    end

    EXEC @retcode = sys.sp_MSupdatesharedagentproperties
       @publisher = @publisher,
       @publisher_db = @publisher_db,
       @publication = @publication,
       @property = N'distributor_security_mode',
       @intvalue = @distributor_security_mode,
       @subscription_type = @subscription_type

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

    EXEC @retcode = sys.sp_MSupdatesharedagentproperties
       @publisher = @publisher,
       @publisher_db = @publisher_db,
       @publication = @publication,
       @property = N'distributor_login',
       @strvalue = @distributor_login,
       @subscription_type = @subscription_type

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

    EXEC @retcode = sys.sp_MSupdatesharedagentproperties
       @publisher = @publisher,
       @publisher_db = @publisher_db,
       @publication = @publication,
       @property = N'distributor_password',
       @strvalue = @distributor_password,
       @subscription_type = @subscription_type

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

    RETURN 0

FixupFailure:
    RETURN 1


 
Last revision 2008RTM
See also

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