Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MShelplogreader_agent

  No additional text.


Syntax

-- Name:	
--		sp_MShelplogreader_agent
--			
-- Description:
--		Displays the following information on logreader agent:
--			LA id
-- 			name
--			publisher_security_mode
--			publisher_login
--			publisher_password
-- 			job_id
-- 			job_login
-- 			job_password
--	
-- Security:
--		SA
-- Requires Certificate signature for catalog access

-- Returns: 	
--		0 : success
--		1 : failure 		


CREATE PROCEDURE sys.sp_MShelplogreader_agent
(
	@publisher		sysname,
	@publisher_db	sysname
)
AS
BEGIN
	DECLARE @publisher_id int

	-- Security Check: require sysadmin
	IF (ISNULL(IS_SRVROLEMEMBER('sysadmin'),0) = 0)
	BEGIN
		RAISERROR(21089,16,-1)
		RETURN 1
	END

	-- database must be distribution db
	IF sys.fn_MSrepl_isdistdb(DB_NAME()) <> 1
	BEGIN
		RAISERROR (21482, 16, -1, 'sp_MShelplogreader_agent', 'distribution')
		RETURN (1)
	END

	SELECT @publisher_id = server_id
		FROM sys.servers
		WHERE UPPER(name) = UPPER(@publisher)

	SELECT msla.id,
			msla.name,
			msla.publisher_security_mode,
			msla.publisher_login,
			N'**********' as [publisher_password],
			sjb.job_id,
			sc.credential_identity as [job_login],
			N'**********' as [job_password]
		FROM MSlogreader_agents msla
				JOIN msdb..sysjobs sjb
					ON convert(uniqueidentifier, msla.job_id) = sjb.job_id
				LEFT JOIN msdb..sysjobsteps sj
					ON msla.job_step_uid = sj.step_uid
				LEFT JOIN msdb..sysproxies sp
					ON sj.proxy_id = sp.proxy_id
				LEFT JOIN sys.credentials sc
					ON sp.credential_id = sc.credential_id
		WHERE msla.publisher_id = @publisher_id
			AND msla.publisher_db = @publisher_db

	RETURN 0
END

 
Last revision 2008RTM
See also

  sp_MSrepl_helplogreader_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