Skip to content

Latest commit

 

History

History
82 lines (61 loc) · 3.92 KB

sp-changearticlecolumndatatype-transact-sql.md

File metadata and controls

82 lines (61 loc) · 3.92 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sp_changearticlecolumndatatype (Transact-SQL)
sp_changearticlecolumndatatype (Transact-SQL)
markingmyname
maghan
03/14/2017
sql
replication
reference
sp_changearticlecolumndatatype
sp_changearticlecolumndatatype_TSQL
sp_changearticlecolumndatatype
TSQL

sp_changearticlecolumndatatype (Transact-SQL)

[!INCLUDE SQL Server]

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

Note

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

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

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

Arguments

[ @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 [!INCLUDEmsCoName] [!INCLUDEssNoVersion] data type in the destination column. type is sysname, with a default of NULL.

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

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

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

Return Code Values

0 (success) or 1 (failure)

Remarks

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

sp_changearticlecolumndatatype is only supported for Oracle Publishers. Executing this stored procedure against a [!INCLUDEssNoVersion] publication results in an error.

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

Permissions

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

See Also

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