Vous êtes sur la page 1sur 18

CS 522 - Database Administration Manage Users

http://class.svuca.edu/~d.liang/
(dongming.liang@svuca.edu) Silicon Valley University Dr. Dongming Liang

Agenda
Create new database users Alter and drop DB users Monitor information about users

User and Security


DBA defines the names of the users allowed to access a database A security domain defines the settings that applied to the user
3

Authentication
A user who needs access to the database can be authenticated by one of the following
Data dictionary Operational system Network

Tablespaces
Tablespace quotas control the amount of physical storage allocated to a user Default tablespace defines the location where segments are stored if no explicit tablespace specified Temporary tablespace defines where to write sort data
5

Account Locking
Accounts can be locked to prevent a user from logging on to the database This can be set to occur automatically Or DBA can lock or unlock account manually
6

Resource Limits
Limits can be placed on the use of resources, such as:
CPU time Logical I/O Number of session opened by a user

Privileges
Direct privileges: privileges are used to control the actions a user can perform in a database Role privileges: a user can be granted privileges indirectly through the use of roles
8

Database Schema
A schema is a named collection of objects A user is created, and a corresponding schema is created User can be associated with only one schema Username and schema are often used interchangeably
9

Schema Objects
Tables Views Clusters Procedures Packages Indexes Etc
10

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 the user
11

Create a User: DB Authentication


Set the initial password

12

Create a User: OS Authentication


A user who logs on to the machine running the Oracle server need not supply a password

User aaron can log on by $ sqlplus /


13

Change User Quota


You may need to modify tablespace quotas in the following situations
When tables owned by a user exhibit unanticipated growth When an application is enhanced and requires additional tables and indexes When objects are reorganized and placed in different tablespaces

Alter USER arron QUOTA 100M on USERS


14

Drop a User
DROP USER arron; Use the CASCADE clause to drop all objects in the schema if the schema contains objects DROP USER arron CASCADE; Users currently connected to the Oracle server cannot be dropped
15

Obtain User Information


Information about users can be obtained by querying the data dictionary DBA_USERS DBA_TS_QUOTAS

16

Example: DBA_USERS
Find the default tablespace for all users

17

Summary
Create user
specifying the appropriate password mechanism

Control usage of space

18

Vous aimerez peut-être aussi