Using an application context
In this recipe, you'll see one possible usage (in SQL) of the application contexts. Some other usages are shown in other parts of the book, and their references are given in the See also section of this recipe.
Getting ready
Create a new user (for example, sofia
). Make sure that his or her e-mail in the format user@company.example.com
is unique. Grant him or her privileges: create session
and select
on sh.customers
table.
Insert data about him or her into the sh.customers
table.
How to do it...
- Connect to the database as a newly created user (for example, user
sofia
):$ sqlplus sofia
- Verify that the user (for example,
sofia
) can access all data in thesh.customers
table. - Verify that when executing the following statement, he or she (for example,
sofia
) can view only his or her data.
How it works...
In step 3, a...