Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
sqlways:users-guide:migrate-mssql-to-postgres [November 09, 2018, 02:23:30 PM] alexandr.kirpichnysqlways:users-guide:migrate-mssql-to-postgres [May 31, 2023, 05:28:12 PM] (current) – external edit 127.0.0.1
Line 1: Line 1:
 \\ \\
-[[http://www.ispirer.com|Ispirer Home Page]] +[[https://www.ispirer.com|Ispirer Website]] 
-[[http://www.ispirer.com|Ispirer SQLWays Migration Product Page]] +[[https://www.ispirer.com/products/migration-toolkit|Ispirer Toolkit Overview]] 
-[[http://www.ispirer.com/?click=RequestSQLWays&from=IspirerWIKI|Request SQLWays]]+[[https://www.ispirer.com/download/download-demo|Free Trial]]
 \\ \\
  
 ====== How To Migrate Microsoft SQL Server to PostgreSQL Using Ispirer MnMTK ToolKit ====== ====== How To Migrate Microsoft SQL Server to PostgreSQL Using Ispirer MnMTK ToolKit ======
  
-To migrate Microsoft SQL Server Database to PostgreSQL can be used Ispirer Migration and Modernization Toolkit. This toolkit includes 3 tools:+You can use Ispirer Migration and Modernization Toolkit to migrate Microsoft SQL Server Database (Tables, Data, Views, Stored Procedures, Functions, Triggers, User Defined Types, Sequences, Indexes, Constraints, Synonyms.) to PostgreSQL. This toolkit includes 3 tools:
  
-   * **SQLWays Wizard**  -  Tool that is able to migrate the objects directly from one database to another. To connect to the source database it uses ODBC connection and to load the converted objects it uses [[http://wiki.ispirer.com/sqlways/faq/utilities-to-make-import|native utilities]]. +   * **SQLWays Wizard**  -  Tool that is able to migrate the objects directly from one database to another (Tables, Data, Views, Stored Procedures, Functions, Triggers, User Defined Types, Sequences, etc.). To connect to the source database it uses ODBC connection and to load the converted objects it uses __**[[https://wiki.ispirer.com/sqlways/faq/utilities-to-make-import|native utilities]]**__
-   * **Ispirer Migration Studio**  -  Is able to convert only one script at a time. +   * **Ispirer Migration Studio**  -  Tool which is able to convert only one script at a time. In this script you can provide sql statements and definitions of the following objects:Tables, Views, Stored Procedures, Functions, Triggers, User Defined Types, Sequences, etc
-   * **Ispirer Migration Commander**  -  Is able to convert multiple scripts or all the scripts in the provided folder including all the sub-directories.+   * **Ispirer Migration Commander**  -  Tool which is able to convert multiple scripts or all the scripts in the provided folder including all the sub-directories. In these scripts you can provide sql statements and definitions of the following objects:Tables, Views, Stored Procedures, Functions, Triggers, User Defined Types, Sequences, etc.
  
  
-So after the installation of Ispirer Migration and Modernization ToolKit you will 3 tools on your desktop:+After the installation of Ispirer Migration and Modernization ToolKit you will see 3 tools on your desktop:
  
-{{:sqlways:users-guide:studio_icon.png |}}   \\ \\ -  Ispirer Migration Studio Tool. Tool that allows to convert only one application script at a time.+{{:sqlways:users-guide:wiz_icon.png |}}  \\ \\ -  **Ispirer SQLWays Wizard Tool** 
 +\\ \\ \\ \\
  
 +{{:sqlways:users-guide:studio_icon.png |}}   \\ \\ -  **Ispirer Migration Studio Tool**. Tool that allows to convert only one application script at a time.
 \\ \\ \\ \\ \\ \\ \\ \\
-{{:sqlways:users-guide:commander_icon2.png |}}  \\ \\ -  Ispirer Migration Commander Tool. Tool that allows to convert multiple scripts at a time. 
  
 +{{:sqlways:users-guide:commander_icon2.png |}}  \\ \\ -  **Ispirer Migration Commander Tool**. Tool that allows to convert multiple scripts at a time.
 +\\ \\ \\ \\
  
 +\\
 +\\
 +
 +//**Ispirer Notification:**//
 +
 +You can get Ispirer Migration and Modernization Toolkit for free by filling out the form on our official web site:__**[[https://www.ispirer.com/download-ispirer-sqlways?ttype=database&dbsrc=mssqlserver&dbtrg=postgresql| Get the Tool For Free Now]]**__
 ===== 1. Registration ===== ===== 1. Registration =====
  
-If you run one of the tools for the first time, you need to register the tool using the license information that you have. +If you run one of the tools for the first time, you need to register the toolkit using the license information you should have received. Here you can find a step by step guide that describes how to register Ispirer Migration and Modernization toolkit: 
 +__**[[https://wiki.ispirer.com/sqlways/faq/how-to-register| How to Register Ispirer Migration and Modernization Toolkit]]**__
  
-==== 1.1 Registration in SLQWays Wizard ==== 
  
-In the SQLWays Wizard tool, on the "Welcome" page we need to enter the license information by clicking "Enter License" button and in the opened window click "Read from file".+__**Ispirer Notification:**__
  
-{{:sqlways:faq:read_file.png|}}+If you don't have a license, you can get it by filling out the form on our official web site__**[[https://www.ispirer.com/download-ispirer-sqlways?ttype=database&dbsrc=mssqlserver&dbtrg=postgresql|Get Free License for Ispirer Migration Toolkit]]**__
  
-After that we need to find the file with the license and open it.+===== 2Conversion =====
  
-{{:sqlways:faq:open_license.png|}}+After the registration process is done, and toolkit is successfully registered, we can proceed with the conversion of Microsoft SQL Server Database into PostgreSQL
  
-Then registration name and registration number should appear in appropriate windows and you will need to click "Register": 
  
-{{:sqlways:faq:reg_license.png|}}+==== 2.1 Conversion Using SQLWays Wizard ====
  
-If everything was correct you will see the updated information about the limitations of your current license on the "Welcome" page.+To convert the database directly from the source database we can use SQLWays Wizard tool
  
-==== 1.2 Registration in Studio or Commander ====+On the first page of SQLWays Wizard we need to provide the project directory. In this directory our tool will generate project file that will store information about the current migration process.
  
-To do that in Studio or Commander tool and click "Help" button on the options menu and click "License Info". Please see the screenshot for your reference:+{{:sqlways:faq:proj_dir.png|}}
  
-{{:sqlways:users-guide:lic_info.png|}} 
  
-In the opened window please click "Enter License" button:+Then we need to choose the ODBC connection to the source database that should be migrated. And then specify a user and a password that will be used to connect to the source database.
  
-{{:sqlways:users-guide:lic_info_dial.png|}} +{{:sqlways:users-guide:ms_sql_odbc.png|}}
  
-In the opened window you will have to provide registration name and registration number. Or you can click "Read From File" button and select the file with the license information and the tool will automatically catch the required informationAfter the appropriate information is provided, you need to click "Register" button:+**__Please note:__** Our tool works using the ODBC connection to the source database only! It means that before using SQLWays Wizard tool you need to install the ODBC driver and tune the ODBC connection to the database that should be migratedSome additional information about the ODBC driver installation and configuration can be found here**__[[https://wiki.ispirer.com/sqlways/users-guide/setting-up-database-connection/sql-server|Setting Up Microsoft SQL Database Connection]]__**
  
-{{:sqlways:users-guide:reg_info.png|}}+**__Please note:__** User that we specify on this page should have appropriate rights to make selects from system tables from your source database. More information about source database user privileges can be found here**__[[https://wiki.ispirer.com/sqlways/users-guide/check-list/setting-up-source-user-privileges#microsoft_sql_serverSource User Privileges]]__**
  
-If everything was correct you will see the "License Info Dialog" with the updated information about the limitations of your current license: 
  
-\\ 
  
-**__Please note:__** you can get the demo license of this tool at our official web site www.ispirer.com+On the next page we need to select target database from the list of the supported databasesAnd then to specify correct information about the target database, for example, server name, database name, user name and a password
  
-===== 2Conversion =====+{{:sqlways:users-guide:pg_trg.png|}}
  
-After the registration process is dome, and toolkit registered successfully, we can proceed with the conversion of the Microsoft SQL Server Database into PostgreSQLTo convert the database directly from the source database we can use SQLWays Wizard tool+This information will be used by our tool to generate correct command lines to psql.exe native utility of the target database. 
 +More information about the utilities used for making import is stored here: __**[[https://wiki.ispirer.com/sqlways/faq/utilities-to-make-import#postgresql|PostgreSQL Native Utility]]**__
  
 +The next step is to specify objects for conversion from the list of objects that our tool was able to extract from MSSQL database. To select objects you can just drag-n-drop the required objects to the right pane of the tool. Or you can select objects using buttons at the bottom of the tool:
  
 +{{:sqlways:users-guide:ms2pg_obj.png|}}
  
  
 +If during the migration process the list of objects was updated, for example some additional objects were created or dropped from the database, you can refresh the list of extracted objects. To do that just right click on the required object type or "Database" branch and click "Refresh" button, like it is shown on the screenshot:
  
 +{{:sqlways:users-guide:wizard:refresh_obj.png|}}
  
-==== 2.1 Setting Required Options ====+If required, you can specify different options that can be used to customize the conversion processThese options can be found on the "Specify DDL and Data Options" page:
  
-== 2.1.1 Direction Options ==+{{:sqlways:users-guide:ddl_opt.png|}}
  
-First of all in both tools we need to provide the source and target destinations. This can be done using the "Source" and "Target" options. So for MS SQL Server to PostgreSQL direction we need to provide "MS SQL Server" as a source and "PostgreSQL" as a target. Please see the screenshotit is applicable for both Studio and Commander:+After that you will need to specify the Export Directory. This is the directory where our tool will put all the generated files, like sql files with the converted PostgreSQL code, txt files with the data extracted from MSSQL databasebat or sh files with the commands to the native utilities.
  
-{{:sqlways:users-guide:source_trg.png|}}+{{:sqlways:faq:exp_dir.png|}}
  
-== 2.1.2 Options In The Options File == 
  
-After that if required we need to set options in the options file(sqlways.ini). In this file located all the options supported be the tool. By default this file is stored in the following directory: +Then we need to specify the **Bin Directory**This is the path where native utility of the target database is stored on your local machine where Ispirer Migration and Modernization Toolkit is installed. It means that to be able to perform import into the target database you need to have the native utility installed on the machine where you run the conversion.
-  +
-**c:\Users\[YOUR_USER]\Documents\Ispirer\SQLWays 8.0\**+
  
-{{:sqlways:users-guide:loc_ini.png|}}+{{:sqlways:users-guide:pg_bin.png|}}
  
-If you want to copy the options fileand use it from another locationthen you heed to provide a path to the required options file. You can do that in the Studio or Commander by clicking "Options" button in the options menu and choosing "Migration":+For more information about the PostgreSQL native utilitythat will be used by our toolplease refer to:
  
-{{:sqlways:users-guide:migr_opt.png|}}+**__[[https://wiki.ispirer.com/sqlways/faq/utilities-to-make-import#postgresql|PostgreSQL Native Utility]]__**
  
-And in the opened window, in the option "INI File Path" provide a correct path to the required options file, like it is done on the screenshot: 
  
-{{:sqlways:users-guide:ini_path.png|}} +After all these steps we need to run the migration. Migration process itself includes two steps"Conversion" and "Import". During the conversion step our tool extracts information about the objects specified for conversion, converts them and generates appropriate set of files. During the import step our tool tries to create all the converted objects and data in the target database.
-\\+
  
-More information about the sqlways.ini file and supported options can be found here: [[http://wiki.ispirer.com/sqlways/command-line/sqlways-ini|Description of the options file and its options]]+To run the conversion process, we need to click "Start Conversion" button on the "Conversion" tab of the "Migration Status" page:
  
 +{{:sqlways:faq:conversion.png|}}
  
-==== 2.2 Running The Conversion ====+After the conversion process is finished, we need to run the import process. So we need to go to the "Import" tab and click "Start Import" button, thus the import process will be initiated.
  
-After setting all the required options we need to specify the source code that need to be converted.+{{:sqlways:faq:import.png|}}
  
-=== 2.2.1 Conversion Using Ispirer Migration Studio === 
  
-In the Studio tool we need to provide the Microsoft SQL Server Database in the left window and click "Run Conversion" button. After the conversion process is finished, in the right window we can see the results of conversion - generated PostgreSQL.+After the migration process you can review all the generated files in the export directory by clicking "View Export" button on the "Conversion" tabIt will open a folder that stores all the converted results together with the log files - **sqlways.log** and **sqlways_imp.log** files. Sqlways.log file stores detailed information about the conversion step and sqlways_imp.log file stores information about the import process.
  
-{{:sqlways:users-guide:studio.png|}}+==== 2.2 Scripts Conversion Using Ispirer Migration Studio and Ispirer Migration Commander ====
  
-After the conversion you can review the source and converted target code, side by side for your convenience.+If you need to convert Microsoft SQL Server code stored in scripts or in filesyou can use Migration Studio or Migration Commander tools.
  
 +=== Conversion Using Ispirer Migration Studio ===
  
-=== 2.2.Conversion Using Ispirer Migration Commander ===+First we need to specify the source and targetThis can be done using the "Source" and "Target" optionsFor MS SQL Server to PostgreSQL direction we need to specify "MS SQL Server" as a source and "PostgreSQL" as a target.  After that we need to provide SQL Server code in the left pane of the tool and click "Run Conversion" button. After the conversion process is finished, in the right pane we will see the results of conversion - generated PostgreSQL. Please see the screenshot for your reference:
  
-== 2.2.2.1 Converting Files ==+{{:sqlways:users-guide:ms2pg_studio_upd.png|}}
  
-In the Migration Commander we need to specify the .cbl files that should be converted and click "Run conversion" button. Please note that .cpy files should not be specified for a conversion. Commander will automatically read information from .cpy files if required.+After the conversion you can review the source and converted target code arranged side by side for your convenience.
  
-{{:sqlways:users-guide:comm_files.png|}}+=== Conversion Using Ispirer Migration Commander ===
  
-In the opened window you need to provide the target directory, where our tool will put the converted files and click "Ok":+== Converting Files ==
  
-{{:sqlways:users-guide:res_dir.png|}}+In Ispirer Migration Commander we need to specify the source and target. This can be done using the "Source" and "Target" options. After that we need to specify the files that should be converted and then click the "Run conversion" button
  
-After the conversion process is finished, the converted files will be located in the target directory. And by clicking the files in the left and right panels, you can compare source code and generated target.+{{:sqlways:users-guide:commander_files.png|}}
  
-{{:sqlways:users-guide:comm_res.png|}} +In the opened window you need to provide the target directory, where our tool will put the converted files. After that please click "Ok": 
-\\+ 
 +{{:sqlways:users-guide:comm_res_path.png|}} 
 + 
 +After the conversion process is finished, the converted files will be located in the target directory. And by clicking the files in the left and right panels, you can compare the source code and generated target code.
 \\ \\
  
-== 2.2.2.2 Converting Whole Folder ==+== Converting Whole Folder ==
  
-Also in the Ispirer Migration Commander tool you can specify a whole folder for conversion. And in that case the tool will convert all the files in the folder and its subfolders. +In Ispirer Migration Commander tool you can also specify a whole folder for conversion, so that the tool will convert all the files in the folder and its subfolders. 
-In that case you just need to choose the selected folder and click "Run Conversion" button:+In order to do that you just need to choose the selected folder and click "Run Conversion" button:
  
-{{:sqlways:users-guide:comm_folder.png|}}+{{:sqlways:users-guide:ms2pg_comm_folder.png|}}
  
-Then you have to provide the target directory, where converted files will be placed. Also when migrating from MS SQL Server to PostgreSQL we need to provide a "File Mask" to convert only the files with the extension ".cbl"And click "Ok". Please see the screenshot:+Then you have to provide the target directory, where converted files will be placed. Also when [[https://www.ispirer.com/products/sql-server-to-postgresql-migration|migrating from MS SQL Server to PostgreSQL]] we can provide a "File Mask" to convert only the files with the required extension. If we need to convert all the files, we need to leave the file mask as isThen click "Ok". Please see the screenshot:
  
-{{:sqlways:users-guide:res_folder.png|}}+{{:sqlways:users-guide:ms2pg_comm_res.png|}}
  
-After the conversion process is finished, the converted files will be located in the target directory. And by clicking the files in the left and right panels, you can compare source code and generated target.+After the conversion process is finished, the converted files will be located in the target directory. And by clicking the files in the left and right panels, you can compare the source code and generated target code.
  
-{{:sqlways:users-guide:comm_res.png|}} 
 \\ \\
  
Line 150: Line 158:
  
 \\ \\
-Also you can review the recorded demo on our youtube channel that shows how to migrate Microsoft SQL Server Database to PostgreSQL code: [[https://www.youtube.com/watch?v=NhbNhxKjZ2I|Cobol to PostgreSQL  Conversion Demo]]+Also you can review the recorded demo on our youtube channel that shows how to migrate Microsoft SQL Server Database to PostgreSQL code: __**[[https://www.youtube.com/watch?v=Fjx1eEA28g4|Microsoft SQL Server to PostgreSQL Conversion Demo]]**__
  
 \\ \\
  
-If you will have questions or face with some difficulties please feel free to mail us: [[support@ispirer.com]] +You can download Ispirer Migration and Modernization toolkit and get the demo license from our official web site just filling out the form on this page:__**[[https://www.ispirer.com/download-ispirer-sqlways?ttype=database&dbsrc=mssqlserver&dbtrg=postgresql|Download Migration Tool With License]]**__. 
  
 \\ \\
-[[http://www.ispirer.com|Ispirer Home Page]] + 
-[[http://www.ispirer.com|Ispirer SQLWays Migration Product Page]] + 
-[[http://www.ispirer.com/?click=RequestSQLWays&from=IspirerWIKI|Request SQLWays]] +If you have any questions or face any issues, please feel free to mail us__**[[support@ispirer.com]]**__
-\\+

© 1999-2024, Ispirer Systems, LLC. All Rights Reserved.