2010年总结报告
今天是2010年的最后一天,这一年基本上是学习中渡过的,没有啥成绩。希望新的一年能够多做项目,另外能够找到大的培训机构讲课![@more@]20
主要的动态视图对应的基表
动态视图 基础FIXED TABLE------------------------ -------------------------GV$ACCESS &nbs...
oracle的truncate table的操作
oracle对于truncate table的操作有着自己的独特做法,truncate一个表几十条数据和千万条数据所用的时间都差不多,说穿了oracle对这类操作只做数据字典的更新,并不对实际数据操作,只需要拉回HWM位置。sys@ORCL...
oracle数据文件的收缩
一般来讲,oracle的数据文件只扩展,不会因为tablespace上的表数据删除而自动收缩数据文件,释放磁盘空间。昨天在asktom看了一篇文章,很有意思,贴过来看看。The only thing that'll make a file "shrink" is to al...
OCM寻求兼职(南京地区)
本人OCM ,从事ORACLE技术工作多年,寻求兼职,在南京地区,非诚勿扰!MSN:wanggangytsoft@msn.com
控制文件扩展问题
今天查看数据库日志,出现下面的日志:Expanded controlfile section 11 from 28 to 56 recordsRequested to grow by 28 records; added 1 blocks of records于是估计查找跟control file有关的视图:select table_name from dict where table_name like upper('%control%');TABLE_NAME------------------------------DBA_REPRESOL_STATS_CONTROLALL_REPRESOL_STATS_CONTROLUSER_REPRESOL_STATS_CONTROLDBA_HIST_WR_CONTROLGV$DLM_TRAFFIC_CONTROLLERV$DLM_TRAFFIC_CONTROLLERV$CONTROLFILEV$CONTROLFILE_RECORD_SECTIONGV$CONTROLFILEGV$C
Create a secure application role
--创建应用角色 create role hr_read identified using hr.hr_read_check; --给角色赋权 grant select on scott.emp to hr_read;--创建角色认证过程(HR) CREATE OR REPLACE PROCEDURE hr.hr_read_check AUTHID CURRENT_USER IS BEGIN DBMS_SESSION.SET_ROLE('HR_READ') ; END; /--在sqlplus 中执行: SQL> declare i number; 2 begin 3 hr.hr_read_check; 4 select count(*) into i from hr.aa; 5 dbms_output.put_line(i); 6 end; 7 / select count(*) into i from hr.aa; * ERROR 位于第 4 行: ORA-06550: 第 4 行, 第 32 列: PL/SQL:
redo和undo之四事物槽
ITL,Interested Transaction List,相关事务列表。此表中每一行,按Oracle惯用的说法,又叫一个槽,SLOT.事物槽的组成 itl Xid...
oracle绑定变量与非绑定变量的性能对比
create table t ( x int );create or replace procedure proc1asbeginfor i in 1 .. 10000loopexecute immediate'insert into t values ( :x )' using i;end loop;end; /create or replace procedure pro...
Tom大师性能分析常用包
create or replace view statsas select 'STAT...' || a.name name, b.valuefrom v$statname a, v$mystat bwhere a.statistic# = b.statistic#union allselect 'LATCH.' || name, getsfrom v$latchunion allselect '...
Tom大师的oracle优化法则
• You should do it in a single SQL statement if at all possible. And believe it or not, itis almost always possible.• If you can’t do it in a single SQL Statement, do it in PL/SQL—as lit...
巧妙设置sqlplus工具环境,工作更安全
vi $ORACLE_HOME/sqlplus/admin/glogin.sqldefine _editor=viset serveroutput on size 1000000set trimspool onset long 5000set linesize 100set pagesize 9999column plan_plus_exp format a80column global_name...
Identifying Locking Issues
Identifying locking issues is instrumental in locating the user who is waiting for someone or something else. You can use this strategy to identify users who are currently being locked in the system...
Use Pipelined Table Functions to Build Complex Result Sets
CREATE OR REPLACE PACKAGE BODY ddl_extract_pkg is FUNCTION scrub_raw_ddl (p_status_c IN varchar2, &nb...
转:ORACLE查找并解除死锁进程
1、查找死锁进程select /*+RULE*/v$lock.sid, decode(v$lock.type, 'MR', 'Media Recovery', 'RT','Redo Thread', 'UN','User Name', 'TX', 'Transaction', 'TM', 'DML', 'UL', 'PL/SQL User Lock', 'DX', 'Dist...
Oracle Waits event:DB File Scattered Read
The DB File Scattered Read wait event generally indicates waits related to full table scans or fast full index scans. As full table scans are pulled into memory, they are scattered throughout the b...
Oracle waits event:DB File Sequential Read
The DB File Sequential Read wait event generally indicates a single block read (an index read, for example). A large number could indicate poor joining orders of tables or unselective indexing. Thi...
Oracle wait problems and potential solutions
Wait ProblemPotential FixSequential ReadIndicates many index reads—tune the code (especially joins)Scattered ReadIndicates many full table scans—tune the code; cache small tablesFree ...
[转]推荐:深入研究ITL阻塞与ITL死锁
1、什么是ITL ITL(Interested Transaction List)是Oracle数据块内部的一个组成部分,用来记录该块所有发生的事务,一个itl可以看作是一个记录,在一个时间,可以记录一个事务(包括提交或者未提交事务)。当然,如...
建立快速刷新的物化视图(materialized view)
1.建表create table t( code varchar(10), name varchar(20), id va...