Oracle: view the table space where the user is located; oracle: view the user's location
View the tablespace of the current user
select username,default_tablespace from user_users;
Modify the user's default tablespace
Alter user Username default new table space;
View roles owned by a user
select * from user_role_privs;
Queries the number of tables in the database.
select * from user_tables;
In oracle, how does one view the tablespace in which a table of the current user is stored?
SELECT
TABLE_NAME,
TABLESPACE_NAME
FROM
USER_TABLES
How to check the tablespace size occupied by a user in oracle
(1) log on to the database with the DBA permission to query the usage of all tablespaces.
SELECT c. tablespace_name, a. bytes/1048576 Megs_Total, (a. bytes-b.bytes)/1048576 Megs_Used,
B. bytes/1048576 Megs_Free, (a. bytes-b.bytes)/a. bytes * 100 Pct_Used, B. bytes/a. bytes * 100 Pct_Free
FROM (SELECT tablespace_name, SUM (a. bytes) bytes, MIN (a. bytes) minbytes, MAX (a. bytes) maxbytes
FROM sys. DBA_DATA_FILES
Group by tablespace_name) a, (SELECT a. tablespace_name, NVL (SUM (B. bytes), 0) bytes
FROM sys. DBA_DATA_FILES a, sys. DBA_FREE_SPACE B
WHERE a. tablespace_name = B. tablespace_name (+)
AND a. file_id = B. file_id (+)
Group by a. tablespace_name) B, sys. DBA_TABLESPACES c
WHERE a. tablespace_name = B. tablespace_name (+)
AND a. tablespace_name = c. tablespace_name
Order by 6;
(2) check whether the table space of the user you are interested in is compared with the usage of all the preceding table spaces to know the result.
(3) The DMP file itself is compressed, and the used space capacity can be considered in a ratio of 4 times, that is, 179 MB * 4.