标签:
一、服务端
1、tnsnames.ora文件内容
ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ip)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) )
2、listener.ora文件内容
LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ip)(PORT = 1521)) ) ) SID_LIST_LISTENER= (SID_LIST= (SID_DESC= (GLOBAL_DBNAME=orcl) (SID_NAME=orcl) ) )
ADR_BASE_LISTENER = /home/oracle/app
3、启停tns
service lsnrctl status\start\stop
二、客户端
1、下载instantclient-basic-win32-11.2.0.1.0.zip和instantclient-sqlplus-win32-11.2.0.1.0.zip
2、把下载的包解压到instantclient_11_2目录下面
3、在instantclient_11_2目录下面,新建tnsnames.ora文件,里面的内容如下
ORCL= (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ip)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ORCL) ) )
4、下载安装plsqlDeveloper、在程序目录下面添加start.bat文件,内容如下
@echo off set path=D:\oracle\instantclient_11_2 set ORACLE_HOME=D:\oracle\instantclient_11_2 set TNS_ADMIN=D:\oracle\instantclient_11_2 set NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK start plsqldev.exe
5、打开start.bat,tools=>preferences,修改OCIlirary为D:\oracle\instantclient_11_2\oci.dll
标签:
原文地址:http://www.cnblogs.com/codefamer/p/5044717.html