Oracle's Data dictionary

Source: Internet
Author: User

1. A data dictionary is a set of read-only system tables created and maintained by an Oracle server that stores information about databases and database objects. Data dictionaries fall into two main categories: base table and data dictionary view

The Oracle server generates these base tables by running SQL.BSP when the database is created, generating the data dictionary through Catalog.sql.

[email protected] admin]# ll sql.bsq catalog.sql-rw-r--r--. 1 Oracle oinstall 59322 April  catalog.sql-rw-r--r--. 1 Oracle oinstall 53130 July  sql.bsq[[email Protec Ted] admin]# Pwd/opt/oracle/product/11.2.0/db_1/rdbms/admin

2. Classification of data dictionary views

user_*: User-created object information all_*: Object information that the  user can access dba_*  : Object information for the entire database *: can be tables, indexes,objects
View a user-created table:sql> Select table_name from user_tables;                                                                   TABLE_NAME------------------------------zhusql> Select table_name from user_tables;                                                                   TABLE_NAME------------------------------ZHU
#查看结果一眼

A simpler way to query: using the User_catalog data dictionary

Sql> select * from User_catalog;                                          table_name                     table_type-----------------------------------------ZHU                            tablesql> select * from Cat;                                          table_name                     table_type-----------------------------------------ZHU                            TABLE User_catalog is the name of the cat

3. View the database name and creation date, log mode, open status.

Sql> select Name,created,log_mode,open_mode from V$database;                      NAME      CREATED     log_mode     open_mode----------------------------------------------------ZABBIX    2014 /5/2 Noarchivelog READ WRITE

4. View host name, instance name, version number

Sql> select Host_name,instance_name,version from V$instance;                 HOST_NAME                                                        instance_name    VERSION----------------------------------------------------------------------- --------------------------Zhu                                                              Zabbix           11.2.0.1.0

5. View the name of the control file

Sql> select * from V$controlfile;             STATUS  NAME                                          is_recovery_dest_file block_size file_size_blks--------------------------------------------- ----------------------------------------------------        /opt/oracle/oradata/zabbix/control01.ctl      NO                         16384            594        /opt/oracle/oradata/zabbix/control02.ctl      NO                         16384            594

6. View the Redo log configuration information for the database

Sql> select group#,members,bytes,status,archived from V$log;          group#    members      BYTES STATUS           archived------------------------------------------------------         1          1   52428800 INACTIVE         no         2          1   52428800 current          no         3          1   52428800 INACTIVE         NO

7. View the file location of the redo log

Sql> select Group#,status,type,member from V$logfile;       group# STATUS  TYPE    MEMBER------------------------------------------------------------------------------ --------------------------         3         online  /opt/oracle/oradata/zabbix/redo03.log         2         online  / Opt/oracle/oradata/zabbix/redo02.log         1         ONLINE  /opt/oracle/oradata/zabbix/redo01.log






This article from "Wave Scouring sand" blog, declined reprint!

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.