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

Oracle 11g database startup and shutdown

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

Share

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

Startup status of the Oracles11 database

Oracle11g must go through three states when it starts: NOMOUNT,MOUNT,OPEN.

NOMOUNT: only open the database instance and read the parameter file in this state.

MOUNT: according to the parameter file information, open the control file. Read all kinds of information in the control file, such as the location of the data file, the log file path, but do not open the data file.

OPEN: open the data file and do a series of checks.

Start the database:

[oracle@temp-test oracle] $sqlplus / nologSQL > connect/as sysdbaConnected.SQL > startup

This shows that the database has been started successfully and entered the open state.

ORACLE instance started.Total System Global Area 1586708480 bytesFixed Size 2213736 bytesVariable Size 939526296 bytesDatabase Buffers 637534208 bytesRedo Buffers 7434240 bytesDatabase mounted.Database opened.

Shut down the database:

SQL > shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.

Shutting down the database is contrary to the startup process, which involves three actions, close, dismount, and shut down.

If you want to manually start each state sequentially, use the following command:

SQL > startup nomount;SQL > alter database mount;SQL > alter database open

Database file

The database is mainly composed of data files, control files and redo log files. These files are the core of the database.

Data file (data files): the data file contains the actual data in the database. Is the final location where the data is stored.

Control file (control files): contains information to maintain and verify the integrity of the database. It is a binary file.

Redo log file (redo files): the redo log file contains records of changes in the database and is used for data recovery in the event of a failure.

Other documents:

Parameter file (parameter files): the parameter file defines the characteristics of the database instance, allocated memory, and buffer size information.

Password file: the authorized user starts and shuts down the database instance and stores the user name and password.

Archive log files: an archive log file is an offline backup of log files that may be used for data recovery after a failure.

Database parameter settings

A shared pool (share pool) is the parsed result data that caches SQL code, including library cache (Libray cache) and data dictionary cache (Data dict cache).

Library cache (Libray cache): stores recently used SQL and PL/SQL statements.

Data dictionary cache (Data dict cache): stores data files, tables, indexes, columns, users, and permission information.

The size of these two cache regions determines the response time of the database query, but the parameters cannot be modified directly, and the cache size can only be adjusted indirectly by adjusting the size of the shared pool.

Set the shared pool size:

SQL > alter system set shared_pool_size=16m;System altered.SQL > show parameter shared_pool_size;NAME TYPE VALUE---shared_pool_size big integer 16m

The database cache (Database buffer cache) stores block information recently read from a data file or data information that needs to be written back to the database after user changes.

Oracle sets the size of the database cache using the parameters DB_BLOCK_SIZE and DB_BLOCK_BUFFERS. The product of the two is the size of the cache, and DB_BLOCK_BUFFERS represents the number of databases.

Query the size of the database block. The value shown here is 8192 B, that is, 8KB:

SQL > show parameter db_block_size;NAME TYPE VALUE---db_block_size integer 8192

View database buffer information:

SQL > show sga;Total System Global Area 1586708480 bytesFixed Size 2213736 bytesVariable Size 939526296 bytesDatabase Buffers 637534208 bytesRedo Buffers 7434240 bytes

SGA is the automatic management of the database.

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