zoukankan      html  css  js  c++  java
  • ORACLE 问题解决

    (1).ORA-12162: TNS:net service name is incorrectly specified

    解决方法:1.cd

             2.ls -alt 

             3.vi  ./bash_profile  添加如下内容

    export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1

    export ORACLE_SID=要设置的SID

    (2)ora-01034:oracle not available

    ora-27101:shared mermory realm does not exist

    解决方法:
    Enter user-name: / AS SYSDBA

    Connected to an idle instance.
    SQL> startup

    ORACLE instance started.
    Total System Global Area  730714112 bytes

    Fixed Size      2216944 bytes

    Variable Size    444599312 bytes

    Database Buffers   276824064 bytes

    Redo Buffers      7073792 bytes

    Database mounted.

    Database opened.

    (3)ORA-12170 TNS 连接超时

    解决方法:

    1.ping ip地址 查看网络问题,看能否ping通

    2.lsnrctl status   lsnrctl是listener-control 监听器的缩写,查看监听的状态

       如果未启动,使用lsnrctl start 命令启动

    3.cmd-----tnsping   ip地址(或者是服务器的实例名SID)如果报“TNS-12535:操作超时”,可能是服务器端防火墙    没有关闭

    查看防火墙命令 

    /etc/init.d/iptables status 会得到一系列信息,说明防火墙开着

    Linux 关启防火墙命令

    1)重启后永久生效

    开启: chkconfig iptables on

    关闭: chkconfig iptables off

    2)及时生效,重启后失效:

    开启:service iptables start

    关闭:service iptables stop

    (4)ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务

    解决方法:

    配置文件 tnsnames 中的 SERVICE_NAME 项可能不对,

    1) sqlplus 下运行 select instance_name from V$instance; 查看

    2) LINUX oracle用户下  echo $ORACLE_SID

    (5)bash: sqlplus: command not found 解决方法

    环境变量已经配好,但是仍报错:

    [oracle@dg1 ~]$ vi .bash_profile

    # .bash_profile

    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
            . ~/.bashrc
    fi

    # User specific environment and startup programs

    PATH=$PATH:$HOME/bin

    export PATH
    export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
    export ORACLE_SID=ora64bit
    export PATH=$ORACLE_HOME/bin:$PATH

    解决方法:

    [oracle@dg1 ~]$ sqlplus 
    bash: sqlplus: command not found
    [oracle@dg1 ~]$ su - root
    Password:
    [root@dg1 ~]# ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
    [root@dg1 ~]# su - oracle
    [oracle@586 ~]$ sqlplus

    SQL*Plus: Release 11.2.0.1.0 Production on Wed May 25 11:58:29 2011

    Copyright (c) 1982, 2009, Oracle.  All rights reserved.

    Enter user-name: sys as sysdba
    Enter password: 

    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
  • 相关阅读:
    eclipse下c/cpp " undefined reference to " or "launch failed binary not found"问题
    blockdev 设置文件预读大小
    宝宝语录
    CentOS修改主机名(hostname)
    subprocess报No such file or directory
    用ldap方式访问AD域的的错误解释
    英特尔的VTd技术是什么?
    This virtual machine requires the VMware keyboard support driver which is not installed
    Linux内核的文件预读详细详解
    UNP总结 Chapter 26~29 线程、IP选项、原始套接字、数据链路访问
  • 原文地址:https://www.cnblogs.com/alamps/p/2795796.html
Copyright © 2011-2022 走看看