SQL$HELP_OLD72.HLB  —  DROP  PROFILE
    Drops a profile definition.

1  –  Environment

    You can use the DROP PROFILE statement:

    o  In interactive SQL

    o  Embedded in host language programs

    o  As part of a procedure in an SQL module or other compound
       statement

    o  In dynamic SQL as a statement to be dynamically executed

2  –  Format

  DROP -+-> PROFILE --> <profilename> ----------------+--+-+---------------+-+->
        +-> DEFAULT PROFILE -+----------------------+-+  | +-> CASCADE ----+ |
                             +-> ALIAS aliasname ---+    | +-> RESTRICT ---+ |
                                                         | +-> IF EXISTS --+ |
                                                         +-------<-----------+

3  –  Arguments

3.1  –  ALIAS aliasname

    When attached to multiple databases, the aliasname is required to
    direct the DROP command to the appropriate database.

3.2  –  CASCADE

    This option causes all user definitions to be altered to remove
    the reference to this profile.

3.3  –  DEFAULT_PROFILE

    Drops the special profile RDB$DEFAULT_PROFILE.

3.4  –  IF_EXISTS

    Prevents SQL command language from displaying error messages if
    the referenced object does not exist in the database.

3.5  –  RESTRICT

    If the profile is used by a user in the database, the DROP
    PROFILE statement will fail. This is the default.

4  –  Examples

    Example 1: Using Delimited Identification Mixed-Case Profile
    Names

    SQL> DROP PROFILE Decision_Support;
    %RDB-E-NO_META_UPDATE, metadata update failed
    -RDMS-E-PRFNEXISTS, a quota does not exist with the name "DECISION_SUPPORT"
    SQL> SET DIALECT 'SQL99';
    SQL> DROP PROFILE "Decision_Support";
    SQL> COMMIT;

    Example 2: Using CASCADE to remove assigned profiles from users

    This example demonstrates that there may be dependencies between
    profiles and user objects. The CASCADE action will remove the
    profile from all users to which is assigned.

    SQL> create profile DECISION_SUPPORT
    cont>     comment is 'restrictions for read-only users'
    cont>     default transaction read only
    cont>     transaction modes (read only, shared);
    SQL>
    SQL> show profile DECISION_SUPPORT;
         DECISION_SUPPORT
     Comment:       restrictions for read-only users
         Transaction modes (read only, shared)
         Default transaction read only
    SQL>
    SQL> create user FREEMAN
    cont>     identified externally
    cont>     profile DECISION_SUPPORT;
    SQL>
    SQL> show user FREEMAN;
         FREEMAN
         Identified externally
         Account is unlocked
         Profile: DECISION_SUPPORT
         No roles have been granted to this user
    SQL>
    SQL> drop profile DECISION_SUPPORT restrict;
    %RDB-E-NO_META_UPDATE, metadata update failed
    -RDMS-E-PRFINUSE, entry "DECISION_SUPPORT" is referenced by user "FREEMAN"
    SQL>
    SQL> drop profile DECISION_SUPPORT cascade;
    SQL>
    SQL> show user FREEMAN;
         FREEMAN
         Identified externally
         Account is unlocked
         No roles have been granted to this user
    SQL>
    SQL> commit;
Close Help