1)oracle官网下载instantclient-basic包,解压放在本地某一路径A下
2)在A目录下新建sqlnet.ora和tnsnames.ora两个文件
sqlnet.ora文件内容
---------------------
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
tnsnames.ora文件内容
-------------------------
orcl =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.82.81.184 )(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl )
)
)
3)配置环境变量
变量名 变量值
TNS_ADMIN A
注意点:这里变量值即为instantclient在本地的主目录;如果不配置该变量,连接时会报错ORA-12154: TNS:could not resolve the connect identifier specified。
4)安装PL/SQL Developer,并配置oracle的连接参数:
打开PL/SQL,Tools-->Preferences,配置Connection的Oracle Home和OCI library,如下图所示
5)重新启动PL/SQL,登录