13.8.6. Migrating from an External Oracle Database to an Embedded Database


The requirements to migrate from an External Oracle Database to an Embedded database:
  • A complete installation of Red Hat Satellite server (satellite.example.com) using an External Oracle Database (oracledb.example.com).

Procedure 13.7. Migrating to an Embedded Database from Oracle Database

  1. Shut down all services on the Red Hat Satellite server:
    [root@satellite ~]# rhn-satellite stop
    
  2. Make sure your External Oracle Database is still running.
  3. Remove the rhn-upgrade if it exists on your server:
    [root@satellite ~]# yum remove rhn-upgrade
    
  4. Update the External Oracle Database to the latest schema version:
    [root@satellite ~]# yum update satellite-schema
    [root@satellite ~]# spacewalk-schema-upgrade
    
    This ensures that your database version matches the latest version for the Embedded Database.
  5. Create a directory to hold your database snapshot.
    [root@satellite ~]# mkdir ~/dbbackup
    [root@satellite ~]# cd ~/dbbackup
    
  6. Export the database using spacewalk-dump-schema:
    [root@satellite dbbackup]# spacewalk-dump-schema --to=postgresql > migrate-to-postgresql.sql
    
  7. Stop the External Oracle Database. It is no longer required.
  8. Exchange the Oracle drivers and configuration scripts with the PostgreSQL drivers and configuration scripts on the Satellite server:
    [root@satellite dbbackup]# yum remove -y spacewalk-oracle
    [root@satellite dbbackup]# yum install -y spacewalk-postgresql spacewalk-setup-postgresql spacewalk-dobby
    [root@satellite dbbackup]# yum remove -y spacewalk-java-oracle spacewalk-backend-sql-oracle
    
  9. Use spacewalk-setup to populate the Embedded Database:
    [root@satellite dbbackup]# spacewalk-setup --db-only
    
    The script populates the database. Wait until this process completes.
    ** Database: Setting up database connection for PostgreSQL backend.
    ** 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: ####################################
    
  10. When the script completes database population, restore the database schema
    [root@satellite dbbackup]# spacewalk-sql -i < migrate-to-postgresql.sql
    
  11. Start Red Hat Satellite.
    [root@satellite ~]# rhn-satellite start
    
The database is now migrated from an External Oracle Database to an Embedded Database.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.