Toad solution to the inability to debug Oracle stored procedures in a RAC environment

Source: Internet
Author: User
Tags sessions

Operating Environment:

Server:oracle 10g RAC

Client:toad for Oracle 8.6

Description of the problem phenomenon:

Set a breakpoint on stored procedure load in editor, followed by the following error prompts:

Ora-12560:tns:protocol Adapter Error

Cannot connect debug session. In, to debug, connected to a RAC instance you must have entries for the individual RAC instances in your TNSNames . ora file or connect directly to a individual RAC instance.

Google later learned:

Source Documents

When using the ' Pl/sql Debugger with a RAC database, your must either have an additional to entry in your to Tnsnames.ora file for The connected instance, or you must connect directly to a instance of the cluster without letting the server assign an I Nstance.

During debugging, Toad creates two background for sessions handling, debugger the Target and Debug calls. These two sessions must are created on the same instance as the main Toad sessions because Oracle does not support G across RAC instances.

To accomplish this, Toad queries the "Data dictionary to find" current instance name, then searches the Tnsnames.ora fil E, starting at the beginning, for the ' the ' the ' the ' the ' entry which has either the service_name or instance_name equal to the NAME fou nd in the data dictionary. Toad'll then use this secondary TNSNames entry when creating the background debugger.

For example, in a two node RAC environment, a user would have their main RAC entry looking as this:

RAC =
(DESCRIPTION =
(Address_list =
(address = (PROTOCOL = TCP) (HOST = 192.0.0.1) (PORT = 1521))
(address = (PROTOCOL = TCP) (HOST = 192.0.0.2) (PORT = 1521))
(load_balance = ON)
(Connect_data =
(service_name = RAC)
(Failover_mode = (TYPE = SELECT)
(method = BASIC)
(retries = 180)
(DELAY = 5)
)
)
)

In this two node environment, the user would then need to have two additional TNSNames, one for the entries L instances in the RAC. In this entries, the can either use the syntax:

RAC1 =
(DESCRIPTION =
(Address_list =
(address = (PROTOCOL = TCP) (HOST = 192.0.0.1) (PORT = 1521))
)
(Connect_data =
(service_name = RAC) # Notice the difference
(instance_name = RAC1) # betwen this
)
)

Or

RAC2 =
(DESCRIPTION =
(Address_list =
(address = (PROTOCOL = TCP) (HOST = 192.0.0.2) (PORT = 1521))
)
(Connect_data =
(service_name = RAC) # and this [ red part originally "RAC2", but "RAC" is easy to understand and manipulate according to context)
)
)

After testing the above two schemes are feasible, the individual understanding is to modify the Tnsnames.ora file in the client, the server-side dual-computer environment into a stand-alone environment, please note that this operation does not make any changes to the Oracle server-side environment.

Reference:

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.