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

Oracle数据字典脚本详解
本文详细介绍了Oracle数据库中用于创建和管理数据字典的各种SQL脚本,包括必需脚本、附加数据字典结构脚本、“NO”脚本、升级和降级脚本以及JavaScript脚本等。这些脚本对于确保数据库的正常运行至关重要。


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

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

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


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26736162/viewspace-2098205/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26736162/viewspace-2098205/

翻译下面内容 Oracle Database 11g Release 11.2.0.4.0 ORACLE DATABASE Patch for Bug# 8857940 for AIX5L Platforms This patch is RAC Rolling Installable - Please read My Oracle Support Document 244241.1 https://support.us.oracle.com/oip/faces/secure/km/DocumentDisplay.jspx?id=244241.1 Rolling Patch - OPatch Support for RAC. This patch is Data Guard Standby-First Installable - Please read My Oracle Support Note 1265700.1 https://support.us.oracle.com/oip/faces/secure/km/DocumentDisplay.jspx?id=1265700.1 Oracle Patch Assurance - Data Guard Standby-First Patch Apply for details on how to remove risk and reduce downtime when applying this patch. Released: Sat Jun 11 09:03:01 2016 This document describes how you can install the ORACLE DATABASE interim patch for bug# 8857940 on your Oracle Database 11g Release 11.2.0.4.0 (I) Prerequisites -------------------- Before you install or deinstall the patch, ensure that you meet the following requirements: Note: In case of an Oracle RAC environment, meet these prerequisites on each of the nodes. 1. Ensure that the Oracle home on which you are installing the patch or from which you are rolling back the patch is Oracle Database 11g Release 11.2.0.4.0. 2. Oracle recommends that you use the latest version available for 11g Release 11.2.0.4.0. If you do not have OPatch 11g Release 11.2.0.3.5 or the latest version available for 11g Release 11.2.0.4.0,then download it from patch# 6880880 for 11.2.0.4.0 release. For information about OPatch documentation, including any known issues, see My Oracle Support Document 293369.1 OPatch documentation list: https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=224346.1 3. Ensure that you set (as the home user) the ORACLE_HOME environment variable to the Oracle home. 4. Ensure that the $PATH definition has the following executables: make, ar, ld and nm. The location of these executables depends on your operating system. On many operating systems, they are located in /usr/ccs/bin. 5. Ensure that you verify the Oracle Inventory because OPatch accesses it to install the patches. To verify the inventory, run the following command. $ opatch lsinventory Note: - If this command succeeds, it will list the Top-Level Oracle Products and one-off patches if any that are installed in the Oralce Home. - Save the output so you have the status prior to the patch apply. - If the command displays some errors, then contact Oracle Support and resolve the issue first before proceeding further. 6. (Only for Installation) Maintain a location for storing the contents of the patch ZIP file. In the rest of the document, this location (absolute path) is referred to as <PATCH_TOP_DIR>. Extract the contents of the patch ZIP file to the location (PATCH_TOP_DIR) you have created above. To do so, run the following command: $ unzip -d <PATCH_TOP_DIR> p8857940_112040_AIX64-5L.zip 7. (Only for Installation) Determine whether any currently installed interim patches conflict with this patch 8857940 as shown below: $ cd <PATCH_TOP_DIR>/8857940 $ opatch prereq CheckConflictAgainstOHWithDetail -ph ./ The report will indicate the patches that conflict with this patch and the patches for which the current 8857940 is a superset. Note: When OPatch starts, it validates the patch and ensures that there are no conflicts with the software already installed in the ORACLE_HOME. OPatch categorizes conflicts into the following types: - Conflicts with a patch already applied to the ORACLE_HOME that is a subset of the patch you are trying to apply - In this case, continue with the patch installation because the new patch contains all the fixes from the existing patch in the ORACLE_HOME. The subset patch will automatically be rolled back prior to the installation of the new patch. - Conflicts with a patch already applied to the ORACLE_HOME - In this case, stop the patch installation and contact Oracle Support Services. 8. Ensure that you shut down all the services running from the Oracle home. Note: - For a Non-RAC environment, shut down all the services running from the Oracle home. - For a RAC environment, shut down all the services (database, ASM, listeners, nodeapps, and CRS daemons) running from the Oracle home of the node you want to patch. After you patch this node, start the services on this node.Repeat this process for each of the other nodes of the Oracle RAC system. OPatch is used on only one node at a time. (II) Installation ----------------- To install the patch, follow these steps: 1. Set your current directory to the directory where the patch is located and then run the OPatch utility by entering the following commands: $ cd <PATCH_TOP_DIR>/8857940 $ opatch apply 2. Verify whether the patch has been successfully installed by running the following command: $ opatch lsinventory 3. Start the services from the Oracle home. (III) Deinstallation ---------------------- Ensure to follow the Prerequsites (Section I). To deinstall the patch, follow these steps: 1. Deinstall the patch by running the following command: $ opatch rollback -id 8857940 2. Start the services from the Oracle home. 3. Ensure that you verify the Oracle Inventory and compare the output with the one run before the patch installation and re-apply any patches that were rolled back as part of this patch apply. To verify the inventory, run the following command: $ opatch lsinventory (IV) Bugs Fixed by This Patch --------------------------------- The following are the bugs fixed by this patch: 8857940: NEED COMMON DURATIONS FOR UNSHRINKABLE POOLS -------------------------------------------------------------------------- Copyright 2016, Oracle and/or its affiliates. All rights reserved. --------------------------------------------------------------------------
10-01
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值