Skip to content

Error with create archivelog directory with in 19c rds oracle

0

Hello. I am attempting to create an archive log directory to view archive logs in RDS for Oracle, but encountered the following error. This occurred despite using a 19c database and the admin user. Please help.

SQL> exec rdsadmin.rdsadmin_master_util.create_archivelog_dir
ORA-20199: Error in rdsadmin_master_util.create_archivelog_dir. ORA-04088:error during execution of trigger 'RDSADMIN.RDS_DDL_TRIGGER2'
ORA-06512: "RDSADMIN.RDSADMIN_MASTER_UTIL", line 224
ORA-04088: error during execution of trigger 'RDSADMIN.RDS_DDL_TRIGGER2'
ORA-06512: "SYS.RDS_SYS_MASTER_UTIL", line  517 
ORA-00604: error occurred at recursive SQL level 2
ORA-20900: Directory ARCHIVELOG_DIR cannot be modified.
ORA-06512: "SYS.RDS_SYS_TRIGGER_UTIL105", line 762
ORA-06512:  line 1
ORA-06512: "SYS.RDS_SYS_TRIGGER_UTIL2", line 277
ORA-06512:  line 1
ORA-06512: "RDSADMIN.RDSADMIN_TRIGGE...

asked a year ago370 views

3 Answers
0

Hi,

From the above, it looks the directory ARCHIVELOG_DIR should already exist in the RDS Oracle database and you can use the below command to list the contents of the archivelog directory.

SQL> SELECT * FROM TABLE(rdsadmin.rds_file_util.listdir(p_directory => 'ARCHIVELOG_DIR'));

FILENAME                                           TYPE         FILESIZE MTIME
-------------------------------------------------- ---------- ---------- ---------
arch/                                              directory        4096 13-NOV-25
redolog-138-1-1200672048.arc                       file             1024 13-NOV-25
redolog-137-1-1200672048.arc                       file           135680 13-NOV-25
redolog-139-1-1200672048.arc                       file             1536 13-NOV-25
redolog-136-1-1200672048.arc                       file            19968 13-NOV-25

You can follow the steps mentioned in the below documents to download or backup the archivelog files,

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.CommonDBATasks.download-redo-logs.html

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.CommonDBATasks.BackupArchivedLogs.html

AWS

answered a year ago

  • The ARCHIVELOG_DIR directory was not created. It does not appear when querying dba_directories, and executing listdir also results in an error. The error I inquired about occurs when executing the create_archivelog_dir command and is suspected to be a permission issue. If there is a solution for this type of case, please provide assistance.

0

The error you're encountering is related to attempting to create an ARCHIVELOG_DIR directory in your Amazon RDS for Oracle 19c instance. This error occurs because in Amazon RDS for Oracle, certain directories are managed by AWS and cannot be modified directly by users, even when using the master user account.

For Amazon RDS for Oracle, the ARCHIVELOG_DIR is a pre-defined directory that is already created and managed by the RDS service. You don't need to create it - it already exists for your use.

Instead of trying to create this directory, you should be able to directly use the existing ARCHIVELOG_DIR for viewing or working with archive logs. The master user in RDS for Oracle has DBA privileges but with certain limitations, including restrictions on creating or modifying system directories.

If you need to work with archived redo logs, Amazon RDS provides specific procedures through the rdsadmin.rdsadmin_rman_util package that you can use to perform operations like backing up archived redo logs. These procedures are designed to work with the pre-defined directories and provide the functionality you need without requiring direct creation or modification of system directories.

To view the contents of the existing ARCHIVELOG_DIR, you can use standard Oracle directory listing commands against this pre-defined directory.
Sources
Amazon RDS for Oracle - Amazon Relational Database Service
RDS for Oracle limitations - Amazon Relational Database Service
Amazon RDS for Oracle RDSADMIN question | AWS re:Post

answered a year ago

0

The error you're encountering appears to be due to an outdated rdsadmin_master_util package, which normally gets updated when you perform a Major/Minor version upgrade of your instance, or when you stop the instance temporarily and start it again.

You can take any of the below actions to overcome this error:


1. Stop the instance temporarily and start the instance again

Stopping and starting the RDS instance will trigger an internal refresh of the rdsadmin packages upon startup.

For detailed steps, please refer to the following documentation:

[+] Stopping an Amazon RDS DB instance temporarily — https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StopInstance.html

[+] Starting an Amazon RDS DB instance that was previously stopped — https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StartInstance.html


OR


2. Perform a Minor version upgrade of your RDS Oracle instance

A Minor version upgrade will also refresh the internal rdsadmin packages. Please note that this action will involve a brief downtime during the upgrade process.

For detailed steps, please refer to the following documentation:

[+] https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Oracle.Upgrading.html


3. Contact AWS Support

If you are unable to perform the above operations due to the production nature of your instance, you can reach out to AWS Support for further assistance.


After performing either of the above actions, please retry the command:

exec rdsadmin.rdsadmin_master_util.create_archivelog_dir;
AWS

answered 3 months 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.