1 Chapters 19 and 20  Ch. 19: By What Authority? Users Roles Grant and revoke Synonyms  Ch. 20: Changing the Oracle Surroundings Indexes Clusters Sequences.

Slides:



Advertisements
Similar presentations
13 Copyright © Oracle Corporation, All rights reserved. Controlling User Access.
Advertisements

Primer on Structure& Storage Analysis Primer on Structure & Storage Analysis This presentation is supposed to give a simple and brief overview for storage.
Basic Storage Concepts and Settings
System Administration Accounts privileges, users and roles
Oracle8 - The Complete Reference. Koch a& Loney1 By What Authority? Presented by Victor Matos.
Harvard University Oracle Database Administration Session 5 Data Storage.
About physical design After you have provided your scripts Understand the problems Present a template that can be used to report on the physical design.
INTEGRITY Enforcing integrity in Oracle. Oracle Tables mrobbert owner granted access.
INTRODUCTION TO ORACLE
Oracle Database Administration Database files Logical database structures.
9/11/2015ISYS366 - Week051 ISYS366 – Week 5-6 Database Tuning - User and Rollback Data Spaces, Recovery, Backup.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Chapter 6 Additional Database Objects
CHAPTER 6 Users and Basic Security. Progression of Steps for Creating a Database Environment 1. Install Oracle database binaries (Chapter 1) 2. Create.
9 Copyright © 2005, Oracle. All rights reserved. Administering User Security.
Copyright س Oracle Corporation, All rights reserved. 14 Controlling User Access.
Database Programming Sections 13–Creating, revoking objects privileges.
7202ICT Database Administration Lecture 7 Managing Database Storage Part 2 Orale Concept Manuel Chapter 3 & 4.
Extents, segments and blocks in detail. Database structure Database Table spaces Segment Extent Oracle block O/S block Data file logical physical.
To Presentation on SECURITY By Office of the A.G. (A&E) Punjab, Chandigarh.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC End User Management – Lecture 3 Copyright System Managers LLC 2007 all rights reserved.
Oracle Database Administration
Chapter 6 Additional Database Objects Oracle 10g: SQL.
7 Copyright © 2004, Oracle. All rights reserved. Administering Users.
9 Storage Structure and Relationships. 9-2 Objectives Listing the different segment types and their uses Controlling the use of extents by segments Stating.
Controlling User Access. Objectives After completing this lesson, you should be able to do the following: Create users Create roles to ease setup and.
Roles & privileges privilege A user privilege is a right to execute a particular type of SQL statement, or a right to access another user's object. The.
Database structure and space Management. Database Structure An ORACLE database has both a physical and logical structure. By separating physical and logical.
Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
Controlling User Access Fresher Learning Program January, 2012.
© 2009 Punjab University College of Information Technology (PUCIT) September 8, 2009 Slide 1 (SQL) Controlling User Access Asif Sohail University of the.
Database Programming Sections 11 & 12 –Sequences, Indexes, and Synonymns.
Week 4 Lecture 2 Advanced Table Management. Learning Objectives  Create tables with large object (LOB) columns and tables that are index-organized 
Database Security. Multi-user database systems like Oracle include security to control how the database is accessed and used for example security Mechanisms:
Copyright © 2004, Oracle. All rights reserved. CONTROLLING USER ACCESS Oracle Lecture 8.
Chapter 5 : Integrity And Security  Domain Constraints  Referential Integrity  Security  Triggers  Authorization  Authorization in SQL  Views 
Transactions, Roles & Privileges Oracle and ANSI Standard SQL Lecture 11.
Chapter 12 Additional Database Objects. Chapter Objectives  Define the purpose of a sequence and state how it can be used by an organization  Explain.
Altering Tables and Constraints Database Systems Objectives Add and modify columns. Add, enable, disable, or remove constraints. Drop a table. Remove.
IST 318 Database Administration Lecture 9 Database Security.
Chapter 13Introduction to Oracle9i: SQL1 Chapter 13 User Creation and Management.
Oracle 11g: SQL Chapter 7 User Creation and Management.
13 Copyright © Oracle Corporation, All rights reserved. Controlling User Access.
Database Security. Multi-user database systems like Oracle include security to control how the database is accessed and used for example security Mechanisms:
Database structure and space Management. Database Structure An ORACLE database has both a physical and logical structure. By separating physical and logical.
Chapter 12Introduction to Oracle9i: SQL1 Chapter 12 Additional Database Objects.
1 Copyright © 2006, Oracle. All rights reserved. Controlling User Access ( 사용자 접근 제어 )
1 Copyright © 2009, Oracle. All rights reserved. Controlling User Access.
Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
1 11g NEW FEATURES ByVIJAY. 2 AGENDA  RESULT CACHE  INVISIBLE INDEXES  READ ONLY TABLES  DDL WAIT OPTION  ADDING COLUMN TO A TABLE WITH DEFAULT VALUE.
Database Systems Slide 1 Database Systems Lecture 4 Database Security - Concept Manual : Chapter 20 - Database Security Manual : Chapters 5,10 - SQL Reference.
Copyright  Oracle Corporation, All rights reserved. 14 Controlling User Access.
Controlling User Access
Controlling User Access
Controlling User Access
Objectives User access Create users Create roles
TABLES AND INDEXES Ashima Wadhwa.
Controlling User Access
Managing Privileges.
Database structure and space Management
IS221: Database Management
Database Security.
ITEC 313 Database Programming
Database Tuning - User and Rollback Data Spaces, Recovery, Backup
Database Security.
Database structure and space Management
Chapter 5 Sequences.
Chapter 4 Indexes.
CH 4 Indexes.
CH 4 Indexes.
Presentation transcript:

