没有太多可说的,直接贴代码:

[oracle@ora12c-1 ~]$ export ORACLE_SID=lenka
[oracle@ora12c-1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Mon Apr 3 12:33:15 2017

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> set linesize 900
SQL> col name for a14
SQL> select con_id,dbid,guid,name,open_mode from v$pdbs;

    CON_ID       DBID GUID                             NAME           OPEN_MODE
---------- ---------- -------------------------------- -------------- --------------------
         2 3336497216 4A32FBF7B8D73D22E055025056845AD4 PDB$SEED       READ ONLY
         3 3747065989 4A331267BC4346C6E055025056845AD4 PDB_LENKA_1    MOUNTED

SQL> select name,cdb,open_mode,con_id from v$database;
 
NAME           CDB    OPEN_MODE                                    CON_ID
-------------- ------ ---------------------------------------- ----------
LENKA          YES    READ WRITE                                        0

SQL> alter pluggable database PDB_LENKA_1 open;

Pluggable database altered.

SQL> select con_id,dbid,guid,name,open_mode from v$pdbs;

    CON_ID       DBID GUID                             NAME           OPEN_MODE
---------- ---------- -------------------------------- -------------- --------------------
         2 3336497216 4A32FBF7B8D73D22E055025056845AD4 PDB$SEED       READ ONLY
         3 3747065989 4A331267BC4346C6E055025056845AD4 PDB_LENKA_1    READ WRITE

SQL> 

——————————
Done。

说点什么

avatar

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据

  Subscribe  
提醒