Orcale Tutorial Content

Loading...

Getting Started - البدء مع إدارة قواعد البيانات
  • أنواع مستخدمي قواعد البيانات:
  • مهام مسؤول قاعدة البيانات:
  • SQL Statements:
  • Identifying Your Oracle Database Software Release - تحديد إصدار اوركل
  • About Database Administrator Security and Privileges- أمان وامتيازات مسؤول قاعدة البيانات
  • Database Administrator Authentication - مصادقة مسؤول قاعدة البيانات
  • Creating and Maintaining a Database Password File - إنشاء ملف كلمة المرور
  • Oracle Architectural Components - مكونات قاعدة البيانات أوركل
  • ﻤﻜﻭﻨﺎﺕ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ
  • Oracle Instance
  • Oracle Database
  • Installing Oracle Database - تثبيت الأوركل
  • Installing oracle database 10g in windows
  • Creating and Configuring Database - إنشاء قاعدة البيانات
  • ﺍﻟﺘﺨﻁﻴﻁ ﻟﻘﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ
  • ﺇﻨﺸﺎﺀ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ ﺒﺎﻟﻁﺭﻴﻘﺔ ﺍﻟﻴﺩﻭﻴﺔ علي Windows:
  • ﺇﻨﺸﺎﺀ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ ﻋﻥ ﻁﺭﻴﻕ ﺍل(DBCA)
  • About Creating an Oracle Database
  • About Selecting a Character Set
  • Prerequisites for Database Creation
  • Creating a Database with the CREATE DATABASE Statement
  • Specifying CREATE DATABASE Statement Clauses
  • Specifying Initialization Parameters
  • Controlling The Database -التحكم في قاعدة البيانات
  • التحكم في قاعدة البيانات - Controlling The Database
  • ﺘﺸﻐﻴل ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ
  • ﺇﻏﻼﻕ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ
  • Opening a Database in Read-Only Mode
  • Opening a Database in Restricted Mode
  • Managing Tablespaces and Data files
  • ﻤﻔﺎﻫﻴﻡ ﻋﺎﻤﺔ ﻋﻥ ﺍل: Tablespaces
  • عملي
  • Control File & Redo Log Files
  • Control File
  • ﺘﻐﻴﻴﺭ ﺍﺴﻡ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ
  • Redo Log Files
  • Administrating Users - إدارة المستخدمين
  • ﺇﻨﺸﺎﺀ ﻭﺇﺩﺍﺭﺓ ﺍﻟﻤﺴﺘﺨﺩﻤﻴﻥ
  • Quota
  • ﻭﺴﻴﻠﺔ ﺍﻟﺘﺤﻘﻴﻕ
  • ﺍﻟﺼﻼﺤﻴﺎﺕ - Privileges
  • ROLES
  • PROFILES
  • Database Security & Monitoring - تأمين ومراقبة قاعدة البيانات
  • Database Security
  • ﻤﺭﺍﻗﺒﺔ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ - AUDITING
  • Oracle Net Services & Database Link & Metrlized Viewِ
  • Oracle Net Services
  • ﺍﻟﺘﺤﻜﻡ ﻓﻲ ﺍﻟﻭﺼﻭل ﻟﻘﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ
  • External Procedures
  • Clients Side
  • Database Link
  • Materialized Views
  • Undo Management & Flashback Technology
  • UNDO MANAGEMENT
  • Flashback Query
  • Flashback Table
  • Flashback Versions Query
  • Flashback Transaction
  • Flashback Drop
  • Flashback Database
  • Managing Shared Servers
  • Why Shared Server
  • Dedicated Server
  • Shared Server Architecture
  • ﻤﺘﻰ ﻨﺴﺘﺨﺩﻡ ﺍل Shared Server ؟
  • Using Globalization Support
  • Globalization
  • ﺍﺨﺘﻴﺎﺭ وتغيير ﺍل Character Set
  • ﻤﺴﺘﻭﻴﺎﺕ ﺍل Globalization
  • ﺍﺴﺘﺨﺩﺍﻡ ﺍل Zones Time
  • Logical Backup & Recovery
  • Use Export Utilities to Export Data
  • TABLES EXPORT Using Export Utilities
  • SCHEMAS EXPORT Using Export Utilities
  • TABLESPACE EXPORT Using Export Utilities
  • DATABASE EXPORT Using Export Utilities
  • Use Import Utilities to Import Data
  • TABLES IMPORT Using Import Utilities
  • SCHEMAS IMPORT Using Import Utilities
  • DATABASE IMPORT Using Import Utilities
  • DATA PUMP
  • TABLES EXPORT Using Data Pump
  • SCHEMAS EXPORT Using Data Pump
  • DATABASE EXPORT Using Data Pump
  • TABLES IMPORT Using Data Pump
  • SCHEMAS IMPORT Using Data Pump
  • DATABASE IMPORT Using Data Pump
  • SQL*Loader
  • Physical Backup & Recovery
  • Physical Backup
  • ﻜﻴﻑ ﻨﻬﻴﺊ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ ﻟﺘﻌﻤل ﻓﻲ ﺍﻟﻨﻤﻁ ARCHIVELOG؟
  • Cold Backup
  • Full Database Recovery
  • Loss of a Non-SYSTEM Data File
  • Loss of a SYSTEM Data File
  • Loss of an Un-archived Online Log Files
  • Loss of Control Files
  • Loss Unbackup Datafile
  • Damage Tempfile
  • Damage Temporary Tablespace
  • Damage Online Logfile Member
  • Point in Time Recovery
  • Backup and Recovery Options
  • Hot Backup
  • Recovery Manager (RMAN)
  • مقدمة
  • مكونات ال Recovery Manager (RMAN)
  • ﺃﻨﻭﺍﻉ ﺍﻻﺘﺼﺎل ﺒﺎل RMAN
  • ﺨﻴﺎﺭﺍﺕ وأنماط ﺍﻟﻨﺴﺦ ﺍﻹﺤﺘﻴﺎﻁﻰ
  • RMAN Configuration Setting
  • Recovery Catalog
  • RMAN Backups
  • Data Files Backup
  • Tablespaces Backup
  • Archived Redo Log Files Backup
  • Control File Backup
  • Database Backup
  • Incremental Backups
  • RMAN Commands
  • Complete Recovery
  • Incomplete Recovery
  • Restore ControlFile and spfile
  • Managing Resources
  • Consumer Groups
  • Resource Manager Plans
  • Resource Manager Configuration
  • Create Consumer Group
  • Update Consumer Group
  • Delete Consumer Group
  • Privileges & Resource Manager
  • Join To Consumer Group
  • Move Active User To Other Consumer Group
  • Create Resource Manager Plans & Directive
  • Update Resource Manager Plans
  • Update Resource Manager Plan Directives
  • Delete Resource Manager Plan Directives
  • Delete Resource Manager Plans
  • Create Simple Plan
  • Consumer Group Mapping
  • Automating Tasks with the Scheduler
  • The Scheduler Architecture
  • Jobs
  • Programs
  • Schedules
  • Using Programs and Schedules
  • Job Classes
  • Windows
  • (Privileges) ﺍﻟﺼﻼﺤﻴﺎﺕ
  • Job Logs
  • Dealing with Locking
  • Shared & Exclusive Locks
  • Manual Lock Table
  • The Enqueue Mechanism
  • Lock Contention
  • Deadlocks
  • Diagnostic Sources
  • Alert Log
  • Background Trace Files
  • Server-Generated Alerts
  • Editing Thresholds
  • User Trace Files
  • Instance-Level SQL Tracing
  • Session-Level SQL Tracing
  • Dealing With Database Corruption
  • Block Corruption
  • ﺍﻜﺘﺸﺎﻑ ﺍﻟﻜﺘل ﺍﻟﻔﺎﺴﺩﺓ (Detecting Block Corruptions)
  • The DBVERIFY Utility
  • The ANALYZE Command
  • DBMS_REPAIR Backage
  • ﺍﺴﺘﺭﺠﺎﻉ ﺍﻟﻜﺘل ﺍﻟﻔﺎﺴﺩﺓ ﺒﻭﺍﺴﻁﺔ ﺍل:RMAN
  • Managing & Monitoring Memory
  • The System Global Area
  • The Shared Pool
  • The Database Buffer Cache
  • The Default, Keep, and Recycle Pools
  • The Nonstandard Block Size Pools
  • Sizing the Database Buffer Cache
  • The Log Buffer
  • The Large Pool
  • The Java Buffer
  • The Steams Buffer
  • Automatic Shared Memory Management
  • Enable Automatic Shared Memory Management
  • The Program Global Area (PGA)
  • Performance Tunning
  • Invalid Objects
  • Unusable Indexes
  • Rebuild Invalid Inexes
  • Optimizer Statistics
  • Gathering Statistics
  • The Automatic Workload Repository (AWR)
  • The Automatic Database Diagnostic Monitor (ADDM)
  • The SQL Tuning Advisor
  • The SQL Access Advisor
  • The Mean Time to Recover Advisor
  • The Segment Advisor
  • The Undo Advisor
  • Administrating Users - إدارة المستخدمين

    ﺍﻟﺼﻼﺤﻴﺎﺕ - Privileges

    ﻜل ﺍﻟﻤﺴﺘﺨﺩﻤﻴﻥ ﺍﻟﺫﻴﻥ ﻗﻤﻨﺎ ﺒﺈﻨﺸﺎﺌﻬﻡ ﻓﻲ ﺍﻟﺴﻴﻨﺎﺭﻴﻭﻫﺎﺕ ﺍﻟﺴﺎﺒﻘﺔ ﻻ ﻴﺴﺘﻁﻴﻌﻭﻥ ﺍﻻﺘﺼﺎل ﺒﻘﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ ﻓﻀﻼﹰ ﻋﻥ ﺍﻟﻘﻴﺎﻡ ﺒﺄﻱ ﻤﻬﺎﻡ ﺃﺨﺭﻯ ﺇﺫ ﻟﻴﺱ ﻟﺩﻴﻬﻡ ﺼﻼﺤﻴﺎﺕ ﺒﺫﻟﻙ.

    ﻓﻲ ﺍﻟﺨﻁﻭﺍﺕ ﺍﻟﺴﺎﺒﻘﺔ ﻗﻤﻨﺎ ﺒﺈﻨﺸﺎﺀ ﺍﻟﻤﺴﺘﺨﺩﻡ ﻭﺤﺩﺩﻨﺎ ﻟﻪ ﻁﺭﻴﻘﺔ ﺍﻟﺘﺤﻘﻕ ﻭﻤﻨﺤﻨﺎﻩ ﺍﻟﺤﺼﺔ ﺍﻟﻤﻁﻠﻭﺒﺔ ﻭﺤﺩﺩﻨﺎ ﻟﻪ ﺍلProfile ﻹﺩﺍﺭﺓ ﻜﻠﻤﺔ ﺍﻟﻤﺭﻭﺭ ﻭﺍﻟﻤﻭﺍﺭﺩ، ﻟﻜﻥ ﻴﻨﺘﻅﺭﻨﺎ ﺍﻵﻥ ﺃﻥ ﻨﻌﻁﻴﻪ ﺼﻼﺤﻴﺎﺕ

    ﻟﻠﻌﻤل ﻓﻲ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ، ﻭﻴﻜﻭﻥ ﻤﻨﺢ ﺍﻟﺼﻼﺤﻴﺎﺕ ﻋﻥ ﻁﺭﻴﻕ ﻤﺩﻴﺭ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ ﺃﻭ ﻤﻥ ﻴﻤﻠﻙ ﺍﻟﺼﻼﺤﻴﺎﺕ.

    ﻫﻨﺎﻙ ﻨﻭﻋﻥ ﻤﻥ ﺍﻟﺼﻼﺤﻴﺎﺕ :-

    1- -System Privileges: ﻭﻫﻲ ﻟﺘﻤﻜﻴﻥ ﺍﻟﻤﺴﺘﺨﺩﻤﻴﻥ ﻤﻥ ﺍﻨﺠﺎﺯ ﺃﻋﻤﺎل ﻤﻌﻴﻨﺔ ﻋﻠﻰ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ.

    ﻭﻫﻨﺎﻙ ﺃﻜﺜﺭ ﻤﻥ 700 ﺼﻼﺤﻴﺔ System Privileges ﻋﻠﻰ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ، ﻋﻠﻰ ﺴﺒﻴل ﺍﻟﻤﺜﺎل :

    SYSDBA: ﻫﺫﻩ ﺍﻟﺼﻼﺤﻴﺔ ﺘﺴﻤﺢ ﻟﻠﻤﺴﺘﺨﺩﻡ ﺇﻏﻼﻕ ﻭﻓﺘﺢ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ.

    TABLESPACE :CREATE ﺘﺴﻤﺢ ﻟﻠﻤﺴﺘﺨﺩﻡ ﺇﻨﺸﺎﺀ Tablespace.

    ﻋﻤﻭﻤﹰﺎ ﻴﻤﻜﻥ ﺍﺴﺘﻌﺭﺍﺽ ﻜل ﺍﻟﺼﻼﺤﻴﺎﺕ System Privileges ﺍﻟﻤﺘﺎﺤﺔ ﻟﻤﺩﻴﺭ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ ﻋﻥ ﻁﺭﻴﻕ ﺍﻻﺴﺘﻌﻼﻡ ﺍﻷﺘﻲ :-

     

    SELECT PRIVILEGE FROM DBA_SYS_PRIVS;

     

    ﻭﻟﻨﻔﺘﺭﺽ ﺃﻨﻨﺎ ﻨﺭﻴﺩ ﻤﻨﺢ ﺒﻌﺽ ﺍﻟﺼﻼﺤﻴﺎﺕ System Privileges ﻟﻠﻤﺴﺘﺨﺩﻡ TEST .

     

    GRANT CREATE TABLESPACE TO TEST;

     

    ﻫﻜﺫﺍ ﻤﻨﺤﻨﺎ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST ﺼﻼﺤﻴﺔ ﺇﻨﺸﺎﺀ ﺍلTablespace .

    ﻴﺠﺏ ﻤﺭﺍﻋﺎﺓ ﺍﻟﻜﻠﻤﺔ ANY ﻋﻨﺩ ﻤﻨﺢ ﺍﻟﺼﻼﺤﻴﺎﺕ، ﻭﻟﺘﻭﻀﻴﺢ ﻫﺫﺍ ﺍﻟﻤﻌﻨﻰ ﻨﻼﺤﻅ ﺍﻟﻔﺭﻕ ﺒﻴﻥ ﺍﻟﺼﻼﺤﻴﺎﺕ:

    SELECT TABLE : ﺘﺴﻤﺢ ﻟﻠﻤﺴﺘﺨﺩﻡ ﻋﻤل SELECT ﻋﻠﻰ ﺍﻟﺠﺩﺍﻭل ﺍﻟﺘﻲ ﻴﻤﻠﻜﻬﺎ ﺍﻟﻤﺴﺘﺨﺩﻡ ﺍﻟﻤﺎﻨﺢ.

    SELECT ANY TABLE : ﺘﺴﻤﺢ ﻟﻠﻤﺴﺘﺨﺩﻡ ﻋﻤل ﺍﺴﺘﻌﻼﻡ SELECT ﻋﻠﻰ ﺍﻟﺠﺩﺍﻭل ﺍﻟﺘﻰ ﻴﻤﻠﻜﻬﺎ ﺍﻟﻤﺴﺘﺨﺩﻤﻴﻥ.

     

    ﻫﻨﺎﻙ ﺨﻴﺎﺭ ﻋﻨﺩ ﻤﻨﺢ ﺍﻟﺼﻼﺤﻴﺎﺕ System Privileges ﻟﻠﻤﺴﺘﺨﺩﻤﻴﻥ ﻭﻫﻭ ﺍﻟﺨﻴﺎﺭ WITH ADMIN OPTION .

    ﻫﺫﺍ ﺍﻟﺨﻴﺎﺭ ﻴﻌﻨﻰ ﺃﻥ ﺍﻟﻤﺴﺘﺨﺩﻡ ﺒﻌﺩ ﺃﻥ ﻴﻤﻠﻙ ﺍﻟﺼﻼﺤﻴﺔ ﻴﺴﺘﻁﻴﻊ ﻤﻨﺤﻬﺎ ﻟﻐﻴﺭﻩ ﻤﻥ ﺍﻟﻤﺴﺘﺨﺩﻤﻴﻥ.

     

    GRANT ALTER SYSTEM TO TEST WITH ADMIN OPTION;

     

    ﺍﻟﻤﺴﺘﺨﺩﻡ TEST ﺍﻵﻥ ﻴﻤﻠﻙ ﺍﻟﺼﻼﺤﻴﺔ ALTER SYSTEM ﻭﻴﺴﺘﻁﻴﻊ ﻤﻨﺤﻬﺎ ﻟﻐﻴﺭﻩ ﻤﻥ ﺍﻟﻤﺴﺘﺨﺩﻤﻴﻥ. ﻫﻨﺎﻙ ﺒﻌﺽ ﺍﻟﺼﻼﺤﻴﺎﺕ ﺍﻟﺘﻰ ﻴﺠﺏ ﺃﻥ ﻻ ﺘﻤﻨﺢ ﺇﻟﻰ ﻟﻤﺩﻴﺭﻱ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ ﻭﻴﺠﺏ ﻤﺭﺍﻋﺎﺓ ﺍﻟﺴﺭﻴﺔ ﻋﻨﺩ ﺍﻟﻤﻨﺢ ﻤﺜﻼﹰ

    (ALTER DATABASE & SESSION RESTRICTED & SYSOPER & SYSDBA) ﻭﻏﻴﺭﻩ ﻤﻥ ﺍﻟﺼﻼﺤﻴﺎﺕ ﺍﻟﺘﻰ ﻴﺠﺏ ﺃﻥ ﺘﻜﻭﻥ ﻓﻘﻁ ﻟﻤﺩﺭﺍﺀ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ.

    ﺒﺎﻟﻁﺒﻊ ﻴﻤﻜﻥ ﺴﺤﺏ ﺍﻟﺼﻼﺤﻴﺎﺕ ﻤﻥ ﺍﻟﻤﺴﺘﺨﺩﻤﻴﻥ، ﻭﻟﻨﻔﺘﺭﺽ ﺃﻨﻨﺎ ﻨﺭﻴﺩ ﺴﺤﺏ ﺼﻼﺤﻴﺔ  CREATE TABLESPACE ﻤﻥ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST.

     

    REVOKE CREATE TABLESPACE FROM TEST;

     

    ﺘﺨﻴل ﻫﺫﺍ ﺍﻟﺴﻴﻨﺎﺭﻴﻭ ﻭﻫﻭ ﺃﻥ ﻤﺩﻴﺭ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ ﻤﻨﺢ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST ﺼﻼﺤﻴﺔ CREATE TABLESPACE عن طريق الخيار WITH ADMIN OPTION، ﻗﺎﻡ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST ﺒﺈﻨﺸﺎﺀ

    Tablespace ﻭﻤﻥ ﺜﻡ ﻤﻨﺢ ﻫﺫﻩ ﺍﻟﺼﻼﺤﻴﺔ ﻟﻤﺴﺘﺨﺩﻡ ﺁﺨﺭ اسمه TEST1.

    ﺃﺭﺍﺩ ﻤﺩﻴﺭ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ ﺴﺤﺏ ﺍﻟﺼﻼﺤﻴﺔ CREATE TABLESPACE ﻤﻥ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST.

    ﺃﻭﻻ ﺴﻴﺘﻡ ﺴﺤﺏ ﺍﻟﺼﻼﺤﻴﺔ ﻤﻥ ﺍﻟﻤﺴﺘﺨﺩﻡ ﺩﻭﻥ ﺍﻟﺘﺄﺜﻴﺭ ﻋﻠﻰ ﺍﻟﻤﻬﺎﻡ ﺍﻟﺘﻰ ﻨﻔﺫﻫﺎ ﺒﻭﺍﺴﻁﺔ ﻫﺫﻩ ﺍﻟﺼﻼﺤﻴﺔ ﻭﻫﻰ ﻫﻨﺎ ﺇﻨﺸﺎﺀ ﺍل.Tablespace.

    ﺜﺎﻨﻴﹰﺎ: ﺍﻟﻤﺴﺘﺨﺩﻡ TEST1 ﻻ ﻴﺘﺄﺜﺭ ﺒﺴﺤﺏ ﺍﻟﺼﻼﺤﻴﺎﺕ ﻤﻥ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST.

    ﻫﺫﺍ ﺍﻟﻤﺴﺘﺨﺩﻡ ﻴﺴﺘﻁﻴﻊ ﻤﻌﺭﻓﺔ ﻤﺎ ﻴﻤﻠﻜﻪ ﻤﻥ ﺼﻼﺤﻴﺎﺕ System Privileges ﻋﻥ ﻁﺭﻴﻕ ﺍﻻﺴﺘﻌﻼﻡ :-

     

    SELECT PRIVILEGE FROM USER_SYS_PRIVS;

     

    ﻟﻼﺴﺘﻌﻼﻡ:

    DBA_ROLES

    USER_ROLE_PRIVS

    DBA_ROLE_PRIVS

    ROLE_ROLE_PRIVS

    ROLE_SYS_PRIVS

    ROLE_TAB_PRIVS

    SESSION_PRIVS

     

    2- -Object Privileges: ﻭﻫﻲ ﺘﻤﻜﻥ ﺍﻟﻤﺴﺘﺨﺩﻤﻴﻥ ﻤﻥ ﺍﻟﻭﺼﻭل ﻭﺍﻟﺘﻌﺎﻤل ﻤﻊ ﺍﻟﻜﺎﺌﻨﺎﺕ، ﺒﺩﻭﻥ ﻫﺫﻩ ﺍﻟﺼﻼﺤﻴﺎﺕ ﺍﻟﻤﺴﺘﺨﺩﻡ ﻻ ﻴﺴﺘﻁﻴﻊ ﺍﻟﺘﻌﺎﻤل ﺇﻻ ﻤﻊ ﺍﻟﻜﺎﺌﻨﺎﺕ ﺍﻟﺘﻲ ﻴﻤﻠﻜﻬﺎ.

    ﺍﻟﻤﺴﺘﺨﺩﻡ ﻓﻲ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ ﻟﻪ ﺼﻼﺤﻴﺎﺕ ﺒﺎﻟﻁﺒﻊ ﻋﻠﻰ ﺍﻟﻜﺎﺌﻨﺎﺕ ﺍﻟﺘﻰ ﻴﻤﻠﻜﻬﺎ، ﻴﺴﺘﻁﻴﻊ ﺍﻟﻤﺴﺘﺨﺩﻡ ﺃﻥ ﻴﻤﻨﺢ ﺼﻼﺤﻴﺎﺕ ﻟﻤﺴﺘﺨﺩﻡ ﺁﺨﺭ ﻟﻠﻭﺼﻭل ﻟﻠﻜﺎﺌﻨﺎﺕ ﺍﻟﺘﻰ ﻴﻤﻠﻜﻬﺎ،

    ﻭﻜﺫﻟﻙ ﻤﺩﻴﺭ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ ﻴﺴﺘﻁﻴﻊ ﻤﻨﺢ ﺼﻼﺤﻴﺎﺕ ﻟﻠﻤﺴﺘﺨﺩﻤﻴﻥ ﻟﻠﻭﺼﻭل ﻟﻜﺎﺌﻨﺎﺕ ﻴﻤﻠﻜﻬﺎ ﻤﺴﺘﺨﺩﻤﻭﻥ ﺁﺨﺭﻭﻥ.

    ﻨﻔﺘﺭﺽ ﺃﻥ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST ﻴﻤﻠﻙ ﺠﺩﻭل ﺍﺴﻤﻪ EXAMPLE، ﻫﺫﺍ ﺍﻟﻤﺴﺘﺨﺩﻡ ﻴﺭﻴﺩ ﻤﻨﺢ ﺼﻼﺤﻴﺔ SELECT ﻋﻠﻰ ﻫﺫﺍ ﺍﻟﺠﺩﻭل ﻟﻠﻤﺴﺘﺨﺩﻡ TEST1.

     

    GRANT SELECT ON EXAMPLE TO TEST1;

     

    ﻤﺎﺫﺍ ﻟﻭ ﺃﺭﺍﺩ ﻤﺩﻴﺭ ﻗﺎﻋﺩﺓ ﺍﻟﺒﻴﺎﻨﺎﺕ ﻤﻨﺢ ﺍﻟﺼﻼﺤﻴﺔ SELECT ﻋﻠﻰ ﺍﻟﺠﺩﻭل EXAMPLE ﺍﻟﺫﻱ ﻴﻤﺘﻠﻜﻪ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST ﻟﻠﻤﺴﺘﺨﺩﻡ TEST1.

     

    GRANT SELECT ON TEST.EXAMPLE TO TEST1;

     

    ﻜﺫﻟﻙ ﻴﻤﻜﻥ ﺍﺴﺘﺨﺩﺍﻡ ﺍﻟﺨﻴﺎﺭ WITH GRANT OPTION  ﻋﻨﺩ ﻤﻨﺢ ﺍﻟﺼﻼﺤﻴﺎﺕ Objects Privileges ﺇﺸﺎﺭﺓ ﺇﻟﻰ ﺃﻥ ﻫﺫﺍ ﺍﻟﻤﺴﺘﺨﺩﻡ ﺒﻌﺩ ﺃﻥ ﻴﻤﻠﻙ ﻫﺫﻩ ﺍﻟﺼﻼﺤﻴﺔ ﻴﻤﻜﻥ ﺃﻥ ﻴﻤﻨﺤﻬﺎ ﻏﻴﺭﻩ ﻤﻥ المستخدمين.

     

    GRANT INSERT ON EXAMPLE TO TEST1 WITH GRANT OPTION;

     

     ﺍﻵﻥ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST1 ﻤﻨﺢ ﺼﻼﺤﻴﺔ INSERT ﻋﻠﻰ ﺍﻟﺠﺩﻭل EXAMPLE ﺍﻟﺫﻱ ﻴﻤﻠﻜﻪ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST ﻟﻐﻴﺭﻩ ﻤﻥ ﺍﻟﻤﺴﺘﺨﺩﻤﻴﻥ.

    ﻤﺎﺫﺍ ﻟﻭ ﺃﺭﺍﺩ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST ﺴﺤﺏ ﺼﻼﺤﻴﺔ ﺍلSELECT ﻤﻥ ﺍﻟﺠﺩﻭل EXAMPLE ﺍﻟﺫﻱ ﻴﻤﻠﻜﻪ ﻤﻥ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST1 ﻤﻊ ﻤﻼﺤﻅﺔ ﺃﻥ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST1 ﻤﻨﺢ ﻫﺫﻩ ﺍﻟﺼﻼﺤﻴﺔ ﻟﻐﻴﺭﻩ ﻤﻥ ﺍﻟﻤﺴﺘﺨﺩﻤﻴﻥ

    ﻭﻟﻨﻔﺘﺭﺽ ﺃﻨﻪ TEST2، ﺍﻟﻨﺘﻴﺠﺔ ﻫﻲ ﺃﻥ ﺍﻟﺼﻼﺤﻴﺔ ﺴﺘﺴﺤﺏ ﻤﻥ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST1 ﻭﻜﺫﻟﻙ ﻜل ﺍﻟﻤﺴﺘﺨﺩﻤﻴﻥ ﺍﻟﻤﻤﻨﻭﺤﻴﻥ ﺍﻟﺼﻼﺤﻴﺔ ﻋﻥ ﻁﺭﻴﻕ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST1؛ ﻭﻫﻨﺎ ﻫﻭ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST2.

    ﺴﻨﺘﺎﺒﻊ ﻫﺫﺍ ﺍﻟﺴﻴﻨﺎﺭﻴﻭ ﻋﻤﻠﻴﺎﹰ :-

     

    SHOW USER;

     

    ﻨﺤﻥ ﺍﻵﻥ ﻨﻌﻤل ﻋﻠﻰ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST.

     

    ﺍﻟﻤﺴﺘﺨﺩﻡ TEST ﻴﻤﻠﻙ ﺠﺩﻭﻻﹰ ﻭﺍﺤﺩﺍﹰ ﻫﻭ EXAMPLE, ﺍﻵﻥ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST ﺴﻴﻤﻨﺢ ﺼﻼﺤﻴﺔ SELECT ﻋﻠﻰ ﺍﻟﺠﺩﻭل EXAMPLE ﺍﻟﺫﻱ ﻴﻤﺘﻠﻜﻪ ﻟﻠﻤﺴﺘﺨﺩﻡ TEST1.

     

    GRANT SELECT ON EXAMPLE TO TEST١ WITH GRANT OPTION;

     

    ﻋﻥ ﻁﺭﻴﻕ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST1 ﻴﻤﻜﻥ ﻋﻤل SELECT ﻋﻠﻰ ﺍﻟﺠﺩﻭل ﺃﻋﻼﻩ.

    ﺍﻟﻤﺴﺘﺨﺩﻡ TEST1 ﻴﺴﺘﻁﻴﻊ ﻤﻨﺢ ﺼﻼﺤﻴﺔ SELECT ﻋﻠﻰ ﺍﻟﺠﺩﻭل EXAMPLE ﺍﻟﺫﻱ ﻴﻤﺘﻠﻜﻪ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST ﻟﻠﻤﺴﺘﺨﺩﻡ TEST2.

     

    GRANT SELECT ON TEST.EXAMPLE TO TEST2;

     

    ﺍﻟﻤﺴﺘﺨﺩﻡ TEST2 ﻴﺴﺘﻁﻴﻊ ﻋﻤل SELECT ﻋﻠﻰ ﺍﻟﺠﺩﻭل EXAMPLE.

     

    SELECT * FROM TEST.EXAMPLE;

     

    ﻨﻘﻭﻡ ﺒﺴﺤﺏ ﺍﻟﺼﻼﺤﻴﺔ ﻤﻥ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST1.

     

    REVOKE SELECT ON EXAMPLE FROM TEST1;

     

     

    ﻋﻥ ﻁﺭﻴﻕ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST1 ﻨﻘﻭﻡ ﺒﻌﻤل SELECT ﻟﻠﺠﺩﻭل EXAMPLE .

     

    SELECT * FROM TEST.EXAMPLE;

     

    ستلاحظ أن المستخدم TEST1 الان لا يملك الصلاحية.

    ﻤﺎﺫﺍ ﻋﻥ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST2؟

    ﻜﺫﻟﻙ ﺍﻟﻤﺴﺘﺨﺩﻡ TEST2 ﻻ ﻴﻤﻠﻙ ﺼﻼﺤﻴﺔ ﺍﻻﺴﺘﻌﻼﻡ ﻋﻠﻰ ﺍﻟﺠﺩﻭل EXAMPLE .

    ﻴﻤﻜﻥ ﻤﻨﺢ ﺍﻟﺼﻼﺤﻴﺔ ﻋﻠﻰ ﻤﺴﺘﻭﻯ ﺍﻟﻌﻤﻭﺩ ، ﻤﺜﻼﹰ :

     

    GRANT INSERT (CNO) ON EXAMPLE TO TEST1;

     

    ﻴﻤﻜﻥ ﺍﻻﺴﺘﻌﻼﻡ ﻋﻥ ﺍلObjects Privileges ﺒﻌﺩﺓ ﻁﺭﻕ ﻤﻨﻬﺎ :

    DBA_TAB_PRIVS

    ALL_TAB_PRIVS

    USER_TAB_PRIV

    DBA_COL_PRIVS

    ALL_COL_PRIVS

    USER_COL_PRIVS

    SESSION_PRIVS

     

    ---------------------------