Re: Migrate from MS SQL 6.5 to postgres?? - Mailing list pgsql-general
From | martin.chantler@convergys.com |
---|---|
Subject | Re: Migrate from MS SQL 6.5 to postgres?? |
Date | |
Msg-id | OF61674FE9.A785D3CE-ON80256A03.004E78E9@cbis.com Whole thread Raw |
In response to | Migrate from MS SQL 6.5 to postgres?? ("Steve O'Hagan" <sohagan@dont-spam-me-stanger.com.hk>) |
List | pgsql-general |
Well, I am actually using Foxpro 2.0 that has no such utility and I also want to customise exactly what it does so that table/column names that are invalid (Reserved words/bad characters) are fixed automatically. Going from one SQL based RDBMS to another should be much easier as you say. Foxpro is very quirky, e.g. numeric columns can contain overflowed data and other oddities! MC "Gordon A. Runkle" <gar@no-spam-integrated-dynamics.com> on 01/03/2001 06:18:29 To: pgsql-general@postgresql.org cc: (bcc: Martin Chantler/CIMG/CVG) Subject: Re: [GENERAL] Migrate from MS SQL 6.5 to postgres?? In article <OFB13C2AF2.443BAB84-ON80256A00.003E8B1C@cbis.com>, "Unknown" <martin.chantler@convergys.com> wrote: > I have an idea that might help I found ODBC to be very slow for > importing data So I wrote a program in C that reads in dump files of SQL > text on the Linux server itself E.G. first line is a create table, next > lines are all the insert's This is very fast, 80mb of data in about 15 > minutes Only problem is the text files need to be formatted a bit > specially If you can write a program in say VB to create the text files > (one per table) it could work. If you are interested I could forward my > C program and Foxpro prg that creates the text files that you could > convert to VB Why make it so difficult? SQL Server provides a perfectly usable bulk copy utility (bcp.exe), which will haul the data out ready-to-go. H:\tmp> bcp dbname..tabname out filename.del -c -t "|" -r "\n" \ -S server -U user -P password This will pull the data out, with '|' as the field delimiter and a newline as a record separator. Now you can COPY the data in using '|' as the delimiter. If you have BLOB data types, those tables will have to be handled in another way, of course. Gordon. -- It doesn't get any easier, you just go faster. -- Greg LeMond ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) -- NOTICE: The information contained in this electronic mail transmission is intended by Convergys Corporation for the use of the named individual or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone (collect), so that the sender's address records can be corrected.
pgsql-general by date: