Part 12. SQL for Oracle System Tables



Similar documents
Managing Objects with Data Dictionary Views. Copyright 2006, Oracle. All rights reserved.

An Oracle White Paper April Oracle Database Cloud Service security lockdown

Oracle Data Dictionary

Oracle Transparent Gateway for Microsoft SQL Server

Database 10g Edition: All possible 10g features, either bundled or available at additional cost.

Part 7: Data Dictionaries

Dictionary (catálogo)

Database System Architecture & System Catalog Instructor: Mourad Benchikh Text Books: Elmasri & Navathe Chap. 17 Silberschatz & Korth Chap.

Oracle Database Gateway for ODBC

5. CHANGING STRUCTURE AND DATA

Best Practices Guide. Database Activity Monitoring Best Practices

Oracle Database Links Master Class Part 1 Written and presented by Joel Goodman July 1st 2009

March 9 th, Oracle Total Recall

Objectives. Oracle SQL and SQL*PLus. Database Objects. What is a Sequence?

Research and Application of Data Archiving based on Oracle Dual Database Structure

Uwe Schimanski. Oracle dir einen

Introduction Oracle Database Security. Leeland Artra

Note: The where clause of the SUBSET statement is sent "as is" to Oracle, so it must contain correct Oracle syntax.

DBA101: A Refresher Course

Delivering Database Compatibility for Oracle in Postgres Plus Advanced Server

MS-40074: Microsoft SQL Server 2014 for Oracle DBAs

Oracle. Brief Course Content This course can be done in modular form as per the detail below. ORA-1 Oracle Database 10g: SQL 4 Weeks 4000/-

How To Migrate From Org.Org To A Database In A Microsoft Oracle Oracle.Org (Oracle) Oracle (Orcient) Orca.Org Oracle/Oracle.Com (Orca.Com) Oror

Database Auditing Report submitted by: D. Murali Krishna S.M Siva Rama Krishna

Guide to Migrating from Oracle to SQL Server 2014 and Azure SQL Database

Oracle Database: Introduction to SQL

Oracle Database: Introduction to SQL

Table Backup and Recovery using SQL*Plus

Oracle Database: Introduction to SQL

Chapter 14. Outline. Database Support for Decision Making. Data and Database Administration

Oracle Architecture, Concepts & Facilities

Oracle Database: SQL and PL/SQL Fundamentals NEW

SQL Injection. Sajjad Pourali CERT of Ferdowsi University of Mashhad

Oracle Database Security and Audit

Microsoft SQL Server for Oracle DBAs Course 40045; 4 Days, Instructor-led

All About Oracle Auditing A White Paper February 2013

Oracle For Beginners Page : 1

DBMS Questions. 3.) For which two constraints are indexes created when the constraint is added?

All About Oracle Auditing Everything You Need to Know

ORACLE DATABASE SECURITY. Keywords: data security, password administration, Oracle HTTP Server, OracleAS, access control.

Oracle DBA Concise Handbook Covers 9i to 11g

Iggy Fernandez, Database Specialists DEFINING EFFICIENCY TUNING BY EXAMPLE CREATING AND POPULATING THE TABLES

Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.

Introduction to the Oracle DBMS

Oracle DBA Course Contents

Delivery Method: Instructor-led, group-paced, classroom-delivery learning model with structured, hands-on activities.

2. Oracle SQL*PLUS Winter Some SQL Commands. To connect to a CS server, do:

Database Security. Oracle Database 12c - New Features and Planning Now

Oracle Database 11g SQL

Enhancing Database Security: Concepts and Tools for the DBA Scripts & Source Code. Passwords in Command Lines. Peter J. Magee, CDA SQRIBE Technologies

ORACLE 9I / 10G / 11G / PL/SQL COURSE CONTENT

Optimizing the Performance of the Oracle BI Applications using Oracle Datawarehousing Features and Oracle DAC

Hacking and Protecting Oracle DB. Slavik Markovich CTO, Sentrigo

High-Performance Oracle: Proven Methods for Achieving Optimum Performance and Availability

Keep It Simple - Common, Overlooked Performance Tuning Tips. Paul Jackson Hotsos

Introduction to SQL Tuning. 1. Introduction to SQL Tuning SkillBuilders, Inc. SKILLBUILDERS

Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.

Oracle Database 12c: New Features for Administrators

Oracle Database 11g: Security

Security Analysis. Spoofing Oracle Session Information

Module 2: Database Architecture

Oracle Database 12c: Introduction to SQL Ed 1.1

Oracle Database 12c: Admin, Install and Upgrade Accelerated

Procedural Extension to SQL using Triggers. SS Chung

