Important reference documents of the four statuses of oracle startup: This is a good introduction 1: oracle Startup File Priority: 1: spfileSID. ora2: Default SPFILE --> spfile. ora3: initSID. ora4: default pfile --> 2: specify how to start the spfile file. oracle only has the command to start the pfile. If you want to manually start the spfile file. You can use the following settings: Use spifle = $ ORACLE_HOME/dbs/spfileabc in the pfile file. ora command ex: There is a file named abc123.ora with spifle = $ ORACLE_HOME/dbs/spfileabc in abc123.ora. ora command, and then we use startup pfile = $ ORACLE_HOME/dbs/abc123.ora to start oracle normally. The file in pfile will be read during startup, because: in abc123.ora, spifle = $ ORACLE_HOME/dbs/spfileabc. the ora command is used to start the spfile file: spfileabc. ora question: Who can start the oracle database: If you are an operating system administrator, you can start and close the database. Oracle is password-Authenticated. If an authenticated user has SYSDBA and SYSOPER permissions, the user can start and close the database. 3: Four statuses of the oracle database: shutdown status indicates that the oracle database has not started NOMOUNT status: the SGA and background processes have started the MOUNT status: the control file is read through parameters, if you have sysdba permissions, you can back up and restore data. Other users cannot access the OPEN State. Other users can access the database normally. 1. SHUTDOWN --> NOMOUNT a database instance: first, read the database parameter file from the spfile or pfile: then allocate the SGA and create background processes. This is equivalent to the fact that both production lines and workers are in place, but production has not started yet, and there are no products on the production line. Some parameters can be found at this time: show parameter db_name; show parameter db_block_size; [SQL] SQL> startup nomount ORACLE routine has been started. Total System Global Area 431038464 bytes Fixed Size 1333676 bytes Variable Size 276825684 bytes Database Buffers 146800640 bytes Redo Buffers 6078464 bytes parameter queries: [SQL] SQL> show parameter db_name; name type certificate ---------------------- VALUE ------------------------------ db_name string orcl SQL> show parameter db_block_size; NAME TYPE ------------------------------ ------ ---------------------- VALUE ---------------------------- db_block_size integer 8192 2: NOMOUNT ----> MOUNT is equivalent to establishing the relationship between the database and the instance. First, find the corresponding control files based on the CONTROL_FILE parameter in the initialization parameter file and open them. The control file contains the database data file and redo log file information. At this time, the database has not been opened and is still closed. At this time, normal users cannot connect to the database. Only the database administrator can perform backup and recovery. Iii. MOUNT ----> OPEN finds the online data file and redo log file through the control file information. If there are no two files above, the database reports an error. If the two files are broken, the database cannot be opened. In this case, you can use the sysdba permission to access the mount state, restore the two data files, and then open the database. Statement for changing DATABASE from nomount to mount: ALTER database db_name MOUNTSTRATUP command explanation official: Keywords and ParametersIf you do not specify any options, then RMAN mounts and opens the DATABASE with the default server parameter file. syntax Element DescriptionSTARTUP If you specify only STARTUP with no other options, then the instance starts, then mounts and open the database. DBA Restricts access to users with the RESTRICTED SESSION privilege. FORCE If the database is open, then FORCE shuts down the database with a shutdown abort statement before re-opening it. if the database is closed, then FORCE opens the database. MOUNT Starts the instance, then mounts the database without opening itNOMOUNT Starts the instance without mounting the database. if no parameter file exists, then RMAN starts the instance with a "dummy" par Ameter file. you can then run restore spfile to restore a backup server parameter file. PFILE = 'filename' Specifies the filename of the init. ora file for the target database. if this parameter is not specified, then the default init. ora filename is used. startup RESTRICT restricts the connection of users with different user permissions to oracle, and alter system enable restricted session; in this way, users without the RESTRICT permission cannot connect. All logon sessions can be queried in the V $ session table. Select saddr, sid, serial #, username from v $ session; the connected users are displayed. Alter system kill session 'sid, SERIAL # '; in this way, the remote connection user can be killed. The DATABASE also has a READ-ONLY mode: You can use the following command to change the DATABASE to READ-ONLY mode: startup mountalter database open read only; 4: how to close database A = abort I = IMMEDIATET = transactiona1n = NORMAL how to close the database: There are several stages to close the database: 1: close the database: First, write the data in SGA to the disk data file, maintain data integrity, and then close the online data files, some datafiles, and redo log files. However, the control file is still open and can be used by the Administrator. 2: Unmount database: oracle closes the control file, but the database instance still has 3: shut down an instance to release the corresponding resources; the SHUTDOWN command has the following mode: A = abort I = IMMEDIATET = transactiona1n = NORMAL abort there will be dirty data, and none of the other three will have dirty data. Shutdown immediate is widely used because it can quickly shut down the database without dirty data.