Re: MS SQL 7.0 to PostgreSQL 7.1

Поиск
Список
Период
Сортировка
От Brent R. Matzelle
Тема Re: MS SQL 7.0 to PostgreSQL 7.1
Дата
Msg-id 20010509194025.1841.qmail@web13007.mail.yahoo.com
обсуждение исходный текст
Ответ на MS SQL 7.0 to PostgreSQL 7.1  ("Ryan C. Bonham" <Ryan@srfarms.com>)
Список pgsql-general
--- "Ryan C. Bonham" <Ryan@srfarms.com> wrote:
> My question is what is the best way to import my data from MS
> SQL. I
> installed the ODBC Drivers and tried exporting using the MS
> import/export
> tool.. It successfully creates the tables, but fails to import
> any data,
> with a error stating that the relationship doesn't exist. So
> there goes the
> easy route and MS POS tool.. What's the correct way of doing
> this??  Thanks
> in advance

First, verify that all of the data types of the old SQL Server
tables were correctly converted to Postgres.  Then to transfer
the rest of the data over use the MS bulk copy (bcp) tool or the
export tool (MSSQL 7 or higher I believe) to create
tab-delimited  dump files for each table.  Then you must add
this to the beginning of each dump file: { COPY "table_name"
FROM stdin; } And add a { \. } at the end of the dump file.
Then you can use { psql -f table_name.dump } to import the data
from the dump files.

Brent

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

В списке pgsql-general по дате отправления:

Предыдущее
От: Jeff Daugherty
Дата:
Сообщение: Re: more-than-one-SERIAL column per table
Следующее
От: Gilles DAROLD
Дата:
Сообщение: Re: Oracle to Pg tool