Drops a user-defined profile.

Syntax

DROP PROFILE [IF EXISTS] profile_name [CASCADE | RESTRICT];

Description

The IF EXISTS clause instructs the server not to report an error even if the specified profile does not exist. If the specified profile does not exist, the server issues a notice.

The optional CASCADE clause reassigns users that are associated with the profile to the default profile, and then drops the profile. The optional RESTRICT clause instructs the server not to drop the profile that is associated with a role. This is the default behavior.

Parameters

Parameter Description
profile_name The name of the profile to be dropped.

Examples

Drop a profile whose name is acctg_profile:

DROP PROFILE acctg_profile CASCADE;

In the following example, the roles were associated with the acctg_profile profile. The command re-associates the roles with the default profile and then drops the acctg_profile profile.

Drop a profile whose name is acctg_profile:

DROP PROFILE acctg_profile RESTRICT;

The RESTRICT clause in the command instructs the server not to drop acctg_profile if the profile is associated with certain roles.