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: OFC981B743.3A0609CD-ON85256C95.005A085A@pa.dominionnet.com (view raw or flat)
Thread:
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
database
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.

-Martin



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




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!!!
</rant>

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

Big TIA :) :)

Cheers,
D
--
David Fetter david(at)fetter(dot)org http://fetter.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)





Responses

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-2014 The PostgreSQL Global Development Group