Oracle 12c pluggable database table list ?
List of tables for pluggable database
SQL>
show pdbs
CON_ID CON_NAME
OPEN MODE RESTRICTED
----------
------------------------------ ---------- ----------
2 PDB$SEED
READ ONLY NO
3 ANUJ
MOUNTED
4 ANUJT
READ WRITE NO
SQL>
alter session set container=ANUJT ;
Session
altered.
alter
session set nls_date_format='dd-mm-yyyy hh24:mi' ;
set
linesize 200 pagesize 200
col
con_name for a20
col
owner for a20
col
table_name for a25
select
a.con_id,b.con_name,owner,a.table_name table_name,num_rows,last_analyzed from
cdb_tables a,v$active_services b
WHERE
1=1
-- and
a.table_name=upper('anuj_drop_test')
and
a.con_id=b.con_id
and
owner not in
('DBSFWUSER','MDSYS','OUTLN','CTXSYS','OLAPSYS','SYSTEM','DVSYS','AUDSYS','DBSNMP','GSMADMIN_INTERNAL','OJVMSYS','ORDSYS','APPQOSSYS','XDB','ORDDATA','SYS','WMSYS','LBACSYS')
-- and
a.CON_ID=4
order
by 1
/
CON_ID CON_NAME OWNER
TABLE_NAME
NUM_ROWS LAST_ANALYZED
----------
-------------------- -------------------- ------------------------- ----------
----------------
4 ANUJT
ANUJ TEST
4 ANUJT
ANUJU
ANUJ_DROP_TEST
1 27-07-2017 20:27
No comments:
Post a Comment