sp_changearticlecolumndatatype (Transact-SQL)

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.

Topic link icon 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 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.

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.

See Also

Reference

Replication Stored Procedures (Transact-SQL)

Concepts

Change Publication and Article Properties

Data Type Mapping for Oracle Publishers