Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
guides:migration-toolkit:command-line:sqlways-ini:sql-server-section [2019/11/06 10:35]
alexandr.kirpichny
guides:migration-toolkit:command-line:sqlways-ini:sql-server-section [2019/11/16 11:01]
darya.prikhodkina
Line 2: Line 2:
 ====== Sqlways.ini File - Section [MSSQL] ====== ====== Sqlways.ini File - Section [MSSQL] ======
  
-This article describes sqlways.ini file [MSSQL] section and options it contains. ​+This article describes sqlways.ini file'​s ​[MSSQL] section and options it contains. ​
 ^  Option name  ^ Description ​ ^  ^  Option name  ^ Description ​ ^ 
 | **BIN** | Specifies the directory where Microsoft SQL Server utilities like BCP and ISQL are located. | | **BIN** | Specifies the directory where Microsoft SQL Server utilities like BCP and ISQL are located. |
-| **TARGET_VERSION** | Specifies the target version of the MSSQL database. If this option is empty the latest MSSQL database version will be used. Note: According to the version number conversion results may differ. ​ |+| **TARGET_VERSION** | Specifies the target version of MSSQL database. If this option is empty the latest MSSQL database version will be used. Note: According to the version number conversion results may differ. ​ |
 | **SERVER_NAME** | Specifies the server name which is used in generated scripts for the BCP and ISQL utilities (Parameter -S of BCP). | | **SERVER_NAME** | Specifies the server name which is used in generated scripts for the BCP and ISQL utilities (Parameter -S of BCP). |
 | **DATABASE** | Specifies the database name which is used in generated scripts for the BCP and ISQL utilities. | | **DATABASE** | Specifies the database name which is used in generated scripts for the BCP and ISQL utilities. |
-| **USER** | Specifies the user name which is used in generated scripts for the BCP and ISQL utilities (Parameter -U of BCP). To use this option, set the TRUSTED_CONNECTION option (see below) to No. | +| **USER** | Specifies the user name which is used in generated scripts for the BCP and ISQL utilities (Parameter -U of BCP). To use this option, set the TRUSTED_CONNECTION option (see below) to "No". | 
-| **PWD** | Specifies the user password which is used in generated scripts for the BCP and ISQL utilities (Parameter -P of BCP). To use this option set the TRUSTED_CONNECTION (see below) option to No. | +| **PWD** | Specifies the user password which is used in generated scripts for the BCP and ISQL utilities (Parameter -P of BCP). To use this option set the TRUSTED_CONNECTION (see below) option to "No". | 
-| **TRUSTED_CONNECTION** | Specifies that a trusted connection to Microsoft SQL Server is used in generated scripts for the BCP and ISQL utilities (Parameters -T of BCP and -E of ISQL). When Yes has been chosen in this option, security credentials of the network user are used and a user name (login_id) and a password are not required. Possible values are Yes, No. The default value is No. |+| **TRUSTED_CONNECTION** | Specifies that a trusted connection to Microsoft SQL Server is used in generated scripts for the BCP and ISQL utilities (Parameters -T of BCP and -E of ISQL). When "Yes" is chosen in this option, security credentials of the network user are used and a user name (login_id) and a password are not required. Possible values are "Yes""No". The default value is "No". |
 | **MAX_ERRORS** | Specifies the maximum number of errors that can occur before the BCP utility is canceled. Each row that cannot be copied by BCP is ignored and counted as one error (Parameter -m of BCP). The default value is 10. | | **MAX_ERRORS** | Specifies the maximum number of errors that can occur before the BCP utility is canceled. Each row that cannot be copied by BCP is ignored and counted as one error (Parameter -m of BCP). The default value is 10. |
 | **CODE_PAGE** | Specifies a code page of the data in the data file for the BCP utility (Parameter -C of BCP). The following values can be specified for the CODE_PAGE option: \\ * **ACP** - ANSI/​Microsoft Windows (ISO 1252). \\ * **OEM** - Default code page used by the client. This is the default code page used by bcp if -C is not specified. \\ * **RAW** - No conversion from one code page to another is taking place. \\ * <​value>​ - Specific code page number, for example, 437. | | **CODE_PAGE** | Specifies a code page of the data in the data file for the BCP utility (Parameter -C of BCP). The following values can be specified for the CODE_PAGE option: \\ * **ACP** - ANSI/​Microsoft Windows (ISO 1252). \\ * **OEM** - Default code page used by the client. This is the default code page used by bcp if -C is not specified. \\ * **RAW** - No conversion from one code page to another is taking place. \\ * <​value>​ - Specific code page number, for example, 437. |
