library cache lock &library cache pin
Oracle使用两种数据结构来进行shared pool的并发控制:lock 和 pin.Lock比pin具有更高的级别.Lock在handle上获得,在pin一个对象之前,必须首先获得该handle的锁定.锁定主要有三种模式: Null,share,Exclusive.在读取访...
DISTINCT statement with Order by clause
SQL> desc test;Name Type Nullable Default Comments ---------- ------------ -------- ------- -------- LAST_NAME ...
Oracle helpful url list
Oracle helpful url list www.petefinnigan.com/orasec.htm This site is good for learning and exploring the Oracle security. One of the best security articles on this site.http://www.dbazine.com/oracle.s...
windows下server process 和client process(Deciated mode)
SQL> select a.spid dedicated_server 2 ,b.process clintpid 3 from v$process a,v$session b 4&n...
ORA_NLS33
环境变量ora_nls33定义'locale data'所在的目录......Oracle对不同字符集的支持是通过nls运行库来实现的,nls运行库的运行需要'local data'的支持,而环境变量ora_nls33就是定义'local data'存放目录的变量;在不同的版...
世界末日
世界末日什么时候呢......SQL> select sysdate + 12*30*8000 from dual;SYSDATE+12*30*8000-------------------9893-02-25 15:29:16SQL> select last_day(sysdate + 12*30*8108 + 120) from dual;LAST_DAY(SYSDATE+1...
用dbms_stats收集统计信息
CBO优化器基于三个方面评估SQL cost:selectivity,cardinality and cost(CPU&MEM&I/O),利用dbms_stats收集column柱状图信息,CBO依据柱状图可以得到column的数据分布情况: SQL> create table t1 as select 1 c...
Pragma RESTRICT_REFERENCES
To be callable from SQL statements, a stored function must obey the following "purity" rules, which are meant to control side effects:When called from a SELECT statement or a parallelized INSERT, UPDA...
重建临时表空间
建立新的临时表空间,再设定系统默认临时表空间为新建空间;SQL> create temporary tablespace tem tempfile 'D:oracleoradatabjmobiletem01.dbf' size 100m;Tablespace created.SQL> alter database default temporar...
ORA-04021
ORA-04021 timeout occurred while waiting to lock object stringstringstringstringstringCause: While waiting to lock a library object, a timeout is occurred.Action: Retry the operation later.来自: Oracl...
Deferrable constraints
对deferrable constraints可定义其检查为immediate or deferred......SQL> create table t1(c1 number);Table createdSQL> alter table t1 add constraint chk_t1 check(c1>5) not deferrable;Table alteredSQL> cre...
ASCII Character Set
ASCII Character SetASCII Character SetSymbolDecimal valueSymbolDecimal valueblank32;59!33<60"34=61#35>62$36?63%37@64&38A-Z65-90'39[91(4092)41]93*42^94+43_95,44'96-45a-z97-122.46{123/47|1240-948-57}125...
tailgate and piggyback
遇到两个有意思的单词:tailgate and piggyback, 查了下发现两者有相同的意思:Piggyback-跟随某人进入需要特定权限方许进入的地方  ...
Busting the Oracle Myth Busters(zz)
by Donald K. BurlesonThe Oracle database of the early 1990s is very different from the database of the early 21st century. RAM was very expensive, disk was slow, and RAID was not yet popular for disk ...
表空间时间点恢复练习
表空间时间点(TSPITR)恢复步骤1: alter tablespace test read only;SQL> select * from test.t_date1; C1 C2---------- ------------------- 714924 2006-12-21 13:34:36 715098 2006-12-21 13:35:39 ...
Error of Install on linux
[oracle@myredhat Disk1]$ ./runInstallerYou do nothave permission to write to the inventory /oraInventory. Installation cannot continue.:Permission denied检查/etc/orainst.loc文件[root@redhat etc]# ca...
parent cursor child cursor shared cursor
每个SQL语句在解析时,会在Library cache中查找同一是否存在同样的SQL,如果没有就创建parent cursor and child cursor,如果有那还要看相关变量类型、环境参数等是否一致,如果一致就重用该sql,如果不一致那就要创建chi...
Buffer pool and alter table cache
我们都知道:oracle有3中buffer pool1. default pool2. keep pool3. recycle pool对于这三种pool,是基于block的热度来进行管理的,系统默认使用的,就用default pool了,还有一些热块,居于其次的,就放到keep pool,...
system change number
system change number(scn)就好比oracle内部时钟,它以增加的方式变动着,DB所有的变动都以它为时间基准,它在整个系统中也是唯一的;Connected to Oracle8i Enterprise Edition Release 8.1.7.3.0 SQL> create table sc...
An example of ref cursor(1)
An example of ref cursorSQL> create table t1(c1 varchar2(20),c2 date);Table created.SQL> create or replace package pkg_refcursor_example is2 type refcursortype is ref cursor;3 procedure p_refcur (ps i...