Oracle database instance-[close startup]

Source: Internet
Author: User
The Oracle database instance should be started strictly. The database is only loaded after the instance is started. Oracle Data startup process is divided into several different

The Oracle database instance should be started strictly. The database is only loaded after the instance is started. Oracle Data startup process is divided into several different

**************************************** *******

Oracle database instance startup and Shutdown Process

**************************************** *******

The Oracle database instance should be started strictly. The database is only loaded after the instance is started. The Oracle Data startup process is divided into several different steps. In different boot processes, we can implement different operations, system repair, and so on, therefore, it is necessary to understand whether Oracle data is enabled or disabled. The following describes how to start and shut down a 10 Gb Oracle Database.

I. Start a database instance

Start command: starup [force] [restrict] [pfile =...] [nomount] [mount] [open]

Startup Process: nomount ---> mount ---> open (startup will be completed one by one without parameters)

1. nomount stage (that is, instance startup)

Generally, an instance starts the following tasks:

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

Spfile . Ora ---> spfile. ora ---> init . Ora

B. Allocate SGA

C. Start the background process

D. Open and modify the alarm . Log File and tracking File

Use Cases:

It is mostly used for database creation, control file reconstruction, and specific Backup recovery.

Note:

At this stage, no control files and data files are opened.

2. mount stage

Tasks completed in the mount phase:

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

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

C. Read the control file to obtain the name and status information of the data file and redo log file, but do not check whether the data log file exists.

Use Cases:

A. Rename the data file and move the location of the data file. (when the database is enabled and the tablespace is offline, you can also rename the data file)

B. enable or disable archiving and non-archiving of redo log files

C. Complete database recovery

Note:

This step reads the control file. If a control file in this step is corrupted, it cannot be started.

3. open stage

Tasks completed in the mount phase:

A. Open the data file

B. Open the online Log File

Note:

A. During this period, the Oracle server will check whether even data files and On-line log files can be opened and check the database for consistency.

B. If a consistency error occurs, the SMON process will start the instance and restore it.

C. If any data file or online log file is lost, the Oracle server reports an error

4. Special Methods to open a database

Read-only mode:

Startup open read only;

If

Alter database open read only;

Restricted mode:

Sometimes database maintenance and protection are required, so that normal users cannot log on. Can be started to this mode, so that only the user has

The restricted session permission can be used to log on to the database.

Start method:

Startup restrict;

Restrictions on cancellation:

Alter system disable restricted session;

Ii. database instance Shutdown

Close command: shutdowm abort | immediate | transactional | normal (the default value is normal if the shutdown parameter is not set)

Disable option:

Normal ---> new connections are not allowed. Wait until the current session ends and wait until the current transaction ends. Force the checkpoint and close the file.

Transactional ---> do not allow new connections, do not wait until the current session ends, wait until the current transaction ends, force the checkpoint and close the file.

Immediate ---> do not allow new connections, do not wait for the end of the current session, do not wait for the end of the current transaction, force the checkpoint and close the file.

Abort ---> do not allow new connections, do not wait for the end of the current session, do not wait for the end of the current transaction, do not make a forced checkpoint.

Iii. Diagnostic files

Contains specific information with significant time, used to solve problems, and used to better manage databases on a daily basis

A. alterSID. log alert file

Records the database startup and shutdown times and some important operations and error warning information, including the error code ora-, which is managed by the dba.

Location by background_dump_dest

AlertSID. log is maintained and transferred regularly. The system automatically generates a new alert_sid.log

B. background process tracking file:

Important information, warnings, and errors of background processes are recorded.

Location: $ ORACLE_BASE/admin/vvorcl/bdump/vvorcl_lgwr_15135.trc

C. User tracking file:

User processes can also generate server processes, and track statistics of user SQL statements, including error information.

The file location is determined by user_dump_dest.

User tracking:

Session level:

Alter session set SQL _trace = true;

Instance level:

Alter system set SQL _trace = true;

The size of the trace file is determined by the max_dump_file_size parameter. It is best to limit the size of a trail.

Iv. Dynamic Performance View

It records the activity of the current database and keeps updating. Therefore, data read consistency cannot be guaranteed.

Monitor and adjust Databases

Owner sys

Starting with v $

The DICT and DICT_COLUMNS views contain the dynamic performance view description and its column description.

V $ FIXED_TALBE contains the names and related information of all views.

For more information about Oracle, see the Oracle topic page? Tid = 12

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.