> 데이터 베이스 > MySQL 튜토리얼 > Oracle database 11g R2 client的sqlplus无法成功连接数据库

Oracle database 11g R2 client的sqlplus无法成功连接数据库

WBOY
풀어 주다: 2016-06-07 17:15:35
원래의
1103명이 탐색했습니다.

Oracle database 11g R2 client的sqlplus无法成功连接数据库,1、数据库版本: Oracle Database 11g Enterprise Edition Release

问题环境:
1、数据库版本: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
2、操作系统环境:Windows 7 旗舰版 64位
3、本地安装有4个Oracle 数据库软件【四个数据库软件,不是四个数据库哦】如下:
Oracle 10.2服务端软件:e:\oracle\product\10.2.0\db_1\BIN\sqlplus.exe
Oracle 11.2服务端软件:e:\oracle\product\11.2.0\db_1\BIN\sqlplus.exe
Oracle 10.2客户端软件:e:\oracle\product\11.2.0\client_1\BIN\sqlplus.exe
Oracle 11.2客户端软件:e:\oracle\product\10.2.0\client_1\BIN\sqlplus.exe

问题描述:

1、本地启动Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 ,服务名sun,服务状态如下:
C:\Windows\system32>sc query oracleservicesun
SERVICE_NAME:oracleservicesun
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0


2、使用Oracle 10.2服务端软件可以正常连接数据库,如下:C:\Windows\system32>set ORACLE_SID=sun
C:\Windows\system32>e:\oracle\product\10.2.0\db_1\BIN\sqlplus.exe / as sysdba
SQL*Plus: Release 10.2.0.4.0- Production on 星期一 5月 14 17:06:32 2012
Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

sys@SUN>

3、使用Oracle 11.2服务端软件可以正常连接数据库,如下:C:\Windows\system32>set ORACLE_SID=sun
C:\Windows\system32>e:\oracle\product\11.2.0\db_1\BIN\sqlplus.exe / as sysdba
SQL*Plus: Release 11.2.0.1.0Production on 星期一 5月 14 17:07:23 2012
Copyright (c) 1982, 2010, Oracle.  All rights reserved.

连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

sys@SUN>


4、使用Oracle 10.2客户端软件可以正常连接数据库,如下:
C:\Windows\system32>set ORACLE_SID=sun
C:\Windows\system32>E:\oracle\product\10.2.0\client_1\BIN\sqlplus.exe / as sysdba
SQL*Plus: Release 10.2.0.4.0- Production on 星期一 5月 14 17:11:27 2012
Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

sys@SUN>


5、使用Oracle 11.2客户端软件无法连接数据库,如下
C:\Windows\system32>set ORACLE_SID=sun
C:\Windows\system32>e:\oracle\product\11.2.0\client_1\BIN\sqlplus.exe / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期一 5月 14 17:13:08 2012
Copyright (c) 1982, 2010, Oracle.  All rights reserved.


ERROR:
ORA-12560: TNS: 协议适配器错误

请输入用户名:

补充信息:
Oracle 11.2客户端sqlnet.ora文件如下:
# sqlnet.ora Network Configuration File: e:\oracle\product\11.2.0\client_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.

# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.

SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
请各位湿湿们不吝赐教,,折腾了很久也没搞明白原因,纠结中。。

linux

원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