Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed explanation of Oracle architecture, basic operation management and client remote connection

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The previous article, "Oracle Database 12c installation", explained how to install the oracle database. This article continues to explain the database architecture, basic operation management and client remote connection.

The architecture of Oracle

The Oracle database consists of two parts

(1) example:

(2) Database

Note: when learning oracle architecture, be sure to keep various diagrams in mind, which will help you understand and master oracle databases.

The structural relationship is shown in the following figure

Oracle memory structure:

Memory area: system global domain (SGA); program global area (PGA)

SGA: system global area shared pool, library cache, data dictionary cache, java pool, large buffer pool, redo log buffer, data cache, temporary save

Data recovery basis: checkpoint (CKPT), which is equivalent to the time point and location of mysql

The storage structure of Oracle is divided into physical structure and logical structure, which are independent and related to each other.

The role of main files in physical structure

Data files: user or application data containing data as well as metadata and data dictionaries

Redo log files: for instance recovery of the database

Control file: contains data related to the database itself, that is, physical database structure information

Archive log files: recovering lost data

Logical structure relationship: table space (storing multiple tables)-"segment -" area-"data block"

Tablespaces that are automatically created after installation:

SYSTEM system tablespace, which stores management information about tablespace names, control files, data files, etc. It belongs to sys,system schema and cannot be deleted or renamed

SYSAUX auxiliary system table space, which is used to reduce the load of data space and improve efficiency

TEMP temporary tablespace for temporary tables and temporary data for sorting

USERS user tablespace, which stores permanent user objects and private information, also known as data tablespace. Note: each database should have a user tablespace so that it can be assigned to the user when creating the user, otherwise the user's data will use the SYSTEM tablespace

UNDO redoes tablespaces to help roll back data from uncommitted transactions.

The data file extension is ".dbf"

In addition, the biggest highlight of Oracle 12C and previous versions is that it supports database hot plug and can be docked with other types of databases.

Basic Operation and Management of Oracle Database

Enable monitoring oracle database login, turn on and off to create a database

One, enable monitoring

Function: the client accesses the oracle database instance and installs the database. If the host is restarted, the listening service needs to be enabled before the client can log in to the oracle database instance.

[oracle@Oracle ~] $lsnrctl

LSNRCTL > start

TNS-01106: listeners with the name LISTENER have been started

Command to close listening port

Second, log in to the Oracle database and open

Log in using the oracle user

Sqlplus / as sysdba (sys users are the top administrators of oracle, so add as)

If it is an ordinary user who logs in to sqlplus username / password

SQL > help index (view list of commands, case-insensitive in sql)

SQL > show user (View current user)

By default, databases are open.

Three states of database opening

/ / start the three phases: start the instance-load the database-open the database

1:startup nomount (alter database mount; alter database open;)

2:startup mount (alter database open;)

3:startup

Third, the mode and state of database shutdown

(1) the shutdown normal transaction can continue to be submitted. If other users cannot connect to the database, the bank will not receive any new customers, but will not close the door until the previous customers have been received.

The waiting time for this shutdown is long, but the data will not be lost.

(2) Shutdown immediate (recommended) closes immediately and the transaction rolls back

(4) Shutdown transactional is equivalent to the first kind.

(5) data will be lost if Shutdown abort is cut off directly, so it is not recommended to use it.

Fourth, create a database

1, [oracle@Oracle ~] $dbca (if you do not pop the window, execute: export DISPLAY=:0.0)

2. Enter the graphical interface to create

3. Details of creating "school" database

4, wait for the reading note

5. After the creation is completed, you can see the location where the log files are stored

/ orc/app/oracle/cfgtoollogs/dbca/school

Fifth, the client connects to the oracle database remotely

1, install the oracle client on windows

On the oracle official website, download the windows version of the client basic package and toolkit

Note: you need to register an account before you can download it.

Http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html

Download the software package on this Baidu cloud disk

Basic package: https://pan.baidu.com/s/1yRGNSO5C6yo5IpihWSgBww

Toolkit: https://pan.baidu.com/s/1kyWjtJ3sUVVXh8AzBSOzgQ

C++ environment package: https://pan.baidu.com/s/1aIv3qLGKlVlQkkS9s6lMHg

2. After downloading, decompress the basic package, and then decompress the toolkit

3. Copy the extracted file to disk C, and add the copy path to the system environment variable so that the system can recognize the sqlplus command.

4. At this time, we open sqlplus and still cannot use it. The system lacks C++ environment package. It can be used after installation.

5. Install C++ environment package

6. After the installation is complete, open the CMD window to connect remotely

Command format: sqlplus user / password @ / / IP address: Port / instance

7, but you will find some garbled code, so you need to add the character set setting to the environment variable

NLS_LANG

AMERICAN_AMERICA.AL32UTF8

8, and then reopen cmd for remote connection, and the font will display normally.

The remote connection was set successfully.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report