Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MShelp_snapshot_agent

  No additional text.


Syntax



-- Name:
--		sp_MShelp_snapshot_agent

-- Description:
--		Retrieves snapshot agent information.

-- Parameters:
--		See the procedure definition.

-- Returns:
--		0 - succeeded
--		1 - failed

-- Result:
--		None

-- Security:

--	This procedure can only be called by replication_agent. It must
--	be executed in the distribution db and the caller must have the
--	following:

--		Min Requirement
--		
--		DBO Distribution DBO
-- Requires Certificate signature for catalog access

create procedure sys.sp_MShelp_snapshot_agent
(
	@agent_id int
)
as
begin
	declare @retcode 					int,
			@publisher					sysname,
			@publisher_security_mode 	int,
			@publisher_login 			sysname,
			@publisher_password 		nvarchar(524)

	
	-- make sure this is a replication agent.
	-- if sessionproperty('replication_agent') != 1
	-- begin
	-- 	-- "You do not have sufficient permission to run this command."
	-- 	raiserror(14260, 16, -1)
	-- 	return 1
	-- end
	
	
	-- sysadmin or db_owner have access
	if is_srvrolemember('sysadmin') != 1
		and is_member('db_owner') != 1
	begin
		-- "You do not have sufficient permission to run this command."
		raiserror(14260, 16, -1)
    	return 1
    end
	
    -- retrieve the publisher server and database name
	select mssa.publisher_security_mode,
			mssa.publisher_login,
			sys.fn_repldecryptver4(mssa.publisher_password)
		from MSsnapshot_agents mssa
		where mssa.id = @agent_id
	if @@error <> 0 return 1

	return 0
end

 
Last revision 2008RTM
See also

  sp_instdist (Procedure)
sp_MShelp_snapshot_agentid (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