EnterpriseDB: The Enterprise Postgres Company Postgres Plus Forums: The PostgreSQL Open Source Database from EnterpriseDB
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 

Migration tool problems  XML

Forum Index » Tuning and Migration Wizard
Author Message
sebastien.maye

New member

Joined: 19 Jun 2012 09:43:45
Messages: 2
Offline

Hello everybody,

I'm trying to migrate my Jforum from Oracle 9i to Postgres but I face two problems:
Fisrt, the date are truncated: 'date' data type in Oracle containing "13/05/2008 09:05:40" results in "2008-05-13" (data type 'date') after migration.
Second, the data of type BLOB and CLOB after migration are displayed as hexadecimal in the forum:
\xfeff004f00750069002c002000e00020006c0027006f0063006300610.....
Il matches exactly what i see in table but I dont know why it can't be displayed correctly.
My Oracle DB parameter for NLS_CHARACTERSET is WE8MSWIN1252, and i think i made a mistake in the configuration of my Postgres DB:
CREATE DATABASE own_jforum
WITH OWNER = own_jforum_role
ENCODING = 'UTF8'
TABLESPACE = jforum_data
LC_COLLATE = 'French_France.1252'
LC_CTYPE = 'French_France.1252'
CONNECTION LIMIT = -1;
GRANT ALL ON DATABASE own_jforum TO own_jforum_role WITH GRANT OPTION;
GRANT ALL ON DATABASE own_jforum TO public;

Can someone help me ?

Thanks !!
 Filename cap.PNG [Disk] Download
 Description jforum
 Filesize 23 Kbytes
 Downloaded:  89 time(s)

raghu_r

Senior member

Joined: 28 Jan 2009 23:23:25
Messages: 158
Location: Andhra Pradesh,India
Offline

Second, the data of type BLOB and CLOB after migration are displayed as hexadecimal in the forum:
\xfeff004f00750069002c002000e00020006c0027006f0063006300610.....


To get the exact result,modify "bytea_output" parameter value from "hex" to "escape" in postgresql.conf file located under data directory and reload the PostgreSQL instance.

--Raghu

Thanks & Regards,

Raghu Ram
skypeID: raghu.ramedb

EnterpriseDB Corporation

Blog:http://raghurc.blogspot.in/
[Email] [WWW]
sebastien.maye

New member

Joined: 19 Jun 2012 09:43:45
Messages: 2
Offline

Thanks for the reply !

I tried changing this parameter but it didn't do the trick.

In my case, it was not a configuration problem. The creation script included with Jforum2 for Oracle shows columns of type BLOB and CLOB, so the Migration Toolkit converts it into "bytea". But the creation scripts for a Postgres DB indicates TEXT type column.

The data were correctly migrate, so I manualy rewrote the data with the appropriate format using this function:
credit goes to Jérôme Saboie our DBA.

After convertion, the content was displayed correctly.

Edit: In fact the conversion from Oracle DATE type (type that include hour, minute, second) to Postgres DATE type is wrong as DATE type in Postgres contains only the year, month, day. The wise way to work around this issue is to migrate the schema only (with -shemaOnly option) then update the type DATE to TIMESTAMP, and finaly migrate the data with -dataOnly option.

This message was edited 1 time. Last update was at 28 Jun 2012 03:56:14

 
Forum Index » Tuning and Migration Wizard
Go to:   
Powered by JForum 2.1.8 © JForum Team