Silahkan Melihat Tutorial di website kami dengan nyaman ENJOY YOUR LIFE ☕

Find tablespace belong to a schema in Oracle Database

Syntax:
SELECT DISTINCT TABLESPACE_NAME FROM DBA_SEGMENTS WHERE OWNER='SCHEMA_NAME';

Example:

[oracle@PTUD-SV01 ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Wed Aug 12 09:24:04 2015

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> SELECT DISTINCT TABLESPACE_NAME FROM DBA_SEGMENTS WHERE OWNER='MPS';

TABLESPACE_NAME
------------------------------
MPS_TRANSLOG
MPS_TRANSLOG_MPI
MPS_TRANSLOG_MPI_BAK
BAK_TRANSACTION_EBP_2
BAK_TRANSACTION_MO_2
MPS_SMSLOG
MPS_SMSLOG_BAK
MPS_TRANSLOG_EBP_BAK
USERS
MPS_DEFAULT
BAK_SUBSCRIPTION_LOGS_2

TABLESPACE_NAME
------------------------------
BAK_TRANSACTION_MT_2
MPS_SUBSCRIPTIONS
BAK_SMSGW_MO_LOGS_2
MPS_INFO
MPS_TRANSLOG_EBP
MPS_TRANSLOG_MPI_1
BAK_SMSGW_MT_LOGS_2
BAK_TRANSACTION_MPI_2

19 rows selected.


SQL> 





0 komentar:

Post a Comment

Find tablespace belong to a schema in Oracle Database