Oracle Windows stop/start Instance

Stop Database 3 options

1. sqlplus (This does not stop the Windows Service for the SID)
start powershell as adminstrator
sqlplus / as sysdba
shutdown immediate
exit;

2. Windows services
net start | select-string “OracleService”
get-service -Name OracleServiceORCL
net stop OracleServiceORCL
get-service -Name OracleServiceORCL

3. oradim
This does not stop the Windows Service for the SID
oradim -shutdown -SID ORCL

We can also stop instance and service using [-SHUTTYPE srvc|inst|srvc,inst]
oradim -shutdown -SID ORCL -SHUTTYPE srvc,inst
get-service -Name OracleServiceORCL


Start Database 3 options

1. sqlplus (This does not stop the Windows Service for the SID)
start powershell as adminstrator
sqlplus / as sysdba
startup
exit;

2. Windows services
net start | select-string “OracleService”
get-service -Name OracleServiceORCL
net start OracleServiceORCL
get-service -Name OracleServiceORCL

3. oradim
This does not stop the Windows Service for the SID
oradim -startup -SID ORCL

We can also start service and instance using [-STARTTYPE srvc|inst|srvc,inst]
oradim -startup -SID ORCL -STARTTYPE srvc,inst
get-service -Name OracleServiceORCL


The windows registry will also contain setting regarding if a database should autostart and autostop during a server reboot, which can be modified as needed.

open powershell, type ‘regedit’, navigate to the ORACLE_HOME key:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\KEY_OraDB19Home1

  • ORA_ORCL_AUTOSTART
  • ORA_ORCL_SHUTDOWN
  • ORA_ORCL_SHUTDOWN_TIMEOUT
  • ORA_ORCL_SHUTDOWNTYPE