Books
in black and white
Main menu
Share a book About us Home
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Teradata RDBMS Database Administration - NCR

NCR Teradata RDBMS Database Administration - NCR , 2004. - 616 p.
Download (direct link): teradatadatabaseadmin2004.pdf
Previous << 1 .. 65 66 67 68 69 70 < 71 > 72 73 74 75 76 77 .. 218 >> Next


CREATE USER Statement

The CREATE USER statement enables you to add new users to the system. In addition to a unique username, CREATE USER requires that you define a password and allocate PERM space (although the value can be 0.)

A password is required in the CREATE USER statement, but once the user exists you can grant an exception. For instructions and cautions, see "CREATE USER and Logon Security" on page 5-6 and "Controlling Password Security" on page 6-20.

The permanent space comes from, and cannot exceed, the current PERM of the immediate owner, which is either your default database, or the database you specify in the FROM clause of the CREATE USER statement.

During a session, each user is associated with a default database, which is the space in which Teradata RDBMS stores or searches for new or target objects unless a different database is specified in the transaction. By default, the default database has the same name as the username. You can define a different default database with:

The DEFAULT DATABASE clause of the CREATE USER statement.

A profile, which takes precedence over the CREATE USER definition.

During a session, the SET SESSION DATABASE statement, which takes precedence over a profile or a CREATE USER definition.

Optionally, you also can use CREATE USER to define one or more ACCOUNT strings, a logon STARTUP string, SPOOL space, TEMP space, a PROFILE, and a default ROLE.

You can assign a profile to define a user account string, temporary space, spool space, and/or password attributes at the group level. To assign a profile to a user, you need the DROP PROFILE privilege.

The definitions in a profile override any definitions in a CREATE/MODIFY USER statement. If you define the PROFILE clause as NULL or NONE, the default is used as explained in "Profiles and User Defaults" on page 5-18.

5 - 10 Teradata RDBMS Database Administration

Chapter 5: Setting Up Users, Profiles, Accounts and Accounting

Implementing Roles and Profiles

To assign a default role to a user, the username under which you logged on must have been explicitly granted that role, or must have an active role (current role or a role nested within it) that has been granted that role, and the GRANT statement must have included the WITH ADMIN OPTION. (For instructions, see "Implementing Roles" on page 5-13.)

CREATE USER Default Values

Default values associated with the CREATE USER statement are summarized in the following table. Notice that the PERM space and PASSWORD clauses have no default values; both must be specified at user creation time.

IF the DDL does not define .

THEN the value used is .

FROM

database

the default database of the creating user.

SPOOL

one of the following:

IF . THEN the value used is .
a profile is assigned to this user that has a SPOOL value the limit defined in the profile.
a profile is assigned but does not have a SPOOL value the same SPOOL value as the owner of the space in which the user is being created.
no profile is assigned the same SPOOL value as the owner of the space in which the user is being created.

TEMP

one of the following:

IF . THEN the default is .
a profile is assigned to this user and it has a TEMP value the limit defined in the profile.
a profile is assigned but does not have a TEMP value the same TEMP value as the owner of the space in which the user is being created.
no profile is assigned the same TEMP value as the owner of the space in which the user is being created.

STARTUP

null (no startup string). The user can enter a startup string during logon.

5 - 10

Teradata RDBMS Database Administration Chapter 5: Setting Up Users, Profiles, Accounts and Accounting

Implementing Roles and Profiles

IF the DDL does not define .

THEN the value used is .

ACCOUNT

one of the following:

IF . THEN the default is .
a profile is assigned to this user and contains an account the account ID defined in the profile.
a profile is assigned and contains one or more account IDs the first ID in the string. The user can submit a SET SESSION ACCOUNT statement to set the default for the current session to one of the other accounts.
a profile is assigned but does not have an account ID the account identifier of the immediate owner of the user.
no profile is assigned the account identifier of the immediate owner of the user.

DEFAULT DATABASE

the username. The user can submit a SET SESSION DATABASE statement to change the default for the current session, as long as the appropriate access rights on that database have been granted to the user.

DEFAULT ROLE

no role is used in the access rights validation process unless the user submits a SET ROLE statement. The user can submit a SET ROLE statement only if that role has been explicitly granted to the user.

5 - 10 Teradata RDBMS Database Administration

Chapter 5: Setting Up Users, Profiles, Accounts and Accounting

Implementing Roles and Profiles
Previous << 1 .. 65 66 67 68 69 70 < 71 > 72 73 74 75 76 77 .. 218 >> Next