Aracılığıyla paylaş


sp_setdefaultdatatypemapping (Transact-SQL)

Marks an existing data type mapping between Microsoft SQL Server and a non-SQL Server database management system (DBMS) as the default.Bu saklı yordam, herhangi bir veritabanı üzerinde dağıtımcı adresindeki yürütülür.

Konu bağlantısı simgesiTransact-sql sözdizimi kuralları

Sözdizimi

sp_setdefaultdatatypemapping [ [ @mapping_id = ] mapping_id ]
    [ , [ @source_dbms = ] 'source_dbms' ]
    [ , [ @source_version = ] 'source_version' ]
    [ , [ @source_type = ] 'source_type' ] 
    [ , [ @source_length_min = ] source_length_min ]
    [ , [ @source_length_max = ] source_length_max ]
    [ , [ @source_precision_min = ] source_precision_min ]
    [ , [ @source_precision_max = ] source_precision_max ]
    [ , [ @source_scale_min = ] source_scale_min ]
    [ , [ @source_scale_max = ] source_scale_max ]
    [ , [ @source_nullable = ] source_nullable ]
    [ , [ @destination_dbms = ] 'destination_dbms' ]
    [ , [ @destination_version = ] 'destination_version' ]
    [ , [ @destination_type = ] 'destination_type' ]
    [ , [ @destination_length = ] destination_length ]
    [ , [ @destination_precision = ] destination_precision ]
    [ , [ @destination_scale = ] destination_scale ]
    [ , [ @destination_nullable = ] source_nullable ]

Bağımsız değişkenler

  • [ @mapping_id= ] mapping_id
    Identifies an existing data type mapping.mapping_id is int, with default value of NULL.Belirtirseniz, mapping_id, sonra da kalan parametreler gereklidir.

  • [ @ source_dbms=] 'source_dbms'
    Is the name of the DBMS from which the data types are mapped.source_dbms is sysname, and can be one of the following values.

    Değer

    Açıklama

    MSSQLSERVER

    kaynak SQL Server veritabanı.

    ORACLE

    kaynak Oracle veritabanıdır.

    Null(default)

    Siz bu parametre belirtmelisiniz mapping_id null olur.

  • [ @source_version= ] 'source_version'
    Is the version number of the source DBMS.source_version is varchar(10), with a default value of NULL.

  • [ @ source_type=] 'source_type'
    Is the data type in the source DBMS.source_type is sysname.Siz bu parametre belirtmelisiniz mapping_id null olur.

  • [ @source_length_min= ] source_length_min
    Is the minimum length of the data type in the source DBMS.source_length_min is bigint, with a default value of NULL.

  • [ @source_length_max= ] source_length_max
    Is the maximum length of the data type in the source DBMS.source_length_max is bigint, with a default value of NULL.

  • [ @source_precision_min= ] source_precision_min
    Is the minimum precision of the data type in the source DBMS.source_precision_min is bigint, with a default value of NULL.

  • [ @source_precision_max= ] source_precision_max
    Is the maximum precision of the data type in the source DBMS.source_precision_max is bigint, with a default value of NULL.

  • [ @source_scale_min= ] source_scale_min
    Is the minimum scale of the data type in the source DBMS.source_scale_min is int, with a default value of NULL.

  • [ @source_scale_max= ] source_scale_max
    Is the maximum scale of the data type in the source DBMS.source_scale_max is int, with a default value of NULL.

  • [ @source_nullable= ] source_nullable
    Is if the data type in the source DBMS supports a value of NULL.source_nullable is bit, with a default value of NULL.1 null değerleri desteklenir anlamına gelir.

  • [ @ destination_dbms =] 'destination_dbms'
    Is the name of the destination DBMS.destination_dbms is sysname, and can be one of the following values.

    Değer

    Açıklama

    MSSQLSERVER

    Hedef bir SQL Server veritabanı.

    ORACLE

    Hedef, bir Oracle veritabanıdır.

    DB2

    Hedef bir IBM DB2 veritabanıdır.

    SYBASE

    Hedef Sybase veritabanıdır.

    Null(default)

  • [ @ destination_version=] 'destination_version'
    Is the product version of the destination DBMS.destination_version is varchar(10), with a default value of NULL.

  • [ @ destination_type=] 'destination_type'
    Is the data type listed in the destination DBMS.destination_type is sysname, with a default value of NULL.

  • [ @destination_length= ] destination_length
    Is the length of the data type in the destination DBMS.destination_length is bigint, with a default value of NULL.

  • [ @destination_precision= ] destination_precision
    Is the precision of the data type in the destination DBMS.destination_precision is bigint, with a default value of NULL.

  • [ @destination_scale= ] destination_scale
    Is the scale of the data type in the destination DBMS.destination_scale is int, with a default value of NULL.

  • [ @destination_nullable= ] destination_nullable
    Is if the data type in the destination DBMS supports a value of NULL.destination_nullable is bit, with a default value of NULL.1 null değerleri desteklenir anlamına gelir.

Dönüş Kodu Değerleri

0 (başarılı) veya 1 (başarısız)

Açıklamalar

sp_setdefaultdatatypemapping arasında çoğaltma tüm türleri kullanılır SQL Server ve bir olmayan-SQL Server dbms.

Varsayılan veri türü eşlemeleri belirtilen dbms dahil tüm çoğaltma topolojisi uygulayın.

İzinler

Yalnızca üyeleri sysadmin sabit sunucu rolü olabilir yürütmek sp_setdefaultdatatypemapping.