X

TimesTen In-Memory Database
for Extreme Performance

How to Manage User Accounts and Privileges in TimesTen?

Jenny Bloom
Product Manager

For users to access your TimesTen database, you must create user accounts and grant appropriate database access privileges to those accounts. A user account is identified by a user name and a password. Only the instance administrator and users with the system privilege ADMIN can create user accounts.

Creating a User Account

To create a new database user, perform the following steps:

  1. On a data instance, source the TimesTen environment

    $ source /home/oracle/TimesTen/instances/instance1/bin/ttenv.sh

  2. Enter ttIsql <connectable_name> at the OS command prompt to launch ttIsql and connect to your database

    $ ttIsql sampledb

  3. Use the SQL statement CREATE USER to create a database user account.

    CREATE USER <username> IDENTIFIED BY <password>;

    You should create an database name "appuser" to work with the sampledb database. For example,

    CREATE USER appuser IDENTIFIED BY <password>;

 

Once a user account has been created, the appropriate user privileges should be granted to the account. They should be granted based on their needs. For example, an application developer needs privileges to insert into tables and to execute stored procedures. However, a developer would not typically be allowed to perform administrative tasks such as backing up the database and removing user accounts.

There are two types of user privileges.

1. System privileges
These privileges give a user the ability to perform system-level activities across multiple objects in the database, or to perform an action on any schema objects of a particular type. For example, the system privilege CREATE TABLE permits a user to create tables in the schema associated with that user.

2. Object privileges
These privileges give a user the ability to perform a particular action on a specific schema object. The privilege to delete rows from the EMPLOYEES table is an example of object privileges. The owner (the creator) of the object always has full privileges to the object.

For a listing of the available privileges, refer to the Oracle TimesTen In-Memory Database SQL Reference.

 

Granting and Revoking Privileges

The SQL statements GRANT and REVOKE enable system and object privileges to be granted to and revoked from database users. For example:

  1. To grant the CREATE TABLE privilege to a user called HR, run the following command:

    GRANT CREATE TABLE to hr;

  2. To revoke the DELETE privilege on employees from hr, run the following command:

    REVOKE DELETE ON employees FROM hr;

For more information on user accounts and privileges, refer to the Oracle TimesTen In-Memory Database Security Guide.

Disclaimer: These are my personal thoughts and do not represent Oracle's official viewpoint in any way, shape, or form.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.