Presentation is loading. Please wait.

Presentation is loading. Please wait.

INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC End User Management – Lecture 3 Copyright System Managers LLC 2007 all rights reserved.

Similar presentations


Presentation on theme: "INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC End User Management – Lecture 3 Copyright System Managers LLC 2007 all rights reserved."— Presentation transcript:

1 INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC End User Management – Lecture 3 Copyright System Managers LLC 2007 all rights reserved.

2 END USER MANAGEMENT Create database users by using the CREATE/ALTER USER commands. Create database objects (tables, views, synonyms and indexes). Control database access/security by granting access privileges: grant update on emp to scott; Grant database access so that users can/cannot pass the privilege on to other users: grant update on emp to scott with admin option; Copyright System Managers LLC 2007 all rights reserved.

3 END USER MANAGEMENT To create a user named SCOTT with password TIGER: SQL > Create user scott identified by tiger SQL > Default tablespace users SQL > Temporary tablespace temp SQL > Quota 15m on users; Give SCOTT the privilege to connect to the database and create objects. SQL > Grant connect, resource to scott; Copyright System Managers LLC 2007 all rights reserved.

4 END USER MANAGEMENT End User Profiles – Resource Control SQL > CREATE PROFILE new_user LIMIT sessions_per_user 10 connect_time 30 idle_time 10; Altering User Access To Resources SQL > ALTER USER IDENTIFIED BY profile new_user;

5 END USER MANAGEMENT Create roles to automate the security/access process: SQL > create role manager; SQL > grant update on emp to manager; SQL > grant manager to scott; Oracle has several pre-defined roles. One of the pre-defined roles is called DBA. Copyright System Managers LLC 2007 all rights reserved.

6 END USER MANAGEMENT How to determine the privileges a user or role has: SQL > select grantee, privilege from sys.dba_sys_privs; How to determine which users are in which roles: SQL > select grantee, granted_role from sys.dba_role_privs;

7 OBJECT CREATION Database objects include: Tables – Used to store records (rows of data) Views – Like a table but takes up no disk space. Is based on an underlying table. Indexes – Use to speed retrieval of data from a table. Synonyms – Used to reference objects owned by another user without having to reference the object owners name/schema. Sequence – Used to generate a unique number Database links – Used to access data in one database from another database. Copyright System Managers LLC 2007all rights reserved.

8 OBJECT CREATION Create Table: Create table dept (deptno number, Creation date, Dname varchar2(10) Dloc varchar2(20); Create View: Create view DVIEW as select deptno, dname, dloc from dept; Copyright System Managers LLC 2007 all rights reserved.

9 OBJECT CREATION Create Index: Create index i_dept on dept(deptno); Create Synonym: Create public synonym dept on dept; Create Sequence: Create sequence dept_num start with 1 increment by 1; Copyright System Managers LLC 2007 all rights reserved.

10 OBJECT MANAGEMENT System and Object Management ALTER TABLE EMP ADD (COLx NUMBER(7,2)…..); ALTER TABLE EMP MODIFY (COLx NUMBER(8,2)); ALTER SESSION IDENTIFIED BY ; ALTER SYSTEM SET LICENSE_MAX_SESSIONS/USERS LICENSE_SYSTEMS_WARNINGS; Copyright System Managers LLC 2007 all rights reserved.

11 THE DATA DICTIONARY SOME ORACLE DATA DICTIONARY TABLES/VIEWS FOR MANAGING END USERS: Table/View Name Description DBA_USERS Names of all users of the database DBA_TABLES Names of all tables in the database DBA_INDEXES Names of all indexes in the database DBA_SYNONYMS Names of all indexes in the synonyms DBA_SEQUENCES Names of all sequences in the database DBA_VIEWS Names of all views in the database There are many other tables/views in the Oracle data dictionary. Refer to the Oracle Administrators Guide for a complete list/description Copyright System Managers LLC 2007 all rights reserved.

12 THE DATA DICTIONARY DATA DICTIONARY VIEWS ACCESSIBLE TO END USERS: DBA_ - End users must be granted the privilege to access the DBA views ALL_ - Objects that the end user has access to but did not create USER_ - Objects created by the end user Copyright System Managers LLC 2007 all rights reserved.


Download ppt "INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC End User Management – Lecture 3 Copyright System Managers LLC 2007 all rights reserved."

Similar presentations


Ads by Google