1 Chapters 19 and 20  Ch. 19: By What Authority? Users Roles Grant and revoke Synonyms  Ch. 20: Changing the Oracle Surroundings Indexes Clusters Sequences Tablespaces

2 Ch. 19: CREATE USER  CREATE USER Create user username identified by password ; Create user username identified externally;  Changing passwords Alter user username identified by password ;  Password Management – determined by DBA created profiles. Password lifetime Grace period Account lock rules Password reuse rules  Moving to another user, connect sqlplus command CONNECT CONNECT username CONNECT username / password

3 Ch. 19: CREATE ROLE  Roles manage sets of privileges.  CREATE ROLE Create role rolename ;  Standard Oracle Roles CONNECT – connect to database and perform very limited functions. RESOURCE – for basic users. DBA – all system privileges.  Maximum roles allowed is set at startup, max_enabled_roles parameter (30 on phoenix).  Roles can have passwords, but do not by default.

4 Ch. 19: GRANT and REVOKE  Grant for object privileges GRANT {privilege, … | ALL} [ (column,…) ] on object to {user | role} [with grant option] [with hierarchy option];  Grant for system privileges GRANT {system privilege | role | ALL} to {user | role} [, {user | role}, …] [identified by password] [with admin option];  Revoke takes privileges from roles or users. REVOKE {system privilege | role | ALL} [, {system privilege | role | ALL} …] from {user | role} [, {user | role}, …];

5 Ch. 19: Synonyms, Examples, Other  What you can grant to other users Tables: alter, references, index, on commit refresh, query rewrite, all PL/SQL Procedures and Functions: execute Sequences: select, alter  Synonyms provide for another name for an object. CREATE [PUBLIC] SYNONYM SYNONYM FOR  Examples: CREATE ROLE MYTEAM; GRANT MYTEAM TO JOE, TOM, SUE; GRANT SELECT ON MYTABLE TO MYTEAM; GRANT UPDATE (COL1) ON MYTABLE TO MYTEAM; CREATE PUBLIC SYNONYM TAB1 FOR MYSCHEMA.MYTABLE;  Advanced Options for Security by User Virtual private database (VPD) adds a where clause to all commands issued by the user to restrict data to only his view of the database. Oracle Label Security uses security labels on all rows, users only have access to those in their hierarchy.

