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.

Note

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

Transact-SQL syntax conventions

Syntax

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

Arguments

[ @publication = ] N'publication'

The name of the Oracle publication. @publication is sysname, with no default.

[ @article = ] N'article'

The name of the article. @article is sysname, with no default.

[ @column = ] N'column'

The name of the column for which to change the data type mapping. @column is sysname, with no default.

[ @mapping_id = ] mapping_id

Identified for informational purposes only. Not supported. Future compatibility is not guaranteed.

[ @type = ] N'type'

The name of the SQL Server data type in the destination column. @type is sysname, with a default of NULL.

[ @length = ] length

The length of the SQL Server data type in the destination column. @length is bigint, with a default of NULL.

[ @precision = ] precision

The precision of the SQL Server data type in the destination column. @precision is bigint, with a default of NULL.

[ @scale = ] scale

The scale of the SQL Server data type in the destination column. @scale is bigint, with a default of NULL.

[ @publisher = ] N'publisher'

Specifies a non-SQL Server 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 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.

Permissions

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