Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSrepl_setdefaultdatatype

  No additional text.


Syntax


-- Name:
--		sp_MSrepl_setdefaultdatatype

-- Description:
--		Mark data type mapping as default

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

-- Security:
--		Internal

-- Notes:
--		Adds/updates the default data type mapping record
--		NOTE: Calling sp is expected to manage transaction

CREATE PROCEDURE sys.sp_MSrepl_setdefaultdatatype
(
	@map_id					int,
	@datatype_mapping_id	int
)
AS
BEGIN
	SET NOCOUNT ON
	
	-- Verify mapping
	IF NOT EXISTS
	(
		SELECT	map.map_id
		FROM	msdb.dbo.MSdbms_map map,
				msdb.dbo.MSdbms_datatype_mapping dm
		WHERE	map.map_id				= dm.map_id
		  AND	map.map_id				= @map_id
		  AND	dm.datatype_mapping_id	= @datatype_mapping_id
	)
	BEGIN
		RAISERROR (21658, 16, -1)
		RETURN (1)
	END
	
	UPDATE	msdb.dbo.MSdbms_map
	SET		default_datatype_mapping_id = @datatype_mapping_id
	WHERE	map_id = @map_id

	IF @@ERROR <> 0
	BEGIN
		RETURN (1)
	END	
	
	RETURN (0)
END

 
Last revision 2008RTM
See also

  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