Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Identifying test instance/workspace vs production

Jon FinkeDec 20 2023 — edited Dec 20 2023

This is a broader issue than just APEX, but APEX does play into it.

I wanted to look at the new APEX release, so my DBA cloned my production database instance (which mostly just runs IdM and APEX). This morning I received TWO “Oversight Reports” - this is a subscribed interactive report that looks at the APEX workflow (which is a whole different thing - pretty cool actually). The bulk of my automatic processing is managed by a few ugly bash scripts run out of cron by a service machine. Since these scripts are pointed at my production database, there are no issues with the test DB instance. For a number of reasons, these scripts need to be replaced - I expect that will be my project for the spring (they started with a simple cron job that ran nightly to “create accounts”. And a few times a year, some new job would come along and get added…. After 25 years, the main SQL script has over 100 execute xxxx statements in it - not a good way to live).

Anyway, since some possible alternatives involve using the Oracle scheduler, I need to come up with a good way for an instance to decide if it is the production instance, or just a restored backup. How do folks make this determination? Typically the production instance gets restarted 4 times each year when we install the latest CPU (Critical Patch Update). Need to set some sort of flag, somewhere, so apps and processes can check before running - for many it doesn't matter, but a lot of them reach out via APIs and update other systems.

I also need to get APEX jobs to be able to check this flag - how/where can I tell APEX to NOT process subscribed reports? My DB is currently at 21.11, and my APEX is at 22.2?

Is there a startup script that gets run when an instance is restarted?

Comments
Post Details
Added on Dec 20 2023
1 comment
417 views