6 Ch. 20: CREATE INDEX  Indexes: Contains values of data from a table and their location Pro: Used to speed data retrieval, also can enforce uniqueness. Con: Slows updates and deletes. When to use: if columns are typically used in where clause searches Primary keys and unique constraints create a unique index automatically. NULL values are not indexed.  Syntax: CREATE [BITMAP|UNIQUE] INDEX index ON table(COL1 [, COL2…] ) [REVERSE];  Other Oracle Index Features: Reverse indexes builds an index on the indexed column in reverse byte order thus increasing the dispersal of values. Bitmap indexes, new in 8 or 8i ?, associates a bitmap to values and only stores the bitmap in the index. Use with low cardinality values (e.g. T/F) Function based indexes, new in 8i. Normal indexes are not used if a function is used on the where clause column that you’re searching on.

7 Ch. 20: CREATE CLUSTER  Clusters: Stores different tables physically together. The cluster key is the column that the data would normally be joined together with.  Syntax Example: Create cluster BOOKandAUTHOR(col1 varchar2(1000)); Create table BOOKSHELF (title varchar2(100) primary key, … ) cluster BOOKandAUTHOR(title);

8 Ch. 20: CREATE SEQUENCE  Sequences: Creates a unique sequentially valued number. Used during insert and update commands usually. Typically used to create a primary key. NextVal and CurrVal get the next/current value of the sequence.  Syntax: Create sequence myseq increment by 1 start with 1; Insert into CUSTOMER (id, name) values (myseq.nextval, ‘a’); Update OTHERTABLE set id = myseq.currval;

9 Ch. 20: Tablespaces and terminology  Tablespace Tablespaces are a logical organization of space. Tablespaces owns the database’s datafiles. Database objects are stored within tablespaces.  Database: a logical collection of shared data stored in tablespaces.  File: A physical datafile belonging to a single tablespace.  Segment: A set of one or more extents that contains all the data for a specific structure within a tablespace.  Extent: A set of contiguous data blocks with in a database that make up a segment.  Block: One or more physical file blocks allocated from an existing datafile.

10  Entity-Relationship Diagram showing: Database Tablespace Extents Segments Files Blocks Ch. 20: ERD

11 Ch. 20: Tablespace clause syntax  Tablespace Clause: indicates Tablespace and other storage options for tables, indexes, constraints.  Storage Clause: indicates how extents are managed, overrides the default storage parameters of tablespace.  Syntax: CREATE TABLE tablename ( column_atype NOT NULL, column_btype,...) STORAGE ( INITIAL 100K NEXT 20K MINEXTENTS 1 MAXEXTENTS 99 PCTINCREASE 50 ) TABLESPACE USER_DATA PCTFREE 5 PCTUSED 30;

12 Ch. 20: Tablespace and Segment Example SQL> select file_name, tablespace_name, bytes, blocks from dba_data_files FILE_NAME TABLESPACE_NAME BYTES BLOCKS /opt/oracle/u1/oradata/OS80/users01.dbf USERS /opt/oracle/u1/oradata/OS80/tools01.dbf TOOLS /opt/oracle/u1/oradata/OS80/temp01.dbf TEMP /opt/oracle/u1/oradata/OS80/rbs01.dbf RBS /opt/oracle/u1/oradata/OS80/system01.dbf SYSTEM /opt/oracle/u1/oradata/OS80/n311_t1.dbf USERDATA_N /opt/oracle/u1/oradata/OS80/csgrad_t1.dbf USERDATA_GRAD SQL> l 1 select tablespace_name, segment_name, segment_type, bytes, blocks, extents 2 from dba_segments 3* where owner = 'SCOTT' TABLESPACE_NAME SEGMENT_NA SEGMENT_TYPE BYTES BLOCKS EXTENTS SYSTEM BONUS TABLE SYSTEM SALGRADE TABLE SYSTEM WORKER TABLE SYSTEM TEMP_USERS TABLE SYSTEM LEDGER TABLE SYSTEM DEPT TABLE SYSTEM EMP TABLE SYSTEM PK_DEPT INDEX SYSTEM PK_EMP INDEX rows selected.