Oracle Series: (3) Oracle Readiness Knowledge

Source: Internet
Author: User
Tags dba failover



1. Oracle's Windows Services and ports


1.1. Oracle's Windows Services

After the Oracle installation is complete, approximately 7 services are registered in Windows.

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/86/EE/wKiom1fO30mj0YxqAACNwG644hI512.png "title=" 001. PNG "alt=" Wkiom1fo30mj0yxqaacnwg644hi512.png "/>


Oracle database is a huge software. Starting it will occupy a lot of memory and CPU resources, especially the ORACLESERVICEORCL service is very time consuming, it is recommended to change to manual boot. As for other Oracle services, no limit.


Start the following two services: "ORACLESERVICEORCL (set to Manual start) and Oracleoradb11g_home1tnslistener (set to start port 1521 automatically)"

Similar to MySQL in: Use database name, that is, use ORCL;

The current database name is started: ORCL



1.2. Oracle Ports

Primary port for Oracle database: 1521, usually fixed.

The premise is: To start the "Oracleoradb11g_home1tnslistener" service when booting

WINDOW7/8, the name of the query port: netstat-a



2. Oracle servers, databases, and instances

An Oracle server : A relational database management system (RDBMS) that provides comprehensive, near-complete information management.

Made up of Oracle instances and Oracle databases

The Oracle Server consists of two main parts:Oracle database and Oracle instance .

Oracle Database : Files that actually hold data on your hard disk, which are organized together to become a whole, that is, an Oracle database. Thus, in Oracle's view, "database" refers to a collection of files on the hard disk, which must be partnered with in-memory instances to provide data management services externally.

Oracle instance : In memory, it consists of a shared memory pool and multiple processes, and the shared memory pool can be accessed by all processes. If the user wants to access the data in the database (that is, the files on the hard disk), it must be implemented through an instance, and the files on the hard disk cannot be read directly.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/86/EE/wKiom1fO4PfiZLr1AAGpawrndxY546.png "title=" 003. PNG "alt=" Wkiom1fo4pfizlr1aagpawrndxy546.png "/>




Oracle database server consists of two parts

(A) Examples: understood as objects, unseen

(B) Databases: Understood as classes, visible, d:\software\oracledb\oradata\orcl\*. Dbf


Three directories:

(1) Oracle Base directory: D:\Software\OracleDB

(2) Software location: D:\Software\OracleDB\product\11.2.0\dbhome_1

(3) Database file location: D:\Software\OracleDB\oradata



2.1. The relationship between Oracle server and ORCL database

An Oracle database server includes multiple databases, such as: ORCL,ORM,OA,BBS,TAX,ERP, etc.

In the D:\Software\OracleDB\oradata\ directory, the number of folders, the number of databases, for example: ORCL folder =ORCL database

All of the databases that we store in the database will eventually be stored in the corresponding library's *. DBF file, stored in binary compression form.

Note: When we installed Oracle, we have created a database, the default name is ORCL, unless you changed the database name.

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/86/ED/wKioL1fO4IzwXGEBAABmU0OQ-Po459.png "title=" 002. PNG "alt=" Wkiol1fo4izwxgebaabmu0oq-po459.png "/>



2.2. Oracle Instance Access tool: Sqlplus and Sqldeveloper

Sqlplus is a client console tool that oracle11g comes with, which can be connected to an instance of a database to manipulate the database

Sqldeveloper is a client-side graphical interface tool from oracle11g that can be connected to an instance of a database to manipulate the database

If you don't like these two client tools, you can download third-party client tools online.


3. The relationship between Oraclesql and sql92/99


(1) Fourth generation language: SQL "Structured Query language, relationship oriented"

First generation: Machine language

Second generation: Compilation

Third generation: c/c++/c#/java/vb/...

Fourth generation: SQL


(2) Four categories of sql92/"99" standard

(A) DML (Data Manipulation language): Select,insert,update,delete

(B) DDL (data definition Language): Create Table,alter table,drop table,truncate table, etc.

(C) DCL (Data Control Language): Grant permissions to Scott,revoke permissions from Scott ...

(D) TCL (Transaction Control Language): Commit,rollback,rollback to SavePoint ...


(3) The relationship between Oraclesql and sql92/99

SQL92/99 standard, standard for accessing any relational database

Oraclesql language, access only the dedicated language of the Oracle database server


(4) The relationship between Java technology and Oraclesql

Jdbc--> uses oraclesql syntax-->oracle server--->ORCL database------record

Hibernate--> using ORACLESQL Syntax-->oracle server

Mybatis--> using ORACLESQL Syntax-->oracle server


4. Using Sqlplus Tools

There are two ways to log on to an Oracle server:

A) User name + role

B) User name + password


Oracle has a super Administrator with a user name of SYS and a role of DBA.


(1) Use the Client Sqlplus tool to enter and exit the ORCL database

------Enter as a Super Administrator role

c:/>sqlplus/as sysdba

Sql>Exit

------Enter as a normal user

c:/>sqlplus Scott/tiger

Sql>Exit

Note: We usually enter as an ordinary user.


(2) Unlocking the user and setting the password

Unlock the Scott scheme/user with the SYS super username, dba role, Super Admin, and set a password for Scott to Tiger

Unlock users: Alter user Scott account unlock;

Set password: Alter user Scott identified by Tiger;

General user Scott

Password Tiger





5. Encoding and storage

In an Oracle database, a Chinese character consumes 2 bytes using the GBK encoding and 3 bytes using the UTF-8 encoding.


6. Advantages of Oracle

Advantages:

(1) Failure transfer

(2) Load balancing


Understanding failover and load balancing concepts

failover : One of the Oracle servers in a cluster is broken and should be moved by users on the Oracle server to several other Oracle servers. This process is not necessary for users to know

load Balancing : When multiple users come in for concurrent access, the Oracle servers in the cluster share the pressure of user concurrent access, but not necessarily the average distribution

The above two concepts, not only in the database field, but also in the Web server domain




Oracle Series: (3) Oracle Readiness Knowledge

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.