April 16, 2012

sp_cdc_get_captured_columns (Transact-SQL MetaData) Definition

Please note: that the following source code is provided and copyrighted by Microsoft and is for educational purpose only.
The meta data is from an SQL 2012 Server.

I have posted alot more, find the whole list here.

Goto Definition or MetaData

Definition:

sys.sp_cdc_get_captured_columns(nvarchar @capture_instance)

MetaData:

   
create procedure [sys].[sp_cdc_get_captured_columns]
(
@capture_instance sysname
)
as
begin

-- Verify database is currently enabled for change data capture
if ([sys].[fn_cdc_is_db_enabled]() != 1)
begin
declare @db_name sysname
set @db_name = db_name()
raiserror(22901, 16, -1, @db_name)
return 1
end

set @capture_instance = rtrim(@capture_instance)

if (@capture_instance is null) or (@capture_instance = N'')
begin
raiserror(22963, 16, -1, N'@capture_instance')
return 1
end

if ([sys].[fn_cdc_has_select_access](rtrim(@capture_instance)) = 0)
begin
raiserror(22981, 16, -1)
return 1
end

exec sys.sp_cdc_captured_columns @capture_instance

return 0
end

No comments:

Post a Comment

Total Pageviews