Oracle Listener Configuration

Source: Internet
Author: User
Tags dedicated server

Select TCP/IP (Internet Protocol) and click Next, as shown in:

 

 

Figure (6)

Enter the host name and port number. Note that the host name and port number must be the same as the host name and port number configured by the listener on the database server. Click Next, as shown in:

 

 

Figure (7)

Select the service name (Oracle8i or later) and enter the service name. The service name here is actually the global database name in the Listener Configuration of the database server. The former must be the same as the latter. The connection type is usually a dedicated server, which depends on the configuration of the database server. If the shared database server is configured, the connection type here must be a shared server, otherwise, we recommend that you select a dedicated server (for more information about the dedicated server, see the relevant documentation ). After configuration, click Next, as shown in:

 

 

Figure (8)

If the related services on the database server are started, click the test button to test the connection. By default, Oracle uses Scott/tiger users to test connections. Since Scott is an example user of Oracle, this user may not be configured for formal business databases or professional Test Databases, therefore, you must change it to a valid user logon before the test is successful. If the connection fails, click "finish" to complete the configuration.

Go back to the main window of Oracle Network Manager (Oracle Net manager) and save the configuration. By default, you can find the local service name configuration file in the Oracle Installation Directory (for example, d in Windows: /Oracle/ora92/Network/admin/tnsnames. ora, $ ORACLE_HOME/Network/admin/tnsnames in Linux/Unix. ora ). The configured local service name is shown as follows:

 

 

Figure (9)

The service name in the tree directory can be changed to a service name composed of any valid characters by renaming the menu in the editing menu. Note that the service name cannot contain spaces before it; otherwise, the database server may not be connected.

3. Connect to the database server:

(1) Start the server listener and Database Service:

In Linux/Unix, start the listener: $ LSNRCTL start.

Disable listener: $ LSNRCTL stop.

View the listening status: $ LSNRCTL status.

Start the database: $ sqlplus/nolog.

SQL> conn sys @ myoracle as sysdba -- Here myoracle is the local service name of the client configured earlier.

Or

 

SQL>conn / as sysdbaSQL>startup

In Windows, start the listener: C:/LSNRCTL start.

Start Oracle instance service: C:/oradim-startup-Sid myoracle.

Close the Oracle instance service: C:/oradim-shutdown-Sid myoracle.

The above services must be started at the same time before the client can connect to the database. Because the listener name configured by default is listener, the above command can start the listener normally. If the listener name is another name, such as alistener, you need to start the listener in the following ways:

In Linux/Unix: $ LSNRCTL start alistener.

In Windows: C:/LSNRCTL start alistener.

(2) Test the connection to the database server.

The test methods are diverse. You can perform the test when configuring the local service name or a third-party client tool, such as PL/SQL developer. the most convenient way is to use the sqlplus tool that comes with Oracle, the following uses sqlplus for testing:

 

C:/sqlplus /nologSQL>conn zgh@myoracle

Connected.

Iv. troubleshooting of client connection to server

To eliminate the connection problem between the client and the server, first check whether the client configuration is correct (the client configuration must be consistent with the database server listening configuration), and then solve the problem according to the error prompt. The following lists several common connection problems:

1. ORA-12541: TNS: No listener:

Obviously, the server listener is not started, and check whether the client IP address or port is entered correctly. Start the listener:

$ LSNRCTL start or C:/LSNRCTL start.

2. ORA-12500: TNS: The Listener cannot start the dedicated server process:

For Windows, the Oracle instance service is not started. Start the instance service: C:/oradim-startup-Sid myoracle.

3, ORA-12535: TNS: Operation Timeout:

There are many reasons for this problem, but it is mainly related to the network. To solve this problem, first check whether the network between the client and the server is smooth. If the network is connected, check whether the firewalls at both ends have blocked the connection.

4. ORA-12154: TNS: unable to process service name:

Check whether the entered service name is consistent with the configured service name. In addition, pay attention to the generated local service name file (for example, D:/Oracle/ora92/Network/admin/tnsnames in Windows. ora, $ ORACLE_HOME/Network/admin/tnsnames in Linux/Unix. the name of the first line of each service in ora cannot contain spaces.

5. ORA-12514: TNS: the listener process cannot resolve the SERVICE_NAME given in the connection descriptor open net manager, select the service name, and check whether the service name input in the service ID column is correct. The service name must be consistent with the global database name configured by the server listener.

6. In Windows, the following error occurs:

You can run the command or start the listener in the service window. The system prompts that the path cannot be found, or the listening service has an exception. Open the registry and enter the HKEY_LOCAL_MACHINE/system/current ControlSet/services/oracleorahome92tnslistener item to check whether the ImagePath string item exists. If not, set the value to D: /Oracle/ora92/bin/tnslsnr. Change the values of different installation paths. This method is also applicable to Oracle instance services. Same as above, find items like HKEY_LOCAL_MACHINE/system/current ControlSet/services/Oracle servicemyoracle to check whether the ImagePath string item exists. If not, create a new one, set the value to D:/Oracle/ora92/binoracle. EXE myoracle.

The above are some common problems for Oracle clients to connect to the server. Of course, it cannot cover all connection exceptions. The key to solving the problem lies in the methods and ideas, rather than having fixed answers to each question.

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.