Some time ago I started to learn some basic knowledge about oracle. To facilitate exercises and operations, I installed an Oracle 10 Gb. After the installation is complete, the current database is directly deprecated. The card is terrible. The card can only be used for surfing the Internet. At that time, I was too busy to do anything else, so I never care about it. Together with the last Internet cafe. These two days are idle. So I tried to solve this problem. I think most developers should know the cause of this problem. Yes. Some Oracle background services are automatically started after startup. A large amount of memory is occupied after startup. To solve this problem, you can disable some Oracle startup services. You can enable it manually when using Oracle. Next, let's take a look at how to close and start the Oracle service program.
1. Right-click my computer-> services and find the following service programs:
Disable the above service programs. Set the start mode to manual start. If you want to use Oracle, you can start these services.
Ii. use scripts to close and open services
Create a login to open or shut down the oracleservice .txt "and add the following code:
@ Echo offtitle Oracle service management clscolor 2 fgoto menu: menuclsecho. =-= Oracle service management =-= echo. echo. 1. Enable echo. echo. 2. Disable the echo service. echo. 3. Return echo. echo. =-= echo. enter the serial number of the selected project: set/P id = if "% ID %" = "1" Goto route 1if "% ID %" = "2" Goto route 2if "% ID %" = "3" enter the correct sequence number for exitecho! & Ping-N 2 127.1> NUL & goto menu: Running 1echo. ECHO to enable the Oracle service in ...net START | findstr/I/c: "oracledbconsoleorcl"> NUL & set k = 1 | set K = 0if % K % = 0 (Net start "oracledbconsoleorcl") Net start | findstr/I/c: "oracleoradb10g_home1isql * Plus"> NUL & set k = 1 | set K = 0if % K % = 0 (Net start "oracleoradb10g_home1isql * Plus ") net start | findstr/I/c: "oracleoradb10g_home1tnslistener"> NUL & set k = 1 | set K = 0if % K % = 0 (Net start "oracleoradb10g_home1tnslistener ") net start | findstr/I/c: "oracleserviceorcl"> NUL & set k = 1 | set K = 0if % K % = 0 (Net start "oracleserviceorcl ") echo. echo Oracle service is successfully enabled... echo. pauseexit: Running 2echo. echo closes ...net start in Oracle service | findstr/I/c: "oracledbconsoleorcl"> NUL & set k = 1 | set K = 0if % K % = 1 (net stop "oracledbconsoleorcl") Net start | findstr/I/c: "oracleoradb10g_home1isql * Plus"> NUL & set k = 1 | set K = 0if % K % = 1 (net stop "oracleoradb10g_home1isql * Plus ") net start | findstr/I/c: "oracleoradb10g_home1tnslistener"> NUL & set k = 1 | set K = 0if % K % = 1 (net stop "oracleoradb10g_home1tnslistener ") net start | findstr/I/c: "oracleserviceorcl"> NUL & set k = 1 | set K = 0if % K % = 1 (net stop "oracleserviceorcl ") echo. echo Oracle service has been successfully disabled... echo. pauseexit
Change the extension name of the file to the BAT file. Run the file and you will see the following interface:
You can enable or disable Oracle services based on your selection.