Getting location of file tnsnames.ora by code

后端 未结 5 1980
野的像风
野的像风 2021-02-06 08:08

How can I get the location of the tnsnames.ora file by code, in a machine with the Oracle client installed?

Is there a windows registry key indicating the l

5条回答
  •  北荒
    北荒 (楼主)
    2021-02-06 08:47

    I'm not a C# or a Windows guy for that matter so hopefully this helps. The tnsnames.ora file should be located in:

    ORACLE_HOME\network\admin
    

    If an alternate location has been specified, it should be available via the TNS_ADMIN registry key.

    See this link for more information on how Oracle handles tns names on Windows.

提交回复
热议问题