Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSdropreplsymmetrickey

  No additional text.


Syntax

-- Name:
--	sp_MSdropreplsymmetrickey
--
-- Description:
--	This procedure drops the following:
--		Database symmetric key based on a password seed
--		Database level certificate with associated asymmetric public/private keys
--		Database level scoped replication symetric key used for encrypting

-- Parameters:
--	See the procedure definition.

-- Returns:
--	0 - On success
--	1 - On Failure

-- Result:
--	None

-- Security:
--	None as this procedure is not public.

CREATE PROCEDURE sys.sp_MSdropreplsymmetrickey
AS
BEGIN
	DECLARE @error_number 	int,
			@error_severity int,
			@error_state 	int
			
	BEGIN TRY
		DROP SYMMETRIC KEY SQLSERVER_REPLICATION
	END TRY
	BEGIN CATCH
		-- we eat the following error:
		--  Msg 15151, Level 16, State 1, Line 1
		--  Cannot drop the symmetric key 'SQLSERVER_REPLICATION', because it does not exist or you do not have permission.
		IF @@ERROR != 15151
		BEGIN
			SELECT @error_number = ERROR_NUMBER(),
					@error_severity = ERROR_SEVERITY(),
					@error_state = ERROR_STATE()

			RAISERROR(@error_number, @error_severity, @error_state)

			RETURN 1
		END
	END CATCH

	BEGIN TRY
		DROP CERTIFICATE SQLSERVER_REPLICATION
	END TRY
	BEGIN CATCH
		-- we eat the following error:
		--  Msg 15151, Level 16, State 1, Line 1
		--  Cannot drop the certificate 'SQLSERVER_REPLICATION', because it does not exist or you do not have permission.
		IF @@ERROR != 15151
		BEGIN
			SELECT @error_number = ERROR_NUMBER(),
					@error_severity = ERROR_SEVERITY(),
					@error_state = ERROR_STATE()

			RAISERROR(@error_number, @error_severity, @error_state)

			RETURN 1
		END
	END CATCH
	
	RETURN 0
END

 
Last revision
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