You just replace them with your own global database name and username when following this article in your system. The exact release of Oracle Database being used is Oracle 11gR2.
First, let's see how we can prevent the autostart of Oracle 11g.
Now, we have to write two batch files, one for starting Oracle 11g and the other for stopping the same. Let's see the batch file which starts Oracle. Just copy the below lines into notepad and save the file as "Start Oracle.bat". Remember to replace the global database name and username.
net start OracleOraDb11g_home1TNSListener
net start OracleServiceMYDB
call C:\app\abhiram\product\11.2.0\dbhome_1\bin\emctl.bat start dbconsole
Next comes the batch file that stops Oracle. Just copy the below lines into notepad and save the file as "Stop Oracle.bat". Remember to replace the global database name and username.
call C:\app\abhiram\product\11.2.0\dbhome_1\bin\emctl.bat stop dbconsole
net stop OracleOraDb11g_home1ClrAgent
net stop OracleMTSRecoveryService
net stop OracleOraDb11g_home1TNSListener
net stop OracleServiceMYDB
You might also have to change the product version in the path from 11.2.0 to other in both of these batch files. Just open explorer, navigate to C:\app\[username]\product and see the product version you have.
I suggest you copying these two batch files to either desktop or Oracle menu in the All Programs section of Start menu. Now you can easily start or stop Oracle as you wish.
Share this article with your friends: