oracle常见视图汇总

2025-08-19 07:16:51

1.关于数据库/实例的动态性能视图v$database :displays information about the database from the control file.v$instance :displays the state of the current instance(当前实例的状况)v$option :displays oracle database options and features(数据库的选项和特性) option must be separately licensed(选项单独认证设置) whereas features come with the product and are enabled based on the product that is running(产品特性的发挥也是要产品运行才能体现)v$parameter :displays information about the initialization parameter that are currently in effect for the session.A new session inherits parameter values from the instance-wide values displayed by the v$system_parameter view.v$backup :display the backup status of all online datafiles.(所有在线数据文件的备份情况)v$px_process_sysstat :contains information about the sessions running parallel execution (包含并行执行会话的信息)v$process :displays information about the currently active processes(活动进程的信息)v$waitstat: displays block contention statistics.this table is only updated when timed statistics are enabled(显示热块竞争的统计,当时间统计参数启动时,这个表只能更新)v$system_event :total waits for an event(事件的总等待时间)2.关于磁盘文件的视图v$datafile :datafile information from the control filev$filestat :displays the number of physical reads and writes done and the total number of single-block and multiblock I/Os done at file level(在文件级别显示物理读写和io信息)v$log :displays log file information from the control filev$log_history :log history information from the control filev$dbfile :all datafiles making up the databasev$tempfile :tempfile informationv$tempstat :file read/write statistics(文件读写的统计)v$segment_statistics :segment-level statistics3.contention竞争的视图v$lock :lists the locks currently held by the oracle database and outstanding requests for a lock or latch (正在使用的锁和过多的请求对锁)v$rollname :lists the names of all online rollback segments(在线回滚段的信息)v$rollstat :contains rollback segment statistics(回滚段的统计情况)v$waitstat :block contention statistics(块争用统计)v$latch :aggregate latch statistics (闩锁的总和统计)4.memory 的视图v$buffer_pool_statistics :statistics about all buffer pools available for the instance(实例所有可用的缓存池的统计)v$db_object_cache:database objects thatare cached inthe library cache(被缓存在库缓存区的对象)v$librarycache :contains statistics about library cache performance and activity (库缓存区的性能和活动的统计信息)v$rowcache :statistics for data dictionary activity(数据字典活动信息统计)v$sysstat:system statisticsv$sgastat :detailed information on the system global area(sga)5.用户/会话的视图v$lock :lists the locks currently held by the oracle database and outstanding requests for a lock or latch (正在使用的锁和过多的请求对锁)v$open_cursor :list cursors that each user session currently has opened and parsed,or cached (当前会话打开的游标列表)v$process :displays information about the currently active processes(活动进程的信息)v$transaction :lists the active transaction in the system (列出系统活动的事物)v$px_sesstat :parallel execution(px),contains information about the sessions running (正在执行会话的并行执行情况 统计)v$px_session :parallel execution(px),contains information about the sessions runningv$sesstat :user session statisticsv$session_event :on waits for an event by a session(会话等待事件)v$sort_usage :在11g好像就没有了v$sort_segment:displays information about every sort segment in given instance 显示实例中给出的每个回滚段的信息。v$session_wait :current or last wait for each session(当前或上次的等待信息)v$sessionv$session_object_cache :object cache statistics for the current user session on the local server(instance)6.等待事件相关的几个视图:v$session: 代表数据库活动的开始,视为源起。v$session_wait: 视图用以实时记录活动SESSION的等待情况,是当前信息。v$session_wait_history: 是对V$SESSION_WAIT的简单增强,记录活动SESSION的最近10次等待。v$sqltext: 当数据库出现瓶颈时,通常可以从V$SESSION_WAIT找到那些正在等待资源的SESSION,通过SESSION的SID,联合V$SESSION和V$SQLTEXT视图就可以捕获这些SESSION正在执行的SQL语句。v$active_session_history: 是ASH的核心,用以记录活动SESSION的历史等待信息,每秒采样一次,这部分内容记录在内存中,期望值是记录一个小时的内容。wrh#_active_session_history : 是V$ACTIVE_SESSION_HISTORY在AWR的存储地。v$active_session_history: 中的信息会被定期(每小时一次)的刷新到负载库中,并缺省保留一个星期用于分析。dba_hist_active_sess_history: 视图是WRH#_ACTIVE_SESSION_HISTORY视图和其他几个视图的联合展现,通常通过这个视图进行历史数据的访问。v$system_event 由于v$session记录的是动态信息,和SESSION的生命周期相关,而并不记录历史信息,所以ORACLE提供视图V$SYSTEM_EVENT来记录数据库自启动以来所有等待事件的汇总信息。通过这个视图,用户可以迅速获得数据库运行的总体概况。

吉他一般几年换一次
广州日报报业集团