如何使用 Visual C#(Visual Studio 2008 Express 版)解析 tnsnames.ora 文件以获取 tnsnames ?例如,我的 tnsnames.ora 文件包含
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = shaman)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
BILL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.58)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
如何解析该文件以获取 TNSNAMES(即 ORCL、BILL 等)。如果这个问题听起来太明显,请原谅我,我正在学习并尝试使用 C#