No services and no listener analysis appear in Oracle 11g RAC listeners

Source: Internet
Author: User

No services and no listener analysis appear in Oracle 11g RAC listeners

First, we must know that in Oracle 11g, the GI and Oracle database software are recommended to be managed separately. In this case, we will find that the Database Listener is actually under the GI management account, that is, the grid account we create. In the $ ORACLE_HOME/network/admin directory of the grid account, we will find our listener. ORA file. At the same time, the startup and shutdown of the listener are controlled by the grid account. If you use an oracle account, the following error is reported:

The TNS-01190: the user is not authorized to execute The requested listener command

Of course, we can still use the oracle account to create a listener using the netca command. The Listener is located in the $ ORACLE_HOME/network/admin directory of the oracle account.

In addition, by default, our tnsnames. ora file still exists in the relevant location under the oracle account.

Next we will analyze the listener's specific Configuration:

First, we must clearly understand which instances are available in the RAC environment and whether all instances need to be listened to. To solve this problem, we will test the following:

[Grid @ RAC01 ~] $ Lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0-Production on 03-JAN-2014 08:33:35

..............................

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

..................

Listener Parameter File/u/app/11.2.0/grid/network/admin/listener. ora

Listener Log File/u/app/grid/diag/tnslsnr/RAC01/listener/alert/log. xml

Listening Endpoints Summary...

(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = LISTENER )))

(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 10.134.30.27) (PORT = 1521 )))

(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 10.134.30.47) (PORT = 1521 )))

Services Summary...

Service "+ ASM" has 1 instance (s ).

Instance "+ ASM2", status READY, has 1 handler (s) for this service...

The command completed successfully

Observe the listener status. At this time, we can find that only the listening service of the ASM instance is available, but where is the listening of the database instance? For this question, we recommend two parameters: local_listener and remote_listener. Once again, we only need the parameter local_listener.

In fact, the no listener and no services mentioned above are related to this parameter. Let's take a look at the configuration of this parameter on the current server:

First, we observe the ASM instance:

SQL> show parameter local_l

NAME TYPE

---------------------------------------------------------------------

VALUE

------------------------------

Local_listener string

(DESCRIPTION = (ADDRESS_LIST = (AD

DRESS = (PROTOCOL = TCP) (HOST = RAC0

1-vip) (PORT = 1521 ))))

SQL> select instance_name, status from v $ instance;

INSTANCE_N STATUS

----------------------------------------------

+ ASM2 STARTED

We can see that the local_listener parameter of the asm instance actually uses vip.

Let's look at our database instance:

SQL> show parameter local_li

NAME TYPE VALUE

-----------------------------------------------------------------------------

Local_listener string (DESCRIPTION = (ADDRESS_LIST = (AD

DRESS = (PROTOCOL = TCP) (HOST = RACS

CAN. localdomain.) (PORT = 1521 )))

)

SQL> select instance_name, status from v $ instance;

INSTANCE_N STATUS

----------------------

RACDB2 OPEN

We can see that the database instance uses scan-ip.

Is the listener service in the listener different from the ip address used?

Let's test:

Here, we only test the parameter local_listener of the asm instance, which is similar to other services.

SQL> alter system set local_listener = '(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = RACSCAN. localdomain.) (PORT = 1521 ))))';

System altered.

SQL> host lsnrctl status

Listener Parameter File/u/app/11.2.0/grid/network/admin/listener. ora

Listener Log File/u/app/grid/diag/tnslsnr/RAC01/listener/alert/log. xml

Listening Endpoints Summary...

(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = LISTENER )))

(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 10.134.30.27) (PORT = 1521 )))

(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 10.134.30.47) (PORT = 1521 )))

The listener supports no services

The command completed successfully

We can see that the listener is the one, but the service is not the one. At this time, no services is available.

In this case, the following error occurs when we log on to the database from the client through the configuration in the tnsnames. ora file:

ORA-12520: TNS: listener cocould not find available handler for requested type

Server

Enter user-name:

Neither vip nor scan-ip can be used. From this point, we can conclude that the listening address of the ASM instance must be VIP rather than scan-ip. Otherwise, the above error is reported.

Modify the listener of the ASM instance.

Alter system set local_listener = '(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = RAC01-vip) (PORT = 1521 ))))';

Which type of ip address should be used for the database instance? Is scan-ip or vip? In fact, these two ip addresses can be used, depending on how you use them. If the local_listener parameter is set to point to the vip, the client can only access the database through the vip. If the local_listener parameter is set to scan-ip, the client must access the database through scan-ip. Otherwise, the following error is returned during login:

ORA-12520: TNS: listener cocould not find available handler for requested type

Server

Enter user-name:

Summary:

In the oracle11g RAC environment, the listener is maintained by the grid account. In addition, the ASM instance must use vip, and the database instance vip and scan-ip can be used. If the database parameter local_listener is configured with vip, the client can only access the database through vip. If the database parameter local_listener is set to scan-ip, the client can only access the database through scan-ip. We recommend that you use scan-ip, so that the database will not affect the use of the client when adding or deleting nodes, and the client does not need to modify the configuration as well as node changes. Oracle officially recommends that you configure at least three scan-ip addresses when using scan-ip. In this way, redundancy can prevent the client from accessing the database because a scan-ip address is unavailable.

The above tests are only for personal testing and analysis. If you have any questions, please point them out in time. Thank you very much.

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.