oracle--Foundation

Source: Internet
Author: User
Tags dba

Architecture of Oracle Database

Database

An Oracle database is the physical storage of data.

Includes data files Ora or DBF, control files, online logs, parameter files

The database here is an operating system with only one library

Oracle can be viewed as a large database

Instance

A oracleshilling (Oracle Instance) has a series of background processes (BackGround Processes) He and

There can be n instances of a database

Data file (DBF)

The data file is the physical storage unit for the database.

The data in the database is stored in the table space.

In one or more data files

and a table space can have one or more data files composed

    

User:

The user is created under the instance

Users with the same name can be created in different instances

Description

Oracle's data management is managed by users and table spaces

Different users can create a table of the same name in the same table space

Instance table spatial data file data

1 --The following actions are logged on with the system user2 3 --View database version versions4 Selectversion5  fromproduct_component_version;6 whereSUBSTR (Product,1,6)= 'Oracle';7 8 --view the currently used DB instance9 SelectInstance_name fromv$instance;Ten  One --View all users in the current instance A Select *  fromdba_users; -  - --See the size of all tablespace capacity and its usage the Selecta.tablespace_name "Table space name", - Total "Table space size", -Total/(1024x768*1024x768*1024x768) "Tablespace size (G)", -Free/(1024x768*1024x768*1024x768) "Table space remaining size (G)", + Free "Table space remaining size", -(Total-Free ) "Tablespace usage size", +        round(Total-Free/Total4)* -The usage rate%" A  from  at(SelectTablespace_name,SUM(bytes) Free fromDba_free_space -                Group  bytablespace_name) A, -(SelectTablespace_name,SUM(bytes) Total fromDba_data_files -                Group  bytablespace_name) b - whereA.tablespace_name=B.tablespace_name and -A.tablespace_name='Jk_tbs'; in  - --View data file related information to Selectb.tablespace_name table Space, +B.file_namephysical file name, -B.bytes/ 1024x768 / 1024x768size M, the(b.bytes- sum(NVL (A.bytes,0)))/ 1024x768 / 1024x768m is used, *SUBSTR ((b.bytes- sum(NVL (A.bytes,0)))/(b.bytes)*  -,1,5) Utilization $  fromDba_free_space A,Panax Notoginseng Dba_data_files b - whereA.file_id =B.file_id      the Group  byB.tablespace_name, +B.file_name, A b.bytes the Order  byB.tablespace_name; +  - --log on using System user $  $ --Create a tablespace (add at least one data file) - Createtablespace wdmlsx -DataFile'C:\tablespace\wdmlsx\datafile\mainFile.dbf' the size 100M; - Wuyi --add a data file to a table space that already exists the AlterTablespace wdmlsxAdd  -DataFile'C:\tablespace\wdmlsx\datafile\secondFile.dbf' Wu size 50M; -  About --Add a data file that allows automatic growth $ AlterTablespace wdmlsxAdd  -DataFile'C:\tablespace\wdmlsx\datafile\thirdFile.dbf' - size 20M -Autoextend on Next5M maxsize 100M; A  + --allow data files that already exist to grow automatically the Alter Database  -DataFile'C:\tablespace\wdmlsx\datafile\mainFile.dbf' $Autoextend on Next5M maxsize 200M; the  the --manually change the size of existing data files the Alter Database theDataFile'C:\tablespace\wdmlsx\datafile\secondFile.dbf' - resize 20M; in  the --log on using System user the  About  the --Create a user and assign a table space to the user the Create UserLSX identified byLSX the defaulttablespace wdmlsx + Account unlock; - Create UserWDM identified byWDM the defaulttablespace wdmlsxBayi Account unlock; the  the --Assigning permissions to users LSX Connect and resource - GrantConnect,resource tolsx; - --assigning permissions to a user WDM DBA the GrantDba toWDM; the  the --Delete the user with all the things they created the Drop UserItcastCascade; -  the --allow users to pass their own permissions to other users the GrantConnect,resource toLSx withAdminoption;

    

oracle--Foundation

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.