【OH】常用数据字典脚本说明 SQL Scripts

简介: 来源于 http://docs.oracle.com/cd/E11882_01/server.112/e40402/scripts.htm  ,主要对一些数据字典脚本进行说明。


来源于  http://docs.oracle.com/cd/E11882_01/server.112/e40402/scripts.htm  ,主要对一些数据字典脚本进行说明。


Database Reference

B SQL Scripts

This appendix describes SQL scripts that are required for optimal operation of the Oracle Database.

The SQL scripts are described in the following sections:


Creating the Data Dictionary

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.

Table B-1 lists required scripts, which are run automatically when you create a database using the Database Configuration Assistant. They are described here because you might need to run them if you create a database manually. To run these scripts, you must be connected to Oracle as a user with SYSDBA privileges.

Table B-1 Creating the Data Dictionary Scripts

Script Name Needed For Description

catalog.sql

All databases

Creates the data dictionary and public synonyms for many of its views

Grants PUBLIC access to the synonyms

catproc.sql

All databases

Runs all scripts required for, or used with, PL/SQL

catclust.sql

Real Application Clusters

Creates Real Application Clusters data dictionary views




Creating Additional Data Dictionary Structures

Oracle supplies other scripts that create additional structures you can use in managing your database and creating database applications. These scripts are listed in Table B-2.

See Also:

Your operating system-specific Oracle documentation for the exact names and locations of these scripts on your operating system

Table B-2 Creating Additional Data Dictionary Structures

Script Name Needed For Run By Description

catblock.sql

Performance management

SYS

Creates views that can dynamically display lock dependency graphs

catexp7.sql

Exporting data to Oracle7

SYS

Creates the dictionary views needed for the Oracle7 Export utility to export data from the Oracle Database in Oracle7 Export file format

caths.sql

Heterogeneous Services

SYS

Installs packages for administering heterogeneous services

catio.sql

Performance management

SYS

Allows I/O to be traced on a table-by-table basis

catoctk.sql

Security

SYS

Creates the Oracle Cryptographic Toolkit package

catqueue.sql

Advanced Queuing

 

Creates the dictionary objects required for Advanced Queuing

catrep.sql

Oracle Replication

SYS

Runs all SQL scripts for enabling database replication

dbmsiotc.sql

Storage management

Any user

Analyzes chained rows in index-organized tables

dbmspool.sql

Performance management

SYS or SYSDBA

Enables DBA to lock PL/SQL packages, SQL statements, and triggers into the shared pool

userlock.sql

Concurrency control

SYS or SYSDBA

Provides a facility for user-named locks that can be used in a local or clustered environment to aid in sequencing application actions

utlbstat.sql and utlestat.sql

Performance monitoring

SYS

Respectively start and stop collecting performance tuning statistics

utlchn1.sql

Storage management

Any user

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.

utlconst.sql

Year 2000 compliance

Any user

Provides functions to validate that CHECKconstraints on date columns are year 2000 compliant

utldtree.sql

Metadata management

Any user

Creates tables and views that show dependencies between objects

utlexpt1.sql

Constraints

Any user

For use with the Oracle Database. Creates the default table (EXCEPTIONS) for storing exceptions from enabling constraints. Can handle both physical and logical rowids.

utlip.sql

PL/SQL

SYS

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.

utlirp.sql

PL/SQL

SYS

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.

utllockt.sql

Performance monitoring

SYS or SYSDBA

Displays a lock wait-for graph, in tree structure format

utlpwdmg.sql

Security

SYS or SYSDBA

Creates PL/SQL functions for default password complexity verification. Sets the default password profile parameters and enables password management features.

utlrp.sql

PL/SQL

SYS

Recompiles all existing PL/SQL modules that were previously in an INVALID state, such as packages, procedures, and types.

utlsampl.sql

Examples

SYS or any user with DBA role

Creates sample tables, such as emp and dept, and users, such as scott

utlscln.sql

Oracle Replication

Any user

Copies a snapshot schema from another snapshot site

utltkprf.sql

Performance management

SYS

Creates the TKPROFER role to allow the TKPROF profiling utility to be run by non-DBA users

utlvalid.sql

Partitioned tables

Any user

Creates tables required for storing output ofANALYZE TABLE ...VALIDATE STRUCTUREof a partitioned table

utlxplan.sql

Performance management

Any user

Creates the table PLAN_TABLE, which holds output from the EXPLAIN PLAN statement




The "NO" Scripts

The scripts in Table B-3 are used to remove dictionary information for various optional services or components.

See Also:

Oracle Database Upgrade Guide for more information about these scripts

Table B-3 The NO Scripts

Script Name Needed For Run By Description

catnoadt.sql

Objects

SYS

Drops views and synonyms on dictionary metadata that relate to object types

catnoaud.sql

Security

SYS

Drops views and synonyms on auditing metadata

catnohs.sql

Heterogeneous Services

SYS

Removes Heterogeneous Services dictionary metadata

catnoprt.sql

Partitioning

SYS

