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

Re: MS ODBC drivers?

From: Martin_Hurst(at)dom(dot)com
To: david(at)fetter(dot)org
Cc: SF Postgres <sfpug(at)postgresql(dot)org>, sfpug-owner(at)postgresql(dot)org
Subject: Re: MS ODBC drivers?
Date: 2002-12-20 17:03:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: sfpug
If I'm reading your question correctly, you want to copy/convert/port your
MSSQLServer database/table/data over to a postgres database.

I have copied MSSQLServer tables to Postgres using MSAccess as the
intermediate step.

1) on Windows PC (I happened to be on Windows XP) configure ODBC access to
SQLServer database
2) on the same Windows PC configure Postgres ODBC drive to Postgres
3) in MSAccess link to get external data and link to the SQLServer table I
want to copy
4) in MSAccess do a file export and connect using the ODBC selection, to
your postgres database
5) this should create in your postgres database, the table and copy the
data over as well
6) mind you this does one table at a time - so if you have many tables, or,
the number of rows in your tables is in the millions, there are some other
MSAccess steps which have worked for me as well.


                    David Fetter                                                                                     
                    <david(at)fetter(dot)or       To:     SF Postgres <sfpug(at)postgresql(dot)org>                                
                    g>                     cc:                                                                       
                    Sent by:               Subject:     [sfpug] MS ODBC drivers?                                     
                    12/19/2002 01:03                                                                                 

Kind people,

I know this is a little bit out to left field, but I thought I'd ask.
I've got the, um, privilege of porting an application that ran on
MSSQL to Postgres.

The ER diagram is every RDBMS person's nightmare--all boxes, no lines.
These geniuses decided that 0 is often, but of course not always, the
same thing as NULL.  AAARRRGGGHHH!!!

Anyhow, it'd be nice if I could hook up directly to this thing
(W2K/MS-SQL) from the new box (Linux/PostgreSQL), and I believe ODBC
is a fairly straightforward way to do it.  Any pointers?
Alternatives?  Extra points if I can use Perl's DBI from the Linux

Big TIA :) :)

David Fetter david(at)fetter(dot)org
phone: +1 510 893 6100    cell: +1 415 235 3778

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)


sfpug by date

Next:From: Josh BerkusDate: 2002-12-20 17:10:39
Subject: Meeting in January
Previous:From: Matthew LanierDate: 2002-12-19 18:29:23
Subject: Re: MS ODBC drivers?

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