Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Converting database to MS-SQLServer from PostGRESQL

0 views
Skip to first unread message

Engada

unread,
Nov 19, 2006, 3:02:24 AM11/19/06
to
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.com

Ed Murphy

unread,
Nov 23, 2006, 4:11:25 AM11/23/06
to
Engada wrote:

> 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.

0 new messages