Dropping a profile v16

Use the DROP PROFILE command to drop a profile. The syntax is:

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

Include the IF EXISTS clause to instruct the server not to throw an error if the specified profile doesn't exist. The server issues a notice if the profile doesn't exist.

Include the optional CASCADE clause to reassign any users that are currently associated with the profile to the default profile and then drop the profile. Include the optional RESTRICT clause to instruct the server not to drop any profile that's associated with a role. This is the default behavior.

Parameters

profile_name

The name of the profile being dropped.

Examples

This example drops a profile named acctg_profile:

DROP PROFILE acctg_profile CASCADE;

The command first reassociates any roles associated with the acctg_profile profile with the default profile and then drops the acctg_profile profile.

The following example drops a profile named acctg_profile:

DROP PROFILE acctg_profile RESTRICT;

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