ORACLE DATABASE 12C: NEW FEATURES FOR ADMINISTRATORS GRADE CURRICULAR. Enterprise Manager Express home page versus Enterprise Manager Database Control

Oracle 11g DBA Online Course - Smart Mind Online Training, Hyderabad. Oracle 11g DBA Online Training Course Content

Lesson 5 Administrative Users

Fine Grained Auditing In Oracle 10G

Instant SQL Programming

1 Triggers. 2 PL/SQL Triggers

Monitoring Audit Trails Using Enterprise Manager

Oracle USF

Oracle Database 12c: Administration Workshop NEW

UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

D B M G Data Base and Data Mining Group of Politecnico di Torino

ORACLE DATABASE 11G: COMPLETE

Data Masking. Procedure

Oracle SQL. Course Summary. Duration. Objectives

Oracle Database 10g: Introduction to SQL

Oracle Database 11g: SQL Tuning Workshop

Oracle 11gR2 : Recover dropped tablespace using RMAN tablespace point in time recovery

CHAPTER 2 DATABASE MANAGEMENT SYSTEM AND SECURITY

SQL Introduction Chapter 7, sections 1 & 4. Introduction to SQL. Introduction to SQL. Introduction to SQL

Database Extension 1.5 ez Publish Extension Manual

PRM For Oracle Database 3.1 GUI:

CA DataMinder. Database Guide. Release th Edition

A Forensic Investigation of PL/SQL Injection Attacks in Oracle 1 st July 2010 David Litchfield

Achieving Security Compliancy and Database Transparency Using Database Activity Monitoring Systems

Security Concepts in Oracle Multitenant O R A C L E W H I T E P A P E R J A N U A R Y

HOW TO INTEGRATE APPLICATIONS RELEASE 11i WITH CUSTOM APPLICATIONS

DB2 - DATABASE SECURITY

1 Changes in this release

Oracle 11g DBA Training Course Content

The Sins of SQL Programming that send the DB to Upgrade Purgatory Abel Macias. 1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

CSI 2132 Lab 3. Outline 09/02/2012. More on SQL. Destroying and Altering Relations. Exercise: DROP TABLE ALTER TABLE SELECT

Modern PL/SQL Code Checking and Dependency Analysis

Oracle Backup & Recovery

Enterprise DBA Part 1A: Architecture and Administration

Database security tutorial. Part I

Transcription:

Part 12 SQL for Oracle System Tables

System Tables All truly relational systems must have the system information stored in tables. These system tables are accessible in the same way as any other table. This means that a relational system will have: A table containing the list of tables that make up the data dictionary. In Oracle this table is named DICTIONARY A table containing the columns in each table of the data dictionary. In Oracle this table is named DICT_COLUMNS It will also have a table containing a list of all tables, and a table containing a list of all columns in all tables. However, these can be found by examining the data dictionary Copyright 1971-2002 Thomas P. Sturm SQL for Oracle System Tables Part 12, Page 2

Examining the Data Dictionary The following queries are useful for examining the data dictionary: SQL> describe dictionary Name Null? Type ------------------------------- -------- ---- TABLE_NAME VARCHAR2(30) COMMENTS VARCHAR2(2000) SQL> Set pagesize 60 Column table_name format a22 Column comments format a57 Select * from DICTIONARY Where comments not like %ynonym for % Order by table_name; SQL> Set pagesize 60 Column table_name format a22 Column column_name format a22 Column comments format a34 Select * from DICT_COLUMNS Where table_name like USER_% Order by table_name, column_name; SQL> Set pagesize 60 Column table_name format a22 Column owner format a12 Column comments format a44 Select all_tables.table_name, all_tables.owner, comments From all_tables, all_tab_comments Where all_tables.table_name = all_tab_comments.table_name and all_tables.owner = all_tab_comments.owner order by owner, table_name; Copyright 1971-2002 Thomas P. Sturm SQL for Oracle System Tables Part 12, Page 3

