Startup and shutdown procedures for Oracle database instances

Source: Internet
Author: User
Tags set set oracle database

Oracle database instance startup, strictly should be the start of the instance, the database is only loaded after the instance is started. The Oracle data startup process is divided into

Several different steps, in the different boot process, we can implement different operations, system repair and so on, so understanding Oracle data startup, shutdown is very

There is a need. The following is a detailed procedure for the launch and shutdown of Oracle database 10g databases.

First, the start of the database instance

Start command: Starup [force][restrict] [pfile= ...] [Nomount] [Mount] [Open]

Startup process: Nomount---> Mount---> Open (Startup without parameters will be completed gradually)

1.nomount phase (that is, instance startup)

The startup of an instance typically contains the following tasks:

A. Search for the following files in the $oracle_home/dbs[win platform for database directory in the following order, that is, if the first one is not found, find the next

Spfile.ora---> Spfile.ora---> Init.ora

B. Allocation of SGA

C. Starting a background process

D. Open and modify alarm. log files and trace files

Usage scenarios:

More for database creation, control of file rebuilding, specific backup recovery, etc.

Attention:

No control files and data files are opened at this stage.

2.mount phase

Tasks completed during the Mount phase:

A. Start the instance and open the control file to associate the database with the instance

B. Use the instructions in the parameter file to open and lock the control file

C. read the control file to get the name and status information of the data file and redo log file, but do not check that the data log file exists

Usage scenarios:

A. Renaming data files, moving data file locations, and so on (database open, table space offline can also rename data files)

B. Enable or turn off archive and non-archive mode for redo log files

C. Achieving a complete recovery of the database

Attention:

This step will read the control file, if this step has a control file corruption can not start

3.open phase

Tasks completed during the Mount phase:

A. Open a data file

B. Open the online log file

Attention:

A. During this period, Oracle Server officers transferred Guevara verify that the data files and the online log files can be opened and checked for consistency in the database

B. If a consistency error occurs, the Smon process initiates the instance recovery

C. If any data file or online log file is missing, the Oracle server will make an error

4. Open the database in a special way

Read-only mode:

Startup open Read only;

If you're on Mount now,

ALTER DATABASE open read only;

Restricted mode:

Sometimes database maintenance, the hope that the general user can not log in. Can be started into this mode, so that only the user has

Restricted session permissions before you can log on to the database.

Startup method:

startup restrict;

Cancellation Restricted:

Alter system disable restricted session;

Second, the shutdown of the database instance

Close command: SHUTDOWM Abort | Immediate | transactional | Normal (shutdown defaults to normal without parameters)

Turn off options:

Normal---> Do not allow new connections, wait for the current session to end, wait for the current transaction to end, force checkpoints, and close the file

Transactional---> does not allow new connections, does not wait for the current session to end, waits for the current transaction to end, forces checkpoints, and closes the file.

Immediate---> does not allow new connections, does not wait for the current session to end, does not wait for the current transaction to end, forces checkpoints, and closes the file.

Abort---> does not allow new connections, does not wait for the current session to end, does not wait for the current transaction to end, and does not force checkpoints.

Iii. Several types of diagnostic documents

Contains specific information about the time that is important for solving problems and for a better day-to-day management database

A.altersid.log Alarm File

Records database startup, shutdown time, and some important actions and error warning messages, including error number ora-, managed by DBA

Location by Background_dump_dest

Maintenance of alertSID.log, regular transfer, the system will automatically generate new Alert_sid.log

B. Background process tracking files:

Documented some important information and warnings, errors, etc. of the background process

Location: $ORACLE _base/admin/vvorcl/bdump/vvorcl_lgwr_15135.trc

C. User tracking Files:

A user process can also be generated by the server process, tracking the user's SQL statement statistics, including error messages

File location by User_dump_dest

User tracking:

Session level:

Alter session set Sql_trace=true;

Instance level:

Alter system set set sql_trace=true;

The size of the trace file is determined by the Max_dump_file_size parameter. The best way to keep track is to limit his size.

Four, dynamic performance view

Record the activity of the current database, and keep updating, so it can't guarantee the consistency of reading data

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

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.