Shutting Down and Starting Up The Database Instance Using SQL*Plus
You can shut down and start the Oracle instance using SQL*Plus.
- Starting Up a Database
- Shutting Down a Database
Shutting Down a Database
Goto Windows-->Start-->Command Prompt and start the SQL*Plus program to connect the database TEST01DB. Issue the SQL*Plus SHUTDOWN command:
C:\app\oracle\product\12.2.0\dbhome_1\bin>set ORACLE_BASE="C:\app\oracle" C:\app\oracle\product\12.2.0\dbhome_1\bin>set ORACLE_SID=TEST01DB C:\app\oracle\product\12.2.0\dbhome_1\bin>sqlplus / as sysdba@TES01DB SQL*Plus: Release 12.2.0.1.0 Production on Sun Jul 23 21:29:38 2017 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production SQL> select name, open_mode, database_role from v$database; NAME OPEN_MODE DATABASE_ROLE --------- -------------------- ---------------- TEST01DB READ WRITE PRIMARY SQL> shutdown Database closed. Database dismounted. ORACLE instance shut down. SQL> SQL>
Starting Up a Database
Now the database instance TEST01DB is down. To restart, issue the SQL*Plus STARTUP command
C:\app\oracle\product\12.2.0\dbhome_1\bin> C:\app\oracle\product\12.2.0\dbhome_1\bin> C:\app\oracle\product\12.2.0\dbhome_1\bin>sqlplus / as sysdba@TES01DB SQL*Plus: Release 12.2.0.1.0 Production on Sun Jul 23 21:36:15 2017 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 5133828096 bytes Fixed Size 8757472 bytes Variable Size 1207963424 bytes Database Buffers 3909091328 bytes Redo Buffers 8015872 bytes Database mounted. Database opened. SQL> SQL> select name, open_mode, database_role from v$database; NAME OPEN_MODE DATABASE_ROLE --------- -------------------- ---------------- TEST01DB READ WRITE PRIMARY SQL> SQL>