Built-indatabase Objects
Other objects created with the database:
· Data Dictionary
· Performance tables
Pl/sql Packages
· Database event triggers
Data Dictionary
· Central Toevery Oracle Database
· Describes the database and it ' s objects
· Contains read-only tables and views
· Stored in the SYSTEM tablespace
· Owned by the user SYS
· Maintained by the Oracle server
· Accessed with SELECT
Base Tables & Data Dictionary views
The data dictionary contains and parts:
· Base tables
-stores Description of the database
-create with Create DATABASE
· Data Dictionary views
-used to simplify the base table information
-accessed through public synonyms (synonyms)
-create with the Catalog.sql script
Createdata Dictionary views
Script |
Purpose |
Catalog.sql |
Creates commonly used data dictionary views and synonyms |
Catproc.sql |
Runs scripts required for Server-side PL/SQL |
Data Dictionary Contents
The data dictionary provides information about:
· Logical and physical database structures
· Definitions and space allocations of objects
· Integrity constraints
· Users
· Roles
· Privileges
· Auditing
How does the Data Dictionary is used?
Primary uses:
· Oracle Server uses it to find information about:
-users
-schema objects
-storage Structures
· Oracle server modifies it when a DDL statement is executed
· Users and DBAs use it as read-only reference for information about the database
Data Dictionary View Categories
· Three sets of static views
· Distinguished by their scope:
-dba:what is in the schemas
-all:what the user can access
-user:what is in the USER ' s schema
Data Dictionary Tables Examples:
· General Overview: dictionary, Dict_columns.
· Schema objects:dba_tables, Dba_indexes, Dba_tab_columns, dba_constraints.
· Space allocation:dba_segments, Dba_extents.
· Database structure:dba_tablespaces, Dba_data_files.
Dynamic perfomance Tables
· Virtual tables
· Record Current database activity
· Continually updated while the database is operational
· Information is accessed from memory and control file
· Used to monitor and tune the database
· owned by SYS user
· synonyms begin with v$
· Listed Inv$fixed_table
Dynamic Performanceexamples
V$controlfile
V$database
V$datafile
v$instance
V$parameter
v$session
V$SGA
V$spparameter
V$tablespace
V$thread
v$version
Admin Script naming
Convention |
Description |
Cat*.sql |
Catalog and Data dictionary information |
Dbms*.sql |
Database Package Specifications |
Prvt*.plb |
Wrapped database Package Code |
Utl*.sql |
Views and tables for database Utilities |
This article is from the "~never" blog, make sure to keep this source http://ospub.blog.51cto.com/6238506/1587751
Data dictionaries and dynamic performance views