<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>OracleOnLinux &#187; Experiments</title>
	<atom:link href="http://www.oracleonlinux.cn/category/oracle/experiments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.oracleonlinux.cn</link>
	<description>Oracle and Linux,I Love U.</description>
	<lastBuildDate>Tue, 07 Feb 2012 09:37:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>解析Oracle rowid系列三(完)</title>
		<link>http://www.oracleonlinux.cn/2011/11/11/whats-oracle-rowid-3/</link>
		<comments>http://www.oracleonlinux.cn/2011/11/11/whats-oracle-rowid-3/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 13:49:15 +0000</pubDate>
		<dc:creator>Asher</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.oracleonlinux.cn/?p=557</guid>
		<description><![CDATA[承接解析Oracle rowid系列一、系列二。今天，我们来探讨特定场景下的Oracle rowid,大文件表空间下的Oracle rowid。大文件的表空间是Oracle 10g的新特性,关于该特性暂且不作过多表述，简单一句话来说，同小文件类型的表空间(数据库默认的表空间类型)相比，该类型的表空间只能包含一个而且最多只能有一个数据文件。正是因为如此，所以位于大文件类型表空间下的表的rowid显得有些特殊，接下来我们探讨究竟特殊在哪儿？
首先，准备场景，建立大文件表空间，并在该表空间下建立一张普通的Heap表。
SQL&#62; conn / as sysdba;
Connected.
SQL&#62; select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE    11.2.0.1.0      Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL&#62; create bigfile tablespace big_tbs datafile size 10m autoextend on;
Tablespace [...]]]></description>
		<wfw:commentRss>http://www.oracleonlinux.cn/2011/11/11/whats-oracle-rowid-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>解析Oracle rowid系列二</title>
		<link>http://www.oracleonlinux.cn/2011/11/08/whats-oracle-rowid-2/</link>
		<comments>http://www.oracleonlinux.cn/2011/11/08/whats-oracle-rowid-2/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 07:28:16 +0000</pubDate>
		<dc:creator>Asher</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.oracleonlinux.cn/?p=551</guid>
		<description><![CDATA[在解析Oracle rowid系列一里，我们简单探讨了Oracle rowid的格式及获取rowid的方法，在本篇中我们探讨的主题是：通过Oracle rowid真的可以唯一定位到表的一条记录吗？或者说在同一Oracle数据库中，rowid就一定唯一、没有重复的吗？
实验步骤：
1 构建cluster table并插入测试数据：
SQL&#62; conn / as sysdba;
Connected.
SQL&#62; select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE    11.2.0.1.0      Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL&#62; conn hr/hr;
Connected.
SQL&#62; create cluster dept_emp_cluster(department_id number(4));
Cluster created.
SQL&#62; create [...]]]></description>
		<wfw:commentRss>http://www.oracleonlinux.cn/2011/11/08/whats-oracle-rowid-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Oracle 11g Concepts 笔记2：什么是唯一、非唯一索引及索引分类</title>
		<link>http://www.oracleonlinux.cn/2011/11/02/oracle-11g-concepts-notes2/</link>
		<comments>http://www.oracleonlinux.cn/2011/11/02/oracle-11g-concepts-notes2/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 10:08:16 +0000</pubDate>
		<dc:creator>Asher</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.oracleonlinux.cn/?p=471</guid>
		<description><![CDATA[从Oracle索引的特征上，我们可以简单的把索引分为Unique Indexes and Nonunique Indexes，即唯一索引和非唯一索引。
1      对于唯一索引，唯一索引确保被索引的字段或多个联合字段在表中绝对不会有重复值；通常，我们在建表时，创建唯一约束或者主键约束，再或者建表以后给表添加唯一、主键约束时，Oracle会自动在主键、唯一约束的字段上创建唯一索引，并且索引的名字跟约束的名字一样，如：
SQL&#62; create table tt(id1 number primary key,id2 number,id3 number);
Table created.
SQL&#62; select index_name,table_name,uniqueness from user_indexes where table_name='TT';
INDEX_NAME                     TABLE_NAME            [...]]]></description>
		<wfw:commentRss>http://www.oracleonlinux.cn/2011/11/02/oracle-11g-concepts-notes2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Oracle 11g Concepts 笔记1：联合索引的创建及注意事项</title>
		<link>http://www.oracleonlinux.cn/2011/10/31/11g-concepts-notes1/</link>
		<comments>http://www.oracleonlinux.cn/2011/10/31/11g-concepts-notes1/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 02:34:16 +0000</pubDate>
		<dc:creator>Asher</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Concepts]]></category>

		<guid isPermaLink="false">http://www.oracleonlinux.cn/?p=451</guid>
		<description><![CDATA[众所周知，每一位Oracle数据库技术牛人，每一名Oracle DBA在谈到自己的成长历程或者分享学习经验时，都会强调阅读Oracle的官方文档的重要性和必要性。而Oracle提供的官方文档数量之多，范围之广让很多初学者都望而却步，尤其是对于英语基础不好的网友更是头痛不已。其实，就我个人而言，也是经历过诸多痛苦的。事实上，我想但凡每一位认认真真地阅读过官方文档的过来人都或多或少的会有同感。既然Oracle提供给我们的学习文档如此之多，那么我们又该选择哪些文档入手呢？
我的建议是，优先阅读也是最应该阅读 Oracle Database Concepts这本书，因为这本书涵盖了Oracle数据库的全部基本概念，多读此书，收获颇多。记得当初08年的时候，自学Oracle，备考Oracle 10g OCA时，自己坚持着把10g 版本的 Oracle Concepts 10g Release 2前2/3部分反复阅读了几次，得以对Oracle数据库算是有个基本了解。
本系列文章将以笔记的形式记录自己在阅读和学习Oracle 11gR2 Database Concepts 【文档编号为E16508-05】的心得和体会。一方面算是对自己的知识总结和记录，另一方面也希望这一系列的文章能够对广大Oracle数据库技术爱好者带来帮助。当然，如果有理解的不对或者是纰漏之处，还恳请广大网友及时回复给予指正。 好了，废话不再赘述。
Oracle 11gR2 Database Concepts第3章Page 57讲到Indexes and Index-Organized Tables，其中Page 59讲到Composite Indexes。
首先，我们创建测试表，并在该表上创建联合索引：


SQL&#62; conn / as sysdba
Connected.
SQL&#62; select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE    11.2.0.1.0    [...]]]></description>
		<wfw:commentRss>http://www.oracleonlinux.cn/2011/10/31/11g-concepts-notes1/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>10g utilities:How to use LogMiner I</title>
		<link>http://www.oracleonlinux.cn/2010/05/20/10ghow-to-use-logminer/</link>
		<comments>http://www.oracleonlinux.cn/2010/05/20/10ghow-to-use-logminer/#comments</comments>
		<pubDate>Wed, 19 May 2010 18:31:56 +0000</pubDate>
		<dc:creator>Asher</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.oracleonlinux.cn/?p=255</guid>
		<description><![CDATA[在对数据库做不完全恢复的时候，如果我们能够精确的定位到出错的时间点的话，那么，我们可以在很大的程度上一次性地保证不完全恢复成功。所以，问题也就是我们应该怎么能够准确定位这个人为错误（如误删除表，错误的提交DML）发生的时间？接下来，要跟大家分享一下关于10g里LogMiner这个“日志挖掘器”的用法，也就是，在Oracle 10g版本的数据库，应该怎么使用LogMiner：
首先：简单介绍一下LogMiner工具。LogMiner 是Oracle公司从产品8i以后提供的一个非常有实用价值的分析工具，使用该工具可以轻松获得Oracle Online redo logs或者Archived logs日志文件中的具体内容。日志文件中记录了所有对数据库的数据块儿进行过改变的操作，而Logminer正是可以挖掘日志文件的利器。
其次：该如何使用Logminer？在早期的数据库版本里，LogMiner在默认情况下，并没有安装，需要手工的以SYSDBA身份去执行$ORACLE_HOME/rdbms/admin/dbmslm.sql以及$ORACLE_HOME/rdbms/admin/dbmslmd.sql这两个脚本。前者是创建DBMS_LOGMNR package，后者用于创建DBMS_LOGMNR_D这个包。在10g版本的数据库，这两个PL/SQL 包默认已经创建，我们就无须再去执行那两个脚本，可以直接对其调用。
然后：需要说明的一点，在Oracle 10g数据库版本里面，默认情况下，联机日志文件记录的内容并非提供任何的Supplemental logging,也就是说默认情况下使用LogMiner只能看到DDL操作。要想看到DML操作的话，在DML操作产生新的日志记录之前我们要启用最低的Supplemental logging,而启用这一特性又分为在数据库级别以及表级别，以下简单演示在全库级别启用最低Supplemental logging:
确认当前数据库Supplemental logging:
SQL&#62; select supplemental_log_data_min from v$database;
SUPPLEME
--------
NO
启用Supplemental logging，以便可以通过LogMiner看到日志文件中记录的关于DML操作的相关信息：
SQL&#62; alter database add supplemental log data;
Database altered.
SQL&#62; select supplemental_log_data_min from v$database;
SUPPLEME
--------
YES
日志“挖掘&#8221;结束，可以禁用Supplemental logging：
SQL&#62; alter database drop supplemental log data;
Database altered.
接下来：该说说具体使用LogMiner的方法了：
使用方法1：
1.1确认数据库当前的日志文件信息：
SQL&#62; select * from v$log;
    GROUP#    THREAD#  SEQUENCE#    [...]]]></description>
		<wfw:commentRss>http://www.oracleonlinux.cn/2010/05/20/10ghow-to-use-logminer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

