Skip site navigation (1) Skip section navigation (2)

Re: Data migration to sql server 2008

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: karthi keyan <karthi2itnet(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Data migration to sql server 2008
Date: 2012-08-10 05:19:56
Message-ID: 502499FC.6050505@ringerc.id.au (view raw or flat)
Thread:
Lists: pgsql-admin
On 08/10/2012 12:35 PM, karthi keyan wrote:
>
>
> Actually my need is import data from PostgreSQL  , and the same 
> process into sql server.
>
I'm guessing you didn't see what I wrote in reply to your message, where 
I said:

You haven't really shown enough information. In particular, where does 
this 'Postgre' variable/table/whatever come from? What is it?

You should look at the PostgreSQL server logs to see if PostgreSQL is 
sending an error when you attempt the connection and if so, what it is. 
Consider also setting log_statement = 'all' in postgresql.conf so you 
can see exactly what queries this "openquery" tool runs against PostgreSQL.


By the way, the easiest way to do this sort of thing is usually to

     COPY tablename TO '/some/file.csv' CSV

from PostgreSQL, then load that file into MS SQL server. That's trivial 
to script with vbscript or whatever you prefer, using psql to get the 
data out of PostgreSQL.

--
Craig Ringer

In response to

pgsql-admin by date

Next:From: Haifeng LiuDate: 2012-08-10 06:56:02
Subject: JDBC keep alive issue
Previous:From: Craig RingerDate: 2012-08-10 05:08:24
Subject: Re: Question about ALTER TABLE DROP CONSTRAINT on 9.1 -- psql crashes

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group