Start the Oracle service and close the script (in Windows)

Source: Internet
Author: User

1. Introduction
Script: a script is an executable file written in a certain format in a specific descriptive language, also known as a macro or batch processing file.
Ii. Background
Recently, the Oracle database has been installed in windows. Because the database occupies a lot of system resources, many services of this database are started by default after installation, which greatly affects the system running speed. How can we enable these services as needed, and disable them when we don't need them. Here I will only introduce three methods.
3. Text
1.use the resource manager to close the related process, such as oracle.exe. This method requires us to have a good understanding of Oracle process control. Program .
2. Use Windows Control Panel management. Steps:
Start-> Control Panel-> performance and maintenance-> management tools-> services and find the services starting with Oracle. My system is as follows:
Oracledbconsoleoracle
Oraclejobscheduleroracle
Oracleoradb10g_home1isql * Plus
Oracleoradb10g_home1tnslistener
Oracleserviceoracle
Start and Stop these services.
3. Use the script, that is, the batch processing program.
We can, for example, 2
Oracleoradb10g_home1isql * Plus
Oracleoradb10g_home1tnslistener
Oracleserviceoracle
These three items are set to manual, so that the three services will not be started after the boot, and the opportunity is faster.
Then, we create a batch processing program:
1. Create the dbstart. CMD file (Enabled)
2. Add the following content: CopyCode The Code is as follows: @ echo off
Net start oracleserviceoracle
Net start oracleoradb10g_home1isql * Plus
Net start oracleoradb10g_home1tnslistener
Pause
Similarly, we can create a closed file (dbstop. cmd)
@ Echo off
Net stop oracleserviceoracle
Net stop oracleoradb10g_home1isql * Plus
Net stop oracleoradb10g_home1tnslistener
Pause

In this way, you can double-click these two files to enable or disable the Oracle service program.
(A friend may have noticed that the service used in 3 is exactly the service found in 2. It is true that 2 is also a way to find the service of your system)
Iv. Summary
1. In Windows, the batch processing program is a collection of DOS commands. You can also run the commands in the program to start the service.
2. Anyone familiar with Linux will surely know that shell scripts in Linux are also a collection of commands. Through scripts, we can write common command sets into scripts, which is very efficient in the management system.

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.