Given below are the various commands & steps which are used to startup & open the database for accessing it in Oracle.
STARTUP Command Behavior
Order of precedence:
- spfileSID.ora
- Default SPFILE
- initSID.ora
- Default PFILE
Specified PFILE can override precedence.
STARTUP PFILE = $ORACLE_HOME/dbs/initDBA1.ora
PFILE can indicate to use SPFILE.
SPFILE = /database/startup/spfileDBA1.ora
Starting Up a Database NOMOUNT
Starting Up a Database MOUNT
Starting Up a Database OPEN
STARTUP Command
Start up the instance and open the database:
STARTUP
STARTUP PFILE=$ORACLE_HOME/dbs/initdb01.ora
You can Change the state of the database from NOMOUNT to MOUNT:
ALTER DATABASE Command :
ALTER DATABASE db01 MOUNT;
Open the database as a read-only database:
ALTER DATABASE db01 OPEN READ ONLY;
Opening a Database in Restricted Mode
Use the STARTUP command to restrict access to a database:
STARTUP RESTRICT
Use the ALTER SYSTEM command to place an instance in restricted mode:
ALTER SYSTEM ENABLE RESTRICTED SESSION;
Opening a Database in Read-Only Mode
STARTUP MOUNT ALTER DATABASE OPEN READ ONLY;
- Can be used to Execute queries
- Execute disk sorts using locally managed tablespaces
- Take data files offline and online, but not tablespaces
- Perform recovery of offline data files and tablespaces


