Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_IHgetversion

  No additional text.


Syntax


-- Name:
--          sp_IHgetversion

-- Description:
--          Retrieve server version of server

-- Security:
--          Internal

-- Returns:
--          Version string

-- Owner:
--          

create procedure sys.sp_IHgetversion
(
	@publisher	sysname,
	@version	sysname OUTPUT
)
as
begin
	DECLARE @publisher_type	sysname
	DECLARE @distribdb	sysname	
	DECLARE @cmd		nvarchar(4000)
	DECLARE @retcode	int

	-- Initialize version
	SELECT @version = NULL
	
	-- Get publisher info
	EXEC @retcode = sys.sp_MSrepl_getdistributorinfo	@publisher      = @publisher,
														@publisher_type = @publisher_type OUTPUT
	
	IF @retcode <> 0
	BEGIN
		RETURN (1)
	END
	
	-- Call version specific logic to find server version
	IF UPPER(@publisher_type) = N'MSSQLSERVER'
	BEGIN
		SELECT @version = NULL
	END
	ELSE IF UPPER(@publisher_type) IN (N'ORACLE', N'ORACLE GATEWAY')
	BEGIN
		EXEC @retcode = sp_ORAgetversion @publisher, @version OUTPUT
		
		IF @retcode != 0 OR @@ERROR != 0
		BEGIN
			RETURN (1)
		END
	END
	ELSE
	BEGIN
		SELECT @version = NULL
	END

	RETURN (0)
	
end

 
Last revision 2008RTM
See also

  sp_articlecolumn (Procedure)
sp_IHaddpublisher (Procedure)
sp_IHsyncmetadata (Procedure)
sp_MSdrop_replcom (Procedure)
sp_MSrepl_changearticlecolumndatatype (Procedure)
sp_MSrepl_get_Oracle_publisher_metadata (Procedure)
sp_MSrepl_helparticlecolumns (Procedure)
sp_MSrepl_refresh_heterogeneous_publisher (Procedure)
sp_ORACheckSourceTable (Procedure)
sp_ORAenumarticlecolumninfo (Procedure)
sp_ORAenumpublishertables (Procedure)
sp_ORAenumtablecolumninfo (Procedure)
sp_ORAgetcolumndata (Procedure)
sp_ORAGetTablespaceInfo (Procedure)
sp_ORAverifypublisher (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