<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>I’m trying to migrate my Oracle database to PostgreSQL and have failed to do so after 2 tries. Our version of Oracle is ‘Oracle Database 10g Release 10.2.0.1.0 - 64bit Production’. Server version: CentOS 5.7<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’ve been following the instructions from here: <a href="https://fedorahosted.org/spacewalk/wiki/PostgreSQLFromOracle">https://fedorahosted.org/spacewalk/wiki/PostgreSQLFromOracle</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The output of the ‘spacewalk-dump-schema’ command is:<o:p></o:p></p><p class=MsoNormal>[root@vacslp01spacewalk 11.2]# spacewalk-dump-schema --db=spacewal --user=spacewalk --password=<password> > /tmp/spacewalk-oracle.dump<o:p></o:p></p><p class=MsoNormal>DBD::Oracle::st fetchrow_arrayref failed: ERROR fetching field 2 of 4. LOB value truncated from 30412298 to 10000000. DBI attribute LongReadLen too small and/or LongTruncOk not set [for Statement "select * from rhnactionconfigrevisionresult"] at /usr/bin/spacewalk-dump-schema line 130.<o:p></o:p></p><p class=MsoNormal>DBD::Oracle::st fetchrow_arrayref failed: ERROR fetching field 2 of 4. LOB value truncated from 30412298 to 10000000. DBI attribute LongReadLen too small and/or LongTruncOk not set [for Statement "select * from rhnactionconfigrevisionresult"] at /usr/bin/spacewalk-dump-schema line 130.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>After capturing a dump of the oracle database, I continued despite the above errors. I install and configure the postgresql server  as directed. <o:p></o:p></p><p class=MsoNormal>Here’s a list of the postgresql packages installed:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>[root@vacslp01spacewalk db_1]# rpm -qa|grep postgres<o:p></o:p></p><p class=MsoNormal>postgresql84-libs-8.4.9-1.el5_7.1<o:p></o:p></p><p class=MsoNormal>postgresql-jdbc-8.1.407-1jpp.4<o:p></o:p></p><p class=MsoNormal>postgresql84-server-8.4.9-1.el5_7.1<o:p></o:p></p><p class=MsoNormal>postgresql-libs-8.1.23-1.el5_7.2<o:p></o:p></p><p class=MsoNormal>postgresql84-8.4.9-1.el5_7.1<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Populating the  postgreSQL db didn’t produce any errors. After completing all the steps in the above mentioned wiki page, I went on and followed the instructions in <a href="https://fedorahosted.org/spacewalk/wiki/HowToUpgrade#UpgradeofSpacewalkconfiguration">https://fedorahosted.org/spacewalk/wiki/HowToUpgrade#UpgradeofSpacewalkconfiguration</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The ‘spacewalk-setup --disconnected –upgrade’ command generated the following errors:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>[root@vacslp01spacewalk data]# spacewalk-setup --disconnected --upgrade<o:p></o:p></p><p class=MsoNormal>** Database: Setting up database connection for PostgreSQL backend.<o:p></o:p></p><p class=MsoNormal>Hostname (leave empty for local)? <o:p></o:p></p><p class=MsoNormal>Database? spacewalk<o:p></o:p></p><p class=MsoNormal>Username? spacewalk<o:p></o:p></p><p class=MsoNormal>Password? <o:p></o:p></p><p class=MsoNormal>** Database: Populating database.<o:p></o:p></p><p class=MsoNormal>** Database: Skipping database population.<o:p></o:p></p><p class=MsoNormal>* Setting up users and groups.<o:p></o:p></p><p class=MsoNormal>** GPG: Initializing GPG and importing key.<o:p></o:p></p><p class=MsoNormal>You must enter an email address.<o:p></o:p></p><p class=MsoNormal>Admin Email Address? unixadmins@central1.com<o:p></o:p></p><p class=MsoNormal>* Performing initial configuration.<o:p></o:p></p><p class=MsoNormal>* Activating Spacewalk.<o:p></o:p></p><p class=MsoNormal>** Certificate not activated.<o:p></o:p></p><p class=MsoNormal>** Upgrade process requires the certificate to be activated after the schema is upgraded.<o:p></o:p></p><p class=MsoNormal>* Enabling Monitoring.<o:p></o:p></p><p class=MsoNormal>* Configuring apache SSL virtual host.<o:p></o:p></p><p class=MsoNormal>Should setup configure apache's default ssl server for you (saves original ssl.conf) [Y]? <o:p></o:p></p><p class=MsoNormal>* Configuring tomcat.<o:p></o:p></p><p class=MsoNormal>Reversed (or previously applied) patch detected!  Skipping patch.<o:p></o:p></p><p class=MsoNormal>1 out of 1 hunk ignored -- saving rejects to file web.xml.rej<o:p></o:p></p><p class=MsoNormal>* Configuring jabberd.<o:p></o:p></p><p class=MsoNormal>* Creating SSL certificates.<o:p></o:p></p><p class=MsoNormal>** Skipping SSL certificate generation.<o:p></o:p></p><p class=MsoNormal>* Deploying configuration files.<o:p></o:p></p><p class=MsoNormal>* Update configuration in database.<o:p></o:p></p><p class=MsoNormal>DBD::Pg::st execute failed: ERROR:  null value in column "category_id" violates not-null constraint<o:p></o:p></p><p class=MsoNormal>Issuing rollback() for database handle being DESTROY'd without explicit disconnect().<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>At this point, I’m stuck. Tomcat generates tonnes of exceptions. Nothing really works. That’s what I’d expect since the ‘spacewalk-setup’ command doesn’t finish.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Any help would be greatly appreciated.<o:p></o:p></p></div></body></html>