--表:
select * from cat;
select * from tab;
select table_name from user_tables;
--檢視:
select text from user_views where view_name=upper('&view_name');
--索引:
select index_name,table_owner,table_name,tablespace_name,status from user_indexes order by table_name;
--觸發器:
select trigger_name,trigger_type,table_owner,table_name,status from user_triggers;
--快照:
select owner,name,master,table_name,last_refresh,next from user_snapshots order by owner,next;
--同義詞:
select * from syn;
--序列:
select * from seq;
--資料庫鏈路:
select * from user_db_links;
--約束限制:
select table_name,constraint_name,search_condition,status from user_constraints;
--本使用者讀取其他使用者物件的許可權:
select * from user_tab_privs;
--本使用者所擁有的系統許可權:
select * from user_sys_privs;
--使用者:
select * from all_users order by user_id;
select username from dba_users;
--表空間剩餘自由空間情況:
select tablespace_name,sum(bytes) 總位元組數,max(bytes),count(*) from dba_free_space group by tablespace_name;
--資料字典:
select table_name from dict order by table_name;
--鎖及資源資訊:
select * from v$lock;不包括ddl鎖
--資料庫字符集:
select name,value$ from props$ where name='nls_characterset';
--inin.ora引數:
select name,value from v$parameter order by name;
--sql共享池:
select sql_text from v$sqlarea;
--資料庫:
select * from v$database
--控制檔案:
select * from v$controlfile;
--重做日誌檔案資訊:
select * from v$logfile;
--來自控制檔案中的日誌檔案資訊:
select * from v$log;
--來自控制檔案中的資料檔案資訊:
select * from v$datafile;
--nls引數當前值:
select * from v$nls_parameters;
--oracle版本資訊:
select * from v$version;
--描述後台程序:
select * from v$bgprocess;
--檢視版本資訊:
select * from product_component_version;
檢視各種物件的SQL
檢視各種物件的sql select from cat select from tab select table name from user tables 檢視 select text from user views where view name upper view name 索引 select...
ORACLE檢視表空間物件
oracle如何檢視表空間儲存了那些資料庫物件呢?可以使用下面指令碼簡單的查詢表空間儲存了那些物件 segment name as segment name,sum bytes 1024 1024 as segment sizefrom dba segmentswhere tablespace na...
檢視oracle中被鎖的物件 表
select a.owner,a.object name,b.xidusn,b.xidslot,b.xidsqn,b.session id,b.oracle username,b.os user name,b.process,b.locked mode,c.machine,c.status,c.se...