-| **int2dec38** | Specifies how to convert Oracle PL/SQL data types INT and INTEGER ​to Microsoft SQL Server. \\ By default Oracle PL/SQL data types INT and INTEGER ​are converted to INT data type. \\ With the option set to YES Oracle PL/SQL data types INT and INTEGER ​are converted to DECIMAL(38,​0) in SQL Server. | +| **int2dec38** | Specifies how to convert ​INT and INTEGER ​Oracle PL/SQL data types to Microsoft SQL Server. \\ By default ​INT and INTEGER ​Oracle PL/SQL data types are converted to INT data type. \\ With the option set to "​Yes", ​INT and INTEGER ​data types will be converted to DECIMAL(38,​0) in SQL Server. | 
-| **smallint2dec38** | Specifies how to convert Oracle PL/SQL data type SMALLINT ​to Microsoft SQL Server. \\ By default Oracle PL/SQL data type SMALLINT ​is converted to SMALLINT data type. \\ With the option set to YES Oracle PL/SQL data type SMALLINT ​is converted to DECIMAL(38,​0) in Microsoft SQL Server. | +| **smallint2dec38** | Specifies how to convert ​SMALLINT ​Oracle PL/SQL data type to Microsoft SQL Server. \\ By default ​SMALLINT ​Oracle PL/SQL data type is converted to SMALLINT data type. \\ With the option set to "​Yes", ​SMALLINT ​will be converted to DECIMAL(38,​0) in Microsoft SQL Server. | 
-| **USE_CONVERT_CHAR_TO_VARCHAR** | This option controls whether to convert CHAR data type to VARCHAR data type while converting to Microsoft SQL Server. The lower limit of CHAR size for which the conversion is required is controlled by **CONVERT_CHAR_TO_VARCHAR** option. The default is No. |+| **USE_CONVERT_CHAR_TO_VARCHAR** | This option controls whether to convert CHAR data type to VARCHAR data type while converting to Microsoft SQL Server. The lower limit of CHAR sizefor which the conversion is requiredis controlled by **CONVERT_CHAR_TO_VARCHAR** option. The default is "No". |
 | **CONVERT_CHAR_TO_VARCHAR** | This option controls the lower limit of CHAR size for which the conversion from CHAR to VARCHAR is required. The optimized default is 20. | | **CONVERT_CHAR_TO_VARCHAR** | This option controls the lower limit of CHAR size for which the conversion from CHAR to VARCHAR is required. The optimized default is 20. |
