Monday, June 18, 2007

Database name list in Toad

I catch something for you when doing database lab work. It is a screenshot of Toad as sql editor in Oracle database. Let’s check it out!

Have you ever thought about this? How can the name of each database shown here? Is it a magic? Of course not. This is the result of tnsnames.ora’s hard work. You can open the tnsnames.ora once again in directory you’ve installed Oracle database. In this case, I install it in D:\Oracle\product\10.1.0\Client_1\Network\Admin. You’ll see several lines of code setting like this:

# tnsnames.ora Network Configuration File:

E:\oracle\product\10.1.0\db_1\network\admin\tnsnames.ora

# Generated by Oracle configuration tools.

ORALP =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = 10.126.11.15)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = ORALP)

)

)

BDL2007=

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 10.126.11.15)(PORT = 1521))

)

(CONNECT_DATA =

(SID = BDL2007)

(SERVER = DEDICATED)

)

)

ORAPBD7 =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 10.126.11.15)(PORT = 1521))

)

(CONNECT_DATA =

(SID = ORAPBD7)

(SERVER = DEDICATED)

)

)


EXTPROC_CONNECTION_DATA =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))

)

(CONNECT_DATA =

(SID = PLSExtProc)

(PRESENTATION = RO)

)

)

List of all database names are mentioned here. Now, you don’t need confuser anymore about the magic combo box at Toad. Oke, see you…

No comments: