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
Previous revision
Next revision Both sides next revision
faq:migration-toolkit:test-features [2019/09/20 10:51]
darya.prikhodkina [Option TEST]
faq:migration-toolkit:test-features [2019/09/20 11:15]
darya.prikhodkina [DEFAULT values for option TEST]
Line 27: Line 27:
 ===== Option MAX_NUMBER_OF_TEST_CALLS ===== ===== Option MAX_NUMBER_OF_TEST_CALLS =====
  
-This option ​is additionally specified in **[COMMON]** section [[guides:​migration-toolkit/​command-line/​sqlways-ini|sqlways.ini]] or sqlways_wzd.ini.+This option ​can be additionally specified in **[COMMON]** section ​of [[guides:​migration-toolkit/​command-line/​sqlways-ini|sqlways.ini]] or sqlways_wzd.ini ​file.
  
-Option MAX_NUMBER_OF_TEST_CALLS is used to specify the number of calling statements for procedures or functions converted either from scripts or from the database. Pleaserefer to the following example: \\+Option MAX_NUMBER_OF_TEST_CALLS is used to specify the number of calling statements for procedures or functions converted either from scripts or from database. Please refer to the following example: \\
  
 **Table3** **Table3**
Line 35: Line 35:
 | create procedure sp_params_select \\  @par1 int, \\ @par2 date, \\ @par3 varchar(20) \\ as \\ DECLARE @var1 int \\ DECLARE @var2 date \\ DECLARE @var3 varchar(20) \\ begin \\ \\ set @var2 = (SELECT tb.col2 \\ from tab_sp_params_select tb, \\ tab_sp_params_select1 tb1 \\ where tb.col1 = **@par1** \\ and tb.col2=tb1.col2) \\ \\ set @var3 = (SELECT tb.col3 \\ from tab_sp_params_select tb, \\ tab_sp_params_select1 tb1 \\ where tb.col2 = **@par2** \\ and tb.col2=tb1.col2) \\ \\ set @var1 = (SELECT tb.col1 \\ from tab_sp_params_select tb, \\ tab_sp_params_select1 tb1 \\ where tb.col3 = **@par3** \\ and tb.col2=tb1.col2) \\ end | CALL sp_params_select(1,​null,'​1'​);​ \\ CALL sp_params_select(1,​null,'​1'​);​ \\ CALL sp_params_select(2,​null,'​1'​);​ \\ CALL sp_params_select(3,​null,'​1'​);​ \\ CALL sp_params_select(4,​null,'​1'​);​ \\ CALL sp_params_select(5,​null,'​1'​);​ \\ CALL sp_params_select(6,​null,'​1'​);​ \\ CALL sp_params_select(7,​null,'​1'​);​ \\ CALL sp_params_select(8,​null,'​1'​);​ \\ CALL sp_params_select(9,​null,'​1'​);​ \\ CALL sp_params_select(10,​null,'​1'​);​ \\ \\ CALL sp_params_select(1,​TO_DATE('​2010-11-01','​YYYY-MM-DD'​),'​1'​);​ \\ \\ CALL sp_params_select(1,​null,'​1'​);​ \\ CALL sp_params_select(1,​null,'​2'​);​ \\ CALL sp_params_select(1,​null,'​3'​);​ \\ CALL sp_params_select(1,​null,'​4'​);​ \\ CALL sp_params_select(1,​null,'​5'​);​ \\ CALL sp_params_select(1,​null,'​6'​);​ \\ CALL sp_params_select(1,​null,'​7'​);​ \\ CALL sp_params_select(1,​null,'​8'​);​ \\ CALL sp_params_select(1,​null,'​9'​);​ \\ CALL sp_params_select(1,​null,'​10'​);​ | | create procedure sp_params_select \\  @par1 int, \\ @par2 date, \\ @par3 varchar(20) \\ as \\ DECLARE @var1 int \\ DECLARE @var2 date \\ DECLARE @var3 varchar(20) \\ begin \\ \\ set @var2 = (SELECT tb.col2 \\ from tab_sp_params_select tb, \\ tab_sp_params_select1 tb1 \\ where tb.col1 = **@par1** \\ and tb.col2=tb1.col2) \\ \\ set @var3 = (SELECT tb.col3 \\ from tab_sp_params_select tb, \\ tab_sp_params_select1 tb1 \\ where tb.col2 = **@par2** \\ and tb.col2=tb1.col2) \\ \\ set @var1 = (SELECT tb.col1 \\ from tab_sp_params_select tb, \\ tab_sp_params_select1 tb1 \\ where tb.col3 = **@par3** \\ and tb.col2=tb1.col2) \\ end | CALL sp_params_select(1,​null,'​1'​);​ \\ CALL sp_params_select(1,​null,'​1'​);​ \\ CALL sp_params_select(2,​null,'​1'​);​ \\ CALL sp_params_select(3,​null,'​1'​);​ \\ CALL sp_params_select(4,​null,'​1'​);​ \\ CALL sp_params_select(5,​null,'​1'​);​ \\ CALL sp_params_select(6,​null,'​1'​);​ \\ CALL sp_params_select(7,​null,'​1'​);​ \\ CALL sp_params_select(8,​null,'​1'​);​ \\ CALL sp_params_select(9,​null,'​1'​);​ \\ CALL sp_params_select(10,​null,'​1'​);​ \\ \\ CALL sp_params_select(1,​TO_DATE('​2010-11-01','​YYYY-MM-DD'​),'​1'​);​ \\ \\ CALL sp_params_select(1,​null,'​1'​);​ \\ CALL sp_params_select(1,​null,'​2'​);​ \\ CALL sp_params_select(1,​null,'​3'​);​ \\ CALL sp_params_select(1,​null,'​4'​);​ \\ CALL sp_params_select(1,​null,'​5'​);​ \\ CALL sp_params_select(1,​null,'​6'​);​ \\ CALL sp_params_select(1,​null,'​7'​);​ \\ CALL sp_params_select(1,​null,'​8'​);​ \\ CALL sp_params_select(1,​null,'​9'​);​ \\ CALL sp_params_select(1,​null,'​10'​);​ |
  