-| **ROWID_FORMAT** | This option controls the way the ROWID from an Oracle database is being converted to Microsoft SQL Server database. Possible values are physloc (returns the address of the data in hex format), lockres (returns the address of the data in [File:​Page:​Slot] format). The default is physlock. | +| **ROWID_FORMAT** | This option controls the way the ROWID from an Oracle database is being converted to Microsoft SQL Server database. Possible values are "physloc" ​(returns the address of the data in hex format), ​"lockres" ​(returns the address of the data in [File:​Page:​Slot] format). The default is "physlock". | 
-| **SET_NOCOUNT_IN_SP** | If this option is set to ON, SET NOCOUNT ON statement will be added to the beginning of stored procedures as well as SET NOCOUNT OFF to the end. \\ Possible values - "​On",​ "​Off"​. Default value - "​Off"​. |+| **SET_NOCOUNT_IN_SP** | If this option is set to "ON", SET NOCOUNT ON statement will be added to the beginning of stored procedures as well as SET NOCOUNT OFF to the end. \\ Possible values - "​On",​ "​Off"​. Default value - "​Off"​. |
 | **DOUBLE_SIZE_CHARACTERS_DATA_TYPES** | If this option is set to "​Yes",​ SQLWays will double the size of the character columns in the converted tables. \\ Possible values - "​Yes",​ "​No"​ or Empty. Default value - "​No"​ or Empty. | | **DOUBLE_SIZE_CHARACTERS_DATA_TYPES** | If this option is set to "​Yes",​ SQLWays will double the size of the character columns in the converted tables. \\ Possible values - "​Yes",​ "​No"​ or Empty. Default value - "​No"​ or Empty. |
 | **ORIGINAL_LOGIN_WITHOUT_DOMAIN** | This option controls the way how Informix function USER is converted to MS SQL Server. If this option is set to "​Yes",​ SQLWays will generate SWF_ORIGINAL_LOGIN() function that will remove domain name from the result returned by ORIGINAL_LOGIN() function. If this option is empty or set to "​No",​ ORIGINAL_LOGIN() function will be used. \\ Possible values - "​Yes",​ "​No"​ or Empty. Default value - "​No"​ or Empty. | | **ORIGINAL_LOGIN_WITHOUT_DOMAIN** | This option controls the way how Informix function USER is converted to MS SQL Server. If this option is set to "​Yes",​ SQLWays will generate SWF_ORIGINAL_LOGIN() function that will remove domain name from the result returned by ORIGINAL_LOGIN() function. If this option is empty or set to "​No",​ ORIGINAL_LOGIN() function will be used. \\ Possible values - "​Yes",​ "​No"​ or Empty. Default value - "​No"​ or Empty. |
 | **CHECK_DATETIME_DATA** | Applicable when during the migration from Firebird to MSSQL global data type mapping is used to change conversion of TIMESTAMP data type to DATETIME instead of DATETIME2 and when in FIREBIRD database TIMESTAMP columns contain dates before "​January 1, 1753", for example "May 15, 1555". There are cases when such dates cannot be inserted into DATETIME columns in MSSQL. So this option can be used to check the dates stored in such columns. And if the tool defines that a certain value may not be inserted in DATETIME column, SQLWays will change it to "​January 1, 1753" value. For PostgreSQL to MSSQL direction this option checks the range and also cuts the millisecond part of a date. \\ Possible values - "​Yes",​ "​No"​ or Empty. Default value - "​No"​ or Empty. | | **CHECK_DATETIME_DATA** | Applicable when during the migration from Firebird to MSSQL global data type mapping is used to change conversion of TIMESTAMP data type to DATETIME instead of DATETIME2 and when in FIREBIRD database TIMESTAMP columns contain dates before "​January 1, 1753", for example "May 15, 1555". There are cases when such dates cannot be inserted into DATETIME columns in MSSQL. So this option can be used to check the dates stored in such columns. And if the tool defines that a certain value may not be inserted in DATETIME column, SQLWays will change it to "​January 1, 1753" value. For PostgreSQL to MSSQL direction this option checks the range and also cuts the millisecond part of a date. \\ Possible values - "​Yes",​ "​No"​ or Empty. Default value - "​No"​ or Empty. |
