How to start and shutdown oracle database

We can use the below command to accomplish the action. If you want to know how to start and shutdown oracle database, first of all we should login into database server using putty as below.

How to start and shutdown oracle database

Steps to start and shutdown oracle database.

Once login on database server. We will login in database as below and start and stop database.

Start database using startup command.

$sqlplus / as sysdba

$SQL> startup;
$SQL> select name, open_mode from v$database;

After login using sys user, we can use startup command to start up the database.

Start database using pfile.

Just use startup pfile command to startup oracle database with pfile.

SQL> startup pfile='$ORACLE_HOME/dbs/init.ora';

If no pfile is specified with startup in that case command looks for spfile.

Shutdown database using shutdown immediate.

To shutdown database, simply we can use shutdown immediate database command to shutdown the database.

SQL> shutdown immediate

Start & Stop pluggable database;

If you want to start and stop pluggable database, then you have to set PDB using aler session set container as blow.

Stop Pluggable database.

SQL> alter session set container=DBUAT;
SQL> alter pluggable database DBUAT close;

Start Pluggable database.

SQL> alter  session set container=DBUAT;
SQL>  alter pluggable database DBUAT open;

Verify PDB database.

SQL> show pdbs;

CON_ID    CON_NAME                                OPEN MODE   RESTRICTED
2               PDB$SEED                                   READ ONLY     NO
3               DBUAT                                         READ WRITE    NO

Leave a Comment