Skip to content

Java specific Oracle DB objects missing while restoring a manual Oracle RDS snapshot

0

We recently migrated our existing Oracle RDS from the 1 region to the another region. We took a manual snapshot of the source Oracle RDS and moved it to the target region, and then used the snapshot to create a new target Oracle RDS. When we checked the target, we found that 3 object types JAVA CLASS, JAVA RESOURCE and JAVA SOURCE were missing specifically on the restored target Oracle RDS.

We made sure that JVM option group was added to the target RDS and all the option groups are properly added similar to source.

The target RDS also has the JAVAVM status valid:

SQL> SELECT COMP_ID, COMP_NAME, STATUS, VERSION FROM DBA_REGISTRY WHERE COMP_ID = 'JAVAVM'; 2 3 COMP_ID

COMP_NAME

STATUS VERSION


JAVAVM JServer JAVA Virtual Machine VALID 19.0.0.0.0

We wanted to know why this issue occurs and how can this be fixed permanently?

asked 2 years ago247 views

1 Answer
1

The issue you're experiencing with missing Java-specific Oracle DB objects (JAVA CLASS, JAVA RESOURCE, and JAVA SOURCE) after restoring a manual Oracle RDS snapshot in a different region is not typical behavior. However, there are a few potential reasons and solutions to consider:

  1. Option Group Differences: While you mentioned that you added the JVM option group to the target RDS, it's important to ensure that all options, including any persistent options, are exactly the same as the source. Some options, particularly persistent ones, may not be automatically copied during snapshot restoration across regions.

  2. Snapshot Restoration Process: When restoring a snapshot, especially across regions, not all settings and configurations are always carried over automatically. This can sometimes include certain database objects or settings related to specific features like Java.

  3. Version Compatibility: Ensure that the Oracle database version in the target region is exactly the same as the source. Even minor version differences could potentially affect Java object restoration.

To address and potentially fix this issue:

  1. Manually recreate the Java objects: If the issue persists, you may need to manually recreate these Java objects in the target database. This can be done by exporting the objects from the source database and importing them into the target.

  2. Use Oracle Data Pump: Consider using Oracle Data Pump for a more comprehensive migration of all database objects, including Java-specific ones. This method often provides more control and can ensure all objects are properly transferred.

  3. Check and compare option groups: Double-check that all options in the source RDS option group are present in the target. Pay special attention to any Java-related options.

  4. CLI-based restoration: Some users have reported better results when using the AWS CLI for snapshot restoration, as it provides more granular control over the restoration process and options.

  5. Contact AWS Support: If the issue persists after trying these solutions, it may be worth contacting AWS Support for further assistance, as this behavior is not expected and could indicate a more complex issue.

For a permanent fix, it's crucial to identify the root cause. If manual intervention consistently resolves the issue, you might consider incorporating these steps into your migration process or creating a post-restoration script to ensure all necessary Java objects are present.
Sources
RDS restore settings not correctly copied from original | AWS re:Post
trying to restore a rds oracle db snapshot but cant because of a option group it doesnt let me select option group | AWS re:Post
Copying a DB snapshot for Amazon RDS - Amazon Relational Database Service

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.