Novice Learning Database (vi)--easy and quick to open and close Oracle Services

Source: Internet
Author: User

Background:

As a program ape, in daily work, our computers often need to execute very many programs at the same time. For example, Eclipse, browser, instant messaging software, and so on, often need to open several Office documents or PDF documents. Now your memory is expected to have exploded. Especially now like Chrome and Firefox browser, just install a few plug-ins, memory footprint is very amazing.

And we have to install a variety of plugins to meet our needs. Since these two browsers do not install no matter what plug-ins with IE no difference.


As you can see. FireFox, Java's two processes, and eclipse has steadily captured the top four of memory usage, and this time assuming your computer is still on Oracle's service, your computer will be stuck to the ground.

Upgrading the computer to 8G memory is just beginning to feel very cool. Not too long. It's getting very slow again. How much memory is really given to it. It will dare to give you how much memory ah. Unrestricted upgrade of hardware is obviously an impractical approach, so we need to use our brains from the software, which requires us to turn off services that are not often used and background processes.

Browser We do not have to live every day, and shut down the main program will not have a background process, so our goal is not it, Java process and Eclipse open every day is inseparable from them. So you can't have a black hand on them. Hey, Oracle sorry, just can kill you, because there is a framework such as hibernate. Let's write the code without needing to know what database we're going to target.

So there's absolutely no need for us to drive the clunky backend services of Oracle on our machines every day.

A little MySQL is completely manageable, so we just need to turn it off and open it when it's ready.

However, the new problem has come again, each time the need to open the service, you also need to turn on the system of service management, to find the relevant Oracle services, and then right click Start. I would like to have a friend who has similar experience in operation. Would think it was a very annoying job.

But as a program ape, we are. It should be very natural to think that these complex work will certainly be able to take the initiative to help us solve the process. That's right. And very easy, just need a few lines of code can be done!


How to resolve:

First, go to the service (press "Win" key.) Enter "Services". Enter) to find Oracle related services, I Ann is 11g. Related services such as the following:

We do not need to open all the services, the main function only need to open such as the following two services can be:

Oracleserviceorcl
Oracleoradb11g_home1tnslistener


Save the following code as a ". bat" file or a ". cmd" file.

Specific code:


Execution Effect:


After execution, you can see that the status of two services has become "started":



Stop service code simply change "Start" to "Stop":

Execution effect:



Well, with these two pieces of code Oracle's services are obedient to us, and the trick comes. The wave is gone. Think of the cool crooked. The following is a description of each Oracle service:

1. Oracle ORCL VSS Writer service:oracle Volume Mapping copy write service, VSS (Volume Shadow Copy service) enables the creation of high-fidelity point-in-time images for storage infrastructure devices (such as disks, arrays, etc.). That is, the mapped copy (shadow copy). It can create a mapped copy on multiple volumes or on a single volume without affecting the system's system performance at the same time. (must not be started)

2. Oracledbconsoleorcl:oracle Database Console service. ORCL is the instance identity of Oracle, and the default instance is ORCL. You need to start this service when you execute Enterprise Manager (Enterprise Management Manager OEM).

(must not be started)

3. Oraclejobschedulerorcl:oracle Job scheduling (timer) service, ORCL is the Oracle instance identity. (must not be started)

4. Oraclemtsrecoveryservice: Service-side control. The service agrees that the database acts as a resource manager for transactions in Microsoft Transaction Servermts, com/com+ objects, and distributed environments. (must not be started)

5. Oracleoradb11g_home1clragent:oracle part of the database. Net Extension Service. (must not be started)

6. Oracleoradb11g_home1tnslistener: The listener service is only needed when the database needs remote access. (no need to start, there are specific explanations below).

7. ORACLESERVICEORCL: Database service (DB instance), which is the Oracle Core service, is the foundation of database startup, only the service starts, and Oracle database talent starts normally. (Must be started) what services do you need to start when developing?

For beginners, if you only use Oracle's own sql*plus, just start ORACLESERVICEORCL, if you use a third-party tool such as PL/SQL developer. Oracleoradb11g_home1tnslistener service is also to be opened. ORACLEDBCONSOLEORCL is a web-based em that must be turned on, and the rest of the service is rarely used.

Note: ORCL is the database instance name, and the default database is ORCL. You can create other, that is, the oracleservice+ database name.


Novice Learning Database (vi)--easy and quick to open and close Oracle Services

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.