码迷,mamicode.com
首页 > 数据库 > 详细

12c 检查pdb数据库状态

时间:2018-01-20 18:51:28      阅读:230      评论:0      收藏:0      [点我收藏+]

标签:64bit   lease   tab   sql   set   normal   edit   var   rom   

日常工作需要记住这两个视图,检查pdb状态
<roidb01:cdb:/home/oracle>$sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Sat Jan 20 17:52:42 2018

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

Connected to:
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 con_name

CON_NAME
------------------------------
CDB$ROOT
SQL> desc cdb_pdbs;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 PDB_ID                                    NOT NULL NUMBER
 PDB_NAME                                  NOT NULL VARCHAR2(128)
 DBID                                      NOT NULL NUMBER
 CON_UID                                   NOT NULL NUMBER
 GUID                                               RAW(16)
 STATUS                                             VARCHAR2(9)
 CREATION_SCN                                       NUMBER
 VSN                                                NUMBER
 LOGGING                                            VARCHAR2(9)
 FORCE_LOGGING                                      VARCHAR2(3)
 FORCE_NOLOGGING                                    VARCHAR2(3)
 CON_ID                                    NOT NULL NUMBER

SQL> col pdb_name for a30
SQL> select pdb_id,pdb_name,status from cdb_pdbs;

    PDB_ID PDB_NAME                       STATUS
---------- ------------------------------ ------------------
         2 PDB$SEED                       NORMAL
         3 PDB1                           NORMAL
         4 PDB2                           NORMAL
         5 PDB3                           NORMAL
         6 PDB4                           NORMAL

SQL> desc v$pdbs;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 CON_ID                                             NUMBER
 DBID                                               NUMBER
 CON_UID                                            NUMBER
 GUID                                               RAW(16)
 NAME                                               VARCHAR2(30)
 OPEN_MODE                                          VARCHAR2(10)
 RESTRICTED                                         VARCHAR2(3)
 OPEN_TIME                                          TIMESTAMP(3) WITH TIME ZONE
 CREATE_SCN                                         NUMBER
 TOTAL_SIZE                                         NUMBER
 BLOCK_SIZE                                         NUMBER
 RECOVERY_STATUS                                    VARCHAR2(8)
 SNAPSHOT_PARENT_CON_ID                             NUMBER

SQL> set line 200
SQL> select con_id,name,open_mode from v$pdbs;

    CON_ID NAME                                                         OPEN_MODE
---------- ------------------------------------------------------------ --------------------
         2 PDB$SEED                                                     READ ONLY
         3 PDB1                                                         READ WRITE
         4 PDB2                                                         READ WRITE
         5 PDB3                                                         READ WRITE
         6 PDB4                                                         READ WRITE

SQL> 

12c 检查pdb数据库状态

标签:64bit   lease   tab   sql   set   normal   edit   var   rom   

原文地址:http://blog.51cto.com/roidba/2063215

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!