Start the Oracle service under the command line in Windows

Source: Internet
Author: User
Tags net command time 0 dedicated server

-- The following is a summary of the startup command:
LSNRCTL [Start | stop | status] -- start the listener, stop the listener, and view the listener status;
Net [Start | stop] oracleserviceorcl


 

1. Independent startup:

Microsoft Windows 2000 [version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

######################################## #################

Check the listener status:

######################################## #################

E:/>LSNRCTL status

LSNRCTL for 32-bit windows: Version 9.2.0.1.0-production on 2005 11:01:01

Copyright (c) 1991,200 2, Oracle Corporation. All rights reserved.

Connecting to (description = (address = (Protocol = TCP) (host = oyez) (Port = 1521 )))
TNS-12541: TNS: No listener
TNS-12560: TNS: protocol adapter error.
TNS-00511: No listener
32-bit Windows Error: 61: Unknown error
Connecting to (description = (address = (Protocol = IPC) (Key = extproc0 )))
TNS-12541: TNS: No listener
TNS-12560: TNS: protocol adapter error.
TNS-00511: No listener
32-bit Windows Error: 2: no such file or directory

######################################## #################

Try to log on to the local database:

######################################## #################

E:/>Sqlplus/nolog

SQL * Plus: Release 9.2.0.1.0-production on Tuesday June 28 11:01:09 2005

Copyright (c) 1982,200 2, Oracle Corporation. All rights reserved.

SQL>ConnSystem/qqqqqq @ oradbAs sysdba
Error:
ORA-12541: TNS: No listener

-- If the Oracle service is not started, the following error will occur instead of the above:
Error:
ORA-12560: TNS: protocol adapter error.

######################################## #################

Cause: the listener is not started and the "oradb" service name cannot be resolved. Therefore, the listener cannot log on to the database.

######################################## #################
SQL>Exit

######################################## #################

Start listener

######################################## #################

E:/>LSNRCTL start

LSNRCTL for 32-bit windows: Version 9.2.0.1.0-production on 2005 11:01:36

Copyright (c) 1991,200 2, Oracle Corporation. All rights reserved.

Start tnslsnr: Please wait...

Tnslsnr for 32-bit windows: Version 9.2.0.1.0-Production
The system parameter file is F:/Oracle/ora92/Network/admin/listener. ora.
Logs written to F:/Oracle/ora92/Network/log/listener. Log
Listener :( description = (address = (Protocol = TCP) (host = oyez) (Port = 1521 )))
Listener :( description = (address = (Protocol = IPC) (pipename = //./pipe/extproc0ipc )))

Connecting to (description = (address = (Protocol = TCP) (host = oyez) (Port = 1521 )))
Listener status
------------------------
Alias listener
Version tnslsnr for 32-bit windows: Version 9.2.0.1.0-Production
Commencement Date: 28-6-2005 11:01:38
Normal operation time 0 days 0 hours 0 minutes 2 seconds
Tracking level off
Security off
SNMP off
Listener parameter file F:/Oracle/ora92/Network/admin/listener. ora
Listener log file F:/Oracle/ora92/Network/log/listener. Log
Listener endpoint overview...
(Description = (address = (Protocol = TCP) (host = oyez) (Port = 1521 )))
(Description = (address = (Protocol = IPC) (pipename = //./pipe/extproc0ipc )))
Service summary ..
The Service "oemrep" contains one routine.
Routine "oemrep", status unknown, contains 1 handler of this service...
The Service "plsextproc" contains one routine.
Routine "plsextproc", status unknown, contains one handler of this service...
The Service "oradb.eleaf.org" contains one routine.
Routine "oradb", status unknown, contains 1 handler of this service...
Command executed successfully

######################################## #################

If the listener is started, "error 3 cannot find the executable file path" is reported ".
Check the properties of [Control Panel] = [SERVICE] = oracleorahome92tnslistener and find that the "executable file path item" is empty. Open the Registry Editor, search for the key value corresponding to the listener service, and finally find the oracleorahome92tnslistener service under HKEY_LOCAL_MACHINE/system/CurrentControlSet (controlset001, controlset002)/services. Right-click it and select "new string value", name it ImagePath, and double-click it to enter the path of the listener in the value. Here it is "F:/Oracle/ora92/bin/tnslsnr. EXE ". The execution is normal.

Cause: system maintenance software such as "Super Rabbit" and "Windows optimization master" will accidentally delete the key value in the registry.

######################################## #################

E:/>Sqlplus/nolog

SQL * Plus: Release 9.2.0.1.0-production on Tuesday June 28 11:05:27 2005

Copyright (c) 1982,200 2, Oracle Corporation. All rights reserved.

SQL>ConnSystem/qqqqqq @ oradbAs sysdba
Error:
ORA-12500: TNS: Listeners cannot start dedicated server processes

######################################## #################

Cause: the service corresponding to the local database is not enabled

######################################## #################
SQL>Exit

######################################## #################

Open the service corresponding to the local database, or click [Control Panel] = [SERVICE], select the service, and click [start] on the toolbar to start the service.

######################################## #################

E:/>Net start oracleserviceoradb
Oracleserviceoradb service is starting .....................................
The oracleserviceoradb service has been started successfully.

E:/>Sqlplus/nolog

SQL * Plus: Release 9.2.0.1.0-production on Tuesday June 28 11:17:53 2005

Copyright (c) 1982,200 2, Oracle Corporation. All rights reserved.

SQL>ConnSystem/qqqqqq @ oradbAs sysdba
Connected.
SQL>
SQL>Desc user_views
Is the name empty? Type
-----------------------------------------------------------------------------
View_name not null varchar2 (30)
Text_length number
Text long
Type_text_length number
Type_text varchar2 (4000)
Oid_text_length number
Oid_text varchar2 (4000)
View_type_owner varchar2 (30)
View_type varchar2 (30)
Superview_name varchar2 (30)

SQL>Exit
From Oracle9i Enterprise Edition Release 9.2.0.1.0-Production
With the partitioning, OLAP and Oracle Data Mining options
Disconnects from jserver release 9.2.0.1.0-Production

E:/>Oemapp Console
E:/>

 

 

2. log on to managerserver:

 

E:/>Net stop oracleserviceoemrep
Oracleserviceoemrep service is stopping ........
The oracleserviceoemrep service cannot be stopped.

######################################## #################

Open the archive service, or click [Control Panel] = [SERVICE], select the service, and click [start] on the toolbar to start the service.

######################################## #################

E:/>Net start oracleserviceoemrep
Oracleserviceoemrep service is starting .................................... ..........
The oracleserviceoemrep service has been started successfully.

In Windows, whether the database can be started using the net command is also affected by a Registry parameter: ora _ <Sid> _ autostart

For my Oracle10g Database, the key value is HKEY_LOCAL_MACHINE/software/Oracle/key_ora10g. the SID of my database is eygle. this parameter is ora_eygle_autostart.

When this parameter is set to true, the Oracle database will start when we start the service. Otherwise, the database will not start.

Test 1, ora_eygle_autostart = true:

C:/> Net start oracleserviceeygle
The oracleserviceeygle service is starting .....................
The oracleserviceeygle service has been started successfully.

C:/> sqlplus "/As sysdba"

SQL * Plus: Release 10.2.0.1.0-production on Tuesday August 22 09:27:35 2006

Copyright (c) 1982,200 5, Oracle. All rights reserved.

Connect:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the partitioning, OLAP and Data Mining options

SQL> select instance_name from V $ instance;

Instance_name
----------------
Eygle

Test 2, ora_eygle_autostart = false:

C:/> Net start oracleserviceeygle
The oracleserviceeygle service is starting.
The oracleserviceeygle service has been started successfully.

C:/> sqlplus "/As sysdba"

SQL * Plus: Release 10.2.0.1.0-production on Tuesday August 22 09:30:03 2006

Copyright (c) 1982,200 5, Oracle. All rights reserved.

Already connected to the idle routine.

SQL>

######################################## #################

Try to use sqlplus to directly connect to the archive.

######################################## #################
E:/>Sqlplus/nolog

SQL * Plus: Release 9.2.0.1.0-production on Tuesday June 28 11:58:26 2005

Copyright (c) 1982,200 2, Oracle Corporation. All rights reserved.

SQL>Conn/As sysdba
Connected.
SQL>ConnSystem/qqqqqq @ oemrep
Connected.
SQL>Exit
From Oracle9i Enterprise Edition Release 9.2.0.1.0-Production
With the partitioning, OLAP and Oracle Data Mining options
Disconnects from jserver release 9.2.0.1.0-Production

######################################## #################

Start agent

######################################## #################

E:/>Agentctl start

Dbsnmp for 32-bit windows: Version 9.2.0.1.0-production on-2005 11:59:51

Copyright (c) 2002 Oracle Corporation. All rights reserved.

Starting Oracle intelligent agent .......
Agent started

######################################## #################

If the agent cannot be started successfully:

Go to % ORACLE_HOME %/Network/agent/to delete all files with the suffix ". Q.

If the problem persists, delete services. ora.

######################################## #################

E:/>Oemctl start oms
Oracleorahome92managementserver service is starting .............
The oracleorahome92managementserver service has been started successfully.

######################################## #################

When the Management Server is started, the user name and password are required. The initial password is sysman/oem_temp.

######################################## #################
E:/>Oemapp Console
E:/>
 

 

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.