Java programmer cainiao (4) Oracle BASICS (4) Oracle starts and closes the Service Program-Solve the Problem of Oracle Installation occupying a large amount of memory

Source: Internet
Author: User


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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.