Database Administration User
When you install a new Vertica Analytic Database a database administration user with access to the following roles gets created:
Access to these roles allows this user to perform all database operations. Assign a name to this user during installation using the --dba-user
option (use -u
for upgrades). For example:
--dba-user mydba
This example creates a database administration user called mydba
. The username you use here must already exist on your operating system. See Installing Vertica with the Installation Script
If you do not use --dba-user
during installation the database administrator user gets named DBADMIN by default.
Note: Do not confuse the DBADMIN user with the DBADMIN Role. The DBADMIN role is a set of privileges you assign to a specific user based on the user's position in your organization.
The Vertica Analytic Database Database Administration user is also called a superuser throughout the Vertica Analytic Database documentation. Do not confuse this superuser with the Linux superuser that manages the Linux operating system.
Create a Database Administration User in the Vertica Analytic Database
As the Database Administration user you can create other users with the same privileges:
- Create a user:
=> CREATE USER DataBaseAdmin2;
CREATE USER
- Grant the appropriate roles to the new user DataBaseAdmin2:
=> GRANT dbduser, dbadmin, pseudosuperuser to DataBaseAdmin2;
GRANT ROLE
The user DataBaseAdmin2 now has the same privileges granted to the original Database Administration user.
- As the DataBaseAdmin2 user, enable the roles using SET ROLE:
=> \c VMart DataBaseAdmin2;
You are now connected to database "VMart" as user "DataBaseAdmin2".
=> SET ROLE dbadmin, dbduser, pseudosuperuser;
SET ROLE
- Confirm the roles are enabled:
=> SHOW ENABLED ROLES;
name | setting
-------------------------------------------------
enabled roles | dbduser, dbadmin, pseudosuperuser