Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_cdc_captured_columns

  No additional text.


Syntax
create procedure sys.sp_cdc_captured_columns  				
(														
	@capture_instance		sysname
)
with execute as 'dbo'
as
begin

	set nocount on
	
	declare @source_schema sysname
		,@source_name sysname
		
	set @source_schema = N'cdc'
	set @source_name = @capture_instance + N'_CT'
		
	select object_schema_name(c.source_object_id) as source_schema,
		object_name(c.source_object_id) as source_table, c.capture_instance,
		t.column_name, i.column_id, i.column_ordinal, t.data_type,
		t.character_maximum_length, t.numeric_precision,
		t.numeric_precision_radix, t.numeric_scale, t.datetime_precision
	from INFORMATION_SCHEMA.COLUMNS t inner join cdc.captured_columns i
		on t.column_name = i.column_name
	inner join cdc.change_tables c
		on i.object_id = c.object_id
	where t.table_catalog = db_name()
	and   t.table_schema  = @source_schema
	and   t.table_name    = @source_name
	and   object_name(i.object_id) = @source_name
	and   t.column_name not in
		('__$start_lsn', '__$end_lsn', '__$seqval', '__$operation', '__$update_mask')
	order by i.column_ordinal

	return 0
end																

 
Last revision 2008RTM
See also

  sp_cdc_get_captured_columns (Procedure)
sp_MSdrop_cdc (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