DROP PROFILE
The DROP PROFILE statement removes a profile from the database.
                  
Required privilege
ADMIN
Usage with TimesTen Scaleout
This statement is supported with TimesTen Scaleout.
SQL syntax
DROP PROFILE profile [CASCADE]Parameters
| Parameter | Description | 
|---|---|
| 
 | Name of the profile to be dropped. | 
| 
 | Specify  | 
Description
- 
                        Use this statement to drop an existing profile. You cannot drop the DEFAULTprofile. See "CREATE PROFILE" for information on theDEFAULTprofile.
- 
                        If you create a profile that is not currently assigned to a user, you do not need to specify CASCADEto drop the profile. If, however, the profile is currently assigned to a user, you must specifyCASCADEto drop the profile.
Example
This example creates the test_profile profile and the test_profile_assign_to_user profile. It then creates the test_user user and assigns the test_profile_assign_to_user profile to that user. The example attempts to drop the test_profile profile. The operation succeeds as there are no users assigned to this profile. The example then attempts to drop the test_profile_assign_to_user profile. The operation succeeds if CASCADE is specified. After the test_profile_assign_to_user profile is dropped, the test_user user is assigned the DEFAULT profile.
                  
- 
                        Create the test_profileprofile. SetFAILED_LOGIN_ATTEMPTSto a value of5.Command> CREATE PROFILE test_profile LIMIT FAILED_LOGIN_ATTEMPTS 5; Profile created. 
- 
                        Create the test_profile_assign_to_userprofile. SetFAILED_LOGIN_ATTEMPTSto a value of3.Command> CREATE PROFILE test_profile_assign_to_user LIMIT FAILED_LOGIN_ATTEMPTS 3; Profile created.
- 
                        Create the test_useruser and assign thetest_profile_assign_to_userprofile to this user.Command> CREATE USER test_user identified by test_user_pwd PROFILE test_profile_assign_to_user; User created.
- 
                        Drop the test_profileprofile. TheDROPPROFILEoperation succeeds. There are no users assigned to thistest_profileprofile.Command> DROP PROFILE test_profile; Profile dropped. 
- 
                        Attempt to drop the test_profile_assign_to_userprofile. TheDROPPROFILEoperation fails. There is a user assigned to this profile. Repeat theDROPPROFILEoperation again, but this time specifyCASCADE. TheDROPPROFILEoperation succeeds.Command> DROP PROFILE test_profile_assign_to_user; 15178: Profile TEST_PROFILE_ASSIGN_TO_USER has users assigned, cannot drop without CASCADE The command failed. Command> DROP PROFILE test_profile_assign_to_user CASCADE; Profile dropped. 
- 
                        Query the DBA_USERSsystem view to verify that thetest_useruser has been assigned theDEFAULTprofile.Command> SELECT profile FROM dba_users WHERE username = 'TEST_USER'; PROFILE < DEFAULT > 1 row found. 
See also