Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSchangepublicationlinkpasswords

  No additional text.


Syntax
CREATE PROCEDURE sys.sp_MSchangepublicationlinkpasswords
(
    @server 		sysname,
    @remote_login	sysname,
    @new_password	sysname
)
AS
BEGIN
    SET NOCOUNT ON

    DECLARE @retcode 		int,
                @publisherlink	sysname,
                @publisher		sysname


    -- if the table does not exist then that means we are not at a
    -- subscription database and we do not need to update anything
    IF OBJECT_ID(N'MSsubscription_properties', N'U') IS NULL
    BEGIN
        RETURN 0
    END

    -- note that here we only update links with security_mode = 0
    DECLARE cursorPubLinks CURSOR LOCAL FAST_FORWARD FOR
        SELECT s.name, sp.publisher
        FROM MSsubscription_properties as sp, master.sys.servers as s
        WHERE (UPPER(sp.publisher) = UPPER(@server) OR @server = N'%')
            AND publisher_security_mode = 0
            AND publication_type in (0,1)
            AND s.name = sys.fn_MSrepllinkname(N'REPLLINK', upper(sp.publisher), sp.publisher_db, sp.publication, db_name())

    OPEN cursorPubLinks

    FETCH cursorPubLinks INTO @publisherlink, @publisher
    WHILE @@FETCH_STATUS <> -1
    BEGIN
        EXEC @retcode = sys.sp_MSchangerepllinkedsrvrpassword @server = @publisherlink,
                                                                                        @remote_login = @remote_login,
                                                                                        @new_password = @new_password
        IF @retcode <> 0 or @@ERROR <> 0
            RETURN 1

        FETCH cursorPubLinks INTO @publisherlink, @publisher
    END

    CLOSE cursorPubLinks
    DEALLOCATE cursorPubLinks

    RETURN 0
END

 
Last revision 2008RTM
See also

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