Re: Migrating PostgreSQL Stored Procedures to MSSQL 2019 for example

2022-08-14 Thread hector vass
I would suggest no easy way with a tool .. postgresql is powerful because
you can write functions in different languages in addition to PLpgSQL so
python,perl,tcl,js,c++ and there are many popular extensions.  So very
possible to encapsulate complex application/business logic within
database.  But if it is just a database with a bit of PLpgSQL to expose
data to a front end application that does all the work then maybe a tool
might work.  You may have noticed how powerful AWS SCT is converting MSSQL
& Oracle to Postgresql but alas will I believe only convert Postgresql to
Postres alike databases Aurora and MySQL ...
Not to say someone somewhere hasn’t but a claimed strength of Postgresql is
probably a hindrance in this instance.


Hector Vass
Data Engineer
07773 352559

On Fri, 12 Aug 2022, 11:24 Scott Simpson,  wrote:

> Hi,
>
> I need to migrate many PostgreSQL Stored Procedures and functions to MSSQL.
>
> I can find anything online that seems to handle this task.
>
> Are there any tools that you have that can do this job?
>
>
> *Kind Regards*
>
>
> *Zellis* | Scott Simpson | Senior Engineer
>
>
>
> Thorpe Park
>
> United Kingdom
>
> Work : +44 (0)20 3986 3523
>
> Email : scott.simp...@zellis.com 
>
> Web : www.Zellis.com 
>
>
> --
>
> *Zellis is the trading name for Zellis Holdings Ltd and its associated
> companies “Zellis”.*
>
> The contents of this email are confidential to Zellis and are solely for
> the use of the intended recipient. If you received this email in error,
> please inform the sender immediately and delete the email from your system.
> Unless Zellis have given you express permission to do so, please do not
> disclose, distribute or copy the contents of this email.
>
> Unless this email expressly states that it is a contractual offer or
> acceptance, it is not sent with the intention of creating a legal
> relationship and does not constitute an offer or acceptance which could
> give rise to a contract.
>
> Any views expressed in this email are those of the individual sender
> unless the email specifically states them to be the views of Zellis.
>
> Zellis Holdings Ltd - registered in England and Wales - Company No:
> 10975623 - Registered Office: 740 Waterside Drive, Aztec West, Almondsbury,
> Bristol, BS32 4UF, UK.
>


RE: Migrating PostgreSQL Stored Procedures to MSSQL 2019 for example

2022-08-12 Thread Joel Rabinovitch
Hi,

When we did our migration from SQL Server to PostgreSQL, we mainly used two 
tools:

sqlserver2pgsql for most of our schema-related changes. You can find that here: 
https://github.com/dalibo/sqlserver2pgsql.
AWS Schema Conversion Tool (SCT) for migrating views and stored 
functions/procedures. The AWS SCT also can do schema conversions. You can find 
that here: https://aws.amazon.com/dms/schema-conversion-tool/

For the AWS SCT tool, you don't really need to use AWS schemas. You can install 
PostgreSQL locally, and save the SQL files it generates and then apply them 
yourself. Not sure if that's a violation of their license terms though (our 
company does use AWS).

Keep in mind that these conversion tools do the majority of the work, but the 
output they generate needs to be reviewed. For example, columns with an 
isjson() constraint need to be converted to json or jsonb columns. Stored 
procedures/functions sometimes don't convert at all.

The following sites also provide the ability to conversion SQL statements using 
SQL Server-specific syntax to PostgreSQL.

https://www.jooq.org/translate/
https://www.sqlines.com/online
https://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL

Hope this helps,

Joel

From: Scott Simpson 
Sent: Friday, August 12, 2022 6:17 AM
To: pgsql-general@lists.postgresql.org
Subject: Migrating PostgreSQL Stored Procedures to MSSQL 2019 for example

ATTENTION: This email originated from outside of Tecsys. Use caution when 
clicking links or opening attachments. | Ce courriel provient de l'extérieur de 
Tecsys. Soyez prudent lorsque vous cliquez sur des liens ou ouvrez des pièces 
jointes.

Hi,

I need to migrate many PostgreSQL Stored Procedures and functions to MSSQL.

I can find anything online that seems to handle this task.

Are there any tools that you have that can do this job?



Kind Regards



Zellis | Scott Simpson | Senior Engineer



[cid:image001.png@01D8AE1E.AC41B970]

Thorpe Park

United Kingdom

Work : +44 (0)20 3986 3523

Email : scott.simp...@zellis.com<mailto:daniel.mu...@zellis.com>

Web : 
www.Zellis.com<https://can01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.zellis.com%2F=05%7C01%7Cjoel.rabinovitch%40tecsys.com%7C762cd705576d4016009c08da7c4cd80b%7C46ced3a460654b729d5e79ecf873728d%7C1%7C0%7C637958966882847800%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000%7C%7C%7C=lLkM8bdzrQiTQeJxEVnWLKxv3mrD6ImxtCxLIWkHyi8%3D=0>





Zellis is the trading name for Zellis Holdings Ltd and its associated companies 
"Zellis".

The contents of this email are confidential to Zellis and are solely for the 
use of the intended recipient. If you received this email in error, please 
inform the sender immediately and delete the email from your system. Unless 
Zellis have given you express permission to do so, please do not disclose, 
distribute or copy the contents of this email.

Unless this email expressly states that it is a contractual offer or 
acceptance, it is not sent with the intention of creating a legal relationship 
and does not constitute an offer or acceptance which could give rise to a 
contract.

Any views expressed in this email are those of the individual sender unless the 
email specifically states them to be the views of Zellis.

Zellis Holdings Ltd - registered in England and Wales - Company No: 10975623 - 
Registered Office: 740 Waterside Drive, Aztec West, Almondsbury, Bristol, BS32 
4UF, UK.


Migrating PostgreSQL Stored Procedures to MSSQL 2019 for example

2022-08-12 Thread Scott Simpson
Hi,

I need to migrate many PostgreSQL Stored Procedures and functions to MSSQL.

I can find anything online that seems to handle this task.

Are there any tools that you have that can do this job?



Kind Regards


Zellis | Scott Simpson | Senior Engineer


[cid:5fb64814-9f57-4720-868b-dd396f48d6c5]

Thorpe Park

United Kingdom

Work : +44 (0)20 3986 3523

Email : scott.simp...@zellis.com

Web : www.Zellis.com




Zellis is the trading name for Zellis Holdings Ltd and its associated companies 
"Zellis".

The contents of this email are confidential to Zellis and are solely for the 
use of the intended recipient. If you received this email in error, please 
inform the sender immediately and delete the email from your system. Unless 
Zellis have given you express permission to do so, please do not disclose, 
distribute or copy the contents of this email.

Unless this email expressly states that it is a contractual offer or 
acceptance, it is not sent with the intention of creating a legal relationship 
and does not constitute an offer or acceptance which could give rise to a 
contract.

Any views expressed in this email are those of the individual sender unless the 
email specifically states them to be the views of Zellis.

Zellis Holdings Ltd - registered in England and Wales - Company No: 10975623 - 
Registered Office: 740 Waterside Drive, Aztec West, Almondsbury, Bristol, BS32 
4UF, UK.