ALTER USER
Alters a Firebird user account
DSQL
ALTER {USER username | CURRENT USER}
[SET] [<user_option> [<user_option> ...]]
[TAGS (<user_var> [, <user_var> ...]]
<user_option> ::=
PASSWORD 'password'
| FIRSTNAME 'firstname'
| MIDDLENAME 'middlename'
| LASTNAME 'lastname'
| {GRANT | REVOKE} ADMIN ROLE
| {ACTIVE | INACTIVE}
| USING PLUGIN plugin_name
<user_var> ::=
tag_name = 'tag_value'
| DROP tag_name
See [fblangref50-security-user-create] for details on the statement parameters.
Any user can alter their own account, except that only an administrator may use GRANT/REVOKE ADMIN ROLE and ACTIVE/INACTIVE.
All clauses are optional, but at least one other than USING PLUGIN must be present:
-
The
PASSWORDparameter is for changing the password for the user -
FIRSTNAME,MIDDLENAMEandLASTNAMEupdate these optional user properties, such as the person’s first name, middle name and last name respectively -
GRANT ADMIN ROLEgrants the user the privileges of theRDB$ADMINrole in the security database ({secdb}), enabling them to manage the accounts of other users.It does not grant the user any special privileges in regular databases. -
REVOKE ADMIN ROLEremoves the user’s administrator in the security database which, once the transaction is committed, will deny that user the ability to alter any user account except their own -
ACTIVEwill enable a disabled account (not supported forLegacy_UserManager) -
INACTIVEwill disable an account (not supported forLegacy_UserManager).This is convenient to temporarily disable an account without deleting it. -
USING PLUGINspecifies the user manager plugin to use -
TAGScan be used to add, update or remove (DROP) additional custom attributes (not supported forLegacy_UserManager).Attributes not listed will not be changed.
See [fblangref50-security-user-create] for more details on the clauses.
If you need to change your own account, then instead of specifying the name of the current user, you can use the CURRENT USER clause.
|
Warning
|
The |
|
Note
|
Remember to commit your work if you are working in an application that does not auto-commit DDL. |