[Spacewalk-list] Spacewalk 2.4 Migration from Oracle to Postgresql

Jan Dobes jdobes at redhat.com
Fri Feb 12 16:31:06 UTC 2016


On 12.2.2016 17:18 Murdoch, Steven wrote:
> Can you Help?
>
> I am using Spacewalk 2.4 with an Oracle DB.
> I need to migrate from Oracle to PostgreSQL.
>
> I have been following this link to migrate from Oracle to PostgreSQL:
>
> https://fedorahosted.org/spacewalk/wiki/DatabaseMigrations
>
> Got as far as trying to load my dump file into my new database, but I
> get this error:
> Running this command:
>
> *# spacewalk-sql -i < migrate-to-postgresql.sql*
>
> UPDATE 685
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ALTER TABLE
>
> ERROR:  relation "rhn_command_queue_sessions" does not exist
>
> #
>
> Before the above error – I ran this, and this worked ok.
> *# spacewalk-setup-postgresql create --db postgresql  --user postgresql
> --password xxxxxxxx
> *….
> #
>
>
> I then ran this and this worked!
> *# spacewalk-setup --db-only --external-postgresql*
>
> ** Database: Setting up database connection for PostgreSQL backend.
>
> Hostname (leave empty for local)?
>
> Database? postgresql
>
> Username? postgresql
>
> Password?
>
> ** Database: Populating database.
>
> The Database has schema.  Would you like to clear the database [Y]? y
>
> ** Database: Clearing database.
>
> ** Database: Shutting down spacewalk services that may be using DB.
>
> ** Database: Services stopped.  Clearing DB.
>
> ** Database: Re-populating database.
>
> *** Progress: #############################
>
> * Configuring tomcat.
>
> #
>
> What do I have to do to get this:
>
> *# spacewalk-sql -i < migrate-to-postgresql.sql*
>
> …to work without the ERROR:  relation "rhn_command_queue_sessions" does
> not exist ?
>
> Thanks a lot.
> Steve..
>
>
>
> ------------------------------------------------------------------------
> This message and any attachments are intended only for the use of the
> addressee and may contain information that is privileged and
> confidential. If the reader of the message is not the intended recipient
> or an authorized representative of the intended recipient, you are
> hereby notified that any dissemination of this communication is strictly
> prohibited. If you have received this communication in error, notify the
> sender immediately by return email and delete the message and any
> attachments from your system.
>
>
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list
>

Hello,

we know about this problem, as a workaround please drop table 
'rhn_command_queue_sessions' in Oracle database and create dump again or 
in existing dump file delete all operations with this table.

Regards,
-- 
Jan Dobes
Satellite Engineering, Red Hat




More information about the Spacewalk-list mailing list