Drops views and synonyms on dictionary metadata that relate to partitioned tables and indexes

catnosvm.sql

Server Manager

SYS

Removes Oracle7 Server Manager views and synonyms

catnsnmp.sql

Distributed management

SYS

Drops the DBSNMP user and SNMPAGENT role



Upgrade and Downgrade Scripts

The scripts in Table B-4 are used when upgrading or downgrading to another release of Oracle. To run these scripts, you must be connected to Oracle as a user with SYSDBA privileges.

Table B-4 Upgrade and Downgrade Scripts

Script Name Needed For Description

catdwgrd.sql

Downgrading

Provides a direct downgrade path from the new Oracle Database 11g release

catupgrd.sql

Upgrading

Provides a direct upgrade path to the new Oracle Database 11g release

utlu112i.SQL

Pre-Upgrade Information

Analyzes the database to be upgraded, detailing requirements and issues for the upgrade to Oracle Database 11g Release 2 (11.2)

utlu112s.SQL

Post-Upgrade Status

Displays the component upgrade status after an upgrade to Oracle Database 11g Release 2 (11.2)




Java Scripts

The scripts in Table B-5 are useful only if the JServer option is installed.

Table B-5 Java Scripts

Script Name Description

initjvm.sql

Initializes JServer by installing core Java class libraries and Oracle-specific Java classes

rmjvm.sql

Removes all elements of the JServer

catjava.sql

Installs Java-related packages and classes


About Me



...............................................................................................................................................................................

本文来自于oracle官方文档,地址:http://docs.oracle.com/cd/E11882_01/server.112/e40402/scripts.htm

本文地址: http://blog.itpub.net/26736162/viewspace-2098205

ITPUB BLOG:http://blog.itpub.net/26736162

QQ:642808185 若加QQ请注明您所正在读的文章标题

【版权所有,文章允许转载,但须以链接方式注明源地址,否则追究法律责任】

...............................................................................................................................................................................


目录
相关文章
|
2月前
|
SQL 存储 缓存
SQL Server 数据太多如何优化
11种优化方案供你参考,优化 SQL Server 数据库性能得从多个方面着手,包括硬件配置、数据库结构、查询优化、索引管理、分区分表、并行处理等。通过合理的索引、查询优化、数据分区等技术,可以在数据量增大时保持较好的性能。同时,定期进行数据库维护和清理,保证数据库高效运行。
|
3月前
|
SQL 移动开发 Oracle
SQL语句实现查询连续六天数据的方法与技巧
在数据库查询中,有时需要筛选出符合特定时间连续性条件的数据记录
|
3月前
|
SQL 存储 关系型数据库
添加数据到数据库的SQL语句详解与实践技巧
在数据库管理中,添加数据是一个基本操作,它涉及到向表中插入新的记录
|
3月前
|
SQL 数据挖掘 数据库
SQL查询每秒的数据:技巧、方法与性能优化
id="">SQL查询功能详解 SQL(Structured Query Language,结构化查询语言)是一种专门用于与数据库进行沟通和操作的语言
|
3月前
|
SQL 监控 数据处理
SQL数据库数据修改操作详解
数据库是现代信息系统的重要组成部分,其中SQL(StructuredQueryLanguage)是管理和处理数据库的重要工具之一。在日常的业务运营过程中,数据的准确性和及时性对企业来说至关重要,这就需要掌握如何在数据库中正确地进行数据修改操作。本文将详细介绍在SQL数据库中如何修改数据,帮助读者更好
562 4
|
2月前
|
SQL 关系型数据库 MySQL
mysql编写sql脚本:要求表没有主键,但是想查询没有相同值的时候才进行插入
mysql编写sql脚本:要求表没有主键,但是想查询没有相同值的时候才进行插入
37 0
|
3月前
|
SQL 分布式计算 关系型数据库
Hadoop-24 Sqoop迁移 MySQL到Hive 与 Hive到MySQL SQL生成数据 HDFS集群 Sqoop import jdbc ETL MapReduce
Hadoop-24 Sqoop迁移 MySQL到Hive 与 Hive到MySQL SQL生成数据 HDFS集群 Sqoop import jdbc ETL MapReduce
116 0
|
3月前
|
SQL 分布式计算 关系型数据库
Hadoop-23 Sqoop 数据MySQL到HDFS(部分) SQL生成数据 HDFS集群 Sqoop import jdbc ETL MapReduce
Hadoop-23 Sqoop 数据MySQL到HDFS(部分) SQL生成数据 HDFS集群 Sqoop import jdbc ETL MapReduce
54 0
|
3月前
|
SQL 分布式计算 关系型数据库
Hadoop-22 Sqoop 数据MySQL到HDFS(全量) SQL生成数据 HDFS集群 Sqoop import jdbc ETL MapReduce
Hadoop-22 Sqoop 数据MySQL到HDFS(全量) SQL生成数据 HDFS集群 Sqoop import jdbc ETL MapReduce
69 0
|
3月前
|
SQL
使用SQL进行集合查询和数据维护
使用SQL进行集合查询和数据维护
50 0