ORACLE-基础四(数字字典,动态性能视图,控制文件)

来源:互联网 发布:金蝶kis软件视频教程 编辑:程序博客网 时间:2024/06/06 10:44

Other object created with the database:

   Data dictionary

   Performance tabes

   PL/SQL packages

   Database event triggers

The data dictionary contains two parts:

Base tables

    Stores description of the database

    Created with CREATE DATABASE

Data dictionary views

   Used to simplify the base table information

   Accessed through public synonyms

   Created with the catalog.sql script


How the DD Is Used

Primary uses:

  Oracle server uses it to find information about

    Users

   Schema objects

   Storage structures

Oracle server modifies it when a DDL statement is executed

Users and DBAs use itas a read-only reference for information about the database




DP Example

V$CONTROLFILE

V$DATABASE
V$DATAFILE
V$INSTANCE
V$PARAMETER  //存在内存里的信息
V$SESSION
V$SGA

V$SPPARAMETER //存在SPFILE里边的信息

V$TABLESPACE

V$THRED

V$VERSION



Control File

A small binary file

Defines current state of physical database

Maintains integrity of database

Required:

   At MOUNT state during database start up

   To operate the database

   Linked to a single database

   Loss may require recovery

   Sized initially by CREATE DATABASE


The main determinants of the size of a control file are the values set for the MAXDATAFILES,MAXLOGFILES,MAXLOGMEMBERS,MAXLOGHISTORY,and MAXINSTANCES parameters in the CREATE DATABASE statement that created the associated database.Increasing the valuesof these parameter increases the size of a controlfilethe associated database.


A control file contains the following entries:

  Database name and identifier

  Time stamp of database creation

  Tablespace names

  Names and locations of data files and online redo log files

   Current online redo log file sequence number

   Checkpoint information

   Begin and end of undo segments

   Redo log archive information

  Backup information

Every Oracle database should have at least two control files,each stored on a different physical disk.






add control file (use spfile)

Alter system set control_files='/u01/oradata/wilson/control01.ctl','/u01/oradata/wilson/control02.ctl' scope=spfile

shutdown immediate

cp /u01/oradata/wilson/control01.ctl  /u01/oradata/wilson/control02.ctl


GetControl File Information

Information about control file status and locations and be retrieved by querying the following views

 V$CONTROLFILE:lists the name and status of allcontrolfilesassociatedwiththeinstance

 V$PARAMETER:Listsstatus and location all parameters

V$CONTROLFILE_RECORD_SECTION:Provides informatio about the controfile record sections

SHOW PARAMETER CONTROL_FILES:Lists the name,status, and location of the control files


0 0
原创粉丝点击