学习动态性能表(五)
[font=宋体]在本视图中,每一个连接到数据库实例中的[/font][font=Times New Roman]session[/font][font=宋体]都拥有一条记录。包括用户[/font][font=Times New Roman]session[/font][font=宋体]及后台进程如[/font][font=Times New Roman]DBWR[/font][font=宋体],[/font][font=Times New Roman]LGWR[/font][font=宋体],[/font][font=Times New Roman]arcchiver[/font][font=宋体]等等。[/font][b][font=Times New Roman]V$SESSION[/font][/b][b][font=宋体]中的常用列[/font][/b]
[b][font=Times New Roman] [/font][/b]
[font=Times New Roman]V$SESSION[/font][font=宋体]是基础信息视图,用于找寻用户[/font][font=Times New Roman]SID[/font][font=宋体]或[/font][font=Times New Roman]SADDR[/font][font=宋体]。不过,它也有一些列会动态的变化,可用于检查用户。如例:[/font]
[font=Times New Roman]SQL_HASH_VALUE[/font][font=宋体],[/font][font=Times New Roman]SQL_ADDRESS[/font][font=宋体]:这两列用于鉴别默认被[/font][font=Times New Roman]session[/font][font=宋体]执行的[/font][font=Times New Roman]SQL[/font][font=宋体]语句。如果为[/font][font=Times New Roman]null[/font][font=宋体]或[/font][font=Times New Roman]0[/font][font=宋体],那就说明这个[/font][font=Times New Roman]session[/font][font=宋体]没有执行任何[/font][font=Times New Roman]SQL[/font][font=宋体]语句。[/font][font=Times New Roman]PREV_HASH_VALUE[/font][font=宋体]和[/font][font=Times New Roman]PREV_ADDRESS[/font][font=宋体]两列用来鉴别被[/font][font=Times New Roman]session[/font][font=宋体]执行的上一条语句。[/font]
[font=Times New Roman] [/font]
[font=宋体]注意:当使用[/font][font=Times New Roman]SQL*Plus[/font][font=宋体]进行选择时,确认你重定义的列宽不小于[/font][font=Times New Roman]11[/font][font=宋体]以便看到完整的数值。[/font]
[font=Times New Roman] [/font]
[font=Times New Roman]STATUS[/font][font=宋体]:这列用来判断[/font][font=Times New Roman]session[/font][font=宋体]状态是:[/font]
[font=Wingdings]l
[/font][font=Times New Roman]Achtive[/font][font=宋体]:正执行[/font][font=Times New Roman]SQL[/font][font=宋体]语句[/font][font=Times New Roman](waiting for/using a resource)[/font]
[font=Wingdings]l
[/font][font=Times New Roman]Inactive[/font][font=宋体]:等待操作[/font][font=Times New Roman]([/font][font=宋体]即等待需要执行的[/font][font=Times New Roman]SQL[/font][font=宋体]语句[/font][font=Times New Roman])[/font]
[font=Wingdings]l
[/font][font=Times New Roman]Killed[/font][font=宋体]:被标注为删除[/font]
[font=Times New Roman] [/font]
[font=宋体]下列各列提供[/font][font=Times New Roman]session[/font][font=宋体]的信息,可被用于当一个或多个[/font][font=Times New Roman]combination[/font][font=宋体]未知时找到[/font][font=Times New Roman]session[/font][font=宋体]。[/font]
[font=Times New Roman] [/font]
[b][font=Times New Roman]Session[/font][/b][b][font=宋体]信息[/font][/b]
[font=Wingdings]l
[/font][font=Times New Roman]SID[/font][font=宋体]:[/font][font=Times New Roman]SESSION[/font][font=宋体]标识,常用于连接其它列[/font]
[font=Wingdings]l
[/font][font=Times New Roman]SERIAL#[/font][font=宋体]:如果某个[/font][font=Times New Roman]SID[/font][font=宋体]又被其它的[/font][font=Times New Roman]session[/font][font=宋体]使用的话则此数值自增加[/font][font=Times New Roman]([/font][font=宋体]当一个[/font][font=Times New Roman]
SESSION[/font][font=宋体]结束,另一个[/font][font=Times New Roman]SESSION[/font][font=宋体]开始并使用了同一个[/font][font=Times New Roman]SID)[/font][font=宋体]。[/font]
[font=Wingdings]l
[/font][font=Times New Roman]AUDSID[/font][font=宋体]:审查[/font][font=Times New Roman]session ID[/font][font=宋体]唯一性,确认它通常也用于当寻找并行查询模式[/font]
[font=Wingdings]l
[/font][font=Times New Roman]USERNAME[/font][font=宋体]:当前[/font][font=Times New Roman]session[/font][font=宋体]在[/font][font=Times New Roman]oracle[/font][font=宋体]中的用户名。[/font]
页:
[1]