zoukankan      html  css  js  c++  java
  • CentOS7 Mini安装Oracle后用PL/SQL连接数据库(图形化安装)

    1、本来是安装完数据库后,本地可以访问了,而Win10下Oracle客户端配置Oracle Net Manager时报连接超时

    解决方法:

    这种连接超时,让我想到telnet连接问题,就用telnet测试,连接被拒绝

    然后就安装telnet和telnet service,而centos默认防火墙是firewall不是iptables,所以就关闭firewwall,安装iptables,并开启23端口

    操作方法可参考····················

    2、telnet连通了,再在oracle net manager测试连接数据库,报连接字符串错误,本以为和上次解决错误一样,就删除监听,重新配置监听,重启系统,还是不行

    解决方法:

    在ORACLE_HOME/network/admin/路径下打开并编辑文件listener.ora,我本地的文件如下(感觉这个错是环境变量没配置好导致)

    # listener.ora Network Configuration File: /opt/oracle/product/11gR2/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    
    SID_LIST_LISTENER =   
    (SID_LIST =   
      (SID_DESC =   
        (SID_NAME = orcl)      
        (ORACLE_HOME = /opt/oracle/product/11gR2)   
      )   
    )
    
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.36.133)(PORT = 1521))
        )
      )
    
    ADR_BASE_LISTENER = /opt/oracle

    这个文件改好后,又把tnsnames.ora文件中localhost改为本地IP,不知这个是否起了作用,反正改了也没错

    # tnsnames.ora Network Configuration File: /opt/oracle/product/11gR2/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    
    ORCL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.36.133)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = orcl)
        )
      )

    修改完这些后,停止监听,启动监听

    [oracle@localhost root]$ lsnrctl stop
    [oracle@localhost root]$ lsnrctl start

    3、再用oracle net manager测试连接数据库,报错

    ORA-01034: ORACLE not available

    ORA-27101: shared memory realm does not exist Linux-x8

    解决方法:

    centos7本机系统oracle用户登录,连接数据库

    [oracle@localhost ~]$ sqlplus /nolog
    
    SQL> conn / as sysdba
    
    SQL> startup

    如果startup报已经启动,则先关闭,再启动

    SQL> shutdown immediate
    
    SQL> startup

    startup 时候报错 post/wait create failed ```````````` No space left on device

    查看磁盘空间是够用的

    网上查到解决办法:

    编辑/etc/sysctl.conf文件中的kernel.sem属性值为5010 641280 5010 128

    然后执行命令 sysctl -p使其生效

  • 相关阅读:
    解决ORA14098分区交换索引不匹配错误
    Oracle等待事件kfk:async disk IO
    Advanced Diagnostic using oradebug dumpvar
    shellscript 06 命令执行顺序
    Linux 备份策略
    shellscript 05 shell输入与输出
    Java video 02
    软件安装:原始码与 Tarball
    shellscript 07 正则表达式介绍
    shellscript 03 后台执行命令
  • 原文地址:https://www.cnblogs.com/hujiapeng/p/5878233.html
Copyright © 2011-2022 走看看