首页 > 代码库 > 不安装oracle客户端,用plsql连接oracle
不安装oracle客户端,用plsql连接oracle
1.1. Instant Client 下载
官网下载地址:
http://www.oracle.com/technetwork/cn/database/features/instant-client/index-092699-zhs.html
下载instantclient-basic包,将包解压存放到本地,本测试为D:\JavaEEServer\instantclient_10_2
1.2. 配置sqlnet.ora
sqlnet.ora(位于instantclient-basic下) |
SQLNET.AUTHENTICATION_SERVICES= (NTS) NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT) |
1.3. 配置tnsnames.ora
tnsnames.ora(位于instantclient-basic下) |
#neikong为oracle服务实例名,根据自己实际情况填写 neikong =
(DESCRIPTION =
(ADDRESS_LIST =
#172.16.3.153根据实际情况填写,如需修改端口号也可修改 (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.3.153 )(PORT = 1521))
)
(CONNECT_DATA =http://www.mamicode.com/
(SERVICE_NAME = neikong )
)
) |
1.4. 配置环境变量
变量名 | TNS_ADMIN |
变量值 | D:\JavaEEServer\instantclient_10_2 |
1.5. 配置PL/SQLDeveloper
安装PL/SQL Developer,并配置oracle的连接参数:打开PL/SQL,Tools-->Preferences,配置Connection的Oracle Home和OCI library,如下图所示
1.6. 重新启动,输入用户名和密码测试
不安装oracle客户端,用plsql连接oracle