Migrate from MS SQL 6.5 to postgres??

Started by Steve O'Haganabout 25 years ago7 messagesgeneral
Jump to latest
#1Steve O'Hagan
sohagan@dont-spam-me-stanger.com.hk

Any utilities around which would ease the pain involved in migrating an m$
sql6.5 database running on WinNT box to postgres running on a Linux box??

If no such utilities around - any advice on strategy to adopt??

Regards,
Steve O'Hagan

#2Martin A. Marques
martin@math.unl.edu.ar
In reply to: Steve O'Hagan (#1)
Re: Migrate from MS SQL 6.5 to postgres??

Mensaje citado por: Steve O'Hagan <sohagan@dont-spam-me-stanger.com.hk>:

Any utilities around which would ease the pain involved in migrating an
m$
sql6.5 database running on WinNT box to postgres running on a Linux
box??

If no such utilities around - any advice on strategy to adopt??

Just a few guesses.
1) ODBC?
2) I'm not sure on how MSSQL dumps, but if you can have it dump an SQL style
file, it would be easy to upload it to postgres, via psql.

Saludos... :-)

System Administration: It's a dirty job,
but someone told I had to do it.
-----------------------------------------------------------------
Mart�n Marqu�s email: martin@math.unl.edu.ar
Santa Fe - Argentina http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------

#3Noname
martin.chantler@convergys.com
In reply to: Martin A. Marques (#2)
Re: Migrate from MS SQL 6.5 to postgres??

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

Regards,
MC

"Steve O'Hagan" <sohagan@dont-spam-me-stanger.com.hk> on 26/02/2001
08:46:14

To: pgsql-general@postgresql.org
cc: (bcc: Martin Chantler/CIMG/CVG)
Subject: [GENERAL] Migrate from MS SQL 6.5 to postgres??

Any utilities around which would ease the pain involved in migrating an m$
sql6.5 database running on WinNT box to postgres running on a Linux box??

If no such utilities around - any advice on strategy to adopt??

Regards,
Steve O'Hagan

--

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.

#4Pablo Prieto
pablo.prieto@dulcesol.es
In reply to: Noname (#3)
RE: Migrate from MS SQL 6.5 to postgres??

-----Mensaje original-----
De: martin.chantler@convergys.com <martin.chantler@convergys.com>
Para: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Fecha: martes 27 de febrero de 2001 14:06
Asunto: Re: [GENERAL] Migrate from MS SQL 6.5 to postgres??

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

Hi!
I got the MS Sql Server data as Access Tables (slowly). After that I copied
the tables from Access to PostgreSQL (very fast).
The main advantage was don't overload MS SQL Server (very weak that fellow).

Greetings

Pablo

#5Ian Harding
iharding@pakrat.com
In reply to: Martin A. Marques (#2)
Re: Re: Migrate from MS SQL 6.5 to postgres??

"Martin A. Marques" wrote:

Mensaje citado por: Steve O'Hagan <sohagan@dont-spam-me-stanger.com.hk>:

Any utilities around which would ease the pain involved in migrating an
m$
sql6.5 database running on WinNT box to postgres running on a Linux
box??

If no such utilities around - any advice on strategy to adopt??

Just a few guesses.
1) ODBC?
2) I'm not sure on how MSSQL dumps, but if you can have it dump an SQL style
file, it would be easy to upload it to postgres, via psql.

Saludos... :-)

System Administration: It's a dirty job,
but someone told I had to do it.
-----------------------------------------------------------------
Mart�n Marqu�s email: martin@math.unl.edu.ar
Santa Fe - Argentina http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------

MSSQL will dump a sql file which would be useful, with some editing, in
recreating a database. It will also export to text, which would be useful for
importing data. Stored procedures will not work. You will need to rewrite
them by hand. Ugh.

Ian

#6Gordon A. Runkle
gar@no-spam-integrated-dynamics.com
In reply to: Noname (#3)
Re: 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

#7Noname
martin.chantler@convergys.com
In reply to: Gordon A. Runkle (#6)
Re: Migrate from MS SQL 6.5 to postgres??

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.