Induction of Oracle Database startup methods and Command Parameters

Source: Internet
Author: User

This article mainly introduces the Oracle database startup method and the relevant actual command parameters for induction. This question is mainly about the actual application code of the Oracle database startup method, the following describes the specific content of the article.

Oracle startup method:

 
 
  1. Startup nomount
  2. Startup mount
  3. Startup open (default options of startup)

Other common parameters: read only, read write, force, restrict

These parameters can be used together. For example, startup and startup open read write have the same effect.

Oracle startup process: Start an instance-> load an Oracle database-> open a database

The order in which the corresponding files are read: parameter files> Control Files> data files

Let's verify the differences between these steps:

 
 
  1. startup nomount 

When the Oracle database is started using nomount, it means that only the database instance is started, no database is loaded, and no database is opened.

In this case, only the parameter file is read. There are two main tasks: one is to allocate the memory SGA area, and the other is to start the Oracle background process.

Modify the name of the Oracle parameter file and start the database as nomount.

Here we need to modify both pfile and spfile. By default, Oracle databases start with spfile and pfile is used when spfile cannot be found.

 
 
  1. [Oracle@localhost dbs]$ pwd  
  2. /Oracle/orc10g/product/10.1.0/db_1/dbs  
  3. [Oracle@localhost dbs]$ mv initorcl.ora initorcl1.ora  
  4. [Oracle@localhost dbs]$ mv spfileorcl.ora spfileorcl1.ora  
  5. SYS@orcl>shutdown abort  
  6. Oracle instance shut down.  
  7. SYS@orcl>startup nomount  
  8. ORA-01078: failure in processing system parameters  
  9. LRM-00109: could not open parameter file '/Oracle/orc10g/product/10.1.0/db_1/dbs/initorcl.ora'  
  10. SYS@orcl> 

Keep the parameter file correct and modify the control file name

 
 
  1. [Oracle@localhost orcl]$ pwd  
  2. /Oracle/orc10g/oradata/orcl  
  3. [Oracle@localhost orcl]$ mv control01.ctl control01a.ctl  
  4. [Oracle@localhost orcl]$ mv control02.ctl control02a.ctl  
  5. [Oracle@localhost orcl]$ mv control03.ctl control03a.ctl  
  6. .....  
  7. SYS@orcl>startup nomount  
  8. Oracle instance started.  
  9. Total System Global Area 167772160 bytes  
  10. Fixed Size 778212 bytes  
  11. Variable Size 61874204 bytes  
  12. Database Buffers 104857600 bytes  
  13. Redo Buffers 262144 bytes  
  14. SYS@orcl> 
  15.  

No error is reported when you modify the control file name in nomount mode. It indicates that the control file is not read in nomount mode.

To continue with the above steps, we start with mount:

 
 
  1. SYS@orcl>alter database mount;  
  2. alter database mount  
  3. *  
  4. ERROR at line 1:  
  5. ORA-00205: error in identifying controlfile, check alert log for more info  

When loading the Oracle database, read the control file to determine the location of the data file.

In the above example, we modify the control file correctly so that the database can find the control file correctly,

Modify the name of the data file.

 
 
  1. [Oracle@localhost orcl]$ mv tp_test.dbf tp_test1.dbf  
  2. .....  
  3. SYS@orcl>startup mount  
  4. Oracle instance started.  
  5. Total System Global Area 167772160 bytes  
  6. Fixed Size 778212 bytes  
  7. Variable Size 61874204 bytes  
  8. Database Buffers 104857600 bytes  
  9. Redo Buffers 262144 bytes  
  10. Database mounted.  

Although I modified the data file, there was no error in the mount mode. It indicates that in the mount mode, only the parameter file and control file are read during the startup process.

Next we open the database.

 
 
  1. SYS@orcl>alter database open  
  2. 2 ;  
  3. alter database open  
  4. *  
  5. ERROR at line 1:  
  6. ORA-01157: cannot identify/lock data file 5 - see DBWR trace file  
  7. ORA-01110: data file 5: '/Oracle/orc10g/oradata/orcl/tp_test.dbf'  

The system prompts that we cannot find the tp_test.dbf file.

At this point, we have a rough understanding of the database startup process, the work done in each step during the startup process, and the files read.

Summary: Oracle starts the Oracle database as follows:

Nomount

------------

Start an instance | mount

(Parameter file) | ---------------

| Load database | open

(Control file) | -----------

| Open a database

(Data files)

1. The control file has not been read in nomount mode. This option is used when all the control files in the database are corrupted. You need to re-create the Database Control file or create a new database.

2. The data file is not opened under the mount option. This option can be used to modify the running mode of the Oracle database or restore the database.

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.