标签:enter none sid \n 实例 term oracle names post
要连接远程数据库,传统的一定可行的方法是在本地装一个oracle。然后使用“Network Configuration Assistant”配置。之后用PL/SQL Dev连接。由于须要在本地安装数据库,所以不是非常方便
?
以下介绍第二种方法
1、首先去oracle官网下载三个须要的压缩包
详细地址是:http://www.oracle.com/technetwork/topics/winsoft-085727.html
须要的包:
instantclient-basic-nt-12.1.0.1.0.zip
instantclient-odbc-nt-12.1.0.1.0.zip
instantclient-sqlplus-nt-12.1.0.1.0.zip
下载PLSQL Developer
将下载的安装包所有解压,放在同一个文件夹下。比方在D:\oracle
2、“控制面板”-”系统”-”高级”-”环境变量”-”系统变量”加入几个环境变量:
NLS_LANG =?SIMPLIFIED CHINESE_CHINA.ZHS16GBK(或AMERICAN_AMERICA.ZHS16GBK)
TNS_ADMIN = D:\oracle
LD_LIBRARY_PATH = D:\oracle
SQLPATH = D:\oracle
Path变量结尾加入D:\oracle
3、在D:\oracle下创建tnsnames.ora文件。在该文件里平配置例如以下代码。自己写easy出错,建议到装了oracle数据库的文件夹下去拷贝。假设你的电脑上安装了oracle,那么该文件的文件夹在D:\Oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN下,这是我的文件夹
# tnsnames.ora Network Configuration File: D:\Oracle\product\11.2.0\dbhome_1\network\admin\tnsnames.ora # Generated by Oracle configuration tools. LISTENER_ORCL = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) ORACLR_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) (CONNECT_DATA = (SID = CLRExtProc) (PRESENTATION = RO) ) )
ORCL = ? (DESCRIPTION = ? ? (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) ? ? (CONNECT_DATA = ? ? ? (SERVER = DEDICATED) ? ? ? (SERVICE_NAME = orcl) ? ? ) ? )
zyback= (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.88)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = zyback) ) )
5、配置PLSQL Developer客户端,如图:
关闭重新启动PLSQL Developer,输入用户、password、数据库,如图:
这样就能够远程訪问其它地方的oracle数据库了
标签:enter none sid \n 实例 term oracle names post
原文地址:https://www.cnblogs.com/zhchoutai/p/8905972.html