An increasingly common question these days is does Toad support Oracle RAC (i.e. Real Application Clusters)? And if so – how, when and where?
HOW: There is nothing special required to support a RAC connection, other than a properly constructed tnsnames.ora file. Probably the best source for a correct RAC aware tnsnames.ora file should be your DBA. But I've included an example below. Some people ask why three entries? In my case, I have a two node RAC cluster. The RAC SID is the one I use to let Oracle load balance me to whatever node and instance it desires. That works 90% of the time. However, there are two key scenarios where one must use an instance specific SID, such as RAC1 or RAC2 shown in the example below:
- Running Toad’s PL/SQL debugger – which due to Oracle requirements necessitates a direct connection to a specifically defined single node.
- Performing certain DBA tasks that are specific to a RAC node – and far beyond scope of explaining within a simple blog entry such as this.
WHEN: RAC support was added back in Toad 9.0 – read
Get to Know Toad 9.0 document regarding
Toad 9.0’s RAC support. It has since been incrementally refined and further improved – so it’s best to obtain the latest version of Toad.
WHERE: There are several screens in Toad that are RAC aware - including the Database Monitor and Database Probe. Below is a screen snapshot of Toad’s Database Monitor. Note how Toad simply displays an additional dropdown so that you can switch among the RAC instances for that database. Other screens, such as the Database Browser and Session Browser, simply display an extra column for the RAC instance # - screen snapshot also shown below. Note too that most of these screens require “DBA” privileges due to their fundamental nature (i.e. not due to RAC requirements per se).
So Toad does in fact do RAC. And has for some time now.
RAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = linux_rac-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = linux_rac1) (PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = linux_rac2) (PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAC)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
)
)
)
RAC1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = linux_rac1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = RAC)
(INSTANCE_NAME = RAC1)
)
)
RAC2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = linux_rac2)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = RAC)
(INSTANCE_NAME = RAC2)
)
)