用 TOAD 连接 Oracle RAC 数据库,调试存储过程的时候报错:
Cannot debug session. In order to debug when connected to a RAC instance you must have SELECT privilege for GV$INSTANCE.
授予用户DBA角色后,继续抱错:
Cannot debug session. In order to debug when connected to a RAC instance you must have entries for the individual RAC instance in your tnsnames.ora file or connect directly to an individual RAC instacne.
修改 tnsnames.ora 文件后,终于可以 debug 了!
asktoad 给出以下的解释:
How do I debug PL/SQL when connected to a RAC?
When using the PL/SQL Debugger with a RAC database, you must either have an additional entry in your TNSNames.ora file for the connected instance, or you must connect directly to an instance of the cluster without letting the server assign an instance.
During debugging, Toad creates two background sessions for handling debugger calls, called the Target and Debug sessions. These two sessions must be created on the same instance as the main Toad session, because Oracle does not support Debugging across RAC instances.
To accomplish this, Toad queries the data dictionary to find the current instance name, then searches the TNSNames.ora file, starting at the beginning, for the first entry which has either the SERVICE_NAME or INSTANCE_NAME equal to the name found in the data dictionary. Toad will then use this secondary TNSNames entry when creating the background debugger sessions.
For example, in a two node RAC environment, a user would have their main RAC entry looking something like 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 entries, one each for the individual instances in the RAC. In these 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 = RAC2) # and this
)
)
原文出处:http://asktoad.com/DWiki/doku.php/faq/answers/procedure_editor?DokuWiki=e217ad0ed5bdf990bcc4b95bb9be96b9#how_do_i_debug_plsql_when_connected_to_a_rac
分享到:
相关推荐
You can use the editor preferences to configure when and how items are added to and deleted from the PL/SQL Clipboard. Debugger Enhancements You can now display compound variable values such as user...
You can use the editor preferences to configure when and how items are added to and deleted from the PL/SQL Clipboard. Debugger Enhancements You can now display compound variable values such as user-...
You can use the editor preferences to configure when and how items are added to and deleted from the PL/SQL Clipboard. Debugger Enhancements You can now display compound variable values such as user-...
You can use the editor preferences to configure when and how items are added to and deleted from the PL/SQL Clipboard. Debugger Enhancements You can now display compound variable values such as user...
### Oracle 12CR2 RAC 升级详解 #### 一、概述 Oracle 12CR2 RAC(Real Application Clusters)升级涉及到多个组件的更新,包括Grid Infrastructure (GI)、RDBMS(Relational Database Management System)以及...
number(,) 精度p取值范围1~38有效位s取值范围-84~127 最高整数位数=p-s s正数,小数点右边指定...Connected to Oracle9i Enterprise Edition Release 9.0.1.1.1 Connected as aspire SQL> SQL> SET linesize 1000;
//// This example program shows how to send messages between two //// //// PICs using CRC error checking. Pushing a button on the //// //// prototype card sends a message from that PIC to any other ...
Virtual AP is an easy-to-use software that turns any LAN-connected PC or laptop into a Wi-Fi wireless access point. So anyone nearby can surf the Internet through your sharing. Also, your iPhone, ...
标题中的“Telnet.rar_TCP/IP_connected component_indy tcp_telnet”揭示了这是一个关于使用Indy组件在Delphi 7中实现TCP/IP连接,特别是与Telnet相关的教程或代码示例。接下来,我将详细解释这些知识点。 **TCP/...
go-get=1: dial tcp 172.217.6.127:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because ...
- Bug # 4918539: ORA-ORA-06502 or ORA-01460 may occurs if a procedure is executed through the Run PL/SQL dialog box and a string with multibyte characters is assigned to one of the parameters. ...
System.out.println("Connected to the database!"); // 进行数据库操作... conn.close(); } catch (ClassNotFoundException e) { System.out.println("Driver not found."); e.printStackTrace(); } catch ...
在线烧录程序时出现“The firmware of the connected J-Link[SN:20090928] does not support the following memory access:Read&@0x02000004 Flags:via AHB-AP”错误提示
Two demos illustrate use of SimPowerSystems for modeling a PV array connected to a utility grid. PVarray_Grid_IncCondReg_det.mdl is a detailed model of a 100-kW array connected to a 25-kV grid via a ...
解决最近升级iar出现的问题,J-Link弹出The connected J-Link is defective,将这几个dll复制粘贴替换掉jLink安装目录(.../Segger/JlinkARMV.../)下的dll,实测可行
在IT行业中,数据库是至关重要的组成部分,而SQL Server作为一款广泛应用的关系型数据库管理系统,它的连接与操作离不开JDBC(Java Database Connectivity)驱动。本篇将详细介绍如何下载和安装sqljdbc4,这是...
System.out.println("Connected to the database!"); // 进行数据库操作... conn.close(); } catch (Exception e) { e.printStackTrace(); } } } ``` 在上述代码中,`url`参数应包含服务器地址、端口号...
When launched, you can see all devices connected to your machine if the ADB connection is successful. Click a device that you want to control or monitor. And enjoy! How to install Install node.js $ ...
在Java编程环境中,连接SQL Server数据库通常需要引入特定的JAR包来实现数据交互。这里提到的"sql server连接中所用的三个JAR包"指的是用于与SQL Server数据库进行通信的驱动程序库。这些JAR包包含了Java代码,允许...