症状是在SQLPLUS /NOLOG中 CONN USER/PASSWORD可以连接上 但是CONN USER/PASSWORD@SID 就会直接死掉 无论是PL/SQL还是SQLPLUS或者是TOAD都是这样的情况  机器是动态IP 当然你建议是在OS级加上LOOPBACK网卡 添加上之后 能够正常连接 但是最近每天开机 本机的服务还是连不上  在TRC文件里面报 
Instance name: orclRedo thread mounted by this instance: 1Oracle process number: 21Windows thread id: 2596, image: ORACLE.EXE (SHAD)
opiino: Attach failed! error=-1 ifvp=00000000SQLNET.LOG里面报
Fatal NI connect error 12560, connecting to:
 (LOCAL=NO)  VERSION INFORMATION:
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 10.2.0.1.0 - Production
Windows NT TCP/IP NT Protocol Adapter for 32-bit Windows: Version 10.2.0.1.0 - Production
  Time: 30-5月 -2009 22:08:25
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12560
    TNS-12560: TNS: 协议适配器错误
    ns secondary err code: 0
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0我目前是LOOPBACK网卡是一开机就启动的 出现连接不上数据库的情况 我就把LOOPBACK禁用 启动 然后本机的无线连接禁用 启动这样折腾几次 就能正常连上 有的时候 把本机的无线连接改成一个固定的IP 或者由固定IP改成自动获取IP 也能解决,但是实在不明白到底是什么问题导致的配置了LOOPBACK网卡还会有这个问题  望解答下 谢谢

解决方案 »

  1.   

    应该是网络问题,和Oracle无关
      

  2.   


    今天刚帮csdn里的朋友解决过这个问题。步骤如下1. 把loopback禁止掉,最好是删除掉,
    2. 停止listener   lsnrctl stop
    3. 启用net manager把旧的listener去掉
    4. 启用net manager建立新的listener,指定host为你的主机名或者是127.0.0.1
    5. 保存并且启动listener  lsntctl start
    6. 检查tns  tnsping 或者 tnsping servicename
    7. 查看listener状态   lsnrctl status 看是否有instance已经绑定进来。如果没有, 用sqlplus "/ as sysdba"登录后,运行alter system register;
    运行完后再检查listener状态。
    8. 用@SID连接==================================================================
    Inthirties关注Oracle数据库 维护 优化,安全,备份,恢复,迁移,故障处理如果你需要帮助或想和我一起学习的请联系
    联系方式QQ:370140387
    QQ群:  85837884(注明:数据库)
    电子邮件:[email protected]
    网站: http://www.inthirties.com
      

  3.   

    机器是动态IP
    ==================
    作为服务器的机器,不能使用动态IP
      

  4.   


    动态IP建议的话,用网络中的计算机名字来取代动态ip。
      

  5.   

    我就是在本机上进行操作 LISTENER和TNSNAME里面都是用的本机名称 
      

  6.   

    IP如果不固定,应使用机器名。LZ说listener和tnsname 使用的是机器名,那你ping 机器名,看是否通。CONN USER/PASSWORD@SID 会死掉,没有错误提示吗?
      

  7.   

    PING机器名可以PING通
    CONN USER/PASSWORD@SID 在PL/SQL和SQLPLUS直接死掉 
    在SQLNET.LOG以及TRC文件的错误 和帖中一样
      

  8.   


    是网络问题造成的,你可以tnsping试试。
      

  9.   

    动态IP就是问题多。LOOPBACK是ORACLE官方的解决方案。你是添加LOOPBACK正常使用一段时间后又不能用了吧?那就重配一次LOOPBACK试试。
    别的也不知道有什么方法了,除非不用动态Ip。
      

  10.   

    如果不用动态IP的话 就把本机的无线连接固定一个IP吗?
    我的是LOOPBACK正常用一段时间后不能用的 是把原来的LOOPBACK网卡删掉 然后再建一个吗?
    能把ORACLE关于这个问题的官方方案的网址发我一个吗 谢谢
      

  11.   

    就是Installation Guide for Microsoft Windows啊。你上官网去看吧。2.4.1 Installing Oracle Database on DHCP ComputersDynamic Host Configuration Protocol (DHCP) assigns dynamic IP addresses on a network. Dynamic addressing allows a computer to have a different IP address each time it connects to the network. In some cases, the IP address can change while the computer is still connected. You can have a mixture of static and dynamic IP addressing in a DHCP system.In a DHCP setup, the software tracks IP addresses, which simplifies network administration. This lets you add a new computer to the network without having to manually assign that computer a unique IP address. However, before installing Oracle Database onto a computer that uses the DHCP protocol, you need to install a loopback adapter to assign a local IP address to that computer.
      

  12.   

     you need to install a loopback adapter to assign a local IP address to that computer.你照着文档一步步操作,可能是你之前哪没弄对。