Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSrepl_getdbmsinfo

  No additional text.


Syntax


-- Name:
--		sp_MSrepl_getdbmsinfo

-- Description:
--		Retrieve data type info

-- Returns:
--		0 if successful
--		1 if failed

-- Security:
--		Internal

-- Notes:
--		Retrieves ID values for data type, dbms


CREATE PROCEDURE sys.sp_MSrepl_getdbmsinfo
(
	@dbms			sysname,
	@version		sysname = NULL,
	@type			sysname,
	@dbms_id		int OUTPUT,
	@datatype_id	int OUTPUT
)
AS
BEGIN
	-- Prepare dbms for case insensitive searches
	SET @dbms = UPPER(@dbms)

	-- Get DBMS id
	SELECT	@dbms_id = dbms_id
	FROM	msdb.dbo.MSdbms
	WHERE	dbms	= @dbms
	  AND	sys.fn_IHcompareversion(version, @version) = 1
	
	IF @dbms_id IS NULL OR @@ERROR <> 0
	BEGIN
		RAISERROR(21653, 16, -1, @dbms, @version)
		RETURN (1)
	END
	
	-- Get data type
	SELECT	@datatype_id = datatype_id
	FROM	msdb.dbo.MSdbms_datatype
	WHERE	dbms_id = @dbms_id
	  AND	UPPER(type COLLATE DATABASE_DEFAULT) =
		UPPER(@type) COLLATE DATABASE_DEFAULT
	
	IF @datatype_id IS NULL OR @@ERROR <> 0
	BEGIN
		RAISERROR(21654, 16, -1, @type)
		RETURN (1)
	END

	RETURN (0)
END

 
Last revision 2008RTM
See also

  sp_dropdatatypemapping (Procedure)
sp_MSdrop_replcom (Procedure)
sp_MSrepl_adddatatypemapping (Procedure)
sp_setdefaultdatatypemapping (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