PostgreSQL to MSSQL Tutorial

[PostgreSQL to SQL Converter]  [FAQ]  [Download]  [Buy]

1. Connect to PostgreSQL Server

On this wizard screen connection settings for PostgreSQL server must be specified. The converter can connect to PostgreSQL server using either local or remote mode. The first one is used to connect to the server launched on the same machine where PostgreSQL to SQL Server converter is running. The second mode allows to connect to the server launched on another computer.

By default the program uses local connection mode. It is indicated by radio button "Local". To set up remote connection select "Remote" radio button. Remote connection requires host and port to connect through. Host could be either network name or IP address. Port value is necessary only if it differs from the default PostgreSQL port 5432. Otherwise this field may be kept "as is".

Finally, user name and password are entered.

    
2. Connect to MS SQL Server

This wizard page is designed to enter the necessary settings for connection to Microsoft SQL Server. "MS SQL Server" field must be filled with the name of the target SQL Server instance of left empty for local MS SQL. Also, custom MS SQL port (other than 1433) can be specified in this field as follows:
 
Sql_server_name,1234
 
where 1234 is the custom port. Then specify the type of authentication to use when connecting to MSSQL Server:

  • Windows authentication - SQL Server validates the login details via Windows user information. The user has to be validated by Windows OS before access is granted.
  • SQL Server authentication - SQL Server uses the standard security validation. Specify user name and password recognized by the target SQL Server to log in.
    
In "SQL Server authentication" mode PostgreSQL to SQL Server migration tool allows to view database tables owned by the specified user only. If the user is not the database owner, tables from "dbo" tablespace are not available. Use "Connect as database owner" checkbox to bypass this restriction. It will force PostgreSQL to SQL Server converter to display all tables from "dbo" tablespace. It is expected that the specified user has enough privileges to read these tables, otherwise the option will not take effect.

3. Select Databases

On this wizard page source PostgreSQL and destination Microsoft SQL databases must be specified. If you have sufficient permissions to list databases on PostgreSQL server, drop down the combo box to select source PostgreSQL database from the list. Otherwise, type the database name in the field.

Also, log file to write execution traces of the conversion process can be specified on this page. Leave it blank to disable logging.

    
4. Conversion Settings

This wizard page is designed to specify PostgreSQL schema (drop down the combo box to select from list or enter it manually) and customize the conversion process using the following settings:

  • Convert table definitions only - select this checkbox to convert only table definitions of the original PostgreSQL database
  • Skip converting indexes - select this checkbox if you don't want to convert indexes
  • Do not include schema name - select this checkbox to not include schema name in table names. By default this option is NOT active in order to process tables with same names from different schemas.

Note: leave schema name blank to convert tables from all schemas. In this case table names will appear in the target MS SQL database in SCHEMA.TABLE format.

    
5. Select Tables

This wizard page is designed to manage the list of PostgreSQL tables to convert into SQL Server format.

In the left part of the wizard page there is "Available tables" list box. It contains all available tables of the PostgreSQL database except those that you have been selected already. On the right there is "Selected tables" list box.

To add new PostgreSQL table for migration to MS SQL server select it in "Available tables" list box and click "Add" button (or double-click the highlighted item). Use "Add all" button to add all available PostgreSQL tables.

To remove an item from "Selected tables" list select it and click "Remove" button. Use "Remove all" button to remove all items from "Selected tables" list box.