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.