Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MShelpsummarypublication

  No additional text.


Syntax


-- Name:	
--		sp_MShelpsummarypublication
--			
-- Description:
--		Called by Object Explorer to populate the Summary Page
--		for a publication

-- Security:
--		Public, PAL access

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


CREATE PROCEDURE sys.sp_MShelpsummarypublication
(
	@oename nvarchar(260),
	@oetype nvarchar(100)
)
AS
BEGIN
	DECLARE	@cmd			nvarchar(1000),
			@publication	sysname,
			@publisher_db	sysname,
			@publisher_type	sysname,
			@pos_pubname	int,
			@pos_pubtype	int,
			@retcode		int

	-- Verify oename parameter
	IF (@oename is null OR LEN(@oename) = 0)
	BEGIN
		RAISERROR(7801, 16, -1, @oename)
		RETURN 1
	END

	SET @pos_pubname = PATINDEX(N'%:%', @oename)
	SET @pos_pubtype = PATINDEX(N'%(%)', @oename)

	SELECT	@publication    = LEFT(@oename, @pos_pubname - 1),
			@publisher_db   = CASE WHEN @pos_pubtype > 0
								THEN SUBSTRING(@oename, @pos_pubname + 1, @pos_pubtype - @pos_pubname - 1)
								ELSE SUBSTRING(@oename, @pos_pubname + 1, LEN(@oename) - @pos_pubname)
							  END,
			@publisher_type = CASE WHEN @pos_pubtype > 0
								THEN SUBSTRING(@oename, @pos_pubtype + 1, LEN(@oename) - @pos_pubtype - 1)
								ELSE NULL
							  END

	IF (@publication IS NULL OR LEN(@publication) = 0 OR @publisher_db IS NULL OR LEN(@publisher_db) = 0)
	BEGIN
		RAISERROR(21423, 16, -1, @publication) --The security check is later, so we want to raise the more generic error
		RETURN 1
	END

	
	-- execute the actual proc in publishing db
	-- security check is done inside
	

	IF @publisher_type IS NULL OR LEN(@publisher_type) = 0
	BEGIN
		-- SQL Server publication
		SELECT @cmd = QUOTENAME(RTRIM(@publisher_db)) + '.sys.sp_publicationsummary'
		EXEC @retcode = @cmd @publication = @publication
	END
	ELSE
	BEGIN
		-- HREPL publication
		EXEC @retcode = sys.sp_publicationsummary	@publication = @publication,
													@publisher   = @publisher_db
	END

	RETURN @retcode
END

 
Last revision 2008RTM
See also

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