Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSSetLogForRepl

  No additional text.


Syntax
create procedure sys.sp_MSSetLogForRepl
(
    @tabid					int
)
AS
BEGIN
	set nocount on
	declare @pkkey sysname
			,@source_table sysname
	
	--now set pk bits for base column of PK or computed PK columns so SE always log the off-rows
	declare #hpk cursor local fast_forward for
		select constraint_column_name from sys.fn_MSconstraint_columns (@tabid)
		where type = 'PK'
		union
		select name from sys.fn_basecolsofcomputedpkcol(@tabid, NULL)
	open #hpk
	fetch #hpk into @pkkey
	while (@@fetch_status = 0)
	begin
		EXEC %%ColumnEx(ObjectID = @tabid, Name = @pkkey).SetLogForRepl(Value = 1)
		IF @@ERROR <> 0
		BEGIN
			select @source_table = object_name(@tabid)
			RAISERROR(15052, -1, -1, @source_table)
			return 1
		END
		fetch #hpk into @pkkey
	end
	close #hpk
	deallocate #hpk
	return 0
END

 
Last revision 2008RTM
See also

  sp_extended_logging (Procedure)
sp_MSdrop_repltran (Procedure)
sp_MSsetfilteredstatus (Procedure)
sp_MSverboselogging (Procedure)
sp_vupgrade_syscol_status (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