Re: Migrating DAta from MSSQL to postgre
От | scott.marlowe |
---|---|
Тема | Re: Migrating DAta from MSSQL to postgre |
Дата | |
Msg-id | Pine.LNX.4.33.0211260912470.8844-100000@css120.ihs.com обсуждение исходный текст |
Ответ на | Migrating DAta from MSSQL to postgre (Savita <savita@india.hp.com>) |
Список | pgsql-general |
On Tue, 26 Nov 2002, Savita wrote: > Hi All, > > I need some help to migrate data from MSSQL to Postgres. > > I have the following a scnirio like. > > 1.I have a table in MSSQL. > 2.I have another table in Postgres with different name and schema from the one > which is present in MSSQL. > > Is it possible to migrate data from the table which is present in MSSQL to > Postgres. Sure. But I'm not sure what you're asking exactly. Are you wanting to move data from tablea in the MSSQL to tablea in Postgresql, even though they have different schema? Or do you want to make a new tableb in Postgresql to take in the data from tablea in MSSQL? Or maybe a new database so you can use the name tablea from MSSQL in Postgresql? Generally, I've found it pretty easy to use ODBC and open a connection to each database and then just 'select * from sourcetable' and the iterate over the result set and build a whole bunch of 'insert into desttable (f1,f2,f3,...fn) values ('v1','v2','v3',...'vn');' and wrap them up in a begin;commit; pair. The other method is to dump the data to a text file on the MSSQL side and then use /copy to suck the data in. Both are pretty fast in my experience, but the /copy is a little faster than the inserts.
В списке pgsql-general по дате отправления: