This did the trick, I removed spacewalk-setup-postgresql package and executed "spacewalk-setup --db-only --external-db" After that I was able to populate postgres DB without errors, and the system was back up and running with postgresql backend.
I just have to check the functionality's are all OK. @Milan Zázrivec: Thank you wary much for your help and guidance BR -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Milan Zázrivec Sent: Wednesday, January 08, 2014 5:00 PM To: [email protected] Subject: Re: [Spacewalk-list] FW: OracleXE to Postgresql mig problem On Wednesday 08 January 2014 15:50:28 Željko Dokman wrote: > If I remove spacewalk-setup-postgresql package and run > "spacewalk-setup --db-only" I get the following error... > > [root@skynet tmp]# spacewalk-setup --db-only > ** Database: Setting up database connection for PostgreSQL backend. > The spacewalk-setup-postgresql does not seem to be available. > You might want to use --external-db command line option. Please append the --external-db command line option to spacewalk-setup: spacewalk-setup --db-only --external-db -MZ > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Milan Zázrivec > Sent: Wednesday, January 08, 2014 4:34 PM > To: [email protected] > Subject: Re: [Spacewalk-list] FW: OracleXE to Postgresql mig problem > > On Wednesday 08 January 2014 14:50:42 Željko Dokman wrote: > > I removed and installed again spacewalk-setup-postgresql package, > > and repeated steps... ....but unfortunate the same error recurs > > You should not be installing spacewalk-setup-postgresql. Just remove > it and run spacewalk-setup. > > -MZ > > > [root@skynet ~]# spacewalk-setup --db-only > > ** Database: Setting up database connection for PostgreSQL backend. > > Database "rhnschema" already exists > > The embedded database appears to be already installed. Either rerun > > this script with the --skip-db-install option, or use the > > '/usr/bin/spacewalk-setup-postgresql remove --db rhnschema --user rhnuser' > > script to remove the embedded database and try again. > > > > [root@skynet ~]# /usr/bin/spacewalk-setup-postgresql remove --db > > rhnschema --user rhnuser > > > > [root@skynet ~]# spacewalk-setup --db-only > > ** Database: Setting up database connection for PostgreSQL backend. > > Database "rhnschema" does not exist > > ** Database: Installing the database: > > ** Database: This is a long process that is logged in: > > ** Database: /var/log/rhn/install_db.log > > *** Progress: # > > ** Database: Installation complete. > > ** Database: Populating database. > > *** Progress: #################################### > > > > [root@skynet ~]# PGPASSWORD=spacewalk psql -a -U spaceuser > > spaceschema psql (8.4.18) Type "help" for help. > > spaceschema=# \d > > No relations found. > > spaceschema=# \d log > > Did not find any relation named "log". > > spaceschema=# \q > > > > [root@skynet tmp]# PGPASSWORD=spacewalk psql -h localhost -U > > spaceuser spaceschema < spacewalk-oracle.dump UPDATE 0 > > ERROR: relation "log" does not exist > > > > > > Best regards > > > > -----Original Message----- > > From: [email protected] > > [mailto:[email protected]] On Behalf Of Milan > > Zázrivec > > Sent: Wednesday, January 08, 2014 2:58 PM > > To: [email protected] > > Subject: Re: [Spacewalk-list] FW: OracleXE to Postgresql mig problem > > > > On Wednesday 08 January 2014 13:34:40 Željko Dokman wrote: > > > Here is the output.. > > > > > > [root@skynet ~]# PGPASSWORD=******* psql -a -U spaceuser > > > spaceschema psql (8.4.18) Type "help" for help. > > > > > > spaceschema=# \d log > > > Did not find any relation named "log". > > > spaceschema=# \d > > > No relations found. > > > spaceschema=# > > > > Right. So you have no tables in your PG spaceschema. This explains > > the original error you showed in your initial posting. > > > > My recommendation is to: > > > > 1. first, uninstall spacewalk-setup-postgresql package from your > > Spacewalk installation 2. then go through the migration procedure > > again, starting with the part where you're supposed to run > > spacewalk-setup --db-only > > > > -MZ > > > > > -----Original Message----- > > > From: [email protected] > > > [mailto:[email protected]] On Behalf Of Milan > > > Zázrivec > > > Sent: Wednesday, January 08, 2014 1:59 PM > > > To: [email protected] > > > Subject: Re: [Spacewalk-list] FW: OracleXE to Postgresql mig > > > problem > > > > > > On Wednesday 08 January 2014 12:09:56 Željko Dokman wrote: > > > > One more appeal for help before abandoning migration plan > > > > > > When you connect to your PG database with psql, do you see the 'log' > > > table created? > > > > > > spaceschema=# \d log > > > > > > or what tables do you see created in your PG schema? > > > > > > spaceschema=# \d > > > > > > -MZ > > > > > > > -----Original Message----- > > > > From: Željko Dokman > > > > Sent: Tuesday, January 07, 2014 12:19 PM > > > > To: [email protected] > > > > Subject: RE: [Spacewalk-list] OracleXE to Postgresql mig problem > > > > > > > > Spacewalk versions match, and the log populate_db.log is > > > > attached, I don’t see any errors in the log > > > > > > > > [root@skynet rhn]# rpm -q spacewalk-schema > > > > spacewalk-schema-2.0.2-1.el5 > > > > [root@skynet rhn]# rhn-schema-version > > > > 2.0.2-1.el5 > > > > > > > > Best regards > > > > > > > > > > > > -----Original Message----- > > > > From: [email protected] > > > > [mailto:[email protected]] On Behalf Of Milan > > > > Zázrivec > > > > Sent: Tuesday, January 07, 2014 11:39 AM > > > > To: [email protected] > > > > Subject: Re: [Spacewalk-list] OracleXE to Postgresql mig problem > > > > > > > > On Tuesday 07 January 2014 10:13:01 Željko Dokman wrote: > > > > > I got this error.. > > > > > > > > > > > > > > > > > > > > spaceschema=# create table log; > > > > > > > > > > ERROR: syntax error at or near ";" > > > > > > > > > > LINE 1: create table log; > > > > > > > > You should not be creating any tables manually. Not when you're > > > > following the process described at the page you referenced earlier. > > > > > > > > Here's how the Ora->Pg migration process works: > > > > 1. you have a Spacewalk version x, using Oracle DB backend 2. > > > > you create a DB dump from your Oracle DB in a format consumable > > > > by PostgreSQL database 3. you install a PostgreSQL database server 4. > > > > you install the database schema to your PostgreSQL database > > > > (that spacewalk-setup --db-only step). Here the schema version > > > > installed in your Oracle DB and the schema version you just > > > > installed into your PG database have to match. What's> the > > > > schema version in your > > > > > > > > Oracle DB? Run: > > > > $ rhn-schema-version > > > > > > > > What's the version you just installed into your PG database? > > > > Presumably, > > > > > > > > it's: > > > > $ rpm -q spacewalk-schema > > > > > > > > The final step is to load the dump you created in step two into > > > > your PG schema. Here the process for you fails, b/c the table > > > > 'log' in your PG schema does not exist (but it does exist in > > > > your Oracle schema). > > > > > > > > This may indicate that: > > > > 1. for some reason, the schema you just installed into your PG > > > > does not match your Oracle schema (not sure how this could have > > > > happened > > > > though) 2. there was a problem populating your PG schema and the > > > > log table (or perhaps other tables too) were not properly created. > > > > For this, > > > > you> > > > > > > > > should check the following file for errors: > > > > /var/log/rhn/populate_db.log > > > > > > > > Regards > > > > -MZ > > > > > > > > _______________________________________________ > > > > Spacewalk-list mailing list > > > > [email protected] > > > > https://www.redhat.com/mailman/listinfo/spacewalk-list > > > > > > _______________________________________________ > > > Spacewalk-list mailing list > > > [email protected] > > > https://www.redhat.com/mailman/listinfo/spacewalk-list > > > > _______________________________________________ > > Spacewalk-list mailing list > > [email protected] > > https://www.redhat.com/mailman/listinfo/spacewalk-list > > _______________________________________________ > Spacewalk-list mailing list > [email protected] > https://www.redhat.com/mailman/listinfo/spacewalk-list _______________________________________________ Spacewalk-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/spacewalk-list
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Spacewalk-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/spacewalk-list
