ITL(Interested Transaction List)
一、ITL描述: ITL(Interested Transaction List)是Oracle数据块内部的一个组成部分, 位于数据块头(block header),itl由xid(Transaction XID),uba(Undo block address),flag,lck和scn/fsc组成, 用来记录该块所有发生的事务,一个itl可以看作是一条事务记录。 当然,如果这个事务已经提交,那么这个itl的位置就可以被反复使用了,因为itl类似记录,所以,有的时候也叫itl槽位。如果一个事务一直没有提交, 那么,这个事务将一直占用一个itl槽位,itl里面记录了事务信息,回滚段的入口, 事务类型等等。如果这个事务已经提交
Oracle Profile and PASSWORD_VERIFY_FUNCTION
ALTER PROFILE default LIMIT PASSWORD_LIFE_TIME 90 PASSWORD_GRACE_TIME 5 PASSWORD_REUSE_TIME 100 PASSWORD_REUSE_MAX 360 FAILED_LOGIN_ATTEMPTS 3 PASSWORD_VERIFY_FUNCTION MY_PASSWORD_VERIFY_FUNC;[@more@]RemRem $Header: utlpwdmg.sql 31-aug-2000.11:00:47 nireland Exp $RemRem utlpwdmg.sqlRemRem Copyright (c) Oracle Corporation 1996, 2000. All Rights Reserved.RemRem NAMERem utlpwdmg.sql - script for Default Password Resource LimitsRemRem DESCRIPTIONRem This is a script fo
Oracle中的SCN详解
pre. Oracle中的SCN(system change number)和我们的北京时间的意义是相同的,SCN是Oracle中的时间号。 为什么Oracle不用时间来界定呢? 我在北京时间8:00的时候执行一条DML语句,然后修改机器上的时间为 7:00,再执行一条DML语句。如果用机器上的时间区分的话,那Oracle根本区分不出来这两条DML语句的执行顺序——而这一点对于Oracle是 很重要的。所以它采用自己产生的SCN来区分所有操作的先后顺序。 SCN设计的值很大,所以不用担心达到最大值后怎么办。[@more@] 可以查看系统当前的SCN号: SQL> se
Histograms
Histograms 就是柱状图 在你不收集Histograms信息的时候 如果存在一个表 表中的记录从1到9,一共900条记录 由于没有收集Histograms信息 oracle会假设记录是平均分配的 就是说1有100条,2有100条…… 而实际上1有800条,其他的100条 这样就会存在问题 在索引的选择上 对1的查询用全表扫描会更好 而对于其他的值用索引可能效果会更好 这时候就需要收集Histograms信息 告诉oracle数据是倾斜 不是平均分布的 v:* {behavior:url(#default#VML);} o:* {behavior:url(#default#VML);} w:* {behavior:url(#default#VML);
PLSQL questions
here are some general questionsPL/SQL Questions: 1. Describe the difference between a procedure, function and anonymous pl/sql block.A function must return a value while a procedure doesn’t have to. Functions can be called from SQL.anonymous pl/sql block begins with a DECLARE statement. [@more@] 2. Describe the use of %ROWTYPE and %TYPE in PL/SQL %TYPE associates a variable with a single column type. %ROWTYPE associates a variable with an entire table row. % TYPE is used to declare a field wi
recover database until cancel using backup controlfile
recover database until cancel using backup controlfile的一些知识点。[@more@]QAPROD_arch15342.dbf 已经在归档地址,但用rman里的recover提示:RMAN-06054: media recovery requesting unknown log: thread 1 scn 7418781225888。 用“recover database until cancel using backup controlfile;” 就可以。难道是因为控制文件是用“alter database backup control file to '/u16/me/control_bkup';” 这种方法备份来的,就需要用“recover database until cancel using backup controlfile;” RMAN> run {allocate channel c1 type
oracle 监听
The listener supports no serviceshttp://tc.itkee.com/database/detail-cba.html[@more@]lsnrctl start提示:The listener supports no servicesThe command completed successfully這樣啓動後遠程連接會造成oracle ORA-12514:TNS:listener does not currently know of service requested in connect descriptor---方案一---------原因:數據庫實例註冊到listener-------------------------------------登錄數據庫$sqlplus / as sysdba--顯示服務名SQL>show parameter service_names--強制註冊服務SQL>alter system register;--查看
shell 的判断
#!/bin/shfile=/u03if [ "${file}" = "/u03" ]thenecho the filename is /u03#!/bin/shfile=/u03if [ "${file}" = "/u03" ]thenecho the filename is /u03fifile2=/u04if [ "${file2}" != "/u03" ]thenecho the filename is not /u03fi[@more@]
Database Audit and Audit trail purging
http://www.oradba.ch/2011/05/database-audit-and-audit-trail-purging/Database Audit and Audit trail purging There are several reason to enable database audit and at least as much reason to not enable database audit. For today I will focus on what can be done after the audit has enabled and how to get rid of the audit data quite easily. It is nothing new nor is it rocket engineering. Ok, removing data is mostly a quite easy task, sometimes to easy… Rather than delet
oracle 8i的restore
oracle8i的restore有些需要特别注意的地方[@more@]oracle 8i 恢复时不支持restore controlfile from ... and restore controlfile from autobackup; 也不支持set DBID= , 在备份时也不支持CONFIGURE CONTROLFILE AUTOBACKUP ON; 在恢复控制文件时,建议在源数据库用 alter database backup controlfile to '$ORACLE_BASE/admin/orcl/bdump/orcl.ctl';(binary file), 然后拷贝到target的控制文件路径。或用alter database backup controlfile to trace;(flat text file)。trace file is very usefu, u can re-create control fil
Connected to an idle instance – while database is running
echo $ORACLE_HOME/home/oracle/product/10g/ (We should eliminate the slash / , export ORACLE_HOME=/home/oracle/product/10g) It causes error "Connected to an idle instance"SQL> conn / as sysdbaConnected to an idle instance.export ORACLE_HOME=/home/oracle/product/10gSQL> conn / as sysdbaConnected.Another reason: ps -ef|grep pmon oracle 19443 1 0 Oct 13 ? 72:50 ora_pmon_dodpp1 oracle 12421 1 0 Nov 18 ? 27:15 ora_pmon_dodpp5echo $ORACLE_SIDDODPP1SQ
backup and restore tips
转自:http://blog.csdn.net/managergh/archive/2007/03/06/1521944.aspx1 列出对应物 RMAN>list incarnation; 2 列出备份 2.1概述可用的备份 RMAN>list backup summary; B 表示 backup F 表示 FULL A 表示 archive log 0 1 表示 incremental backup S 说明备份状态 (A AVAILABLE X EXPIRED )[@more@] 2.2按备份类型列出备份 RMAN>list backup
FORCE LOGGING
Oracle provides the ability to enable or disable logging of certain types of dml/ddl statements. The reasons one might consider nologging with some commands or objects is driven by a desire for improved performance. However its important that applications understand the repercussions in recovery. We have seen at Bell on numerous occasions where an application has used nologging commands and then later when they needed a subsequent Oracle restore and rollforward they did not realize that s
理解备份集backup set与备份片backup piece
1,备份集backup set存储备份信息的逻辑结构,仅仅是备份信息的逻辑结构而已,通俗说就是存储这个备份集里面都是备份了哪些数据文件以及这个备份集的大小,备份的时间,备份片的信息等信息,通俗的说相当于一本书的序+目录.转: http://space.itpub.net/8554499/viewspace-580190[@more@] 2,备份片backup piece存储备份集信息的二进制文件.备份集由一个或多个备份片组成,并且每个备份片对应一个OS文件. 3,数据文件可以跨备份片,不能跨备份集。 3.1比如说你定义备份集的MAXSETSIZE参数,该参数的最小值必须大于你所备份的数据文件中最大
用Rman 异机迁移
*********************************************************************** Use rman to migrate source db to target db on same platform and oracle version 27-Sep-2012 The tested db is small, if for big db, need to redesign the full_backup.sh script to make the backup faster. And pay more attention to the source shutdown as downtime won’t be long in production.[@more@] Normal 0 false false false MicrosoftInternetExplorer
备份集地址变了
恢复数据文件,如果备份集地址变了,可以更新control file指定新地址:[@more@]http://space.itpub.net/26277071/viewspace-712197恢复数据文件,如果备份集地址变了,可以更新control file指定新地址:首先,让新恢复的控制文件可以找到备份集:RMAN> catalog start with '/db_dumps/O02RCD3/DONT_TOUCH/rman';更新控制文件里的备份集信息:RMAN> crosscheck backup;
NOLOGGING 应用场景
NOLOGGING Wrap-upThe operations that may be performed in a NOLOGGING mode are as follows:特别注意,在非归档下,Create表和索引都不会产生大量日志。You would not see the differencesin redo size in a NOARCHIVELOG mode database as the index CREATE and REBUILD operations are not logged inNOARCHIVELOG mode.If you test this on a NOARCHIVELOG-mode database, The CREATE TABLE will not be logged, with the exception of the data dictionary modifications, in a NOARCHIVELOG-mode database.[@more@]• Index c
vmware 添加硬盘
一:首先介绍硬盘扩容的方法: 1、vmware提供一个命令行工具,vmware-vdiskmanager.exe,位于vmware的安装目录下,比如 C:Program FilesVMwareVMware Workstationvmware-vdiskmanager.exe. 在windows的cmd窗口中,转到vmware的安装目录 即:cd C:Program FilesVMwareVMware Workstation vmware-vdiskmanager.exe 可以查看帮助[@more@] 2. 对于扩容,可以输入下列命令: vmware-vdiskmanager -x 4Gb "D:VMwareWinXPmyLinux.vmdk" 参数"-x"表示要扩展虚拟机硬盘空间,紧随其后
ASM管理实践
ASM管理实践(转)http://hi.baidu.com/zwfha/blog/item/af96d8119bf376c2a7ef3f0f.htmlasmcmd实用程序是Oracle 10g版本2的新增特性,它是一个命令行实用工具,提供了一种简单的方法,可以使用类似于Linux外壳命令(例如ls和mkdir)的命令集,浏览和维 护ASM磁盘组中的对象。ASM实例所维护对象的分层性质适合于采用类似Linux文件系统中浏览和维护文件所使用的命令集。http://hi.baidu.com/zwfha/blog/item/af96d8119bf376c2a7ef3f0f.html[@more@]在使用asmcmd之前,必须确保将环境变量ORACLE_BASE、ORACLE_HOME和ORACLE_SID设置为指向ASM
Logical DBA, DA Data Architect
Logical DBA 不同与Physical DBA. 有些像DA的角色,下面是一些工作内容:[@more@]Base Activities:Review database Code as part of data object review Define entities, attributes and relationships Involved in process design Review/show plans Review explains Perform initial performance review. Perform OS scripting Perform database scripting. Assist in debugging of scripts. Assist in monitoring on server platforms. Assist in application support through code implementation support. Assist in app