Re: Converting from pgsql to sqlserver?

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: armindo(dot)dias(at)dhvmc(dot)pt
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Converting from pgsql to sqlserver?
Date: 2001-09-27 09:48:47
Message-ID: 3BB2F5FF.C84F47C5@tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> armindo(dot)dias(at)dhvmc(dot)pt wrote:
> >
> > Greetings.
> > I don´t know if this is the right place to ask this, sorry if this don't
> > belong here.
> > I begun this week working in a new firm. They use linux and PostgreSQL as
> > the database for the Intranet site and for the management of CV's and
> > Knowledge Management (they have an on-line system to manage and search
> > information about workers of the firm and projects they have).
> >
> > They now want to convert from the current linux/postgresql platform to
> > Windows and SQLServer.

If you stay away from IIS (and Internet as a whole) you should be quite
safe on Windows platforms ;)

see: http://news.cnet.com/news/0-1003-200-7294516.html?tag=mainstry

> > I've never worked before with linux or PostgreSQL so
> > i know nothing about the capabilities of this combo.

Should be capable enough ;)

PG dump produces mostly ANSI-SQL compatible script that will recreate
the
database. (Older versions dump suome stuff, like foreign keys as system
table modifications, so you have to modify at least that ).

You may also have to change type names, as pg_dump uses often original
postgreSQL type names and not their ANSI equivalents. (It is meant to be
primarily a backup tool, not porting tool)

The PL/PGSQL and Transact-SQL (or whatever MS calls it) are quite
different though, so any stored procs have to be rewritten.

> > My question are:
> >
> > - the PostgreSQL database has a lot of information. Is it possible to
> > migrate the data of the PostgreSQL to SQLServer in Windows? What do i need
> > to do?

pg_dump -D -a dbname

> >
> > - is it possible to migrate the tables relationships (the relational schema)
> > of the DB to SQLServer or do i have to build the DB from scratch?

pg_dump -s dbname

-------------------
Hannu

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Karel Zak 2001-09-27 10:11:15 pg_locale (Was: Re: Problem with setlocale (found in libecpg)...)
Previous Message Tatsuo Ishii 2001-09-27 09:19:32 Re: multibyte performance