Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSreplencrypt

  No additional text.


Syntax

-- Name:
--	sp_MSreplencrypt

-- Description:
--	This procedure is a wrapper that actually calls
--	xp_repl_encrypt as well as fn_replencryptver4.

-- Parameters:
--	See the procedure definition.

-- Returns:
--	0 - On Success
--	1 - On Failure

-- Result:
--	None

-- Security:None as this procedure is not public.
-- Requires Certificate signature for catalog access

CREATE PROCEDURE sys.sp_MSreplencrypt
(
	@password nvarchar(524) OUTPUT
)
AS
BEGIN
	DECLARE @retcode int
			
	IF LEN(@password) > 115
	BEGIN
		-- The password that you specified is too long. The password should have no more than 115 characters.
		RAISERROR(15156, 16, -1, 115)
		RETURN 1
	END

	EXEC @retcode = sys.xp_repl_encrypt @password OUTPUT
	IF @@ERROR <> 0 OR @retcode <> 0 RETURN 1
	
	EXEC @retcode = sys.sp_MSreplopensymmetrickey
	IF @@ERROR <> 0 OR @retcode <> 0 RETURN 1
	
	SELECT @password = sys.fn_replencryptver4(@password)
	IF @@ERROR <> 0 RETURN 1
	
	EXEC @retcode = sys.sp_MSreplclosesymmetrickey
	IF @@ERROR <> 0 OR @retcode <> 0 RETURN 1
	
	RETURN 0	
END

 
Last revision 2008RTM
See also

  sp_addmergepublication (Procedure)
sp_addmergepullsubscription_agent (Procedure)
sp_addmergepushsubscription_agent (Procedure)
sp_addmergesubscription (Procedure)
sp_addpullsubscription_agent (Procedure)
sp_changedistpublisher (Procedure)
sp_changemergepublication (Procedure)
sp_changesubscriptiondtsinfo (Procedure)
sp_change_subscription_properties (Procedure)
sp_MSadd_distribution_agent (Procedure)
sp_MSadd_logreader_agent (Procedure)
sp_MSadd_merge_agent (Procedure)
sp_MSadd_snapshot_agent (Procedure)
sp_MSadd_subscriber_info (Procedure)
sp_MSchangerepltablepasswords (Procedure)
sp_MSchange_distribution_agent_properties (Procedure)
sp_MSchange_logreader_agent_properties (Procedure)
sp_MSchange_merge_agent_properties (Procedure)
sp_MSchange_snapshot_agent_properties (Procedure)
sp_MSdrop_replcom (Procedure)
sp_MShelp_snapshot_agentid (Procedure)
sp_MSrepl_adddistpublisher (Procedure)
sp_MSrepl_addpublication (Procedure)
sp_MSrepl_addsubscription_article (Procedure)
sp_MSrepl_changepublication (Procedure)
sp_MSupdatesharedagentproperties (Procedure)
sp_MSupdate_subscriber_info (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