转:Oracle数据库一致性读的原理(Consistent Read)
转:Oracle数据库一致性读的原理(Consistent Read)申明:此文为转载,如果发生版权问题,本人将立即删除相关内容:http://blog.csdn.net/wh62592855/article/details/6151482 在Oracle数据库中,undo主要...
redo與undo的一點點思考
redo也包含undo sql,為什麼不用redo的undo sql回滾呢因為有一種情況,數據在未提交的狀態下就寫如數據文件了,當這時發生主機crash,那麼這些未提交的數據在redolog中是沒有記錄的,media recovery執行回滾時必須借助於undo,rollback undotablespace 事務表中的未提交事務[@more@]
recover database using backup controlfile
也就是说,不加using backup controlfile的情况。在普通的recover database 或者 recover tablespace, recover datafile时, Oracle会以当前controlfile所纪录的SCN为准,利用archive log和 redo log的redo entry, 把相关的datafile 的 block恢复到“当前controlfile所纪录的SCN”而某些情况下,Oracle需要把数据恢复到比当前controlfile所纪录的SCN还要靠后的位置(比如说,control file是backup controlfile , 或者 controlfile是根据trace create的。),这时候,就需要用using backup controlfile. 恢复就不会受“当前controlfile所纪录
nestloop
嵌套循环的程序逻辑相当于for i in .. loop for j in .. loop if (matched) output end if;end loop;end loop;所以它相对于merge join和hash join来说比较快的返回1行因为merge join要先sort两个表之后,才开始做joinhash join要先构造驱动表的hash tablealter session set events '10046 trace name context forever, level 12';用10046跟踪了一下:怎么看“第一次fetch的结果都是1行”呢,还有每次fetch返回多少行呢?以下是部分dump内容:PARSE #3:c=10000,e=4853,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,tim=36791549501158BINDS #
事务的基本概念ACID
事务的基本概念事务处理在应用系统开发中起着重要的作用。简单地来说,事务就是由若干步处理组成的工作单元,这些步骤之间具有一定的逻辑关系,作为一个整体的操作过程,每个步骤必须同时成功或者失败。当所有的步骤都成功的时候,事务就必须“提交”,而当其中有一个步骤失败的时候,整个事务都必须“回滚”,也就是,其中的每一个步骤所做的改动都必须撤销。举一个例子来说明事务处理的情形。我们考察一个仓库入库的过程。仓库的入库要经过以下步骤:填写一张入库单,这张入库单上可能包含多种商品,每一种商品入库一定的数量根据入库单
monitor sys and system user(轉自http://www.oracle.com)
Tip of the Week Tip for Week of February 23, 2003 Monitor SYS and SYSTEM Accounts This tip comes from Daniel Stanley, Oracle DBA/Developer at ASIX, Inc., in Bellevue, WA. Create a procedure to monitor and log users logging onto the database with the SYS and SYSTEM accounts. Create two new SYS objects: --trigger sys$logtrig-- This logon trigger fires the procedure if you are logged on with the SYS or SYSTEM accounts. --procedure sys$logproc-- This procedure writes an ascii file to either the utl_
Oracle/PLSQL: UserEnv Function(轉自http://www.techonthenet.com/oracle/functions/userenv.php)
In Oracle/PLSQL, the userenv function can be used to retrieve information about the current Oracle session. Although this function still exists in Oracle for backwards compatibility, it is recommended that you use the sys_context function instead.The syntax for the userenv function is:userenv( parameter )parameter is the value to return from the current Oracle session. The possible values are:ParameterExplanationCLIENT_INFOReturns user session information stored using the DBMS_APPLICATION_INFO p
Oracle/PLSQL: Sys_Context Function(轉自http://www.techonthenet.com)
In Oracle/PLSQL, the sys_context function can be used to retrieve information about the Oracle environment.The syntax for the sys_context function is:sys_context( namespace, parameter, [ length ] )namespace is an Oracle namespace that has already been created. If the namespace of 'USERENV' is used, attributes describing the current Oracle session can be returned.parameter is a valid attribute that has been set using the DBMS_SESSION.set_context procedure.length is optional. It is the length of t
Naming Database Objects
Naming Database Objects• Names must be from 1 to 30 bytes long with theseexceptions:– Names of databases are limited to 8 bytes– Names of database links can be as long as 128bytes• Nonquoted names cannot be Oracle reservedwords.• Nonquoted names must begin with an alphabeticcharacter from your database character set.Naming Database ObjectsWhen you name an object in the database you have the option of enclosing names in doublequotation marks ("). If you do this then you c
redolog thread
redolog thread instand[@more@]
oracle 9iAgent無法啟動解決方案
轉自:http://www.puschitz.com/InstallingOracle9i.shtml#PatchingOracleIntelligentAgentOnRHAS3Patching Oracle Intelligent Agent on RH AS 3When you run "agentctl start" (Oracle 9.2.0.4), dbsnmp will crash: http://metalink.oracle.com. See bug/patch 3238244 for more information.Before you apply the patch, make sure the instance is down!Also make sure the opatch script appears in your $PATH. See "Patching Oracle9iR2 on Red Hat AS 3" for information on getting and installing opatch.
曲终人散尽,江上数青峰
"曲终人散尽,江上数青峰"。曲终了,人散了,然而青峰依在,朗朗乾坤,或許物換星移,没有转移的是你我依然還在,不变的是你我曾經的點點滴滴, 生活仍将继续,讓大家彼此祝福吧[@more@]
VY小語
曲終人散盡,江上數青峰”。曲終了,人散了,然而青峰依在,朗朗乾坤,或許物換星移,沒有轉移的是你我依然還在,不變的是你我曾經的點點滴滴,生活仍將繼續,讓大家彼此祝福吧[@more@]
異質資料庫鍊
1、安装 Microsoft Data Access Components (MDAC)SDK ODBC driver 2、test whether CATHS has run.connect to the Oracle server as schema "SYSTEM" and do "DESCRIBE SYS.HS_FDS_CLASS". If it does not exist, connect as SYS (or internal) and run the CATHS script. (ORACLE_HOMERDBMSADMINCATHS.SQL) 3、建立 SQL SERVER 数据源 TEST_SQLSERVER 4、配置tnsnames.ora. (ORACLE_HOMENETWORKADMIN) TEST_SQLSERVER = (DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=<IP地址>) (PORT=1521) ) (CONNECT_DATA
Shmmax參數
shmmax内核参数定义单个共享内存段的最大值,如果该参数设置小于Oracle SGA设置,那么SGA就会被分配多个共享内存段。这在繁忙的系统中可能成为性能负担,带来系统问题。Linux上该参数的缺省值通常为32M。[root@neirong root]# more /proc/sys/kernel/shmmax 33554432 可以通过ipcs命令查看此设置下共享内存的分配,我们可以看到Oracle分配了多个共享内存段以满足SGA设置的需要:[root@neirong root]# ipcs -sa ------ Shared Memory Segments -------- key shmid owner perms bytes nattch status
oracle的幾個服務
注:SID - 数据库标识HOME_NAME - Oracle Home名称,如OraHome92、OraHome81(1)OracleServiceSID 数据库服务,这个服务会自动地启动和停止数据库。如果安装了一个数据库,它的缺省启动类型为自动。服务进程为ORACLE.EXE,参数文件initSID.ora,日志文件SIDALRT.log,控制台SVRMGRL.EXE、SQLPLUS.EXE。(2)OracleHOME_NAMETNSListener监听器服务,服务只有在数据库需要远程访问时才需要(无论是通过另外一台主机还是在本地通过 SQL*Net 网络协议都属于远程访问),不用这个服务就可以访问本地数据库,它的缺省启动类型为自动。服务进程为
linux上安裝oracle
我在RedHat7.1上第一次安装Oracle8.1.7就成功了,呵呵,很幸运!后来有不少朋友请教我安装方法,我才知道原来有这么多问题,按照我的方法应该可以安装成功,我自己安装了不下10遍都是很顺利就成功了。总结一下自己的安装经验,也总结一下别人遇到的问题,希望能对其他人有一点点帮助。安装假设oracle系统文件放在/u01下,数据库文件放在/u02下,不安装OPS,不安装JServer,单数据库单实例。ORACLE_BASE=/u01/app/oracleORACLE_HOME=/u01/app/oracle/product/8.1.7ORACLE_SID=orcl一、安装前的配置1、替换glibcOracle8.1.7使用的是glibc2.1.
Right here waiting
ocea apart day after dayand slowly go insanei hear your voice on the linebut it doesn't stop the painif see you next to neverhow can we say foreveri took for granted, all the times.that i though would last somehow.i hear laughter i taste the tearsbut i can't get near you nowoh, can't you see it baby.you've got me goin crazy.i wonder how we can survive this romancebut in the end if I'm with youI'll take the chance.oh,can't you see it babyyou've got me goin crazywherevery go whervery doi will be r
批處理檔備份oracle
1.set aa=%date:~0,4%2.set bb=%date:~5,2%3 set bb=%date:~8,2%note: date variable have two parameter, one is statr bit,other is long4.example:exp scott/tiger file=c:scott%aa%%bb%%cc%.dmp log=scott%aa%%bb%%cc%5.create a schedule in task manager for backup.6.fininish[@more@]
ORACLE 数据库管理员的职责
ORACLE 数据库管理员应按如下方式对 ORACLE 数据库系统做定期监控: (1). 每天对 ORACLE 数据库的运行状态 , 日志文件 , 备份情况 , 数据 库的空间使用情况 , 系统资源的使用情况进行检查 , 发现并解决 问题。 (2). 每周对数据库对象的空间扩展情况 , 数据的增长情况进行监控 , 对数据库做健康检查 , 对数据库对象的状态做检查。 (3). 每月对表和索引等进行 Analyze, 检查表空间碎片 , 寻找数据库 性能调整的机会 , 进行数据库性能调整 , 提出下一步空间管理 计划。对 ORACLE 数据库状态进行一次全面检查。 每天的工作 (1). 确认所有的 IN