When running Oracle, It is very resource-consuming and affects the speed of the machine. Therefore, I usually stop its services when I don't need oracle, but what services do we need to start and what do we do? The following is a brief introduction.
Oracledbconsoleorcl: Oracle Database Console service. orcl is the instance id of Oracle. The default instance is orcl. Start this service when running Enterprise Manager (Enterprise Manager OEM. (Not mandatory)
Oraclejobschedulerorcl: Oracle Job Scheduling (timer) service. orcl is the Oracle instance id. (Not mandatory)
Oracleoradb11g_home1tnslistener: Listener service, which is required only when the database needs remote access. (Not required ).
Oracleserviceorcl: Database Service (database instance) is the core service of Oracle. It is the basis for database startup. Only when the service is started can the Oracle database be started normally. (Must be started)
From the above introduction, we can see that if you only use the SQL * Plus provided by Oracle, you only need to start oracleserviceorcl. If you use third-party tools such as PL/SQL developer, the oracleoradb11g_home1tnslistener service must also be enabled. Oracledbconsoleorcl must be enabled to access the Web-based EM, and is rarely used by other services.
Generally, we only need to start oracleserviceorcl
Oracleoradb11g_home1tnslistener.
Next let's take a look at how we start oracle in the command line:
Start oracleoradb11g_home1tnslistener
C: \ Documents ents and Settings \ User> LSNRCTL startlsnrctl For 32 -Bit windows: Version 11.1 . 0.7 . 0 -Production on 16 -Apr- 2013 16 : 32 : 09 Copyright (c) 1991 ,2008 , Oracle. All Rights Reserved. Starting tnslsnr: please Wait ... Tnslsnr For 32 -Bit windows: Version 11.1 . 0.7 . 0 - The production system parameter file is E: \ app \ User \ product \ 11.1 . 0 \ Db_1 \ Network \ admin \ listener. ora write E: \ app \ User \ diag \ tnslsnr \ HT -1376 \ Listener \ alert \ log. xml: (Description = (Address = (Protocol = IPC) (pipename = \. \ PIPE \ extproc1521ipc) Listener: (Description = (Address = (Protocol = TCP) (host = 172.16 . 13.20 ) (Port = 1521 ) Connecting to (Description = (Address = (Protocol = IPC) (Key = Extproc1521) Status of the listener ------------------------ Alias listenerversion tnslsnr For 32 -Bit windows: Version 11.1 . 0.7 . 0 - Productionstart date 16 -Apr- 2013 16 : 32 : 10 Uptime 0 Days 0 HR. 0 Min. 2 Sectrace level offsecurity on: Local OS authenticationsnmp offlistener parameter file E: \ app \ User \ product \ 11.1 . 0 \ Db_1 \ Network \ admin \ listener. oralistener Log File E: \ app \ User \ diag \ tnslsnr \ HT - 1376 \ Listener \ alert \ log. xmllistening endpoints summary... (Description = (Address = (Protocol = IPC) (pipename = \. \ PIPE \ extproc1521ipc) (Description = (Address = (Protocol = TCP) (host = 172.16 .13.20 ) (Port = 1521 ) The listener supports no servicesthe command completed successfully starts oracleserviceorclc: \ Documents and Settings \ User > Net start oracleserviceorcloracleserviceorcl service is starting... oracleserviceorcl service has been started successfully.
Start oracleserviceorcl
C: \ Documents ents and Settings \ User>Net start oracleserviceorcloracleserviceorcl service is starting... oracleserviceorcl service has been started successfully.
To disable the service, run LSNRCTL stop and net stop oracleserviceorcl to stop the above two services.
Next, let's take a look at a common problem: Why cannot the service be started when our IP address changes?
This is because after oracle is successfully installed, the system will depend on the IP address when oracle is installed in the following three places (ORACLE_HOME = E: \ app \ User \ product \ 11.1.0 \ db_1)
1). Under % ORACLE_HOME %A directory named "Current ip_orcl", which stores information such as the configuration of the Oracle database named orcl.
2) at % ORACLE_HOME % \There is a directory named "oc4j_dbconsole _ current ip_orcl" under the directory of the Solaris \ J2EE, which stores the relevant configurations of the oracledbconsole service and other information.
3) at % ORACLE_HOME % \Host in listener. ora file under Network \ ADMIN and orcl in tnsnames. ora (database instance) are the current IP Address
After the environment IP address changes, you must modify the files in the above three locations and change the above IP address to the name of the current machine or the current IP address.
After the modification is complete, restart the service and you will find that the two services oracleserviceorcl oracleoradb11g_home1tnslistener can be started normally.
But at this timeWe still cannot start oracledbconsoleorcl. If you need to use Em, we must follow the steps below to modify the configuration.
Step 1:
C: \ Documents ents and Settings \ User> set oracle_sid = Orclc: \ Documents ents and Settings \ User > Emca- Repos recreateemca started 2013 - 4 - 16 16 : 42 : 46 Em configuration assistant, 11.1 . 0.7 . 0 Official copyright (c) 2003 , 2005 , Oracle. All rights reserved. Enter the following information: Database Sid: orcl listenerProgramPort Number: 1521 Sys User Password: SYS User Password: sysman User Password: continue ? [Yes (y )/ No (n)]: Y 2013 - 4 - 16 16 : 43 : 11 Oracle. sysman. emcp. emconfig perform information: The operation is logged to E: \ app \ User \ export toollogs \ emca \ orcl \ emca_2013_04_16_16_42_45.log. 2013 - 4 - 16 16 : 43 : 12 Oracle. sysman. emcp. emreposconfig invoke information: the EM archives are being deleted (this operation may take some time )... 2013 - 4 - 16 16 : 46 : 18 Oracle. sysman. emcp. emreposconfig invoke information: the archive has been deleted successfully. 2013 - 4 - 16 16 : 46 : 19 Oracle. sysman. emcp. emreposconfig createrepository information: creating the EM data archival Library (this operation may take some time )... 2013 - 4 - 16 16 : 54 : 55 Oracle. sysman. emcp. emreposconfig invoke information: the archive has been created successfully. The Enterprise Manager configuration is completed. 2013 - 4 -16 16 : 54 : 55
Step 2:
C: \ Documents ents and Settings \ User> emca- Config dbcontrol dbemca starts 2013 - 4 - 16 17 : 00 : 51 Em configuration assistant, 11.1 . 0.7 . 0 Official copyright (c) 2003 , 2005 , Oracle. All rights reserved. Enter the following information: Database Sid: orcl has configured Database Control for the database orcl. You have selected to configure Database Control to manage the database orcl. This operation will remove the existing configuration and default settings, and re-execute the configuration to continue ? [Yes (y )/ No (n)]: Y listener Port Number: 1521 Sys User Password: SYS User Password: sysman User Password: notification email address (optional): Notification sender (SMTP) server (optional): ----------------------------------------------------------------- You have specified the following settings for the database ORACLE_HOME ...... E: \ app \ User \ product \ 11.1 .0 \ Db_1 local host name ...... HT - 1376 Listener port number ................ 1521 Database Sid ................ email Address of the orcl notification ............... notification sending (SMTP) server ............... ----------------------------------------------------------------- Continue? ? [Yes (y )/ No (n)]: Y 2013 - 4 - 16 17 :05 : 08 Oracle. sysman. emcp. emconfig perform information: The operation is logged to E: \ app \ User \ export toollogs \ emca \ orcl \ emca_2013_04_16_17_00_51.log. 2013 - 4 - 16 17 : 05 : 11 Oracle. sysman. emcp. util. portmanager isportinuse warning: specified port 5540 Already in use. 2013 -4 - 16 17 : 05 : 11 Oracle. sysman. emcp. util. portmanager isportinuse warning: specified port 5520 Already in use. 2013 - 4 - 16 17 : 05 : 11 Oracle. sysman. emcp. util. portmanager isportinuse warning: specified port 1158 Already in use. 2013 - 4 - 16 17 : 05 : 12 Oracle. sysman. emcp. util. dbcontrolutil stopoms information: the database control is being stopped (this operation may take some time )... 2013 - 4 - 16 17 : 05 : 30 Oracle. sysman. emcp. emreposconfig uploadconfigdatatorepository information: Uploading configuration data to the EM archives (this operation may take some time )... 2013 - 4 - 16 17 : 06 : 53 Oracle. sysman. emcp. emreposconfig invoke information: the configuration data has been uploaded successfully. 2013 - 4 - 16 17 : 41 : 00 Oracle. sysman. emcp. util. dbcontrolutil configuresoftwarelib information: the software library has been configured successfully. 2013 - 4 - 16 17 : 41 : 00 Oracle. sysman. emcp. emdbpostconfig configuresoftwarelibrary information: deploying the pre-configuration file... 2013 - 4 -16 17 : 41 : 15 Oracle. sysman. emcp. emdbpostconfig configuresoftwarelibrary information: the pre-configuration file is successfully deployed. 2013 - 4 - 16 17 : 41 : 15 Oracle. sysman. emcp. util. dbcontrolutil securedbconsole information: Protecting Database Control (this operation may take some time )... 2013 -4 - 16 17 : 41 : 30 Oracle. sysman. emcp. util. dbcontrolutil securedbconsole information: The Database Control is successfully protected. 2013 - 4 - 16 17 : 41 : 31 Oracle. sysman. emcp. util. dbcontrolutil startoms information: Starting Database Control (this operation may take some time )... 2013 - 4 - 16 17 : 43 : 41 Oracle. sysman. emcp. emdbpostconfig restart mconfiguration information: The Database Control has been started successfully. 2013 - 4 - 16 17 : 43 : 42 Oracle. sysman. emcp. emdbpostconfig configure mconfiguration information: >>>>>>>>>>> Database Control URL is https: // HT-1376: 1158/EM < 2013 - 4 - 16 17 : 43 : 46 Oracle. sysman. emcp. emdbpostconfig invoke warning: * *********************** Warning *************** *********The management archive has been placed in security mode, in which enterprise manager data is encrypted. The encryption key has been placed in the file E: \ app \ User \ product \ 11.1 . 0 \ Db_1 \ HT- 1376_orcl \ sysman \ config \ emkey. ora. Make sure to back up this file because encrypted data will not be available if this file is lost. **************************************** ******************* Emca has been successfully configured for Enterprise Manager and ends 2013 - 4 - 16 17 : 43 : 46
Now input: https: // HT-1376: 1158/em in the browser to find that EM can be accessed normally.