In the modern IT world SQL Server and PostgreSQL are known as popular relational database management systems enriched with wide range of administration tools and programming APIs. However, Microsoft SQL has valuable disadvantages compared to PostgreSQL – restrictive licensing policy and high total cost of ownership. This is the primary reason of why particular businesses and organizations consider converting their databases from MS SQL to PostgreSQL.
Basically, procedure of database migration is a sequence of export and import operations that must cover all database objects. It is applied to SQL Server to PostgreSQL migration as follows:
- export MS SQL table definitions as SQL data definition (DDL) statement
- convert DDL statements into PostgreSQL format and import it into the destination database
- export SQL Server data into comma separated values (CSV) files
- convert these CSV files according to PostgreSQL format and load into the destination database
- export views, stored procedures and triggers from MS SQL database as SQL code
- convert this code into PostgreSQL dialect and import it into the destination database
There are special software products that can automate database migration from SQL Server to PostgreSQL. One of such tools to convert sql to postgresql is provided by Intelligent Converters, software company offering solutions for database migration and synchronization since 2001. Their SQL Server to PostgreSQL converter provides extremely high performance due to direct connection and bulk insert techniques implemented in the product.
Other features of SQL Server to PostgreSQL converter:
- all versions of SQL Server and PostgreSQL are supported (including cloud variations)
- command line support allows to automate the conversion process
- option to merge or synchronize existing PostgreSQL database with MS SQL data
- composing SELECT-queries allows to filter data for conversion
- custom column mapping allows to change column name, type and other properties in the resulting database (as well as to exclude particular columns from the conversion)
- option to export the data into a local SQL script file instead of migrating to PostgreSQL server can help when the target server does not allow remote connection
SQL Server to PostgreSQL converter comes with unlimited support and 1 year subscription for updates.