zoukankan      html  css  js  c++  java
  • oracle 12c show con_name

    今天安装了一个oracle 12c的数据库做测试,在运行一个很简单的命令时出错了:

    SQL> show con_name
    concat "." (hex 2e)
    SP2-0158: unknown SHOW option "_name"

    上网搜了好久也没搜到,在google里面居然只搜到一条记录,是一个法国人写的blog,可惜好像他也没有写这个错误的原因。最后又看了下自己的操作,发现是下面这样的,

    [oracle@oratest profile]$ sqlplus / as sysdba
    
    SQL*Plus: Release 11.2.0.4.0 Production on Wed Aug 6 15:17:28 2014
    
    Copyright (c) 1982, 2013, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
    
    SQL> show con_name
    concat "." (hex 2e)
    SP2-0158: unknown SHOW option "_name"
    SQL>

    可以发现sqlplus 是11g的。虽然sqlplus 是11g的,但是连接的却是12c数据库,这是因为我在设置环境变量的时候只设置了oracle sid 和 oracle home 没有设置path。 11g的sqlplus不识别12c的命令。所以需要用下面的方式。

    [oracle@oratest profile]$ /u01/app/oracle/product/12c/bin/sqlplus / as sysdba
    
    SQL*Plus: Release 12.1.0.1.0 Production on Wed Aug 6 15:22:11 2014
    
    Copyright (c) 1982, 2013, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
    
    SQL> show con_name
    
    CON_NAME
    ------------------------------
    CDB$ROOT
    SQL>
  • 相关阅读:
    解方程
    十进制快速幂
    comb
    题单解题记录-POJ题目分类推荐 (很好很有层次感)
    算法题离谱错误合集
    VMware-Ubuntu16.04踩坑解决记录
    2020牛客多校赛第三场
    需学习的博客地址
    错误记录
    可持久化线段树 区间第k大/小
  • 原文地址:https://www.cnblogs.com/kramer/p/3894785.html
Copyright © 2011-2022 走看看