[Spacewalk-list] Please help with Oracle to PostgreSQL migration
Jan Pazdziora
jpazdziora at redhat.com
Tue Nov 22 12:31:55 UTC 2011
On Mon, Nov 21, 2011 at 12:47:12PM -0800, James Fillman wrote:
> Thanks for the help Jan,
>
> I increased the LongReadLen value. That fixed the initial problem. I am still left with another error:
>
> [root at vacslp01spacewalk db_1]# spacewalk-dump-schema --db=spacewal --user=spacewalk --password=spacewalk > /tmp/oracle-dump.sql
> Malformed UTF-8 character (fatal) at /usr/bin/spacewalk-dump-schema line 121.
>
> Any suggestions on this one??
Could you try
diff --git a/utils/spacewalk-dump-schema b/utils/spacewalk-dump-schema
index 0068ed4..b40593b 100755
--- a/utils/spacewalk-dump-schema
+++ b/utils/spacewalk-dump-schema
@@ -118,8 +118,9 @@ sub process_table {
} elsif ($types[$i] eq 'unknown' or $types[$i] eq 'BLOB') { # blobs
$row->[$i] =~ s!(.)! sprintf "\\\\%03o", ord($1) !seg;
} else {
+ utf8::encode($row->[$i]);
$row->[$i] =~ s!([\x00-\x1f\x5c])! sprintf "\\x%02x", ord($1) !seg;
- utf8::encode($row->[$i]); utf8::decode($row->[$i]);
+ utf8::decode($row->[$i]);
}
print $row->[$i];
} else {
?
--
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat
More information about the Spacewalk-list
mailing list