Oracle Database startup involves three steps:
Nomount: Find the initialization file pfile or spfile, create the SGA and start the background process, but do not allow access to the database.
Mount: locate the Control File based on the initialization File, and load the database for some DBA activities, but the user is not allowed to access the database.
Open: Find the Data File according to the control File and Redo the log File so that you can access the database.
Shut down four different commands of the database
Shutdown normal (equal to shutdown)
Normally, the database is shut down by default. Normally, the database is shut down in the following circumstances.
• New connections are not allowed
• Wait until the session ends
• Wait until the transaction ends
• Make a checkpoint and close the data file
• The instance is not required to be restored at the next startup.
Shutdown transactional
Transaction processing is disabled to prevent customers from losing work transaction processing the database is closed in the following circumstances
• New connections are not allowed
• Do not wait until the session ends
• Wait until the transaction ends
• Make a checkpoint and close the data file
• The instance is not required to be restored at the next startup.
Shutdown immediate
Immediately shut down the database in the following circumstances
• New connections are not allowed
• Do not wait until the session ends
• Do not wait until the transaction ends
• Rollback)
• Make a checkpoint and close the data file
• No routine recovery is required for the next Startup
Shutdown abort
If the normal and immediate shutdown options do not work, you can abort the current data warehouse routine.
• New connections are not allowed
• Do not wait until the session ends
• Do not wait until the transaction ends
• No checkpoint and no data file is closed
• The instance is required to be restored at the next startup.
Start database commands
Startup (started to open by default)
Startup nomount
Startup mount
Alter database mount;
Alter database open;
Initialize File
Pfile: a text file that can be edited manually.
Spfile: binary file. You cannot manually modify the parameters in the binary file. You can only use database commands to modify the parameters. By default, spfile is used for database startup.
View the initialization file path
Show parameter spfile;
Create a pfile Based on spfile
Create pfile from spfile;
Create pfile = '/u01/app/pfile. ora' fromspfile;
Create spfile from pfile = '/u01/app/pfile. ora ';
View the control file path
Select name from v $ controlfile;
View the control file content and rebuild the control file according to ctl. trc.
Alter database backup controlfile to trace as '/u01/app/ctl. trc ';
View the location of the data file
Select name from v $ datafile;
View the location of the redo log file
Select member from v $ logfile;
Database Password File
Windows, $ ORACLE_HOME/database/PWDorcl. ora
Linux/Unix, $ ORACLE_HOME/dbs/orapworcl
The role of the password file is to allow the database's sysdba and sysoper users to log on remotely using the password.
Check whether the database allows users to log on to the database remotely
Show parameter remote_login_passwordfile;
If remote_login_passwordfile is EXCLUSIVE, remote connection to the database is allowed.
If remote_login_passwordfile is set to NONE, remote database connection is not allowed.
Prohibit users from logging on to the database remotely (restart the database to take effect)
Alter system set remote_login_passwordfile = none scope = spfile;
Tablespace
Select * from dba_tablespaces;
Data Files
Select * from dba_data_files;
Redo log files
Select * from v $ logfile;
Redo Log File status
STALE indicates that the data has been submitted to the database, and the blank state indicates that the file is being used.