64位WIN7系统,未装ORACLE,我用PLSQLDEV 远程连接数据库时报错ORA-12560:TNS:protocol adapter error
1个回答
展开全部
参考这个:
使用PL/SQL Developer连接OracleX64版本:
•1. 下载32位Oracle InstantClient,并展开到某目录,例如C:\instantclient-basic-nt-11.2.0.2.0;
•2. 将系统的tnsnames.ora拷贝到该目录下;
•3. 在PLSQL Developer中设置Oracle_Home和OCI Library:
ToolsPreferencesOracleConnection:
Oracle_Home:C:\instantclient-basic-nt-11.2.0.2.0
OCI Library:C:\instantclient-basic-nt-11.2.0.2.0\oci.dll
•4. 在PLSQL Developer目录下编辑如下bat文件,替换其快捷方式,启动PLSQL Developer:
@echo off
set path=C:\instantclient-basic-nt-11.2.0.2.0
set ORACLE_HOME=C:\instantclient-basic-nt-11.2.0.2.0
set TNS_ADMIN=C:\instantclient-basic-nt-11.2.0.2.0
set NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
start plsqldev.exe
使用PL/SQL Developer连接OracleX64版本:
•1. 下载32位Oracle InstantClient,并展开到某目录,例如C:\instantclient-basic-nt-11.2.0.2.0;
•2. 将系统的tnsnames.ora拷贝到该目录下;
•3. 在PLSQL Developer中设置Oracle_Home和OCI Library:
ToolsPreferencesOracleConnection:
Oracle_Home:C:\instantclient-basic-nt-11.2.0.2.0
OCI Library:C:\instantclient-basic-nt-11.2.0.2.0\oci.dll
•4. 在PLSQL Developer目录下编辑如下bat文件,替换其快捷方式,启动PLSQL Developer:
@echo off
set path=C:\instantclient-basic-nt-11.2.0.2.0
set ORACLE_HOME=C:\instantclient-basic-nt-11.2.0.2.0
set TNS_ADMIN=C:\instantclient-basic-nt-11.2.0.2.0
set NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
start plsqldev.exe
追问
我就是这么弄的,完了之后看不到远程的数据库名
追答
本地网络服务名的配置弄好了吗? 在文件 tnsnames.ora 中 ???
比如:
tnsnames.ora
# tnsnames.ora Network Configuration File: D:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(Key = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |