SQL2-ch1 控制使用者存取. 題號  80 題: 14 、 22 、 40 、 42 、 52  140 題: 9 、 40 、 103.

Slides:



Advertisements
Similar presentations
SQL1-ch7 集合運算 1. 題號  80 題: 50 、 55 、 62  140 題: 41 、 61 、
Advertisements

9 Creating and Managing Tables. Objectives After completing this lesson, you should be able to do the following: Describe the main database objects Create.
SQL2-ch2 管理綱要物件.
14-1 Copyright  Oracle Corporation, All rights reserved. Privileges Database security: – System security – Data security System privileges: Gain.
13 Copyright © Oracle Corporation, All rights reserved. Controlling User Access.
SQL1-ch11 使用資料說明視觀表 (Data Dictionary) 管理物件. 題號  80 題: 6 、 64  140 題: 105.
Database Security by Muhammad Waheed Aslam SIS Project Leader ITC/KFUPM.
Database Management System
A Guide to SQL, Seventh Edition. Objectives Create a new table from an existing table Change data using the UPDATE command Add new data using the INSERT.
System Administration Accounts privileges, users and roles
Security and Integrity
By Lecturer / Aisha Dawood 1.  Administering Users  Create and manage database user accounts.  Create and manage roles.  Grant and revoke privileges.
CHAPTER 6 Users and Basic Security. Progression of Steps for Creating a Database Environment 1. Install Oracle database binaries (Chapter 1) 2. Create.
Copyright س Oracle Corporation, All rights reserved. 14 Controlling User Access.
Database Programming Sections 13–Creating, revoking objects privileges.
Other database objects (Sequence). What Is a Sequence? A sequence: Automatically generates sequential numbers Is a sharable object Is typically used to.
16 Copyright © Oracle Corporation, All rights reserved. Managing Privileges.
Controlling User Access. Objectives After completing this lesson, you should be able to do the following: Create users Create roles to ease setup and.
Oracle 11g DATABASE DEVELOPMENT LAB1. Introduction  Oracle 11g Database:-  Oracle 11g database is designed for some features, which helps to the organizations.
Outline Introduction Basic SQL Setting Up and Using PostgreSQL
Chapter 2 Views. Objectives ◦ Create simple and complex views ◦ Creating a view with a check constraint ◦ Retrieve data from views ◦ Data manipulation.
SQL1-ch8 操作資料 (DML) 1. 題號  80 題: 47 、 67  140 題: 12 、 49 、 50 、 55 、 79 、 80 、 89 、
SQL1-ch5 顯示多個表格的資料. 題號  80 題: 34 、 57 、 71 、 72  140 題: 18 、 25 、 62 、 97 、 115 、 131.
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.
SQL1-ch10 其他綱要物件. 題號  80 題: 5 、 9 、 18 、 32 、 38 、 41 、 44 、 54 、 77  140 題: 76 、 78 、 120 、 132.
Controlling User Access. 2 home back first prev next last What Will I Learn? Compare the difference between object privileges and system privileges Construct.
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.
SQL1-ch1 使用SQL SELECT 敘述句擷取資料.
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.
IST 318 Database Administration Lecture 9 Database Security.
SQL2-ch4 群組相關資料以產生報表. 題號  80 題: 11 、 20 、 43 、 59 、 70 、 80  140 題: 14 、 88 、 113.
SQL1-ch4 群組函數與聚總資料. 題號  80 題: 33 、 39  140 題: 10 、 59 、 95 、 110.
Chapter 13Introduction to Oracle9i: SQL1 Chapter 13 User Creation and Management.
A Guide to SQL, Eighth Edition Chapter Six Updating Data.
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:
PRACTICE OVERVIEW PL/SQL Part Your stored procedure, GET_BUDGET, has a logic problem and must be modified. The script that contains the procedure.
1 Copyright © 2006, Oracle. All rights reserved. Controlling User Access ( 사용자 접근 제어 )
SQL1-ch9 使用 DDL 建立與管理表格 1. 題號  80 題: 63 、 76  140 題: 6 、 24 、 44 、 71 、 77 、 92 2.
1 Copyright © 2009, Oracle. All rights reserved. Controlling User Access.
19 Managing Privileges Objectives Identifying system and object privileges Granting and revoking privileges Controlling operating system or password.
Creating and Revoking Object Privileges. 2 home back first prev next last What Will I Learn? Explain what a ROLE is and what its advantages are. Construct.
A Guide to MySQL 6. 2 Objectives Create a new table from an existing table Change data using the UPDATE command Add new data using the INSERT command.
 CONACT UC:  Magnific training   
Copyright  Oracle Corporation, All rights reserved. 14 Controlling User Access.
Controlling User Access
Controlling User Access
IS221: Database Management
Managing Privileges.
Controlling User Access
Objectives User access Create users Create roles
TABLES AND INDEXES Ashima Wadhwa.
Controlling User Access
Managing Privileges.
Database Security.
ITEC 313 Database Programming
Database Security.
OER- UNIT 3 Authorization
Session #, Speaker Name Database Privileges 11/29/2018.
Chapter 2 Views.
SQL .. An overview lecture3.
Chapter 2 Views.
Create New User in Database. First Connect the System.
Managing Privileges.
SQL2-ch3 操控大型資料集.
Permissions to database objects Indexes RUNSQLSTM Referential Constraint options ON DELETE RESTRICT ON DELETE CASCADE ON DELETE SET DEFAULT Lab.
Presentation transcript:

