1、查看表空间文件占用比例 select b.file_id as 文件ID, b.tablespace_name as 表空间, b.file_name as 物理文件名, b.bytes/1024/1024/1024 as 总字节数, (b.bytes-sum(nvl(a.bytes,0)))/1024/1024/1024 as 已使用, sum(nvl(a.bytes,0))/1024/1024/1024 as 剩余, sum(nvl(a.bytes,0))/(b.bytes)*100 as 剩余百分比 from dba_free_space a,dba_data_files b where a.file_id=b.file_id group by b.tablespace_name,b.file_name,b.file_id,b.bytes order by b.tablespace_name ; 2、一键查询有表分区的表 SELECT TABLE_NAME,PARTITION_NAME,TABLESPACE_NAME FROM USER_TAB_PARTITIONS; 3、查询oracle当前被锁对象 select a.session_id, c.serial#, a.locked_mode, a