-| **MAP_CHAR_TO_NCHAR** | If this option is set to Yes, all CHAR columns with length less or equal to 4000 will be converted to NCHAR in MSSQL. \\ Possible values - "​Yes",​ "​No"​ or empty. Default value - "​No"​ or empty. | +| **MAP_CHAR_TO_NCHAR** | If this option is set to "Yes", all CHAR columns with length less or equal to 4000 will be converted to NCHAR in MSSQL. \\ Possible values - "​Yes",​ "​No"​ or empty. Default value - "​No"​ or empty. | 
-| **MAP_VARCHAR_TO_NVARCHAR** | If this option is set to Yes, all VARCHAR columns with length less or equal to 4000 will be converted to NVARCHAR in MSSQL. \\ Possible values - "​Yes",​ "​No"​ or empty. Default value - "​No"​ or empty. | +| **MAP_VARCHAR_TO_NVARCHAR** | If this option is set to "Yes", all VARCHAR columns with length less or equal to 4000 will be converted to NVARCHAR in MSSQL. \\ Possible values - "​Yes",​ "​No"​ or empty. Default value - "​No"​ or empty. | 
-| **FN_IDX_TO_IDX_VIEW** | This option defines the way how Oracle function-based indexes will be converted to MSSQL. If this option is set to Yes, function-based indexes will be converted into indexed views in MSSQL. \\ Possible values - "​Yes",​ "​No"​ or empty. Default value - "​No"​ or empty. |+| **FN_IDX_TO_IDX_VIEW** | This option defines the way how Oracle function-based indexes will be converted to MSSQL. If this option is set to "Yes", function-based indexes will be converted into indexed views in MSSQL. \\ Possible values - "​Yes",​ "​No"​ or empty. Default value - "​No"​ or empty. |
 | **HINT** | This option specifies the hint or hints to be used during a bulk import of data into a table in MSSQL Database. All possible hints are supported in our toolkit. More information about the hints supported by MSSQL BCP utility can be found here: [[https://​docs.microsoft.com/​en-us/​sql/​tools/​bcp-utility?​view=sql-server-2017#​h|MSSQL Server BCP Hints]]. \\ Possible values: Hints supported by MSSQL Server. \\ Default value: Empty. | | **HINT** | This option specifies the hint or hints to be used during a bulk import of data into a table in MSSQL Database. All possible hints are supported in our toolkit. More information about the hints supported by MSSQL BCP utility can be found here: [[https://​docs.microsoft.com/​en-us/​sql/​tools/​bcp-utility?​view=sql-server-2017#​h|MSSQL Server BCP Hints]]. \\ Possible values: Hints supported by MSSQL Server. \\ Default value: Empty. |
-| **MS_QUOTED_IDENTIFIER** | This option defines the way how MSSQL native utilities (sqlcmd.exe and bcp.exe) will treat quoted delimiters and data. If this option is set to "​Yes"​ identifiers should be delimited with double quotes and literals must be delimited with single quotation marks. When this option is set to "​No",​ then only brackets [] can be used to delimit identifiers and double quotation marks will be used to delimit character strings. \\ Possible values - "​Yes",​ "​No"​ or empty. \\ Default value - "​No"​ or empty. |+| **MS_QUOTED_IDENTIFIER** | This option defines the way how MSSQL native utilities (sqlcmd.exe and bcp.exe) will treat quoted delimiters and data. If this option is set to "​Yes"​identifiers should be delimited with double quotes and literals must be delimited with single quotation marks. When this option is set to "​No",​ then only brackets [] can be used to delimit identifiers and double quotation marks will be used to delimit character strings. \\ Possible values - "​Yes",​ "​No"​ or empty. \\ Default value - "​No"​ or empty. |
 | **PARTITION_ENABLE** | This option controls whether partition tables conversion is required. When option is set to '​Yes',​ table partitioning logic will be migrated and additional partition function and partition scheme will be created. Otherwise, partitioning logic will be omitted. \\ Possible values - "​Yes",​ "​No"​ or empty. \\ Default value - "​No"​ or empty. | | **PARTITION_ENABLE** | This option controls whether partition tables conversion is required. When option is set to '​Yes',​ table partitioning logic will be migrated and additional partition function and partition scheme will be created. Otherwise, partitioning logic will be omitted. \\ Possible values - "​Yes",​ "​No"​ or empty. \\ Default value - "​No"​ or empty. |
 | **PARTITION_FILEGROUP** | The option sets filegroups names for the conversion solution for table partitioning. It can take any value which is the name of filegroup. PRIMARY filegroup is used by default. \\ Please, take into account that filegroups will not be created automatically during the migration. Please, create required filegroups manually. ​ \\ Default value - "​PRIMARY"​ or empty. | | **PARTITION_FILEGROUP** | The option sets filegroups names for the conversion solution for table partitioning. It can take any value which is the name of filegroup. PRIMARY filegroup is used by default. \\ Please, take into account that filegroups will not be created automatically during the migration. Please, create required filegroups manually. ​ \\ Default value - "​PRIMARY"​ or empty. |
Line 36: Line 36:
 | **INDEX_FILEGROUP** | This option defines FILGROUP for indexes. | | **INDEX_FILEGROUP** | This option defines FILGROUP for indexes. |
 | **FK_DEL_CASCADE_SET_NULL_TO_TRIG** | This option defines how to convert ON DELETE CASCADE and ON DELETE SET NULL foreign key options from Firebird database to MSSQL. If it is set to Yes, then ON DELETE CASCADE and ON DELETE SET NULL foreign key options will be converted into a trigger that emulates the same behavior as in Firebird. \\ Possible values - "​Yes",​ "​No"​ or Empty. \\ Default value - "​No"​ or Empty. | | **FK_DEL_CASCADE_SET_NULL_TO_TRIG** | This option defines how to convert ON DELETE CASCADE and ON DELETE SET NULL foreign key options from Firebird database to MSSQL. If it is set to Yes, then ON DELETE CASCADE and ON DELETE SET NULL foreign key options will be converted into a trigger that emulates the same behavior as in Firebird. \\ Possible values - "​Yes",​ "​No"​ or Empty. \\ Default value - "​No"​ or Empty. |
-| **FK_UPD_CASCADE_SET_NULL_TO_NO_ACT** | This option defines how to convert ON UPDATE CASCADE and ON UPDATE SET NULL foreign key options from Firebird database to MSSQL. If it is set to Yes, then ON UPDATE CASCADE and ON UPDATE SET NULL foreign key options will be converted into ON UPDATE NO ACTION in Microsoft SQL Server. \\ Possible values - "​Yes",​ "​No"​ or Empty. \\ Default value - "​No"​ or Empty. | +| **FK_UPD_CASCADE_SET_NULL_TO_NO_ACT** | This option defines how to convert ON UPDATE CASCADE and ON UPDATE SET NULL foreign key options from Firebird database to MSSQL. If it is set to "Yes", then ON UPDATE CASCADE and ON UPDATE SET NULL foreign key options will be converted into ON UPDATE NO ACTION in Microsoft SQL Server. \\ Possible values - "​Yes",​ "​No"​ or Empty. \\ Default value - "​No"​ or Empty. | 
-| **USE_SCOPE_IDENTITY** | This option defines how to convert @@identity global variable when migrating from Sybase Adaptive Server Anywhere to Microsoft SQL Server. If it is set to Yes, then @@identity will be converted to SCOPE_IDENTITY() in Microsoft SQL Server. If this option is set to No, then @@identity global variable will be left as is in MS SQL. \\ Possible values - "​Yes",​ "​No"​ or Empty. \\ Default value - "​No"​ or Empty. |+| **USE_SCOPE_IDENTITY** | This option defines how to convert @@identity global variable when migrating from Sybase Adaptive Server Anywhere to Microsoft SQL Server. If it is set to "Yes", then @@identity will be converted to SCOPE_IDENTITY() in Microsoft SQL Server. If this option is set to "No", then @@identity global variable will be left as is in MS SQL. \\ Possible values - "​Yes",​ "​No"​ or Empty. \\ Default value - "​No"​ or Empty. |
  
 **Example**:​ **Example**:​