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

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

Home / Database / Oracle Database Online Documentation 11g Release 2 (11.2) / Database Administration

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请注明您所正在读的文章标题

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

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

时间: 2024-09-20 19:34:39

【OH】常用数据字典脚本说明 SQL Scripts的相关文章

讲解Oracle数据库中的数据字典及相关SQL查询用法_oracle

Oracle数据字典概述   数据库是数据的集合,数据库维护和管理这用户的数据,那么这些用户数据表都存在哪里,用户的信息是怎样的,存储这些用户的数据的路径在哪里,这些信息不属于用户的信息,却是数据库维护和管理用户数据的核心,这些信息就是数据库的数据字典来维护的,数据库的数据字典就汇集了这些数据库运行所需要的基础信息叻.每个数据库都提供了各自的数据字典的方案,虽然形式不同,但是目的和作用是一样的,比如在mysql里数据字典是在information_schema 里表现的,sqlserver则是在

8个DBA最常用的监控Oracle数据库的常用shell脚本--转

一.8个重要的脚本来监控Oracle数据库: 1.检查实例的可用性 2.检查监听器的可用性 3.检查alert日志文件中的错误信息4.在存放log文件的地方满以前清空旧的log文件 5.分析table和index以获得更好的性能 6.检查表空间的使用情况 7.找出无效的对象 8.监控用户和事务 二.DBA需要的Unix基本知识 基本的UNIX命令,以下是一些常用的Unix命令: ps--显示进程 grep--搜索文件中的某种文本模式 mailx--读取或者发送mail cat--连接文件或者显示

使用SQL-DMO实现定制SQL Scripts

      我是个负责数据库应用的开发人员,昨夜和旧同事电话聊天中谈到了一个  大家共同的苦恼:因为几乎每天都要将自己的数据库项目生成SQL Scripts  以供备份存档或发给客户更新,所以生成SQL Scripts就成了每天的必修课.  而SQLSERVER的企业管理器又无法支持将生成SQL Scripts的过程保存为一个设置  文件,每次都必须做许多相同的工作,  如:选择对象呀.设置格式呀.表脚本选项.文件选项..老是重复这样的操作  实在太麻烦了!电话闲聊完后就想:能不能写个小工具,在

Oracle管理数据字典(一) Oracle常用数据字典

1.数据字典的功能 数据字典记载了数据的系统信息,它是只读表和视图的集合. 数据字典的所有者为sys用户,并且其被保存放在SYSTEM表空间里. 2.数据字典的概念 数据字典包括数据字典基表和数据字典视图两部分,其中,基表存储数据库的基本信息,普通用户不能直接访问数据字典基表:数据字典视图是基于数据字典基表建立的视图,普通用户可以通过查询数据字典视图取得系统信息.数据字典视图主要包括USER_XXX.ALL_XXX.DBA_XXX. 3.常用数据字典 (1)DICT 用于显示当前用户可访问的所有

oracle表空间,角色,权限,表,索引,序列号,视图,同义词,约束条件,存储函数和过程,常用数据字典,基本数据字典信息,查看VGA信息,维护表空间,创建表空间等信息

查看当前用户的缺省表空间 SQL>select username,default_tablespace from user_users; 查看当前用户的角色 SQL>select * from user_role_privs; 查看当前用户的系统权限和表级权限 SQL>select * from user_sys_privs;        结果可以是:        USERNAME                       PRIVILEGE                    

Oracle中的数据字典技术及常用数据字典总结

一.Oracle数据字典 数据字典是Oracle存放有关数据库信息的地方,其用途是用来描述数据的.比如一个表的创建者信息,创建时间信息,所属表空间信息,用户访问权限信息等.当用户在对数据库中的数据进行操作时遇到困难就可以访问数据字典来查看详细的信息. Oracle中的数据字典有静态和动态之分.静态数据字典主要是在用户访问数据字典时不会发生改变的,但动态数据字典是依赖数据库运行的性能的,反映数据库运行的一些内在信息,所以在访问这类数据字典时往往不是一成不变的.以下分别就这两类数据字典来论述. 1.

mysql-python 脚本中sql语句执行失败的问题

问题描述 python 脚本中sql语句执行失败的问题 如题,一句sql语句,在mysql命令行下可以执行并且有结果,但是,放在一段python脚本里, db.cursor.excute(sql)怎么都是0,这是怎么回事,求破 (我用的pymysql包做数据库连接池,autocommit为Ture) 解决方案 SQL语句中的执行时间问题执行SQL语句脚本文件解决存储过程中SQL字符串语句执行引入参数的问题 解决方案二: 先打印一下python的sql语句,看是否有区别

Oracle重建索引Shell脚本、SQL脚本分享_oracle

索引是提高数据库查询性能的有力武器.没有索引,就好比图书馆没有图书标签一样,找一本书自己想要的书比登天还难.然而索引在使用的过程中,尤其是在批量的DML的情形下会产生相应的碎片,以及B树高度会发生相应变化,因此可以对这些变化较大的索引进行重构以提高性能.N久以前Oracle建议我们定期重建那些高度为4,已删除的索引条目至少占有现有索引条目总数的20%的这些表上的索引.但Oracle现在强烈建议不要定期重建索引.具体可以参考文章:Oracle 重建索引的必要性.尽管如此重建索引还是有必要的,只是不

ASP程序中常用的脚本语言_应用技巧

在浏览器中通过查看源代码的方式是无法看到ASP源代码的,你只能看到由ASP文件输出的结果,而那些只是纯粹的HTML而已.这是因为,在结果被送回浏览器前,脚本已经在服务器执行了. 实例: 用ASP写文本 以下为引用的内容: <html> <body> <% response.write("Hello World!") %> </body> </html> 向文本添加HTML 以下为引用的内容: <html> <