Contents of the DICTIONARY table Table Name ALL_CATALOG ALL_COL_COMMENTS ALL_COL_PRIVS ALL_COL_PRIVS_MADE ALL_COL_PRIVS_RECD ALL_CONSTRAINTS ALL_CONS_COLUMNS ALL_DB_LINKS ALL_DEF_AUDIT_OPTS ALL_DEPENDENCIES ALL_ERRORS ALL_INDEXES ALL_IND_COLUMNS ALL_OBJECTS ALL_REFRESH ALL_REFRESH_CHILDREN ALL_SEQUENCES ALL_SNAPSHOTS ALL_SOURCE ALL_SYNONYMS ALL_TABLES ALL_TAB_COLUMNS ALL_TAB_COMMENTS ALL_TAB_PRIVS ALL_TAB_PRIVS_MADE ALL_TAB_PRIVS_RECD ALL_TRIGGERS ALL_TRIGGER_COLS Comments All tables, views, synonyms, sequences accessible to the user Comments on columns of accessible tables and views Grants on columns for which the user is the grantor, grantee, owner, or an enabled role or PUBLIC is the grantee Grants on columns for which the user is owner or grantor Grants on columns for which the user, PUBLIC or enabled role is the grantee Constraint definitions on accessible tables Information about accessible columns in constraint definitions Database links accessible to the user Auditing options for newly created objects Dependencies to and from objects accessible to the user Current errors on stored objects that user is allowed to create Descriptions of indexes on tables accessible to the user COLUMNs comprising INDEXes on accessible TABLES Objects accessible to the user All the refresh groups that the user can touch All the objects in refresh groups, where the user can touch the group Description of SEQUENCEs accessible to the user Snapshots the user can look at Current source on stored objects that user is allowed to create All synonyms accessible to the user Description of tables accessible to the user Columns of all tables, views and clusters Comments on tables and views accessible to the user Grants on objects for which the user is the grantor, grantee, owner, or an enabled role or PUBLIC is the grantee User's grants and grants on user's objects Grants on objects for which the user, PUBLIC or enabled role is the grantee Triggers accessible to the current user Column usage in user's triggers or in triggers on user's Copyright 1971-2002 Thomas P. Sturm SQL for Oracle System Tables Part 12, Page 4

ALL_USERS ALL_VIEWS AUDIT_ACTIONS COLUMN_PRIVILEGES DBA_2PC_NEIGHBORS DBA_2PC_PENDING DBA_AUDIT_EXISTS DBA_AUDIT_OBJECT DBA_AUDIT_STATEMENT DBA_AUDIT_TRAIL DBA_CATALOG DBA_CLUSTERS DBA_CLU_COLUMNS DBA_COL_COMMENTS DBA_COL_PRIVS DBA_CONSTRAINTS DBA_CONS_COLUMNS DBA_DATA_FILES DBA_DB_LINKS DBA_DEPENDENCIES DBA_ERRORS DBA_EXP_FILES DBA_EXP_OBJECTS DBA_EXP_VERSION DBA_EXTENTS DBA_FREE_SPACE DBA_INDEXES DBA_IND_COLUMNS DBA_JOBS DBA_JOBS_RUNNING tables Information about all users of the database Text of views accessible to the user Description table for audit trail action type codes. Maps action type numbers to action type names Grants on columns for which the user is the grantor, grantee, owner, or an enabled role or PUBLIC is the grantee information about incoming and outgoing connections for pending transactions info about distributed transactions awaiting recovery Lists audit trail entries produced by AUDIT NOT EXISTS and AUDIT EXISTS Audit trail records for statements concerning objects, specifically: table, cluster, view, index, sequence, [public] database link, [public] synonym, procedure, trigger, rollback segment, tablespace, role, user Audit trail records concerning grant, revoke, audit, noaudit and alter system All audit trail entries All database Tables, Views, Synonyms, Sequences Description of all clusters in the database Mapping of table columns to cluster columns Comments on columns of all tables and views All grants on columns in the database Constraint definitions on all tables Information about accessible columns in constraint definitions Information about database files All database links in the database Dependencies to and from objects Current errors on all stored objects in the database Description of export files Objects that have been incrementally exported Version number of the last export session Extents comprising all segments in the database Free extents in all tablespaces Description for all indexes in the database COLUMNs comprising INDEXes on all TABLEs and CLUSTERs All jobs in the database All jobs in the database which are currently running, join v$lock and job$ Copyright 1971-2002 Thomas P. Sturm SQL for Oracle System Tables Part 12, Page 5

