User Profiles  «Prev  Next»

Implementing Restrictions when Using Wildcards - Exercise

Objective: Restrict specific database users from performing certain SQL*Plus operations.

Exercise scoring

This exercise is worth 10 points and will be graded on your submission.

Background and Overview

In earlier exercises you created the COIN database and several users. In this exercise you will use the PRODUCT_PROFILE table (historically known as PRODUCT_USER_PROFILE) to place restrictions on two of those users so they cannot run certain commands when they connect with SQL*Plus. Note: this mechanism was desupported starting with Oracle Database 19c and is covered here as historical SQL*Plus security knowledge, not as current Oracle AI Database 26ai guidance.

Instructions

Add the necessary rows to the PRODUCT_PROFILE table so that the users BID1 and BID2 are prevented from performing INSERT, UPDATE, and DELETE operations while using SQL*Plus.

Hints

Other than the single special value % (or PUBLIC), which applies a restriction to every user, the documented behavior of the userid column requires an exact username — there is no documented partial-match wildcard for restricting just a subset of users who share a naming pattern. Because you need to restrict BID1 and BID2 specifically, without affecting any other user, write one row for each user for each restricted command. That means six INSERT statements in total: one per user, per restricted command.

Submitting your exercise