How to set up a post-startup trigger on RDS Oracle 19c?

0

We have an instance running with Oracle Edition-Based Redefinition (EBR). Following an outage, say to apply the quarterly security patches, a post-startup trigger is required in order to execute a PLSQL package automatically. Our code is DROP TRIGGER RDSADMIN.RDS_DDL_TRIGGER2; CREATE OR REPLACE TRIGGER RDSADMIN.RDS_DDL_TRIGGER2 BEFORE DDL ON DATABASE BEGIN rdsadmin_trigger_util.secure_ddl; END; / SHOW ERRORS;

And we're raising the following error: [Error] Compilation (3: 7): ORA-04088: error during execution of trigger 'RDSADMIN.RDS_DDL_TRIGGER2' ORA-00604: error occurred at recursive SQL level 1 ORA-20900: RDS restricted DDL found: CREATE TRIGGER SYS.EDITION_SERV_START ORA-06512: at "RDSADMIN.RDSADMIN_TRIGGER_UTIL", line 756 ORA-06512: at line 2

Any insight would be appreciated.

1 Antwort
0

You can try to solve this problem two different ways:

  1. Use an AWS CloudFormation custom resource to call an AWS Lambda function to run post-database creation steps on the Amazon RDS for Oracle DB instance right after creation or restoration from a snapshot
  2. Use Amazon Elastic Compute Cloud (Amazon EC2) as a temporary instance to connect with the RDS for Oracle database to run post-database creation steps on the RDS for Oracle DB instance right after creation or restoration from a snapshot

Reference : https://aws.amazon.com/blogs/database/automate-post-database-creation-scripts-or-steps-in-an-amazon-rds-for-oracle-database/

profile pictureAWS
EXPERTE
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen