Oracle DBA Study Notes-STARTUP

Source: Internet
Author: User


Oracle DBA Study Notes-STARTUP detailed description: Refer to database version: 10.0.2 I. Command Parsing STARTUP options | upgrade_options options is: [FORCE] [RESTRICT] [PFILE = filename] [QUIET] [MOUNT [dbname] | [OPEN [open_options] [dbname] | NOMOUNT], the three stages of NOMOUNT, MOUNT, and OPEN are startup. They cannot exist in the command at the same time. Here, open_options is: READ {ONLY | WRITE [RECOVER]} | RECOVER. Upgrade_options: [PFILE = filename] {UPGRADE | DOWNGRADE} [QUIET] www.2cto.com 1. FORCE resolution: to forcibly open the database, shutdown will be executed before open, which is equivalent to shutdown abort; startup open. If FORCE is not used when the current instance is running, an error is reported when the instance is started. FORCE can be used in a debugging or non-production environment with caution. 2. RESTRICT resolution: only users with restricted session system permissions can access the database opened in this mode. After enabling restricted, you can use the alter system command to set the state to disable restricted and enable the database normally. 3. PFILE = filename resolution: Use the parameters in the specified file to open the instance. If PFILE is not used, startup is enabled with parameters in the default parameter file. In UNIX systems, the default file is $ ORACLE_HOME/dbs/init $ ORACLE_SID.ora. In Windows systems, the default file is % ORACLE_HOME % \ database \ initSID. ora. 4. QUIET resolution: This option will cause the instance to not display the SGA-related information during the opening process. 5. MOUNT dbname resolution: Open the instance in the MOUNT mode. If dbname is not specified, open the database specified by the DB_NAME parameter in the parameter file. 6. OPEN resolution: OPEN the instance in OPEN mode 7. NOMOUNT resolution: OPEN the instance in NOMOUNT Mode 8. RECOVER resolution: This option can guide startup to perform full recovery before opening the instance, the function is the same as that of the recover database command. To enable automatic recovery, set AUTORECOVERY to ON. If the redo log file is not in the specified position, the recovery can continue even if automatic recovery is not enabled after the backup log file is specified according to the prompt. 9. UPGRADE resolution: OPEN the instance in open upgrade mode and set specific parameter values to run the upgrade script. You can use the UPGRADE option only when you open a new database version for the first time. When this option is used, run the upgrade script to upgrade the currently installed database version to an updated version. After upgrade is complete, the database must be shut down and restarted properly. 10. DOWNGRADE resolution: OPEN the instance in the open downgrade mode and set specific parameters to run the downgrade script. When this option is used, run the downgrade script to downgrade the currently installed database version to an earlier version. After downgrade is completed, the database must be shut down and restarted properly. Www.2cto.com 2. Instructions for use 1. You must connect as SYSOPER or SYSDBA to execute startup 2. startup without any parameters is equivalent to startup open 3 and startup open recover even if the restoration fails., the instance is still loaded and started. 3. The instance and database are started in three steps: 1. Start and instance (NOMOUNT ); 2. Mount the database (MOUNT); 3. Open the database (OPEN) 1. Start and instance in NOMOUNT state, ORACLE starts an instance, it reads the defined initial parameter values in the specified parameter file of SPFILE or PFILE. Allocate the SGA shared memory area and create background processes. You can use the RESTRICT and FORCE options to enable instances. In RESTRICT mode, only DBA is allowed to perform the following tasks: Perform Structure Maintenance, such as re-indexing, import and export of database files, perform database loading, and temporarily stop users from using data. 2. Mount the database to load the database in the MOUNT mode. the instance will find and open the control file based on the value specified by the initialization parameter CONTROL_FILES, and obtain the data file and redo log file information from the control file. In this status, the database is still closed. Only some users with database management permissions can perform operations on the database, such as renaming data files, adding, undoing, or renaming redo log files; start and disable redo log archiving; execute all database recovery. 2.1 When you load RAC, you can set the initialization parameter CLUSTER_DATABASE to true to load multiple databases. By default, the value of this initialization parameter is false, and the database will be loaded in an exclusive manner. After the first instance loads the database with CLUSTER_DATABASE = TRUE, the subsequent instances also load the database with CLUSTER_DATABASE = TRUE. 2.2 The standby database www.2cto.com replica database is a completely identical copy of the primary database, which can continue to provide database Availability for disasters. Replica databases are always in the RECOVERY mode. Only the alter database command can be used to load databases in standby mode, and archive redo logs generated by the primary DATABASE are applied in standby mode. ONLY the READ-ONLY (OPEN) replica database 2.3 can be used to load the clone database. The clone database is a database copy dedicated to point-in-time recovery of tablespaces. When the database is restored at the execution time point, the cloned database is loaded and restored to the expected time, and metadata (metadata) is imported from the cloned database) to the master database, copy the data files in the tablespace to the master database 3. Open the database to OPEN the database, so far the database is fully Open. When the database is opened, it opens online data files and redo log files. If the tablespace is in the offline status when the database is shut down last time, the tablespace remains in the offline status when the database is re-opened. If an exception exists in a data file or redo log file, ORACLE returns an error. When the database is opened, the Instance tries to obtain the undo tablespace. If the value of the initialization parameter UNDO_MANAGEMENT is AUTO, the instance automatically manages UNDO. The default value of the initialization parameter UNDO_MANAGEMENT is MANUAL. If you use tablespace to manage UNDO, UNDO is automatically managed. This is the recommended mode. If you use rollback segment to manage UNDO space, use MANUAL. If the database is shut down abnormally and there are scattered and suspicious transactions, whether committed or rolled back, when you re-open the database and restore it completely, the background process RECO can automatically, immediately, and permanently complete this task. 4. Example 1. Start the instance with the default parameter file (SPFILE), load the default database, and open the database. Www.2cto.com 2. startup open dbname starts the instance with the default parameter file (SPFILE), loads the database dbname, and opens the database. 3. startup force restrict MOUNT4 and startup pfile = init_dbname.ora NOMOUNT5 and startup force restrict pfile = init_dbname.ora OPEN dbname
 

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.