|Home | Getting Started | Documentation | Demo | Download | Support|
Database user names are global across a database (and not per all Sedna databases). Database users interact with database objects. Every database object has its owner - the user that created it. Every user and role (we will discuss roles in the Section 3.2) has its creator.
In order to bootstrap the database, a freshly created database always contains one predefined DBA user with name "SYSTEM" and password "MANAGER". To start your work with the database, you first have to connect as this initial user, then you can create more users and change default password (if you care for preventing unauthorized access to your database).
There are following kinds of Sedna database objects:
There are two types of Sedna database users:
An ordinary user:
Every user has its name and password.
To create a user use CREATE USER statement:
CREATE USER "user-name" WITH PASSWORD "user-password"
For example, the following statement:
CREATE USER "Alice" WITH PASSWORD "mypass"
creates user Alice identified with mypass password.
To remove an existing user, use DROP USER statement:
DROP USER "user-name"
For example, the following statement removes user Alice:
DROP USER "Alice"
A user can drop only a user he has created. DBA user can drop any user of the database.
To change user password use ALTER USER statement. A user can change a password for himself or for a user he has created. DBA user can change a password for any user of the database.
ALTER USER "user-name" WITH PASSWORD "new-password"
This statement changes the password of the user user-name to the new-password.