/*备注:表空间是数据库的逻辑组成部分从物理上将:数据库数据存放在数据文件中从逻辑上将:数据库则是存放在表空间中表空间由一个或是多个数据文件组成*/ --1.查看用户下面的所有的表SELECT * FROM USER_TABLES;SELECT * FROM DBA_TABLES WHERE OWNER = 'COMM_USER'; --1.1查看表所在的表空间 select TABLE_NAME,TABLESPACE_NAME from dba_tables t where t.table_n
-- 查看被锁对象 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
查看当前用户的缺省表空间 SQL>select username,default_tablespace from user_users; 查看当前用户的角色 SQL>select * from user_role_privs; 查看当前用户的系统权限和表级权限 SQL>select * from user_sys_privs; SQL>select * from user_tab_privs; 查看用户下所有的表 SQL>select * from user_tables;
在oracle 上面查看别锁定的表,以及解锁表的sql: select t3.object_name,t3.owner,t2.machine,t2.sid,t2.serial# from v$locked_object t1,v$session t2,dba_objects t3 where t1.session_id = t2.sid and t1.object_id = t3.object_id; alter system kill session'101,1507'; # sid , se
查看被锁的表 select p.spid,a.serial#, c.object_name,b.session_id,b.oracle_username,b.os_user_name from v$process p,v$session a, v$locked_object b,all_objects c where p.addr=a.paddr and a.process=b.process and c.object_id=b.object_id ; 查看那个用户那个进程照成死锁,锁的级别se
--以下几个为相关表SELECT * FROM v$lock;SELECT * FROM v$sqlarea;SELECT * FROM v$session;SELECT * FROM v$process ;SELECT * FROM v$locked_object;SELECT * FROM all_objects;SELECT * FROM v$session_wait; --查看被锁的表 select b.owner,b.object_name,a.session_id,a.locked_
相关视图 SELECT * FROM v$lock;SELECT * FROM v$sqlarea;SELECT * FROM v$session;SELECT * FROM v$process ;SELECT * FROM v$locked_object;SELECT * FROM all_objects;SELECT * FROM v$session_wait; --查看被锁的表 select b.owner,b.object_name,a.session_id,a.locked_mode
--以下几个为相关表SELECT * FROM v$lock;SELECT * FROM v$sqlarea;SELECT * FROM v$session;SELECT * FROM v$process ;SELECT * FROM v$locked_object;SELECT * FROM all_objects;SELECT * FROM v$session_wait; --查看被锁的表 select b.owner,b.object_name,a.session_id,a.locked_
查询用户创建的表 select * from user_tab_comments; -- 查询本用户的表,视图等. select * from user_col_comments; -- 查询本用户的表的列名和注释. 查询所有表大小 select Segment_Name, Sum(bytes) / 1024 / 1024 / 1024 "size(DB)" From User_Extents Group By Segment_Name order by "size(DB)&
ORACLE 表空间扩展方法 环境: linux系统 工具:PL/SQL DEVELOPER 第一步:查看表空间的名字及文件所在位置: select tablespace_name, file_id, file_name, ), ) total_space from sys.dba_data_files order by tablespace_name 第二步:增大所需表空间大小: alter database datafile '表空间位置' resize 新的尺寸 例如: alter dat