用 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-...
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, ...
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. ...
E/E-ARCHITECTURE IN A CONNECTED WORLD
Conection of tcp/ip using indy components with delphi 7
解决最近升级iar出现的问题,J-Link弹出The connected J-Link is defective,将这几个dll复制粘贴替换掉jLink安装目录(.../Segger/JlinkARMV.../)下的dll,实测可行
Driver for a keypad w/16 buttons connected to a PCF8574 I2C I/O expander
TITLE:fic Jacket SMA-Connected TO-Can Package FPLD Transmitter With Direct Modulation Bandwidth Beyond 6 GHz for 256-QAM Single or Multisubcarrier OOFDM upto 15Gb/s> Abstract—A specifically designed ...
华东师范大学 2017_计算机网络试题_软件工程A_参考答案
在线烧录程序时出现“The firmware of the connected J-Link[SN:20090928] does not support the following memory access:Read&@0x02000004 Flags:via AHB-AP”错误提示
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 $ ...
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 ...
Parameters schema collection now uses INFORMATION_SCHEMA when connected to a 6.0 server Added 'Functions Return String' connection string option Connector/Net 5.1 ASP.Net membership and role ...
oracle基本命令,适合初学者学习的。 一、ORACLE的启动和关闭 1、在单机环境下 要想启动或关闭ORACLE系统必须首先切换到...Connected to an idle instance. SQL> startup^C SQL> startup ORACLE instance started.