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
faq:migration-toolkit:export-import-command-line-mode [2019/07/19 12:19]
darya.prikhodkina
— (current)
Line 1: Line 1:
-====== How to Convert and Import a Database in Command Line Mode ====== 
-  
-Ispirer Migration and Modernization Toolkit allows you to convert and load converted database via command line or shell script. ​ 
- 
-===== Database Conversion ===== 
-  
-First of all we need to open a command line window by running **Start -> SQLWays 8.x -> SQLWays Command Line** or **Start -> Run -> cmd.exe** ​ 
- 
-=== Preparing Command Line === 
- 
-To convert database objects we need to use **sqlways.exe** command line utility. So we have to prepare an appropriate command line for this command line tool. 
- 
-Command line may look as follows: 
-  ​ 
-  "​c:​\Program Files (x86)\Ispirer\MnMTK2017\sqlways.exe"​ /​D="​MSSQL_VMDBSRVDEMO001_itest"​ /U=sa /P=pwd /​DIR="​S:​\Tests\tab" ​ 
-  /​LOG=sqlways.log /​TARGET="​POSTGRE"​ /​GCMD=sqlways_all.bat /​PRJF=C:​\Users\Alexandr.Kirpichny\Documents\Ispirer\SQLWays 8.0\sqlways.xml ​ 
-  /​INI=C:​\Users\Alexandr.Kirpichny\Documents\Ispirer\SQLWays 8.0\sqlways_db.ini /​TD="​postgres"​ /​TH="​vmdbsrvdemo004"​ /TP=pwd /​TU=postgres ​ 
- 
-**Note:** SQLWays command line options are case insensitive and their order is insignificant.  ​ 
- 
- 
-Here is the list of parameters used in the provided command line:  
- 
-  * **sqlways.exe** ​ -  the name of the utility that performs the conversion. If required, it can be specified with the full path to the utility. 
-  * **/​d** ​ -  specifies the ODBC Data Source Name (DSN) to connect to the source database. Articles on how to tune the ODBC Connection to your source database can be found here: [[http://​wiki.ispirer.com/​sqlways/​users-guide/​setting-up-database-connection| How to Tune ODBC Connection]]. 
-  * **/​U** ​ -  specifies the user name for the source connection. 
-  * **/​P** ​ -  specifies the password for the source connection. 
-  * **/​DIR** ​ -  specifies the location of the generated files (output directory).  ​ 
-  * **/​LOG** ​ -  specifies the name of the conversion log file. 
-  * **/​TARGET** ​ -  specifies the target database. ​ 
-  * **/​GCMD** ​ - specifies the name of the general command file name. General Command File is a file that initiates the import. 
-  * **/​PRJF** ​ -  specifies the path to the project file. In this file information about the objects specified for conversion is stored. Here you can find the information about the project file: [[http://​wiki.ispirer.com/​sqlways/​command-line/​sqlways-xml| Project file description]]. 
-  * **/​INI** ​ -  specifies the options file. Options file is a file that stores all the options supported by the tool. Options file with the default settings is located in the directory like: "​C:​\Users\[user_name]\Documents\Ispirer\SQLWays 8.0\". You can use it as a default options file. More information about the supported options can be found here: [[http://​wiki.ispirer.com/​sqlways/​command-line/​sqlways-ini|Options file description]]. ​ 
-  * **/​TD** ​ -  specifies the target database name, where import should be done. 
-  * **/​TH** ​ -  specifies the target host\server name. 
-  * **/​TP** ​ -  specifies the password that will be used to connect to the target database. 
-  * **/​TU** ​ -  specifies the user name for the target connection. 
- 
-\\ 
- 
- 
-=== The Easiest Way to Get the Command Line ===  
- 
-The easiest way to prepare a correct command line is to run SQLWays Wizard tool and select all the required objects for conversion, so that on the "​Review the Selections"​ page you will see the generated command line: 
- 
-{{:​faq:​migration-toolkit/​summary.png|}} 
- 
-You can just copy the generated command line and run it. 
- 
- 
-=== Run the Prepared Command Line === 
- 
-After we prepared a command line with appropriate set of options we need to run it in the command line prompt. 
- 
-{{:​faq:​migration-toolkit/​cmd_run.png|}} 
- 
-And as a result, in the output directory we will see all the generated scripts. 
- 
-{{:​faq:​migration-toolkit/​exp_dir.png|}} 
- 
-Thus the conversion process is finished. 
- 
- 
-===== Import into the Target Database ===== 
- 
-During the "​Conversion"​ process SQLWays.exe tool generates all the scripts required for import and places them in the appropriate order so that to save the referential integrity. 
- 
-To make import we just need to run the generated "​sqlways_all.bat"​ file. To do that, we need to go to the output directory (directory that we have specified in the **/DIR** option) and run this file. 
- 
-Please see the screenshot for your reference: 
- 
-{{:​faq:​migration-toolkit/​imp.png|}} 
- 
- 
-Also you can run the general command file name as follows: 
- 
-{{:​faq:​migration-toolkit/​cmd_imp.png|}} 
- 
-In this case all the information about the import process (all the warnings, notifications and error messages) will be stored in the "​sqlways_imp.log"​ file. 
- 
- 
-\\ 
- 
-A more detailed list of command line options can be found here: **__[[http://​wiki.ispirer.com/​sqlways/​command-line/​options|Command Line Options]]__** 
-\\ 
-If you have any questions about how to run the migration in batch mode, please contact our technical team: **__[[[email protected]]]__** 
- 
-\\ 
----- 
-=== More about Ispirer Systems === 
-[[https://​www.ispirer.com|Ispirer Home Page]] 
-[[https://​www.ispirer.com/​products/​database-migration|Database Migration]] 
-[[https://​www.ispirer.com/​application-conversion|Application Conversion]] 
-[[https://​www.ispirer.com/​download|Downloads]]