博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ORACLE 问题解决
阅读量:6951 次
发布时间:2019-06-27

本文共 2142 字,大约阅读时间需要 7 分钟。

(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

转载于:https://www.cnblogs.com/alamps/archive/2012/11/30/2795796.html

你可能感兴趣的文章
【小练习】“表单”制作及答案
查看>>
Android应用程序支持安装到SD卡
查看>>
我的软件工程课目标
查看>>
MYSQL 连接数据库命令收藏
查看>>
C#基础篇六飞行棋
查看>>
汇编语言(王爽)第一章基础知识
查看>>
在创业型软件公司的收获
查看>>
Build SSH for Development on Windows Subsystem for Linux
查看>>
学习:数学----容斥原理
查看>>
WebSite And WebApplication
查看>>
Georgia Tech Online Master of Science in Computer Science 项目经验分享
查看>>
字王珐琅体系列,初稿ok
查看>>
浏览网上资源,了解编译原理就是什么?学习编译原理有什么好处?不学有什么损失?如何学习编译原理?...
查看>>
LeetCode 226. Invert Binary Tree
查看>>
空虚、寂寞、无聊
查看>>
基础学习笔记之opencv(1):opencv中facedetect例子浅析
查看>>
JS中属性/方法调用
查看>>
iOS 7 需要再和 Android 比什么
查看>>
8-Images
查看>>
Python字节码与解释器学习
查看>>