Naming rules for Oracle database management scripts

Source: Internet
Author: User

The ORACLE tutorial is: naming rules for Oracle database management scripts. The data dictionary in Oracle is a very important part of the database and provides information about the relevant database. It is used by all Oracle users (from application end users, application design developers to database administrators) is a very important source of information. The data dictionary is created by running related database management scripts after the Oracle database is created. When the Oracle Universal Installer is used to create a database, the dictionary view and script related to the Oracle server will be automatically installed. However, to upgrade the current Oracle database server, the database administrator must manually re-run the SQL statement used to create these views or scripts. After the database is installed, the Oracle database management script is stored in the operating system. For UNIX and NT operating systems, they are located in different physical directories, as shown in table 1:

Table 1 physical location of database management scripts in the operating system

Almost all system management scripts in Oracle are stored in this file directory, which contains hundreds of different files. What are the functions of these different files? This article will discuss in detail the naming rules for Oracle database management scripts. In this way, the user can probably know the main purpose of a file. Files in this directory can be divided into four categories based on different functions. to distinguish these types of files easily, Oracle must follow certain rules for file naming. See table 2.

[NextPage]

The following describes the four different types of script functions:

1. cat *. SQL script

This script is mainly used to create a data dictionary view. The scripts catalog. SQL and catproc. SQL are the two scripts that must be run after the database is created. The functions of these two scripts are shown in table 3.

Table 3 script description for creating a data dictionary View

(1) catalog. SQL

This script creates a view and System Dynamic Performance view relative to the system base table and their synonyms. This script also runs the script to create other objects at the same time, mainly including:

Basic PL/SQL environment, including PL/SQL statement:

-Data Type

-Predefined exceptions

-Built-in processes and functions

-SQL operations

Audit

Import/Export

SQL * Loader

Installation Options

(2) catproc. SQL

This script is mainly used to establish the environment for PL/SQL functions. In addition, several PL/SQL packages are created to extend the functions of RDBMS. This script also creates additional packages and views for some of the following RDBMS functions:

Warning (Alerts)

Pipelines)

LogMiner)

Large Object (Large objects)

Object (Objects)

Advanced queue)

Replication option)

Other built-in packages and options (Other built-ins and options)

(3) other scripts

There are other scripts in this directory to expand the functions of the Oracle Database Server. For example, the catadt. SQL script is used to create a data dictionary view that displays megabytes of data in RDBMS. The catnoadt. SQL script is used to delete these tables and views.

2. dbms *. SQL and prvt *. plb scripts

These two types of scripts are used to create Oracle package objects predefined by the system that extends the functions of the Oracle server. These programs are used to complete database management tasks. Most SQL scripts are executed when running catproc. SQL scripts. Some additional scripts must be executed separately by the database administrator. For example, the dbmspool. SQL script is used to display the size of objects in the Shared Pool. To reduce the size of fragments in the shared pool, it can be marked as "keep" or "delete" in SGA.

3. utl *. SQL script

This type of script must be run only when the database requires additional views and tables. For example, the script utlxplan. SQL is used to create a table, which is used to observe the SQL statement Execution Plan ).

Note that most database management scripts must be run under user SYS. If the database administrator wants to run these scripts, it is best to first read the relevant information in the script content to learn who should run these scripts.

Previous Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.