Services to be started and shut down by Oracle:
1. OracleOracle_homeTNSListener corresponds to the Database Listener
2. OracleServiceSID corresponds to the database routine
3. OracleDBConsoleSID corresponds to Oracle Enterprise Manager (OEM)
Note: ORACLE_HOME indicates the Oracle main directory.
SID indicates the Oracle system identifier.
We can use start and stop in the Windows net command to start and close the Service as follows:
Note that the order of startup and shutdown is as follows:
Start: OracleOracle_homeTNSListener
OracleServiceSID
OracleDBConsoleSID
Close: OracleDBConsoleSID
OracleServiceSID
OracleOracle_homeTNSListener
We can see that the order of startup and shutdown is reversed, because the Oracle listener is controlled by Oracle.
Below is the content of a previously written Bat file, which has never been changed. I don't know if I can run it now. It's good to use it in the company. If not, leave a message!
Remember to replace OracleOraDb10g_home2 and C1S01 with your own content!
: Doit @ echo offset/p xz = press the "su" key to start the service .......... press "sd" to close the service if % xz % = su goto suif % xz % = sd goto sdgoto doit: su @ echo offecho is starting the oracle service, please wait. .....net start OracleOraDb10g_home2TNSListenernet start OracleServiceC1S01net start OracleDBConsoleC1S01echo to start oracle service to complete echo. & pausegoto doit: sd @ echo offecho is shutting down the oracle service. Please wait for ......net stop OracleDBConsoleC1S01net stop OracleServiceC1S01net stop OracleOraDb10g_home2TNSListenerecho to close the oracle service to complete echo. & pausegoto doit