1,Objectives
.Create new database users
.Alter and drop existing database users
.Monitor information about existing users
2,Users and Security
.Account locking
.Default tablespace
.Temporary tablespace
.Tablespace quotas
.Resource limits
.Direct privileges
.Role privileges
.Authentication mechanism
SQL> alter user test quota 10m on users;
User altered.
3,Database Schema
.A schema is a named collection of objects;
.A user is created,and a corresponding schema is created
.User can be associated only with one schema
.Username and schema are often used interchangeably
.Schema Objects:Tables,Triggers,Constraints,Indexes,Views,Sequence,Stored program units
syninyms,User-defined data types,Database links
4,Checklist for Creating users
.identify tablespaces in which the user needs to store objects.
.Decide on quotas for each tablespace
.Assign a default tablespace and temporary tablespace
.Create a user
.Grant privileges and roles to user.
SQL>select username,default_tablespace,profile from dba_users;
SQL> alter user test default tablespace test;
User altered.
SQL> run
1 create user test2
2 identified by test2_001
3 default tablespace test
4 temporary tablespace temp
5 quota 10m on test
6* password expire
User created.
SQL> alter database default tablespace test;
Database altered.
5,Creating a New User:Operating System Authentication
.OS_AUTHENT_PREFIX initialization parameter specifies the format of the usernames
.IDENTIFIED EXTERNALLY
SQL> show parameter OS_AU
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
os_authent_prefix string OPS$
remote_os_authent boolean FALSE
6,DAB_USERS,DBA_TS_QUOTAS
.Create new database users
.Alter and drop existing database users
.Monitor information about existing users
2,Users and Security
.Account locking
.Default tablespace
.Temporary tablespace
.Tablespace quotas
.Resource limits
.Direct privileges
.Role privileges
.Authentication mechanism
SQL> alter user test quota 10m on users;
User altered.
3,Database Schema
.A schema is a named collection of objects;
.A user is created,and a corresponding schema is created
.User can be associated only with one schema
.Username and schema are often used interchangeably
.Schema Objects:Tables,Triggers,Constraints,Indexes,Views,Sequence,Stored program units
syninyms,User-defined data types,Database links
4,Checklist for Creating users
.identify tablespaces in which the user needs to store objects.
.Decide on quotas for each tablespace
.Assign a default tablespace and temporary tablespace
.Create a user
.Grant privileges and roles to user.
SQL>select username,default_tablespace,profile from dba_users;
SQL> alter user test default tablespace test;
User altered.
SQL> run
1 create user test2
2 identified by test2_001
3 default tablespace test
4 temporary tablespace temp
5 quota 10m on test
6* password expire
User created.
SQL> alter database default tablespace test;
Database altered.
5,Creating a New User:Operating System Authentication
.OS_AUTHENT_PREFIX initialization parameter specifies the format of the usernames
.IDENTIFIED EXTERNALLY
SQL> show parameter OS_AU
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
os_authent_prefix string OPS$
remote_os_authent boolean FALSE
6,DAB_USERS,DBA_TS_QUOTAS