sp_changearticlecolumndatatype (Transact-SQL)
TOC
Collapse the table of content
Expand the table of content

sp_changearticlecolumndatatype (Transact-SQL)

 

Applies To: SQL Server

Changes the article column data type mapping for an Oracle publication. This stored procedure is executed at the Distributor on any database.

System_CAPS_ICON_note.jpg Note


The data type mappings between supported Publisher types are provided by default. Use sp_changearticlecolumndatatype only when overriding these default settings.

Topic link icon Transact-SQL Syntax Conventions

  
sp_changearticlecolumndatatype [ @publication= ] 'publication'  
    [ @article = ] 'article'   
    [ @column = ] 'column'  
    [ , [ @type = ] 'type' ]  
    [ , [ @length = ] length ]  
    [ , [ @precision = ] precision ]  
    [ , [ @scale = ] scale ]  
    [ , [ @publisher = ] 'publisher'  

[ @publication= ] 'publication'
Is the name of the Oracle publication. publication is sysname, with no default.

[ @article = ] 'article'
Is the name of the article. article is sysname, with no default.

[ @column= ] 'column'
Is the name of the column for which to change the data type mapping. column is sysname, with no default.

[ @type = ] 'type'
Is the name of the Microsoft SQL Server data type in the destination column. type is sysname, with a default of NULL.

[ @length = ] length
Is the length of the SQL Server data type in the destination column. length is bigint, with a default of NULL.

[ @precision= ] precision
Is the precision of the SQL Server data type in the destination column. precision is bigint, with a default of NULL.

[ @publisher= ] 'publisher'
Specifies a non-SQL Server publisher. publisher is sysname, with a default of NULL.

0 (success) or 1 (failure)

Sp_changearticlecolumndatatype is used to override the default data type mappings between supported Publisher types (Oracle and SQL Server). To view these default data type mappings, execute sp_getdefaultdatatypemapping.

sp_changearticlecolumndatatype is only supported for Oracle Publishers. Executing this stored procedure against a SQL Server publication results in an error.

sp_changearticlecolumndatatype must be executed for each article column mapping that must be changed.

Only members of the sysadmin fixed server role or db_owner fixed database role can execute sp_changearticlecolumndatatype.

Change Publication and Article Properties
Data Type Mapping for Oracle Publishers
Replication Stored Procedures (Transact-SQL)

Community Additions

ADD
Show:
© 2016 Microsoft