1 回答

TA貢獻(xiàn)1841條經(jīng)驗(yàn) 獲得超3個(gè)贊
怎么查看 oracle 所有用戶
select * from dba_users;
2. 只查詢用戶和密碼
select username,password from dba_users;
3. 查詢當(dāng)前用戶信息
select * from dba_ustats;
4. 查詢用戶可以訪問(wèn)的視圖文本
select * from dba_varrays;
5. 查詢數(shù)據(jù)庫(kù)中所有視圖的文本
select * from dba_views;
select distinct tablespace_name from SYS.DBA_FREE_SPACE where tablespace_name like '%RB%';
select * from dba_objects where object_name='JDE900_F0005';
select * from rbods.jde900_f0005;
select * from rbodm.dim_company;
查看當(dāng)前用戶的缺省表空間
select username,default_tablespace from user_users
查看當(dāng)前用戶的角色
select * from user_role_privs
查看當(dāng)前用戶的系統(tǒng)權(quán)限和表級(jí)權(quán)限
select * from user_sys_privs
select * from user_tab_privs
查看用戶下所有的表
select * from user_tables
顯示用戶信息(所屬表空間)
select default_tablespace,temporary_tablespace from dba_users
顯示當(dāng)前會(huì)話所具有的權(quán)限
select * from session_privs
顯示指定用戶所具有的系統(tǒng)權(quán)限
select * from dba_sys_privs
顯示特權(quán)用戶
select * from v$pwfile_users
查看名稱包含log字符的表
select object_name,object_id from user_objects where instr(object_name,'log')>0
查看某表的創(chuàng)建時(shí)間
select object_name,created from user_objects where object_name='ZW_YINGYEZ'
查看某表的大小
select sum(bytes)/(1024*1024) tablesize from user_segments
where segment_name='ZW_YINGYEZ'
查看放在ORACLE的內(nèi)存區(qū)里的表
select table_name,cache from user_tables where instr(cache,'Y')>0
查看索引個(gè)數(shù)和類別
select index_name,index_type,table_name from user_indexes order by table_name
查看索引被索引的字段
select * from user_ind_columns where table_name='CB_CHAOBIAOSJ201004'
查看索引的大小
select sum(bytes)/(1024*1024) as indexsize from user_segments
where segment_name=upper('AS_MENUINFO')
查看視圖信息
select * from user_views
查看同義詞的名稱
select * from user_synonyms
查看函數(shù)和過(guò)程的狀態(tài)
select object_name,status from user_objects where object_type='FUNCTION'
select object_name,status from user_objects where object_type='PROCEDURE'
查看函數(shù)和過(guò)程的源代碼
select text from all_source where owner=user and name='SF_SPLIT_STRING'
查看表字段
select cname from col where tname='ZW_YINGYEZ'
select column_name from user_tab_columns where table_name='ZW_YINGYEZ'
查看oracle版本命令:
select * from v$version
- 1 回答
- 0 關(guān)注
- 1591 瀏覽
添加回答
舉報(bào)