<?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; Oracle</title>
	<atom:link href="http://www.oracleonlinux.cn/category/oracle/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.oracleonlinux.cn</link>
	<description>Oracle and Linux,I Love U.</description>
	<lastBuildDate>Wed, 30 Jun 2010 14:40: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>SQL:Group Functions</title>
		<link>http://www.oracleonlinux.cn/2010/05/25/group-functions/</link>
		<comments>http://www.oracleonlinux.cn/2010/05/25/group-functions/#comments</comments>
		<pubDate>Tue, 25 May 2010 07:24:48 +0000</pubDate>
		<dc:creator>Asher</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.oracleonlinux.cn/?p=310</guid>
		<description><![CDATA[


不可否认SQL语句的功能非常强大，但是，在大多数的时候，我们还是会在使用SQL语句的过程中，调用数据库内嵌的函数，通过函数来强化我们SQL语句的功能，以达到我们预期的目的，尤其是在满足一些应用程序对统计报表的需求情况下。
首先，简单说说单行函数（Single-Row Functions）。在Oracle数据库里，单行函数大概可以细分为Character function，Number function，Date function,Conversion function,General function。其实，Oracle数据库支持的函数足够多了，在这里不一一列举具体用法和使用规则了，我们应该清晰的一个概念就是：单行函数可以多次嵌套调用。
另外，大概说一下分组函数（Group Functions）。所谓分组函数跟单行函数的区别就是：单行函数是对数据源中的记录逐条分别作为函数的输入参数来处理，最终得到函数处理的结果。而分组函数就是把数据源中的记录按照某种特定的需求以分组的形式来作为函数的输入参数处理，最终得到处理的结果自然就是以组的形式区分开来。
来简单看一下，使用分组函数的语法规则：
SELECT    column, group_function(column)
FROM      table
[WHERE    condition]
[GROUP BY group_by_expression]
[ORDER BY column];
我们在使用分组函数的时候需要注意的几个地方就是：
①All columns in the SELECT list that are not in group functions must be in the GROUP BY clause.凡是出现在查询列表中的没有应用分组函数的字段必须要出现在GROUP BY子句中，否则报错。
②The GROUP BY column does not have to be in [...]]]></description>
		<wfw:commentRss>http://www.oracleonlinux.cn/2010/05/25/group-functions/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>10g utilities:How to use LogMiner II</title>
		<link>http://www.oracleonlinux.cn/2010/05/25/10g-utilitieshow-to-use-logminer-ii/</link>
		<comments>http://www.oracleonlinux.cn/2010/05/25/10g-utilitieshow-to-use-logminer-ii/#comments</comments>
		<pubDate>Mon, 24 May 2010 16:27:54 +0000</pubDate>
		<dc:creator>Asher</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.oracleonlinux.cn/?p=299</guid>
		<description><![CDATA[在上一篇日志里：我们了解了怎么使用LogMiner工具的第一种使用方法。接着，我们来学习下LogMiner工具的第二种使用方式：
在使用LogMiner之前，我们要确定相关的参数，也就是简单配置一下LogMiner工具使用的“环境”：
①配置一个用于将来存放LogMiner分析日志文件（online redo logs,archived logs）的结果路径和文件，这个路径和文件是映射在文件系统上的。这个文件可以认为是一个字典文件，但是这个字典文件跟数据库的数据字典文件完全是两码子事儿。对应的初始化参数是utl_file_dir，默认情况下，该参数没有配置。
②在调用LogMiner工具之前，在文件系统上生成这个字典文件。
③接下来调用LogMiner工具的方法跟第一种方法就完全类似了。
接下来，进入正式调用流程：
 I 首先：以SYS用户登录数据库，检查utl_file_dir初始化参数是否设置，或者设置是否正确，捎带看下数据库版本，以及操作系统版本：
SQL&#62; show user;
USER is "SYS"
SQL&#62; select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL&#62; !uname -a
Linux Oracle10g 2.6.9-55.ELsmp #1 SMP Wed May 2 [...]]]></description>
		<wfw:commentRss>http://www.oracleonlinux.cn/2010/05/25/10g-utilitieshow-to-use-logminer-ii/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to use order by clause ?</title>
		<link>http://www.oracleonlinux.cn/2010/05/23/how-to-use-order-by-clause/</link>
		<comments>http://www.oracleonlinux.cn/2010/05/23/how-to-use-order-by-clause/#comments</comments>
		<pubDate>Sun, 23 May 2010 15:26:00 +0000</pubDate>
		<dc:creator>Asher</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.oracleonlinux.cn/?p=291</guid>
		<description><![CDATA[在我们写SQL语句的时候，会经常用到order by子句来对查询结果进行排序。在这里对order by子句的使用，作一个简单的总结：
1 SQL语句中，order by从句永远并且一定是放在所有从句的最后位置处，也就是说，一个复杂的SQL语句中，可能会包含诸如group by子句,Where 子句等等。但是，不管有多少个从句跟在FROM关键字后面，order by从句一定是出现在所有子句的最后端，因为order by是对所有查询结果集的排序。如：
SQL&#62; SHOW USER;
USER is "HR"
SQL&#62; SELECT employee_id,last_name
  2  FROM employees
  3  WHERE employee_id&#62;200
  4  ORDER BY employee_id
  5  ;
EMPLOYEE_ID LAST_NAME
----------- -------------------------
        201 Hartstein
        202 Fay
 [...]]]></description>
		<wfw:commentRss>http://www.oracleonlinux.cn/2010/05/23/how-to-use-order-by-clause/feed/</wfw:commentRss>
		<slash:comments>1</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>
		<item>
		<title>Stay up for what</title>
		<link>http://www.oracleonlinux.cn/2010/05/13/stay-up-for-what/</link>
		<comments>http://www.oracleonlinux.cn/2010/05/13/stay-up-for-what/#comments</comments>
		<pubDate>Wed, 12 May 2010 18:55:28 +0000</pubDate>
		<dc:creator>Asher</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.oracleonlinux.cn/?p=257</guid>
		<description><![CDATA[NND,熬夜到现在，难道就是为了解决一个Oracle 10g 利用Export/Import 跨平台（Win32到Linux）并且伴随数据库字符集的问题吗？最终，最终，还是搞定了，稍后会有详细文档，记录下来，算是给自己一个交待：其中包括碰到若干个从前从未碰到过的错误：EXP-00046错误，字符集不兼容问题&#8230;&#8230;.
如果说是为了搞定上述若干问题，那么我想熬夜也值。
如果不是，那我还是趁现在赶紧上床，=_=
Send article as PDF to  
]]></description>
		<wfw:commentRss>http://www.oracleonlinux.cn/2010/05/13/stay-up-for-what/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
