Database administration user
On installation, a new Vertica database automatically contains a user with superuser privileges. Unless explicitly named during installation, this user is identified as dbadmin
. This user cannot be dropped and has the following irrevocable roles:
With these roles, the dbadmin
user can perform all database operations. This user can also create other users with administrative privileges.
Important
Do not confuse the dbadmin
user with the DBADMIN role. The DBADMIN role is a set of privileges that can be assigned to one or more users.
The Vertica documentation often references the dbadmin
user as a superuser. This reference is unrelated to Linux superusers.
Creating additional database administrators
As the dbadmin
user, you can create other users with the same privileges:
-
Create a user:
=> CREATE USER DataBaseAdmin2; CREATE USER
-
Grant the appropriate roles to new user
DataBaseAdmin2
:=> GRANT dbduser, dbadmin, pseudosuperuser to DataBaseAdmin2; GRANT ROLE
User
DataBaseAdmin2
now has the same privileges granted to the original dbadmin user. -
As
DataBaseAdmin2
, enable your assigned roles with SET ROLE:=> \c - 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