简体   繁体   中英

Oracle Apex: Is it possible to change the default schema at runtime?

We have an Apex application (version 20.1) and our users must be able to change the database schema at runtime via button click (preferably without logging in again). Currently we are solving this by installing our application multiple times, once per schema.

We recently discovered the function apex_export.get_application . We intend to use this function to bring our frontend under version control (finally.). We would like to deploy our application directly from the exported files, Having a single application. we would not have to mess with the internal component ids from the exported files.

Is it possible to install the application once and change the default schema via Pl/SQL code? Thank you!

I don't think this can be done, but perhaps the following is a reasonable compromise

  1. add all the schemas you need to support to the workspace schema list
  2. Any SQL (and I do mean any ) in your app would be prefixed with an application item, eg

Before: select * from my_table After: select * from &my_schema..my_table

  1. At login time (or when a user selects it) you modify the MY_SCHEMA application item

(I've not tried this...so test/tread carefully)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM