Thursday, March 29, 2012

Converting database to MS-SQLServer from PostGRESQL

Forgive me if this question is a bit too generic, if it is, feel free to
just not respond.

I have a database which has been running in PostgreSQL for a number of
years at this stage which I want to port into MS SQL server.

It seems that the SQL that Postgre outputs when I do a backup is not
syntactically correct within MS-SQL server.

My question is, does anyone have any documentation on how to convert a
database from the Postgre platform to SQL server? Is it possible using
an ODBC connection to import a database structure including table
definitions, views etc into SQL Server?

Failing this, does anyone have any suggestions on where I might start -
I did attempt to go through the SQL code and modify it to suit SQL
server, but it's about 3,500 lines of code excluding the insert
statements (which themselves are also wrong) and almost every line needs
something changed when comparing SQL syntax from Postgre to MSSQL server

Thanks in advance for any comments/suggestions.

Engada.

--
Posted via a free Usenet account from http://www.teranews.comEngada wrote:

Quote:

Originally Posted by

I have a database which has been running in PostgreSQL for a number of
years at this stage which I want to port into MS SQL server.
>
It seems that the SQL that Postgre outputs when I do a backup is not
syntactically correct within MS-SQL server.


pg_dump has a number of flags that may help, e.g. --inserts

What specific types of syntax errors do you encounter?

Googling (PostgreSQL export) turns up some third-party programs designed
to simplify this type of port.

No comments:

Post a Comment