Oracle® TimesTen In-Memory Database SQL Reference Release 11.2.1 Part Number E13070-04 |
|
|
View PDF |
The CREATE USER statement creates a user of a TimesTen database.
Required privilege
ADMIN
SQL syntax
CREATE USER user IDENTIFIED BY {password | "password"} CREATE USER user IDENTIFIED EXTERNALLY
Parameters
The CREATE USER statement has the parameters:
Parameter | Description |
---|---|
user |
Name of the user that is being added to the database. |
IDENTIFIED |
Identification clause. |
BY { password |" password "} |
Internal users must be given a TimesTen password. To perform database operations using an internal user name, the user must supply this password. |
EXTERNALLY |
Identifies the operating system user to the TimesTen database. To perform database operations as an external user, the process needs a TimesTen external user name that matches the user name authenticated by the operating system or network. A password is not required by TimesTen because the user has been authenticated by the operating system at login time. |
Database users can be internal or external.
Internal users are defined for a TimesTen database.
External users are defined by an external authority such as the operating system. External users cannot be assigned a TimesTen password.
Passwords are case-sensitive.
When a user is created, the user has the privileges granted to PUBLIC and no additional privileges.
You cannot create a user across a client/server connection. You must use a direct connection when creating a user.
In TimesTen, user brad
is the same as user "brad"
. In both cases, the name of the user is created as BRAD
.
User names are TT_CHAR data type.
Examples
To create the internal user terry
with the password "secret"
, use:
CREATE USER terry IDENTIFIED BY "secret"; User created.
Verify that user terry
has been created:
Command> SELECT * FROM sys.all_users WHERE username='TERRY'; < TERRY, 11, 2009-05-12 10:28:04.610353 > 1 row found.
To identify the external user pat
to the TimesTen database, use:
CREATE USER pat IDENTIFIED EXTERNALLY; User created.
See also