Using a Permanent Schema for Deploying Programs that Call APIs

Starting release 3.1, if you have custom user defined outside of Oracle LSH, make sure that the schema is editioned. Use the following command to mark any existing custom users/schemas as editionable:

ALTER USER <user_name> ENABLE EDITIONS FORCE;

When you develop a program outside Oracle LSH that will call the Oracle LSH APIs, you can use your own schema in the external tool (such as SQL*Plus, SQL Developer, or SAS) to run and test the program, if you have Execute privileges on CDR_PUB_API_INITIALIZATION. When you are ready to allow other people to run it, copy it into a different location.

Oracle recommends setting up one or more permanent, publicly available schemas in the Oracle LSH database for the purpose of compiling and storing programs that call the Oracle LSH APIs. Grant each schema Execute privileges on CDR_PUB_API_INITIALIZATION. This approach has the following advantages:

  • If a user manually runs your program, he or she must enter the program location and name explicitly. This will be much easier if the user knows which schema contains such programs.
  • If you set up the program to run automatically when a user clicks a button in the external system's user interface, for example, you must hardcode the program's name and location into the code.
  • You can grant Execute on CDR_PUB_API_INITIALIZATION to a controlled number of schemas.