Getting location of file tnsnames.ora by code

后端 未结 5 2044
野的像风
野的像风 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:20

    According to the net that depends on the version of Oracle and the working directory of the SQL*Plus process. This first link tells you the environment variable that specifies the base path for some versions (7, 8, 9i) of Oracle. If you use a different one, I'm sure there's a similar way to get to the system directory.

    If you spread versions of these files all over the place though and rely on the "look for a local tnsnames.ora first" behaviour of the client, then I guess you're out of luck.

提交回复
热议问题