描述:在自己机器上安装了一台 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>