Download presentation
Presentation is loading. Please wait.
Published byAubrie Hancock Modified over 8 years ago
1
15 Copyright © Oracle Corporation, 2001. All rights reserved. Managing Users
2
15-2 Copyright © Oracle Corporation, 2001. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Create new database users Alter and drop existing database users Monitor information about existing users
3
15-3 Copyright © Oracle Corporation, 2001. All rights reserved. Account locking Tablespace quotas Temporary tablespace Default tablespace Role privileges Resource limits Security domain Direct privileges Authentication mechanism Users and Security
4
15-4 Copyright © Oracle Corporation, 2001. All rights reserved.
5
15-5 Copyright © Oracle Corporation, 2001. All rights reserved. Database Schema Schema Objects Tables Triggers Constraints Indexes Views Sequences Stored program units Synonyms User-defined data types Database links A schema is a named collection of objects. A user is created, and a corresponding schema is created. A user can be associated only with one schema. Username and schema are often used interchangeably.
6
15-6 Copyright © Oracle Corporation, 2001. All rights reserved. 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.
7
15-7 Copyright © Oracle Corporation, 2001. All rights reserved. Creating a New User: Database Authentication Set the initial password: CREATE USER aaron IDENTIFIED BY soccer DEFAULT TABLESPACE data DEFAULT TEMPORARY TABLESPACE temp QUOTA 15M ON data QUOTA 10M ON users PASSWORD EXPIRE;
8
15-8 Copyright © Oracle Corporation, 2001. All rights reserved.
9
15-9 Copyright © Oracle Corporation, 2001. All rights reserved.
10
15-10 Copyright © Oracle Corporation, 2001. All rights reserved. Creating a New User: Operating System Authentication The OS_AUTHENT_PREFIX initialization parameter specifies the format of the usernames. Defaults to OPS$. CREATE USER aaron IDENTIFIED EXTERNALLY DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE temp QUOTA 15m ON data PASSWORD EXPIRE;
11
15-11 Copyright © Oracle Corporation, 2001. All rights reserved.
12
15-12 Copyright © Oracle Corporation, 2001. All rights reserved. Changing User Quota on Tablespaces ALTER USER aaron QUOTA 0 ON USERS; A user’s tablespace quotas may be modified for any the following situations: Tables owned by a user exhibit unanticipated growth. An application is enhanced and requires additional tables or indexes. Objects are reorganized and placed in different tablespaces. To modify a user’s tablespace quota:
13
15-13 Copyright © Oracle Corporation, 2001. All rights reserved.
14
15-14 Copyright © Oracle Corporation, 2001. All rights reserved. Dropping a User Use the CASCADE clause to drop all objects in the schema if the schema contains objects. Users who are currently connected to the Oracle server cannot be dropped. DROP USER aaron; DROP USER aaron CASCADE;
15
15-15 Copyright © Oracle Corporation, 2001. All rights reserved.
16
15-16 Copyright © Oracle Corporation, 2001. All rights reserved. Obtaining User Information Information about users can be obtained by querying the following views: DBA_USERS DBA_TS_QUOTAS
17
15-17 Copyright © Oracle Corporation, 2001. All rights reserved. Summary In this lesson, you should have learned how to: Create users by specifying the appropriate password mechanism Control usage of space by users
18
15-18 Copyright © Oracle Corporation, 2001. All rights reserved. Practice 15 Overview This practice covers the following topics: Creating users Displaying data dictionary information about users Removing user quotas
19
15-19 Copyright © Oracle Corporation, 2001. All rights reserved.
20
15-20 Copyright © Oracle Corporation, 2001. All rights reserved.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.