同一台服务器oracle不同版本登录切换

描述:在自己机器上安装了一台 Oracle12.1.0.2.0,此时sqlplus可以正常使用,由于需要在机器上又安装了Oracle-11.2.0.4.0,这是发现通过切换oracle_sid,sqlplus可以连接oracle12c,但是12c独有的功能却不能用,因此需要将oracle12c的环境变量(系统path值前加上:E:\app\product\12.1.0\dbhome_1\BIN;)放在oracle11g的前面,这样每次就是使用oracle12c的sqlplus了。即使切换oracle_sid,oracle11g和oracle12c的功能都能分别使用了

Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

C:\Users\v074>sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on 星期二 10月 29 15:36:30 2019

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


连接到:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDBSKY                         MOUNTED
         4 PDBCLOUD                       READ WRITE NO
         5 PDBTEST                        MOUNTED
SQL> exit
从 Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options 断开

C:\Users\v074>set oracle_sid=orcl

C:\Users\v074>sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on 星期二 10月 29 15:36:58 2019

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


连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show pdbs
SP2-0614: 服务器版本太低, 不能实现此功能
SQL> exit
从 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断开

C:\Users\v074>sqlplus -C 11.2 / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on 星期二 10月 29 15:37:50 2019

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


连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> exit
从 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断开

C:\Users\v074>set oracle_sid=sky

C:\Users\v074>sqlplus -C 11.2 / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on 星期二 10月 29 15:38:02 2019

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


连接到:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDBSKY                         MOUNTED
         4 PDBCLOUD                       READ WRITE NO
         5 PDBTEST                        MOUNTED
SQL>

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

sky@sea

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值