SQL2-ch1 控制使用者存取

題號  80 題: 14 、 22 、 40 、 42 、 52  140 題: 9 、 40 、 103

建立使用者與角色  建立使用者  建立角色

授權  將 departments 的 select 、 inert 權限 授權給 scott 使用者。  With Grant Option :允許 scott 繼續授權。  收回授權: Revoke

Q14/80 OE and SCOTT are the users in the database. The ORDERS table is owned by OE. Evaluate the statements issued by the DBA in the following sequence: CREATE ROLE r1; GRANT SELECT, INSERT ON oe.orders TO r1; GRANT r1 TO scott; GRANT SELECT ON oe.orders TO scott; REVOKE SELECT ON oe.orders FROM scott; What would be the outcome after executing the statements?

A. SCOTT would be able to query the OE.ORDERS table. B. SCOTT would not be able to query the OE.ORDERS table. C. The REVOKE statement would remove the SELECT privilege from SCOTT as well as from the role R1. D. The REVOKE statement would give an error because the SELECT privilege has been granted to the role R1. CREATE ROLE r1; GRANT SELECT, INSERT ON oe.orders TO r1; GRANT r1 TO scott; GRANT SELECT ON oe.orders TO scott; REVOKE SELECT ON oe.orders FROM scott; CREATE ROLE r1; GRANT SELECT, INSERT ON oe.orders TO r1; GRANT r1 TO scott; GRANT SELECT ON oe.orders TO scott; REVOKE SELECT ON oe.orders FROM scott;

Q40/80 User OE, the owner of the ORDERS table, issues the following command: GRANT SELECT,INSERT ON orders TO hr WITH GRANT OPTION; The user HR issues the following command: GRANT SELECT ON oe.orders TO scott; Then, OE issues the following command: REVOKE ALL ON orders FROM hr; Which statement is correct?

A. The user SCOTT loses the privilege to select rows from OE.ORDERS. B. The user SCOTT retains the privilege to select rows from OE.ORDERS. C. The REVOKE statement generates an error because OE has to first revoke the SELECT privilege from SCOTT. D. The REVOKE statement generates an error because the ALL keyword cannot be used for privileges that have been granted using WITH GRANT OPTION.

系統權限  系統權限:取得資料庫的存取權  物件權限:操控物件的內容

Q22/80 Which statement correctly grants a system privilege? A. GRANT EXECUTE ON proc1 TO PUBLIC; B. GRANT CREATE VIEW ON table1 TO user1; C. GRANT CREATE TABLE TO user1, user2; D. GRANT CREATE SESSION TO ALL;

Q42/80 SCOTT is a user in the database. Evaluate the commands issued by the DBA: 1 - CREATE ROLE mgr; 2 - GRANT CREATE TABLE, SELECT ON oe.orders TO mgr; 3 - GRANT mgr, create table TO SCOTT; Which statement is true regarding the execution of the above commands?

A. Statement 1 would not execute because the WITH GRANT option is missing. B. Statement 1 would not execute because the IDENTIFIED BY clause is missing. C. Statement 3 would not execute because role and system privileges cannot be granted together in a single GRANT statement. D. Statement 2 would not execute because system privileges and object privileges cannot be granted together in a single GRANT command. 1 - CREATE ROLE mgr; 2 - GRANT CREATE TABLE, SELECT ON oe.orders TO mgr; 3 - GRANT mgr, create table TO SCOTT;

Q52/80 View the Exhibit and examine the structure of the ORDERS table. The ORDERS table belongs to the user OE. HR is another user in the database. Evaluate the commands issued by users OE and HR in the following order: Statement 1 by user OE: GRANT SELECT, UPDATE(customer_id, order_total) ON orders TO hr; Statement 1 by user HR: SELECT * FROM oe.orders; Statement 2 by user HR: UPDATE oe.orders SET order_total= 10000; Which statement is true regarding the above commands?

A. Statement 1 by user OE would not work because the statement has to be issued by the DBA. B. Statement 2 by user HR would not work because the grant is only for SELECT in a subquery of update. C. There are no errors in the statements issued by OE and HR; all the statements would execute successfully. D. Statement 1 by user HR would not work because SELECT and UPDATE privileges have been granted only on CUSTOMER_ID and ORDER_TOTAL columns.

Q9/140 Which two statements are true regarding roles? (Choose two.) A. A role can be granted to itself. B. A role can be granted to PUBLIC. C. A user can be granted only one role at any point of time. D. The REVOKE command can be used to remove privileges but not roles from other users. E. Roles are named groups of related privileges that can be granted to users or other roles.

Q40/140 Which statement correctly differentiates a system privilege from an object privilege? A. System privileges can be granted only by the DBA whereas object privileges can be granted by DBAs or the owner of the object. B. System privileges give the rights to only create user schemas whereas object privileges give rights to manipulate objects in a schema. C. Users require system privileges to gain access to the database whereas they require object privileges to create objects in the database. D. A system privilege is the right to perform specific activities in a database whereas an object privilege is a right to perform activities on a specific object in the database.

Q103/140 The user SCOTT who is the owner of ORDERS and ORDER_ITEMS tables issues the following GRANT command: GRANT ALL ON orders, order_items TO PUBLIC; What correction needs to be done to the above statement? A. PUBLIC should be replaced with specific usernames. B. ALL should be replaced with a list of specific privileges. C. WITH GRANT OPTION should be added to the statement. D. Separate GRANT statements are required for ORDERS and ORDER_ITEMS tables.