Database Reference
This appendix describes SQL scripts that are required for optimal operation of the Oracle Database.
The SQL scripts are described in the following sections:
<a href="http://docs.oracle.com/cd/E11882_01/server.112/e40402/.s001.htm#i1005654">Creating the Data Dictionary</a>
<a href="http://docs.oracle.com/cd/E11882_01/server.112/e40402/.s002.htm#i1005727">Creating Additional Data Dictionary Structures</a>
<a href="http://docs.oracle.com/cd/E11882_01/server.112/e40402/.s003.htm#i1006017">The "NO" Scripts</a>
<a href="http://docs.oracle.com/cd/E11882_01/server.112/e40402/.s004.htm#i1006127">Upgrade and Downgrade Scripts</a>
<a href="http://docs.oracle.com/cd/E11882_01/server.112/e40402/.s005.htm#i1006218">Java Scripts</a>
When you use the Database Configuration Assistant to create a database, Oracle automatically creates the data dictionary. Thereafter, whenever the database is in operation, Oracle updates the data dictionary in response to every DDL statement.
The data dictionary base tables are the first objects created in any Oracle database. They are created in the SYSTEM tablespace and must remain there. The data dictionary base tables store information about all user-defined objects in the database.
Script Name
Needed For
Description
All databases
Creates the data dictionary and public synonyms for many of its views
Grants PUBLIC access to the synonyms
Runs all scripts required for, or used with, PL/SQL
Real Application Clusters
Creates Real Application Clusters data dictionary views
See Also:
Your operating system-specific Oracle documentation for the exact names and locations of these scripts on your operating system
Run By
Performance management
SYS
Creates views that can dynamically display lock dependency graphs
Exporting data to Oracle7
Creates the dictionary views needed for the Oracle7 Export utility to export data from the Oracle Database in Oracle7 Export file format
Heterogeneous Services
Installs packages for administering heterogeneous services
Allows I/O to be traced on a table-by-table basis
Security
Creates the Oracle Cryptographic Toolkit package
Advanced Queuing
Creates the dictionary objects required for Advanced Queuing
Oracle Replication
Runs all SQL scripts for enabling database replication
Storage management
Any user
Analyzes chained rows in index-organized tables
SYS or SYSDBA
Enables DBA to lock PL/SQL packages, SQL statements, and triggers into the shared pool
Concurrency control
Provides a facility for user-named locks that can be used in a local or clustered environment to aid in sequencing application actions
Performance monitoring
Respectively start and stop collecting performance tuning statistics
For use with the Oracle Database. Creates tables for storing the output of the ANALYZEcommand with the CHAINED ROWS option. Can handle both physical and logical rowids.
Year 2000 compliance
Provides functions to validate that CHECKconstraints on date columns are year 2000 compliant
Metadata management
Creates tables and views that show dependencies between objects
Constraints
For use with the Oracle Database. Creates the default table (EXCEPTIONS) for storing exceptions from enabling constraints. Can handle both physical and logical rowids.
PL/SQL
Used primarily for upgrade and downgrade operations. It invalidates all existing PL/SQL modules by altering certain dictionary tables so that subsequent recompilations will occur in the format required by the database. It also reloads the packages STANDARD andDBMS_STANDARD, which are necessary for any PL/SQL compilations.
Used to change from 32-bit to 64-bit word size or vice versa. This script recompiles existing PL/SQL modules in the format required by the new database. It first alters some data dictionary tables. Then it reloads the packagesSTANDARD and DBMS_STANDARD, which are necessary for using PL/SQL. Finally, it triggers a recompilation of all PL/SQL modules, such as packages, procedures, and types.
Displays a lock wait-for graph, in tree structure format
Creates PL/SQL functions for default password complexity verification. Sets the default password profile parameters and enables password management features.
Recompiles all existing PL/SQL modules that were previously in an INVALID state, such as packages, procedures, and types.
Examples
SYS or any user with DBA role
Creates sample tables, such as emp and dept, and users, such as scott
Copies a snapshot schema from another snapshot site
Creates the TKPROFER role to allow the TKPROF profiling utility to be run by non-DBA users
Partitioned tables
Creates tables required for storing output ofANALYZE TABLE ...VALIDATE STRUCTUREof a partitioned table
Creates the table PLAN_TABLE, which holds output from the EXPLAIN PLAN statement
Objects
Drops views and synonyms on dictionary metadata that relate to object types
Drops views and synonyms on auditing metadata
Removes Heterogeneous Services dictionary metadata
Partitioning
Drops views and synonyms on dictionary metadata that relate to partitioned tables and indexes
Server Manager
Removes Oracle7 Server Manager views and synonyms
Distributed management
Drops the DBSNMP user and SNMPAGENT role
Downgrading
Provides a direct downgrade path from the new Oracle Database 11g release
Upgrading
Provides a direct upgrade path to the new Oracle Database 11g release
Pre-Upgrade Information
Analyzes the database to be upgraded, detailing requirements and issues for the upgrade to Oracle Database 11g Release 2 (11.2)
Post-Upgrade Status
Displays the component upgrade status after an upgrade to Oracle Database 11g Release 2 (11.2)
Initializes JServer by installing core Java class libraries and Oracle-specific Java classes
Removes all elements of the JServer
Installs Java-related packages and classes
About Me
...............................................................................................................................................................................
QQ:642808185 若加QQ請注明您所正在讀的文章标題
【版權所有,文章允許轉載,但須以連結方式注明源位址,否則追究法律責任】