lyphtesttest sql of system session
--停止會 session select a.OBJECT , b.sid , b.SERIAL# from SYS.V_$ACCESS a , SYS.V_$session b where a.type = ‘PROCEDURE‘ and (a.OBJECT like upper(‘%E_HOSHITORI%‘) or a.OBJECT like lower(‘%E_HOSHITORI%‘) ) and a.sid = b.sid and b.status = ‘ACTIVE‘;
--停止會 session --alter system kill session ‘539,13863‘;
-- ALL TABLE COL SELECT TAB.TABLE_NAME 表物理名 ,TAB_C.COMMENTS 表論理名 ,COL.COLUMN_NAME コラム物理名 ,COL_C.COMMENTS コラム論理名 ,COL.COLUMN_ID 番號 FROM USER_TABLES TAB , USER_TAB_COMMENTS TAB_C , USER_TAB_COLUMNS COL , USER_COL_COMMENTS COL_C WHERE TAB.TABLE_NAME = TAB_C.TABLE_NAME AND TAB.TABLE_NAME = COL.TABLE_NAME AND COL.TABLE_NAME = COL_C.TABLE_NAME AND COL.COLUMN_NAME = COL_C.COLUMN_NAME AND TAB.TABLE_NAME NOT LIKE ‘%BAK%‘ --BAK TABLE AND TAB.TABLE_NAME NOT LIKE ‘%_20%‘ --BAK TABLE AND TAB.TABLE_NAME NOT LIKE ‘VIEW%‘ --VIEW ORDER BY TAB_C.COMMENTS ,COL.COLUMN_ID;
--?看所有用?
select * from all_users; -------?看所有的用?
select * from user_users; --------?看當前用?
--2.?看用?或角色系??限:
select * from user_sys_privs; --------?看當前用?的?限
--3.?看角色所包含的?限
select * from role_sys_privs; -------
--4.?看用??象?限
select * from all_tab_privs; --------?看所用的用?的可操作表?限 select * from user_tab_privs; --------?看當前用?的表可操作?限
--5.?看用?或角色所?有的角色
select * from user_role_privs; ------?看當前用?的角色
--?看表的?束條件包含:主? 外?。 以及索引
select * from user_constraints where TABLE_NAME=‘?‘; -----?看某一個表的?束
select constraint_type,constraint_name,search_condition from all_constraints where table_name=‘?‘;
select * from user_cons_columns where TABLE_NAME=‘?‘; -----某一個?束的?成
select index_name,index_type,status,blevel from user_indexes where table_name = ‘?‘; -----?看某一個表的所有索引
SELECT table_name, index_name, column_name, column_position FROM user_ind_columns WHERE table_name=‘?‘; ----?看索引的?成
lyphtesttest sql of system session