Oracle Startup and shutdown principle-phased start of data path

Source: Internet
Author: User


First, the principle of startup and shutdown of Oracle

1. Oracle Boot Step Analysis

Sql> Startup-This is the command to start the database
ORACLE instance started. --first stage, launch instance, Nomount state
Total System Global area 608174080 bytes
Fixed Size 1268920 bytes
Variable Size 230687560 bytes
Database buffers 373293056 bytes
Redo buffers 2924544 bytes
Database mounted. --second stage, load database, Mount state
Database opened. --The third stage, open the database, opening state

2. Phased start of Oracle database

2.1 Boot the database to the Nomount state, just launch the instance

Sql> Startup Nomount
ORACLE instance started.

Total System Global area 608174080 bytes
Fixed Size 1268920 bytes
Variable Size 230687560 bytes
Database buffers 373293056 bytes
Redo buffers 2924544 bytes

Principle: Read the parameter file SPFile file
Parameter file path: $ORACLE _home/dbs
[email protected] dbs]$ LL
Total 48
-RW-R-----1 Oracle oinstall 1544 06-05 15:47 Hc_law.dat
-RW-RW----1 Oracle oinstall 1544 06-09 09:25 Hc_orcl.dat
-rw-r--r--1 Oracle oinstall 12920 2001-05-03 Initdw.ora
-RW-R-----1 Oracle oinstall 8385 1998-09-11 Init.ora
-RW-R-----1 Oracle oinstall 06-04 16:20 LKORCL
-RW-R-----1 Oracle Oinstall 1536 06-04 16:23 ORAPWORCL
-RW-R-----1 Oracle oinstall 2560 06-09 09:23 Spfileorcl.ora

Spfileorcl.ora: is the parameter file to be read by Oracle Startup

Reverse SPFile file

Sql> create Pfile from SPFile;

File created.

I've got this file in $oracle_home/dbs.
-rw-r--r--1 Oracle Oinstall 987 06-09 09:28 Initorcl.ora--default is no this file

In the Initorcl.ora file, the parameters about the memory component:
*.sga_target=605028352
*.pga_aggregate_target=201326592
orcl.__db_cache_size=373293056
orcl.__java_pool_size=33554432
orcl.__large_pool_size=4194304
orcl.__shared_pool_size=192937984
Orcl.__streams_pool_size=0

Oracle's background process:
[[Email protected] ~]$ PS aux | grep Ora_
Oracle 3473 0.0 0.6 694896 13096? Ss 09:25 0:00 ORA_PMON_ORCL
Oracle 3475 0.0 0.5 694312 11372? Ss 09:25 0:00 ORA_PSP0_ORCL
Oracle 3477 0.0 1.0 694312 21756? Ss 09:25 0:00 ORA_MMAN_ORCL
Oracle 3479 0.0 0.6 695992 13200? Ss 09:25 0:00 ORA_DBW0_ORCL
Oracle 3481 0.0 0.5 694312 11420? Ss 09:25 0:00 ORA_LGWR_ORCL
Oracle 3483 0.0 0.5 694312 12248? Ss 09:25 0:00 ORA_CKPT_ORCL
Oracle 3485 0.0 0.5 694312 11436? Ss 09:25 0:00 ORA_SMON_ORCL
Oracle 3487 0.0 0.5 694312 11376? Ss 09:25 0:00 ORA_RECO_ORCL
Oracle 3489 0.0 0.5 694312 11396? Ss 09:25 0:00 ORA_CJQ0_ORCL
Oracle 3491 0.0 0.5 694312 11548? Ss 09:25 0:00 ORA_MMON_ORCL
Oracle 3493 0.0 0.5 694312 11392? Ss 09:25 0:00 ORA_MMNL_ORCL
Oracle 3495 0.0 0.5 694820 11460? Ss 09:25 0:00 ORA_D000_ORCL
Oracle 3497 0.0 0.5 694308 10836? Ss 09:25 0:00 ORA_S000_ORCL

To view the status of a listener
Service "ORCL" has 1 instance (s).
Instance "ORCL", status BLOCKED, have 1 handler (s) for the This service ...

Nomount Stage Use occasions: as a database maintenance operations, most often do is to control the file reconstruction.


2.2 Boot database to mount state, Mount database

Sql> ALTER DATABASE Mount; -This is the only way to use this command in a nomount state

Database altered.

sql> startup Mount; --Jump directly to the second stage by booting the database into the Mount state
ORACLE instance started.

Total System Global area 608174080 bytes
Fixed Size 1268920 bytes
Variable Size 230687560 bytes
Database buffers 373293056 bytes
Redo buffers 2924544 bytes
Database mounted.

Principle: Read the control file

There is a path to the control file in the parameter file:
*.control_files= '/u01/oracle/oradata/orcl/control01.ctl ', '/u01/oracle/oradata/orcl/control02.ctl ', '/u01/oracle /oradata/orcl/control03.ctl '

[Email protected] ~]$ cd/u01/oracle/oradata/orcl/
[email protected] orcl]$ ll *.ctl
-RW-R-----1 Oracle oinstall 7061504 06-09 09:53 control01.ctl
-RW-R-----1 Oracle oinstall 7061504 06-09 09:53 control02.ctl
-RW-R-----1 Oracle oinstall 7061504 06-09 09:53 control03.ctl

The control file is a binary file, you want to read the words need to be trace out, trace out the file placed in the/u01/oracle/admin/orcl/udump

LOGFILE
GROUP 1 '/u01/oracle/oradata/orcl/redo01.log ' SIZE 50M,
GROUP 2 '/u01/oracle/oradata/orcl/redo02.log ' SIZE 50M,
GROUP 3 '/u01/oracle/oradata/orcl/redo03.log ' SIZE 50M
--STANDBY LOGFILE
DataFile
'/u01/oracle/oradata/orcl/system01.dbf ',
'/u01/oracle/oradata/orcl/undotbs01.dbf ',
'/u01/oracle/oradata/orcl/sysaux01.dbf ',
'/u01/oracle/oradata/orcl/users01.dbf ',
'/U01/ORACLE/ORADATA/ORCL/EXAMPLE01.DBF '
CHARACTER SET ZHS16GBK
;
The path to the log file and data file is stored in the control file.

Attention:

The instance is already associated with the database.
SYS user can access the database
Other non-SYS users are unable to access the database
Sql> Conn SYSTEM/ORCL
ERROR:
Ora-01033:oracle initialization or shutdown in progress


Warning:you is no longer connected to ORACLE.

Application of Mount State:
Do database recovery and data migration

2.3 Opening a database

sql> ALTER DATABASE open; This command can be used in the Mount state.

Database altered.

Sql> startup-Opens the database directly and triple jump directly
ORACLE instance started.

Total System Global area 608174080 bytes
Fixed Size 1268920 bytes
Variable Size 230687560 bytes
Database buffers 373293056 bytes
Redo buffers 2924544 bytes
Database mounted.
Database opened.

Oracle Startup and shutdown principle-phased start of data path

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.