Thread: Migration from SQL Server to PostgeSQL

Migration from SQL Server to PostgeSQL

From
"Muthukumar.GK"
Date:
HiTeam,

We need to migrate tables,Records,Procedure and function from SQL server to Postgresql. Kindly let me know, Is there any  tool or easiest way  available to migrate from SQL Server to Postgresql. Please let me know if there are any limitations in postgresql compared to SQL server.

Regards
Muthu.

Re: Migration from SQL Server to PostgeSQL

From
Pavel Stehule
Date:


po 30. 11. 2020 v 6:12 odesílatel Muthukumar.GK <muthankumar@gmail.com> napsal:
HiTeam,

We need to migrate tables,Records,Procedure and function from SQL server to Postgresql. Kindly let me know, Is there any  tool or easiest way  available to migrate from SQL Server to Postgresql. Please let me know if there are any limitations in postgresql compared to SQL server.

The migration from MSSQL can be difficult, and needs a lot of manual work. The concept of procedures is very different. In MSSQL is natural returning multirecordset from procedures. This is not possible in Postgres, where design of procedures (or all design) is similar to Oracle. It is possible. I know some customers that did successful migrations from Sybase to Postgres (Sybase had the same roots like MSSQL).

Regards

Pavel


Regards
Muthu.

Re: Migration from SQL Server to PostgeSQL

From
"Muthukumar.GK"
Date:
Hi Pavel,

Kindly let me know the following functionality can be possible in postgresql. If possible,provide me with a sample program.

1. Call the procedure from/inside another procedure  and insert the result set into Temp Table.
2. Creating Dynamic procedure in postgresql. because We have dynamic procedure in SQL server, On execution of this  Procedure, another two procedures will be Created dynamically.


Regards
Muthu

On Mon, Nov 30, 2020 at 11:02 AM Pavel Stehule <pavel.stehule@gmail.com> wrote:


po 30. 11. 2020 v 6:12 odesílatel Muthukumar.GK <muthankumar@gmail.com> napsal:
HiTeam,

We need to migrate tables,Records,Procedure and function from SQL server to Postgresql. Kindly let me know, Is there any  tool or easiest way  available to migrate from SQL Server to Postgresql. Please let me know if there are any limitations in postgresql compared to SQL server.

The migration from MSSQL can be difficult, and needs a lot of manual work. The concept of procedures is very different. In MSSQL is natural returning multirecordset from procedures. This is not possible in Postgres, where design of procedures (or all design) is similar to Oracle. It is possible. I know some customers that did successful migrations from Sybase to Postgres (Sybase had the same roots like MSSQL).

Regards

Pavel


Regards
Muthu.

Re: Migration from SQL Server to PostgeSQL

From
Pavel Stehule
Date:


po 30. 11. 2020 v 7:06 odesílatel Muthukumar.GK <muthankumar@gmail.com> napsal:
Hi Pavel,

Kindly let me know the following functionality can be possible in postgresql. If possible,provide me with a sample program.

1. Call the procedure from/inside another procedure  and insert the result set into Temp Table.

it is possible

2. Creating Dynamic procedure in postgresql. because We have dynamic procedure in SQL server, On execution of this  Procedure, another two procedures will be Created dynamically.

I don't know what dynamic procedure is.




Regards
Muthu

On Mon, Nov 30, 2020 at 11:02 AM Pavel Stehule <pavel.stehule@gmail.com> wrote:


po 30. 11. 2020 v 6:12 odesílatel Muthukumar.GK <muthankumar@gmail.com> napsal:
HiTeam,

We need to migrate tables,Records,Procedure and function from SQL server to Postgresql. Kindly let me know, Is there any  tool or easiest way  available to migrate from SQL Server to Postgresql. Please let me know if there are any limitations in postgresql compared to SQL server.

The migration from MSSQL can be difficult, and needs a lot of manual work. The concept of procedures is very different. In MSSQL is natural returning multirecordset from procedures. This is not possible in Postgres, where design of procedures (or all design) is similar to Oracle. It is possible. I know some customers that did successful migrations from Sybase to Postgres (Sybase had the same roots like MSSQL).

Regards

Pavel


Regards
Muthu.

Re: Migration from SQL Server to PostgeSQL

From
Thibaut Madelaine
Date:


Le 30/11/2020 à 06:11, Muthukumar.GK a écrit :
HiTeam,

We need to migrate tables,Records,Procedure and function from SQL server to Postgresql. Kindly let me know, Is there any  tool or easiest way  available to migrate from SQL Server to Postgresql. Please let me know if there are any limitations in postgresql compared to SQL server.

Regards
Muthu.

Hello Muthukumar,

We maintain a tool to migrate from SQL Server to PostgreSQL: sqlserver2pgsql

You can use it to convert your SQL schema.
It can generate Pentaho Data Integrator (Kettle) job to migrate all the data.

Unfortunately , it does not migrate procedures and functions. Transact-SQL is very different from PostgreSQL's many PL languages. These would need a manual migration.

Hope this tool can be of any help!

Cordialement,

Thibaut

-- 
Thibaut Madelaine
Dalibo Support PostgreSQL
Attachment