How to retrieve Oracle version with AWS SDK

0

Which is the AWS API to use for retrieving data about oracle version if I've already found with DescribeDBInstances the engine version: Engine Version = 19.0.0.0.ru-2022-10.rur-2022-10.r1

Angelo
asked 2 months ago365 views
2 Answers
1

To retrieve data about the Oracle version using the AWS SDK after finding the engine version with DescribeDBInstances, you can use the DescribeDBEngineVersions API operation in the AWS SDK for the programming language of your choice. Below are examples for retrieving the Oracle version using the AWS SDK in Python

import boto3

# Create an RDS client
rds_client = boto3.client('rds')

# Describe the DB engine versions
response = rds_client.describe_db_engine_versions(
    Engine='oracle',
    EngineVersion='19.0.0.0.ru-2022-10.rur-2022-10.r1'
)

# Extract Oracle version from the response
if 'DBEngineVersions' in response and len(response['DBEngineVersions']) > 0:
    oracle_version = response['DBEngineVersions'][0]['EngineVersion']
    print("Oracle version:", oracle_version)
else:
    print("No information found for the specified engine version.")

From you question it seems this is your Engine version '19.0.0.0.ru-2022-10.rur-2022-10.r1' with the specific engine version you obtained from DescribeDBInstances.

Hope it clarifies and if does I would appreciate answer to be accepted so that community can benefit for clarity, thanks ;)

profile picture
EXPERT
answered 2 months ago
  • It seems you retrieve the same information of Engine version, but not the Oracle version...

0

If you have already used the DescribeDBInstances API to retrieve information about your Oracle database instance and obtained the engine version, you won't be able to directly fetch Oracle version information using another AWS API. The engine version information returned by DescribeDBInstances usually includes the version of the database engine provided by AWS RDS, not the specific version of Oracle.

To retrieve the specific version of Oracle database installed on your RDS instance, you would typically connect to the database and query the database metadata. However, if you're looking for information about the Oracle version managed by AWS RDS, you can refer to the AWS RDS documentation or the Oracle documentation for the release versions supported by RDS.

Here are some steps you can take:

  1. Check AWS RDS Documentation: AWS RDS maintains documentation for the supported database versions, including Oracle. You can find information about the Oracle versions supported by AWS RDS in the AWS RDS User Guide or on the AWS website.

  2. Check Oracle Documentation: Oracle also maintains documentation for its database versions. You can cross-reference the Oracle version numbers mentioned in the AWS RDS documentation with the Oracle documentation to determine the exact version of Oracle being used.

  3. Query Database Metadata: If you need to retrieve the Oracle version directly from the database, you would need to connect to the database using a client tool like SQL*Plus or SQL Developer and run a query against the database metadata. For example:

    SELECT * FROM v$version;

    This query will return information about the Oracle Database version.

By combining information from the AWS RDS documentation and the Oracle documentation, along with querying the database metadata directly, you should be able to determine the Oracle version used by your RDS instance.

profile picture
answered 2 months ago
  • I need to retrieve the oracle version information by code. There is an API I can use to execute the query ?

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.

Guidelines for Answering Questions