01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | ---数据库实例的基本信息 desc v$instance; select * from v$instance; --数据文件的基本信息 desc v$datafile; select * from v$datafile; desc dba_data_files; select file_name,file_id,tablespace_name,bytes,blocks, status,online_status from dba_data_files; --临时文件的基本信息 desc dba_temp_files; select file_name,file_id,tablespace_name,status, bytes/1024/1024 大小MB from dba_temp_files; --控制文件的基本信息 desc v$controlfile; select name ,status,is_recovery_dest_file, block_size,file_size_blks from v$controlfile; --日志文件的基本信息 desc v$logfile; select group #,status,type,member,is_recovery_dest_file from v$logfile; --数据库的基本信息 desc v$ database ; select * from v$ database ; select dbid, name ,created,resetlogs_time,log_mode, open_mode,checkpoint_change#,archive_change#, controlfile_created,controlfile_type, controlfile_sequence#,controlfile_change#, controlfile_time,protection_mode,database_role from v$ database ; --日志文件参数信息 show parameter log_archive_dest; --访问参数文件 desc v$parameter; select num, name ,type,value,display_value, isdefault,isses_modifiable, issys_modifiable,isinstance_modifiable from v$parameter; select * from v$parameter; select name ,value,description from v$parameter; --后台进程信息 desc v$bgprocess; select paddr,pserial#, name ,description,error from v$bgprocess; --DBA 用户的所有的表的基本信息 desc dba_tables; desc dba_tab_columns; select owner,table_name,column_name,data_type,data_length, global_stats,data_upgraded,histogram from dba_tab_columns; --DBA 用户的所有的视图的基本信息 desc dba_views; select owner,view_name,read_only from dba_views; --DBA 用户的所有的同义词的基本信息 desc dba_synonyms; select owner,synonym_name,table_owner, table_name,db_link from dba_synonyms; --DBA 用户的所有的序列的信息 desc dba_sequences; select sequence_owner,sequence_name,min_value,max_value, cycle_flag from dba_sequences; --DBA 用户的所有的约束的信息 desc dba_constraints; select owner,constraint_name,constraint_type, table_name,status from dba_constraints; --DBA 用户的所有的索引的基本信息 desc dba_indexes; select owner,index_name,index_type,table_owner,table_name, table_type,uniqueness,compression,logging,status from dba_indexes; --DBA 用户的所有的触发器的基本信息 desc dba_triggers; select owner,trigger_name,trigger_type, table_owner,table_name,column_name from dba_triggers; --DBA 用户的所有的存储过程的基本信息 desc dba_source; select owner, name ,type,line,text from dba_source; --DBA 用户的所有的段的基本信息 desc dba_segments; select owner,segment_name,segment_type, tablespace_name,blocks,extents from dba_segments; --DBA 用户的所有的区的基本信息 desc dba_extents select owner,segment_name,segment_type, tablespace_name,extent_id,file_id,blocks from dba_extents; --DBA 用户的所有的对象的基本信息 desc dba_objects; select owner,object_name,subobject_name, object_id,data_object_id,object_type, created,status,namespace from dba_objects; --当前用户可以访问的所有的基表 desc cat; select table_name from cat; --当前用户可以访问的所有的基表,视图,同义词 desc system.tab; select tname,tabtype,clusterid from system.tab; --构成数据字典的所有的表信息 desc dict; select table_name,comments from dict; -- 查询关于表空间的一些基本的数据字典 desc dba_tablespaces; select tablespace_name,block_size,status, logging,extent_management from dba_tablespaces; desc dba_free_space; select tablespace_name,file_id,block_id, bytes/1024/1024 大小MB,blocks,relative_fno from dba_free_space; --归档状态的一些基本信息 desc v$archived_log; select name ,dest_id,blocks,block_size, archived,status,backup_count from v$archived_log; --关于内存结构的一些信息 desc v$sga; select name ,value/1024/1024 大小MB from v$sga; desc v$sgastat; select pool, name ,bytes from v$sgastat; desc v$db_object_cache; select owner, name ,db_link,type,namespace,locks from v$db_object_cache; desc v$sql; select sql_text,sql_id,cpu_time from v$sql; |
发表评论 取消回复