-- 查看被锁对象 select object_name,machine,s.sid,s.serial# from v$locked_object l,dba_objects o ,v$session s where l.object_id = o.object_id and l.session_id=s.sid; --杀死进程 alter system kill session '24,111'; (其中24,111分别是上面查询出的sid,serial# ora-00031:session
Oracle查看表空间及修改数据文件大小 第一步:查看所有表空间及表空间大小: select tablespace_name ,sum(bytes) / 1024 / 1024 as MB from dba_data_files group by tablespace_name; 第二步:查看所有表空间对应的数据文件: select tablespace_name,file_name from dba_data_files; 第三步:修改数据文件大小 alter database datafil
--1.查看表空间的名称及大小 )), ) ts_size FROM dba_tablespaces t, dba_data_files d WHERE t.tablespace_name = d.tablespace_name GROUP BY t.tablespace_name; --2.查看表空间物理文件的名称及大小 SELECT tablespace_name, file_id, file_name, ), ) total_space FROM dba_data_files ORDER
--查看表空间的真实使用情况 set linesize 500 pagesize 500 col tablespace_name format a25 col TP_REAL_GB format a15 col TP_REAL_FREE_GB format a20 select all_tp.TP_NAME "TABLESPACE_NAME", to_char(trunc(all_tp.TP_ALL_SIZE_KB / 1024 / 1024, 2), 'FM9999990.0099'
查看表空间剩余: ||'M' from dba_free_space group by tablespace_name 查看表空间总大小.使用大小.剩余大小,使用率.剩余率 ) useded, trunc(c.bytes) freeed from sys.sm$ts_avail a,sys.sm$ts_used b,sys.sm$ts_free c where a.tablespace_name = b.tablespace_name and a.tablespace_name = c.tabl
--1.查看表空间的名称及大小 )), ) ts_size FROM dba_tablespaces t, dba_data_files d WHERE t.tablespace_name = d.tablespace_name GROUP BY t.tablespace_name; --2.查看表空间物理文件的名称及大小 SELECT tablespace_name, file_id, file_name, ), ) total_space FROM dba_data_files ORDER
ORACLE如何查看表空间存储了那些数据库对象呢?可以使用下面脚本简单的查询表空间存储了那些对象: SELECT TABLESPACE_NAME AS TABLESPACE_NAME , SEGMENT_NAME AS SEGMENT_NAME , SUM(BYTES)/1024/1024 AS SEGMENT_SIZE FROM DBA_SEGMENTS WHERE TABLESPACE_NAME=&TABLESPACE_NAME GROUP
查看表空间 select * from user_tablespaces where table_name = 'TableName' 查看表属主 select Owner from all_tab_columns where table_name = 'TableName' 附录: A tablespace is a storage location where the actual data underlying database objects can be kept. It prov
1.查看表所占空间 SELECT TABLESPACE_NAME,TO_CHAR(SUM(BYTES)/(1024*1024),'999G999D999') CNT_MB FROM DBA_EXTENTS WHERE OWNER='&OWNER' AND SEGMENT_NAME='&TABLE_NAME' AND SEGMENT_TYPE LIKE 'TABLE%' GROUP BY TABLESPACE_NAME;