How to uninstall oracle? Oracle basic structure and statement collection

Source: Internet
Author: User

Oracle uninstall

1. Stop all Oracle services
2. run Oracle uninstallProgram
3. Modify the Registry
① Heky_local_machine \ Software \ oracle
② HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services
③ Heky_local_machine \ System \ currentcontorlset \ Services

\ Applocation
4. Delete the Oracle system directory c: \ Program Files \ oracle
5. Delete Oracle environment variables
6. Delete the Oracle menu in the program menu item
7. restart the system and delete the Oracle working Home Directory D: \ oracle

Basic Structure of Oracle

Oracle Server = Oracle instance + database (physical component)
A. ing between users and databases: a database can have multiple users, and a user belongs to a database.
B. Relationship between the user and the tablespace: The tablespace is the container of the logical object of the database, and the user is the owner of the logical object of the database. You can create a tablespace or allocate a quota to other users;
C. ing between instances and databases: one instance can correspond to only one database, and one database may correspond to multiple instances, unless the parallel Oracle server option is used, otherwise, each Oracle database has an instance associated with it, and a database is loaded by a unique instance.

An Oracle instance is composed of the system global zone (SGA) and five background processes.
(SMON, pmon, dbwr, lgwr, ckpt,
Pmon: process monitoring process, responsible for cleaning and recovery of process faults.
SMON: system monitoring process. It is responsible for automatically recovering the instance when the instance fails to start and re-opens the database, and maintaining the data logic component.
Dbwr: The Data Writing Process manages the data buffer. recently used blocks are retained in the buffer zone, and data files are written after the buffer data changes.
Lgwr: A log writing process. It is mainly responsible for writing log data and cyclically writing multiple log files in the system.
Ckpt: Checkpoint Process, synchronous data file, log file, control file
A database consists of data control files, redo log files, and data files.

Connection Method
Log on to the user-> instance and create a corresponding server process from the server.
Also created, server processes provide services to user processes, and user processes provide services to the server
When a process sends a request, the server process performs the following operations on the database:

% Ora-home %/oradata/Instance name/*. * database file storage directory
% Ora-home %/database/*. * database parameter file (body, password)

Oracle statement collection

1. Oracle paging SQL

 

A). Minute by rowid
Select * From t_xiaoxi where rowid in (select rid from (select rownum RN, rid from (select rowid RID, CID from

T_xiaoxi order by cid desc) Where rownum <10000) Where rn> 9980) order by cid desc;
Execution time: 0.03 seconds
B). Divide by Analysis Function
Select * from (select T. *, row_number () over (order by cid desc) rk from t_xiaoxi t) Where rk <10000 and rk> 9980;
Execution time: 1.01 seconds
C). Divide by rownum
Select * from (select T. *, rownum rn from (select * From t_xiaoxi order by cid desc) t where rownum <10000) Where

Rn> 9980; execution time: 0.1 seconds
Here, t_xiaoxi is the table name, CID is the table's key field, and the records 9981-9999 are sorted by CID in descending order. The t_xiaoxi table has more than 70000 records.
I personally think a) is the most efficient, c) is the second, B) is the worst.

2. How to view the Oracle version

Select * From SYS. V _ $ version3. check which options are installed: Select * From SYS. V _ $ Option
URL: http://greatverve.cnblogs.com/archive/2011/07/05/oracel-delete.html

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.