DBA_OBJECTS DBA_OBJECT_SIZE DBA_OBJ_AUDIT_OPTS DBA_PRIV_AUDIT_OPTS DBA_PROFILES DBA_RCHILD DBA_REFRESH DBA_REFRESH_CHILDREN DBA_RGROUP DBA_ROLES DBA_ROLE_PRIVS DBA_ROLLBACK_SEGS DBA_SEGMENTS DBA_SEQUENCES DBA_SNAPSHOTS DBA_SNAPSHOT_LOGS DBA_SOURCE DBA_STMT_AUDIT_OPTS DBA_SYNONYMS DBA_SYS_PRIVS DBA_TABLES DBA_TABLESPACES DBA_TAB_COLUMNS DBA_TAB_COMMENTS DBA_TAB_PRIVS DBA_TRIGGERS DBA_TRIGGER_COLS DBA_TS_QUOTAS DBA_USERS DBA_VIEWS DICTIONARY DICT_COLUMNS GLOBAL_NAME INDEX_HISTOGRAM INDEX_STATS RESOURCE_COST ROLE_ROLE_PRIVS ROLE_SYS_PRIVS ROLE_TAB_PRIVS SESSION_PRIVS All objects in the database Sizes, in bytes, of various pl/sql objects Auditing options for all tables and views Describes current system privileges being audited across the system and by user Display all profiles and their limits All the children in any refresh group. This view is not a join. All the refresh groups All the objects in refresh groups All refresh groups. This view is not a join. All Roles which exist in the database Roles granted to users and roles Description of rollback segments Storage allocated for all database segments Description of all SEQUENCEs in the database All snapshots in the database All snapshot logs in the database Source of all stored objects in the database Describes current system auditing options across the system and by user All synonyms in the database System privileges granted to users and roles Description of all tables in the database Description of all tablespaces Columns of all tables, views and clusters Comments on all tables and views in the database All grants on objects in the database All triggers in the database Column usage in all triggers Tablespace quotas for all users Information about all users of the database Text of all views in the database Description of data dictionary tables and views Description of columns in data dictionary tables and views global database name statistics on keys with repeat count statistics on the b-tree Cost for each resource Roles which are granted to roles System privileges granted to roles Table privileges granted to roles Privileges which the user currently has set Copyright 1971-2002 Thomas P. Sturm SQL for Oracle System Tables Part 12, Page 6

SESSION_ROLES TABLE_PRIVILEGES USER_AUDIT_OBJECT USER_AUDIT_STATEMENT USER_AUDIT_TRAIL USER_CATALOG USER_CLUSTERS USER_CLU_COLUMNS USER_COL_COMMENTS USER_COL_PRIVS USER_COL_PRIVS_MADE USER_COL_PRIVS_RECD USER_CONSTRAINTS USER_CONS_COLUMNS USER_DB_LINKS USER_DEPENDENCIES USER_ERRORS USER_EXTENTS USER_FREE_SPACE USER_INDEXES USER_IND_COLUMNS USER_JOBS USER_OBJECTS USER_OBJECT_SIZE USER_OBJ_AUDIT_OPTS USER_REFRESH USER_REFRESH_CHILDRE N USER_RESOURCE_LIMITS USER_ROLE_PRIVS USER_SEGMENTS USER_SEQUENCES USER_SNAPSHOTS USER_SNAPSHOT_LOGS Roles which the user currently has enabled Grants on objects for which the user is the grantor, grantee, owner, or an enabled role or PUBLIC is the grantee Audit trail records for statements concerning objects, specifically: table, cluster, view, index, sequence, [public] database link, [public] synonym, procedure, trigger, rollback segment, tablespace, role, user Audit trail records concerning grant, revoke, audit, noaudit and alter system Audit trail entries relevant to the user Tables, Views, Synonyms and Sequences owned by the user Descriptions of user's own clusters Mapping of table columns to cluster columns Comments on columns of user's tables and views Grants on columns for which the user is the owner, grantor or grantee All grants on columns of objects owned by the user Grants on columns for which the user is the grantee Constraint definitions on user's own tables Information about accessible columns in constraint definitions Database links owned by the user Dependencies to and from a users objects Current errors on stored objects owned by the user Extents comprising segments owned by the user Free extents in tablespaces accessible to the user Description of the user's own indexes COLUMNs comprising user's INDEXes or on user's TABLES All jobs owned by this user Objects owned by the user Sizes, in bytes, of various pl/sql objects Auditing options for user's own tables and views All the refresh groups All the objects in refresh groups, where the user owns the refresh group Display resource limit of the user Roles granted to current user Storage allocated for all database segments Description of the user's own SEQUENCEs Snapshots the user can look at All snapshot logs owned by the user Copyright 1971-2002 Thomas P. Sturm SQL for Oracle System Tables Part 12, Page 7

USER_SOURCE USER_SYNONYMS USER_SYS_PRIVS USER_TABLES USER_TABLESPACES USER_TAB_COLUMNS USER_TAB_COMMENTS USER_TAB_PRIVS USER_TAB_PRIVS_MADE USER_TAB_PRIVS_RECD USER_TRIGGERS USER_TRIGGER_COLS USER_TS_QUOTAS USER_USERS USER_VIEWS Source of stored objects accessible to the user The user's private synonyms System privileges granted to current user Description of the user's own tables Description of accessible tablespaces Columns of user's tables, views and clusters Comments on the tables and views owned by the user Grants on objects for which the user is the owner, grantor or grantee All grants on objects owned by the user Grants on objects for which the user is the grantee Triggers owned by the user Column usage in user's triggers Tablespace quotas for the user Information about the current user Text of views owned by the user Copyright 1971-2002 Thomas P. Sturm SQL for Oracle System Tables Part 12, Page 8