-Please note that there are three SELECT statements inside the SP that return result-sets based on the values specified through the parameters, while calling the SP. Soif together with SP there are selected tables that are referenced inside the SP, there is generated ​a set of calling ​statments ​based on the data extracted from the source database. Please consider the following table for the data stored in the table **tab_sp_params_select** used in the example above: \\+Please note that there are three SELECT statements inside the SP that return result-sets based on the values specified through the parameters, while calling the SP. So if together with SP there are selected tables that are referenced inside the SP, a set of calling ​statements ​based on the data extracted from the source database ​will be generated. Please consider the following table for the data stored in the table **tab_sp_params_select** used in the example above: \\
  
 **Table4** **Table4**
Line 41: Line 41:
 | 1,​2010-11-01,​1 \\ 2,​2010-11-01,​2 \\ 3,​2010-11-01,​3 \\ 4,​2010-11-01,​4 \\ 5,​2010-11-01,​5 \\ 6,​2010-11-01,​6 \\ 7,​2010-11-01,​7 \\ 8,​2010-11-01,​8 \\ 9,​2010-11-01,​9 \\ 10,​2010-11-01,​10 \\ 11,​2010-11-01,​11 \\ 12,​2010-11-01,​12 \\ 13,​2010-11-01,​13 \\ 14,​2010-11-01,​14 \\ 15,​2010-11-01,​15 \\ 16,​2010-11-01,​16 \\ 17,​2010-11-01,​17 \\ 18,​2010-11-01,​18 \\ 19,​2010-11-01,​19 \\ 20,​2010-11-01,​20 | | 1,​2010-11-01,​1 \\ 2,​2010-11-01,​2 \\ 3,​2010-11-01,​3 \\ 4,​2010-11-01,​4 \\ 5,​2010-11-01,​5 \\ 6,​2010-11-01,​6 \\ 7,​2010-11-01,​7 \\ 8,​2010-11-01,​8 \\ 9,​2010-11-01,​9 \\ 10,​2010-11-01,​10 \\ 11,​2010-11-01,​11 \\ 12,​2010-11-01,​12 \\ 13,​2010-11-01,​13 \\ 14,​2010-11-01,​14 \\ 15,​2010-11-01,​15 \\ 16,​2010-11-01,​16 \\ 17,​2010-11-01,​17 \\ 18,​2010-11-01,​18 \\ 19,​2010-11-01,​19 \\ 20,​2010-11-01,​20 |
  
-As you can see only one parameter is used per each select statement. That is why there are generated ​three sections of calling ​statments, each with up to 10 statements inside, as the **MAX_NUMBER_OF_TEST_CALLS** option is set to 10 for this example. Only DISTINCT values are taken. That is why for column **col2** only one date value is used and only one calling statement is generated. The rest values are added as the default.+As you can see only one parameter is used per each select statement. That is why there are three sections of calling ​statements generated, each with up to 10 statements inside, as the **MAX_NUMBER_OF_TEST_CALLS** option is set to 10 for this example. Only DISTINCT values are taken. That is why for column **col2** only one date value is used and only one calling statement is generated. The rest of the values are added as default.
  
-===== DEFAULT ​values ​for option ​TEST =====+===== DEFAULT ​Values ​for Option ​TEST =====
  
-Each database has it'​s ​own set of data types, that can be specified differently from RDBMS to RDBMS. That is why the default values for **TEST** option are specified in their own database section. Please refer to the following table with the sections and options names and their values:+Each database has its own set of data types, that can be specified differently from RDBMS to RDBMS. That is why the default values for **TEST** option are specified in each database section. Please refer to the following table with the sections and options names and their values:
  
 **Table5** **Table5**
Line 54: Line 54:
  
 \\ \\
-If you will face with some difficulties or have any other questions, please contact our support team: [[[email protected]]]+If you face with any difficulties or have any other questions, please contact our support team: [[[email protected]]]
  
 \\ \\