ORACLE应用经验(2)建站知识
导读:1建站知识ORACLE应用经验(2)网站建设多少钱网站seo优化。
正在看的ORACLE教程是:ORACLE应用经验(2)。------谁正在访问数据库?Select c.sid, c.serial#,c.username,a.object_id,b.object_name,c.program,c.status,d.name,c.osuser from v$Locked_object a, All_objects b, &nb网站seo优化培训sp; v$session c, audit_actions dwhere a.object_id=b.object_id and a.session_id =c.sid(+) and c.command=d.action;alter system kill session '&1,&2';Select a.sid,a.serial#,a.username,a.status,a.program,b.name,a.osuserfrom v$session a,audit_actions b where a.command=b.actionAnd username='&1';------谁被锁住?Select a.sid,a.serial#,a.username,A.LOCKWAIT,a.status,a.program,b.namefrom v$session a,audit_actions b where a.command=b.actionAND LOCKWAIT IS NOT NULL;------谁在锁表?Select a.sid,a.serial#,a.username,A.LOCKWAIT,a.status,a.program,b.namefrom v$session a,audit_actions b where a.command=b.actionAND STATUS='ACTIVE';Select sid, serial#, object_name, row_wait_block#, row_wait_row#, row_wait_file# from all_objects, v$sessionwhere row_wait_obj#=object_id and type='USER' and lockwait is not null ;Select sl.username, sl.sid, sl.serial# from v_$lock l1, v$session s1where exists (select * from v_$lock l2, v$session s2 where l2.sid=s2.sid and l2.id1=l1 and s2.lockwait=l2.kaddr and request=0 and l1.sid=s1.sid) ;select count(*) from v$session;select count(*) from sys.v_$process;select count(*) from sys.v_$transaction;ZYP_35.98------查看哪些包要固定COLUMN OWNER FORMAT A10Select owner, name, type, source_size+cod网站seo优化诊断工具e_size+pars高端网站建设ed_size+error_size BYPES from dba_object_sizewhere type='PACKAGE BODY' ORDER BY 4 DESC ;------查看一个用户拥有哪些表空间的实体信息:Select tablespace_name, owner, segment_name,segment_type from dba_segmentswhere owner-'SyS' and segment_type_-'ROLLBACK'order by tablespace_name, owner, segment_name ;break on owner on segment_nameCOLUMN segment_name FORMAT A15cOLUMN tablespace_name FORMAT A15COLUMN file_name FORMAT A20SELECT A.owner, a.segment_name, b.tablespace_name, b.file_name, sum(a.bytes) bytes from dba_extents a, dba_data_files bwhere a.file_id-b.file_id group by a.owner, a.segment_name, b.tablespace_name, b.file_name ;------看内存缓冲区使用效率的指数是命中率HITS: Hits=Logical_reads/(logical_reads+physical_reads)其中:logical_reads=db_block_gets+consistent_readsselect cur.value db, con.value con, phy.value phy, (cur.value+con.value)/cur.value+con.value+phy.value)*100 HITS from v$sysstat cur, v$sysstat con, v$sysstat phywhere CUR.NAME='db block gets' AND CON.NAME='consistent gets' AND PHY.NAME='physical reads' ;------如何检测ROLLBACK SEGMENT竞争?select class, count from v$waitstatwhere class in ('system undo header', 'system undo block', 'undo header', 'undo block') ;select sum(value) from v$sysstat where name in ('db block gets', 'consistents gets') ; 若count/sum(value)大于1%,则应考虑增加ROLLBACK SEGMENT------查看有事务在哪几个回退段中:COLUMN u FORMAT A15COLUMN s FORMAT A15COLUMN s
声明: 本文由我的SEOUC技术文章主页发布于:2023-05-22 ,文章ORACLE应用经验(2)建站知识主要讲述标签,经验,ORACLE应用经验(2)建站知识1网站建设源码以及服务器配置搭建相关技术文章。转载请保留链接: https://www.seouc.com/article/web_5067.html