In this recipe, you'll create a local application context (for example, sh_client
). In the next recipes, you will use it to store clients' identifiers.
To complete this recipe, you'll need an existing user who can create an application context (it needs the CREATE ANY CONTEXT
privilege or a DBA role), for example, the user maja
.
Connect to the database as a user who has appropriate privileges (for example, user
maja
).$ sqlplus maja
Create a local application context (for example,
sh_client
).Note
The PL/SQL package that will be used to set application context attributes doesn't have to exist at this time, but you have to specify its name.
SQL> CREATE CONTEXT <context_name> USING <PL/SQL_package_name>;