Thread: Migrating from a DB2/400 to Postgres.
Hello, I have no experience of AS400 but I might be finding myself migrating a database from db2/400 to postgres/linux shortly. I suppose it is a question of making a dump on the db2 and then importing it to postgres. (The fact that I get more search hits on db2 *core* dumps than data dumps is not so incouraging...) Does anybody know what the incompatibilities between these two file-formats might be, i.e dump format of db2 and import/populate format of postgres? Is there some general file format incompatibilities between as400 and linux/unix??? Might it be wiser to do an intermediary step to a linux db2? On another note, anybody know how postgres competes with db2? Questions, questions.. now ideas and answers, yes? Cheers, -- Adam Huuva / Easter-eggs Spécialiste GNU/Linux 44-46 rue de l'Ouest - 75014 Paris - France - Métro Gaité Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76 mailto:sventon@easter-eggs.com - http://www.easter-eggs.com
It may be possible to dump each table to a file on the AS/400 and FTP it to a PC I am not certain how this could be done but it should be possible. If the database is not too big I would be tempted to use an ODBC link to extract the data directly into postgres from a VB/Java program that has ODBC connection to postgres and the 400 Don't forget the useful SYS tables on the 400 (SYSCOLUMNS,SYSTABLES,etc) that define the database, these can be very useful As for how postgres compares with db2/400, postgres is 1000 times more advanced. DB2/400 doesn't have full SQL implementation, its basic but can run quickly MC. Adam Huuva <sventon@easter-eggs.com> on 28/03/2001 10:56:30 To: pgsql-general@postgresql.org cc: (bcc: Martin Chantler/CIMG/CVG) Subject: [GENERAL] Migrating from a DB2/400 to Postgres. Hello, I have no experience of AS400 but I might be finding myself migrating a database from db2/400 to postgres/linux shortly. I suppose it is a question of making a dump on the db2 and then importing it to postgres. (The fact that I get more search hits on db2 *core* dumps than data dumps is not so incouraging...) Does anybody know what the incompatibilities between these two file-formats might be, i.e dump format of db2 and import/populate format of postgres? Is there some general file format incompatibilities between as400 and linux/unix??? Might it be wiser to do an intermediary step to a linux db2? On another note, anybody know how postgres competes with db2? Questions, questions.. now ideas and answers, yes? Cheers, -- Adam Huuva / Easter-eggs Spécialiste GNU/Linux 44-46 rue de l'Ouest - 75014 Paris - France - Métro Gaité Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76 mailto:sventon@easter-eggs.com - http://www.easter-eggs.com ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html -- 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.
Hello. I am occasionally (seemingly randomly) seeing the following error when I try to load a large object. FastPath call returned ERROR: lo_close: invalid large obj descriptor (0) at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:141) at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:191) at org.postgresql.largeobject.LargeObject.close(LargeObject.java:105) at org.postgresql.jdbc2.ResultSet.getBytes(ResultSet.java:371) at org.postgresql.jdbc2.ResultSet.getBytes(ResultSet.java:580) at com.commnav.sbh.framework.persist.JDBCEngine2.loadResultSet(JDBCEngine2.java :259) at com.commnav.sbh.framework.persist.JDBCEngine2.load(JDBCEngine2.java:156) at com.commnav.sbh.framework.persist.PersistenceObject.load(PersistenceObject.j ava:147) Can someone give me some insight on this? Can I call lo_close explicitly if i get this error? Can I ignore it or will that leave me with open resources? thanks chris
At 07:56 28/03/01 -0500, chris markiewicz wrote: >Hello. > >I am occasionally (seemingly randomly) seeing the following error when I try >to load a large object. > >FastPath call returned ERROR: lo_close: invalid large obj descriptor (0) You must setAutoCommit(false) before using any large object. Can someone give me some insight on this? Can I call lo_close explicitly if >i get this error? Can I ignore it or will that leave me with open >resources? There are no open resources at the time of the error. Because lo's need to be within a transaction when the transaction closes, so do the lo's. Peter
Regarding the fastpath error (ERROR: lo_close: invalid large obj descriptor (0)...i also get this with lo_tell, etc)... is there any possible cause that is not related to autoCommit? our app does a lot of transactional stuff so autocommit is set to false for all connections (i added some logging that shows me the autocommit attribute and it's false even when this error occurs)...i still see this problem occasionally/randomly. i appreciate your help. chris -----Original Message----- From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Peter Mount Sent: Thursday, March 29, 2001 4:13 AM To: cmarkiew@commnav.com; pgsql-general@postgresql.org Subject: Re: fastpath error? At 07:56 28/03/01 -0500, chris markiewicz wrote: >Hello. > >I am occasionally (seemingly randomly) seeing the following error when I try >to load a large object. > >FastPath call returned ERROR: lo_close: invalid large obj descriptor (0) You must setAutoCommit(false) before using any large object. Can someone give me some insight on this? Can I call lo_close explicitly if >i get this error? Can I ignore it or will that leave me with open >resources? There are no open resources at the time of the error. Because lo's need to be within a transaction when the transaction closes, so do the lo's. Peter ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster
Hello. I'm still having problems with this FastPath error. As I mentioned, autoCommit is always set to 'false' in our system, so could there be another source of this? Another angle - Can it be ignored? For example, if I get the error during lo_close and ignore it, am I okay? If so, what exception am I looking for? From the stack trace, it seems that it's just a java.lang.Exception - not a SQLException....Do I just grab the text of the exception and look for "FastPath" or is there a better way? I really appreciate your help. chris -----Original Message----- From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org]On Behalf Of chris markiewicz Sent: Thursday, April 12, 2001 9:36 AM To: 'Peter Mount'; pgsql-general@postgresql.org; pgsql-jdbc@postgresql.org Cc: chris.markiewicz@commnav.com Subject: [JDBC] RE: fastpath error? Regarding the fastpath error (ERROR: lo_close: invalid large obj descriptor (0)...i also get this with lo_tell, etc)... is there any possible cause that is not related to autoCommit? our app does a lot of transactional stuff so autocommit is set to false for all connections (i added some logging that shows me the autocommit attribute and it's false even when this error occurs)...i still see this problem occasionally/randomly. i appreciate your help. chris -----Original Message----- From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Peter Mount Sent: Thursday, March 29, 2001 4:13 AM To: cmarkiew@commnav.com; pgsql-general@postgresql.org Subject: Re: fastpath error? At 07:56 28/03/01 -0500, chris markiewicz wrote: >Hello. > >I am occasionally (seemingly randomly) seeing the following error when I try >to load a large object. > >FastPath call returned ERROR: lo_close: invalid large obj descriptor (0) You must setAutoCommit(false) before using any large object. Can someone give me some insight on this? Can I call lo_close explicitly if >i get this error? Can I ignore it or will that leave me with open >resources? There are no open resources at the time of the error. Because lo's need to be within a transaction when the transaction closes, so do the lo's. Peter ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster