<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Frederick Tang Weblog</title>
	<atom:link href="http://fredericktang.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://fredericktang.wordpress.com</link>
	<description>Stories about Oracle concepts I have learnt from work, and the occasional brain-dump...</description>
	<lastBuildDate>Wed, 28 Oct 2009 04:23:23 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='fredericktang.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/db95bef764bac18faa8a6ab2ef14281b?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Frederick Tang Weblog</title>
		<link>http://fredericktang.wordpress.com</link>
	</image>
			<item>
		<title>ORA-01652: unable to extend temp segment</title>
		<link>http://fredericktang.wordpress.com/2009/10/28/ora-01652-unable-to-extend-temp-segment/</link>
		<comments>http://fredericktang.wordpress.com/2009/10/28/ora-01652-unable-to-extend-temp-segment/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 04:18:12 +0000</pubDate>
		<dc:creator>fredericktang</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://fredericktang.wordpress.com/?p=185</guid>
		<description><![CDATA[This is a short explanation about one scenario where a SQL query can result in an ORA-01652 error, for the benefit of a database user instead of a DBA. The following has been tested on an Oracle10g (10.2.0.4) database.
This week during a routine check of a pre-production database I built, I found a couple of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=185&subd=fredericktang&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is a short explanation about one scenario where a SQL query can result in an ORA-01652 error, for the benefit of a database user instead of a DBA. The following has been tested on an Oracle10g (10.2.0.4) database.</p>
<p>This week during a routine check of a pre-production database I built, I found a couple of ORA-01652 errors in the alert log, so I proceeded to extract an AWR report over the timeframe of the error, in the hope that I could guess which SQL caused the error. But to simplify the scenario for this post, I will show a small demo case instead.</p>
<p>An ORA-01652 error typically means that a SQL query required more temporary segments than the temporary tablespace can provide. Temporary tablespace is typically used for sort operations, such as <em>joins, index builds, ordering, computing aggregates (GROUP BY), and collecting optimizer statistics</em> [<a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/physical.htm#i5901">source</a>].</p>
<p>Let&#8217;s just show a simple example:</p>
<pre class="brush: sql;">
SQL&gt; select * from mrt_alert order by alertname;
select * from mrt_alert order by alertname
              *
ERROR at line 1:
ORA-01652: unable to extend temp segment by 128 in tablespace FREDT_TEMP
</pre>
<p>The first thing that comes to mind might be report this error to your resident DBA, or simply extend the temporary tablespace to whatever is required. But how big do we need to extend this temporary tablespace to, so that our SQL query will work? Use Explain Plan.</p>
<pre class="brush: sql;">
SQL&gt; explain plan for
  2  select * from mrt_alert order by songname;

Explained.

SQL&gt; SELECT * FROM TABLE(dbms_xplan.display);

PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Plan hash value: 2703675187

----------------------------------------------------------------------------------------
| Id  | Operation          | Name      | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
----------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |           |   320K|   153M|       | 39661   (1)| 00:07:56 |
|   1 |  SORT ORDER BY     |           |   320K|   153M|   384M| 39661   (1)| 00:07:56 |
|   2 |   TABLE ACCESS FULL| MRT_ALERT |   320K|   153M|       |  5405   (2)| 00:01:05 |
----------------------------------------------------------------------------------------

9 rows selected.
</pre>
<p>The Explain Plan tells us the SORT ORDER BY operation requires 384MB of <strong>free</strong> temporary tablespace. The temporary tablespace is usually shared between other database users in the database. Remember to have uptodate statistics on the table, otherwise, the Explain Plan will show non-accurate information. In 10g, this is mostly done for you via the nightly dbms_stats scheduled job run.</p>
<p>Before shooting a request straight to our DBA to ensure the temporary tablespace have more than 384MB of free space, it&#8217;s necessary to just do a sanity check on our SQL query. For example:</p>
<p>1. How many rows are there in our table, so much that we need 384MB of space to sort?<br />
2. Can we reduce the number of columns to view?<br />
3. Can we limit our results by adding some conditions using the WHERE clause?</p>
<pre class="brush: sql;">
SQL&gt; select count(*) from mrt_alert;

  COUNT(*)
----------
    320203
SQL&gt; select bytes/1024/1024 as MB from user_segments
  2  where segment_name='MRT_ALERT';

        MB
----------
       192
</pre>
<p>If we are only interested in one column for example, then we need less space for the SORT ORDER BY operation. As we can show below, we reduced the Temporary Segments required from 384MB to 19MB, but selecting only one column.</p>
<pre class="brush: sql;">
SQL&gt; explain plan for
  2  select alertname from mrt_alert order by alertname;

Explained.

SQL&gt;
SQL&gt; SELECT * FROM TABLE(dbms_xplan.display);

PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Plan hash value: 2703675187

----------------------------------------------------------------------------------------
| Id  | Operation          | Name      | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
----------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |           |   320K|  7192K|       |  7618   (2)| 00:01:32 |
|   1 |  SORT ORDER BY     |           |   320K|  7192K|    19M|  7618   (2)| 00:01:32 |
|   2 |   TABLE ACCESS FULL| MRT_ALERT |   320K|  7192K|       |  5401   (2)| 00:01:05 |
----------------------------------------------------------------------------------------

9 rows selected.
</pre>
<p>It is possible to further reduce space required for the SORT ORDER BY operation, by adding some conditions using a WHERE clause. First let&#8217;s start with the demonstration before explaining what&#8217;s going on.</p>
<pre class="brush: sql;">
SQL&gt; explain plan for
  2  select alertname from mrt_alert where alertname like 'A%' order by alertname;

Explained.

SQL&gt; SELECT * FROM TABLE(dbms_xplan.display);

PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Plan hash value: 1920725646

-------------------------------------------------------------------------------------
| Id  | Operation          | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
-------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |                |  3895 | 89585 |  5308   (2)| 00:01:04 |
|   1 |  SORT ORDER BY     |                |  3895 | 89585 |  5308   (2)| 00:01:04 |
|*  2 |   TABLE ACCESS FULL| MRT_ALERT      |  3895 | 89585 |  5306   (2)| 00:01:04 |
-------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - filter(&quot;ALERTNAME&quot; LIKE 'A%')

14 rows selected.
</pre>
<p>We can see that the TempSpc column in our Explain Plan has disappeared. Shervin provided a very simple explanation <a href="http://oradbatips.blogspot.com/2008/02/tip-69-estimate-temp-usage-without.html">here</a>. Basically, when the disk based temporary tablespace is not required, the TempSpc column is not shown.</p>
<p>Metalink Note: 102339.1 <em>Temporary Segments: What Happens When a Sort Occurs</em> further explains &#8220;<em>the sort area allocated inside the Program Global Area (PGA) is used first. If the sort operation needs additional memory, then the sorted rows  are written to disk to free up the sort area so that it can be  re-used for the remaining sort. This means that temporary segments are created.</em>&#8220;. In simple words, if the sort can be done in memory, it won&#8217;t resort to disk.</p>
<p>So there, we have managed reduce the Temporary Segments usage from 384MB to 19MB, and with a WHERE clause, the SORT ORDER BY operation can be done entirely in memory, and we don&#8217;t even have to rely on Temporary Segments (i.e. 0MB). Therefore, we don&#8217;t have to talk to our DBA about adding more space to the Temporary Tablespace.</p>
<p>There is additionally one extra step we can do however, which can eliminate a SORT ORDER BY operation altogether. This is done by introducing a B*Tree index.</p>
<pre class="brush: sql;">
SQL&gt; create index IX_MRT_ALERT_2 on MRT_ALERT(ALERTNAME);

Index created.

SQL&gt; exec dbms_stats.gather_index_stats(user, 'IX_MRT_ALERT_2');

PL/SQL procedure successfully completed.

SQL&gt; explain plan for
  2  select alertname from mrt_alert where alertname like 'A%'
  3  order by alertname;

Explained.

SQL&gt; SELECT * FROM TABLE(dbms_xplan.display);

PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Plan hash value: 249942460

-------------------------------------------------------------------------------------
| Id  | Operation        | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
-------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT |                  |  3895 | 89585 |    21   (0)| 00:00:01 |
|*  1 |  INDEX RANGE SCAN| IX_MRT_ALERT     |  3895 | 89585 |    21   (0)| 00:00:01 |
-------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   1 - access(&quot;ALERTNAME&quot; LIKE 'A%')
       filter(&quot;ALERTNAME&quot; LIKE 'A%')

14 rows selected.
</pre>
<p>As can be observed from the Explain Plan, Oracle uses Index Range Scan to retrieve results that satisfy our WHERE clause. The result of an Index Range Scan returns results in an order &#8211; in this case, a VARCHAR2 column &#8211; alphabetical order. Therefore, Oracle can avoid a SORT ORDER BY operation as the results is already ordered.</p>
<p>There&#8217;s a caveat though, in Metalink Note: 67409.1 <em>When will an ORDER BY statement use an Index</em>, &#8220;<em>Oracle explains that the index is only used when the column must be NOT NULL, otherwise, the index will not be considered</em>&#8220;. It then gives an explanation for this behaviour which I won&#8217;t copy and paste here.</p>
<p><strong>Conclusion</strong><br />
I guess I have presented an over-simplified scenario here, and the SQL query you are testing might be a lot more complex than this, but it is important to just do some sanity checks before asking a DBA to increase database resource capacity.</p>
<p>I have shown some steps where it is possible to reduce Temporary Segments usage, and with a clever usage of an index, to complete remove the need to perform a SORT. Having said all the above, if you do require the additional Temporary Segments, then by all means, go for it!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredericktang.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredericktang.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredericktang.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredericktang.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredericktang.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredericktang.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredericktang.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredericktang.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredericktang.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredericktang.wordpress.com/185/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=185&subd=fredericktang&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fredericktang.wordpress.com/2009/10/28/ora-01652-unable-to-extend-temp-segment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9edbce5b92b99efa9994731f963bf783?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredericktang</media:title>
		</media:content>
	</item>
		<item>
		<title>sys_connect_by_path and ORA-01489</title>
		<link>http://fredericktang.wordpress.com/2009/10/21/sys_connect_by_path-and-ora-01489/</link>
		<comments>http://fredericktang.wordpress.com/2009/10/21/sys_connect_by_path-and-ora-01489/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 01:38:36 +0000</pubDate>
		<dc:creator>fredericktang</dc:creator>
				<category><![CDATA[9i]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://fredericktang.wordpress.com/?p=174</guid>
		<description><![CDATA[This is strictly on an issue on a Oracle9i database. It has been fixed in Oracle10g.
Just would like to write a brief note about a test case we found with using sys_connect_by_path to concatenate values on a column from multiple rows into one string, on an Oracle9i database. 
This technique has been discussed on a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=174&subd=fredericktang&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong>This is strictly on an issue on a Oracle9i database. It has been fixed in Oracle10g.</strong></p>
<p>Just would like to write a brief note about a test case we found with using sys_connect_by_path to concatenate values on a column from multiple rows into one string, on an Oracle9i database. </p>
<p>This technique has been discussed on a few websites:<br />
http://www.williamrobertson.net/documents/one-row.html<br />
http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php<br />
http://www.oracle.com/technology/oramag/code/tips2006/101606.html</p>
<p>As we might all know, VARCHAR2 in Oracle 9i has a limit of 4000 bytes (note, not characters). This limits applies to string concatenation, and will (or should) result in <em>ORA-01489:  result of string concatenation is too long</em> if the result of concatenation yields a string greater than 4000 bytes in length. Eddie has demonstrated some examples here: http://awads.net/wp/2005/12/06/more-on-generating-strings/</p>
<p>I discovered a difference in behaviour when concatenating strings using sys_connect_by_path on Oracle9i, between a Multibyte character set database and a Single-byte character set database, where I would get an ORA-01489 error at just over the 2000 bytes mark on a Multibyte database. For example, UTF8 is Multibyte and WE8ISO8859P1 is a Single-byte character set. (http://download.oracle.com/docs/cd/B10501_01/server.920/a96529/appa.htm#956722)</p>
<p><em>There are a couple of ways to find out which character set the database is built on (requires dba privilege or select_catalog_role granted):</p>
<pre class="brush: css;">
select value$ from props$ where name='NLS_CHARACTERSET';
select * from database_properties where property_name='NLS_CHARACTERSET';
</pre>
<p></em></p>
<p>We construct a simple test case, a table with an ID column, and a VARCHAR2 column. I am going to insert a fixed string of 10 characters into the VARCHAR2 column, then apply the string concatenation technique using sys_connect_by_path. I am not using any special characters, so each character should just be 1 byte. It is possible to get size of a varchar2 string using vsize().</p>
<pre class="brush: css;">
create table test_concat_sys
(
   id     number,
   str    varchar2(4000)
);

insert into test_concat_sys
SELECT 1 as id, '1111111111' RNDMSTR
FROM all_objects
WHERE rownum &lt;= 200;

commit;
</pre>
<p>On a UTF8 character set database, this will work, and the last row will be 2002 bytes (182&#215;10+182). That&#8217;s 182 rows of 10 bytes, plus 1 byte for each &#8216;/&#8217; in the concatenation delimiter.</p>
<pre class="brush: css;">
SELECT VSIZE(SYS_CONNECT_BY_PATH(str, '/')) as BYTES
FROM
(
   select A.*, row_number() over (partition by id order by id) row#
   from test_concat_sys A
   where rownum &lt;= 182
)
START WITH row#=1
CONNECT BY PRIOR id=id and prior row# = row# -1;
</pre>
<p>This will result in an ORA-01489 error:</p>
<pre class="brush: css;">
SELECT VSIZE(SYS_CONNECT_BY_PATH(str, '/')) as BYTES
FROM
(
   select A.*, row_number() over (partition by id order by id) row#
   from test_concat_sys A
   where rownum &lt;= 183
)
START WITH row#=1
CONNECT BY PRIOR id=id and prior row# = row# -1;
</pre>
<p>The behavior is working as expected on a Oracle 9i Single-byte database or an Oracle10g (or later) release, and we can set rownum upto 363 rows (363&#215;10+363 = 3993), one more row and it will return ORA-01489 as expected since we will reach the limit (364&#215;10+364 = 4004).</p>
<p>I have logged a SR for this, and the reply from Oracle was that they &#8220;officially accepted this is the right candidate for bug.&#8221;, but &#8220;9i is in sustaining support mode and development will not provide any fix for this. Also this issue is fixed in 10g so they would not accept it.&#8221;</p>
<p>All the more reason to upgrade to 10g if not already done so. This bug is rather odd to hit because we wouldn&#8217;t normally expect to concatenate a string upto 2000 characters and beyond. But in our case, the business obviously did.</p>
<p>There are other ways to concatenate strings from multiple rows, they are also covered in the websites linked at the beginning of this article.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredericktang.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredericktang.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredericktang.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredericktang.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredericktang.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredericktang.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredericktang.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredericktang.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredericktang.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredericktang.wordpress.com/174/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=174&subd=fredericktang&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fredericktang.wordpress.com/2009/10/21/sys_connect_by_path-and-ora-01489/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9edbce5b92b99efa9994731f963bf783?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredericktang</media:title>
		</media:content>
	</item>
		<item>
		<title>impdp ORA-06550 ORA-00917</title>
		<link>http://fredericktang.wordpress.com/2009/09/14/impdp-ora-06550-ora-00917/</link>
		<comments>http://fredericktang.wordpress.com/2009/09/14/impdp-ora-06550-ora-00917/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 00:28:47 +0000</pubDate>
		<dc:creator>fredericktang</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://fredericktang.wordpress.com/?p=171</guid>
		<description><![CDATA[Just want to quickly write about this bug.
I created a Datapump export (expdp) of a partitioned table from an Oracle 10.2.0.3 database, and import (impdp) into an Oracle 10.2.0.4 database.
During impdp, everything worked well until importing statistics, then the process ran into the following errors:
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
ORA-39083: Object type TABLE_STATISTICS failed to create with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=171&subd=fredericktang&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just want to quickly write about this bug.</p>
<p>I created a Datapump export (expdp) of a partitioned table from an Oracle 10.2.0.3 database, and import (impdp) into an Oracle 10.2.0.4 database.</p>
<p>During impdp, everything worked well until importing statistics, then the process ran into the following errors:</p>
<p>Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS<br />
ORA-39083: Object type TABLE_STATISTICS failed to create with error:<br />
ORA-06550: line 12, column 17:<br />
PL/SQL: ORA-00917: missing comma<br />
ORA-06550: line 4, column 121:<br />
PL/SQL: SQL Statement ignored<br />
&#8230;</p>
<p>Turns out this is a bug with expdp/impdp partitioned table, described in Metalink Note &#8220;Bug 6862987 &#8211; impdp throws an error when importing partitioned table stats&#8221;, which happens &#8220;when importing statistics for tables if there are global statistics only.&#8221;. This bug is fixed in the 10.2.0.5 Patchset. The workaround is not to import statistics.</p>
<p>I dumped the sqlfile and had a look what&#8217;s really going on, it turns out there was a repeated syntax error with some of the INSERT statements:</p>
<p>INSERT INTO &#8220;SYS&#8221;.&#8221;IMPDP_STATS&#8221; (type, version,<br />
               c1, c2, c3, c4, c5, n1,<br />
               n2, n3, n4, n5, n6, n7, n8, n9, n10, n11,<br />
               d1, r1, r2, ch1, flags)<br />
       VALUES (&#8216;C&#8217;, 4, &#8216;HTTP_LOG&#8217;, &#8216;P20090921&#8242;, NULL, &#8216;PROTOCOL_ID&#8217;, &#8216;PBC_ADMIN&#8217;,<br />
       0, 0, 0, NULL, 0, NULL, NULL, 0, NULL, NULL, NULL,<br />
       &#8216;, NULL), NULL, NULL, NULL, 0);</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredericktang.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredericktang.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredericktang.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredericktang.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredericktang.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredericktang.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredericktang.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredericktang.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredericktang.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredericktang.wordpress.com/171/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=171&subd=fredericktang&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fredericktang.wordpress.com/2009/09/14/impdp-ora-06550-ora-00917/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9edbce5b92b99efa9994731f963bf783?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredericktang</media:title>
		</media:content>
	</item>
		<item>
		<title>PL/SQL Developer Associate</title>
		<link>http://fredericktang.wordpress.com/2009/08/05/plsql-developer-associate/</link>
		<comments>http://fredericktang.wordpress.com/2009/08/05/plsql-developer-associate/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 16:23:31 +0000</pubDate>
		<dc:creator>fredericktang</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://fredericktang.wordpress.com/?p=169</guid>
		<description><![CDATA[I have added another Certification to my bag, passing the 1Z0-147 Program with PL/SQL exam. I studied the Oracle documentation and used the Selftest software to prepare for this exam.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=169&subd=fredericktang&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have added another Certification to my bag, passing the 1Z0-147 Program with PL/SQL exam. I studied the Oracle documentation and used the Selftest software to prepare for this exam.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredericktang.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredericktang.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredericktang.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredericktang.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredericktang.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredericktang.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredericktang.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredericktang.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredericktang.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredericktang.wordpress.com/169/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=169&subd=fredericktang&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fredericktang.wordpress.com/2009/08/05/plsql-developer-associate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9edbce5b92b99efa9994731f963bf783?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredericktang</media:title>
		</media:content>
	</item>
		<item>
		<title>Completed OCE and OCA</title>
		<link>http://fredericktang.wordpress.com/2009/07/06/completed-oce-and-oca/</link>
		<comments>http://fredericktang.wordpress.com/2009/07/06/completed-oce-and-oca/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 12:11:13 +0000</pubDate>
		<dc:creator>fredericktang</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://fredericktang.wordpress.com/?p=167</guid>
		<description><![CDATA[I have taken a brief break from blogging for some personal reasons, and lately I have taken the time to pass and complete a couple of Oracle certifications: 1Z0-047 (Oracle Database SQL Expert Exam), and 1Z0-042 (Oracle Database 10g: Administration I Exam).
It&#8217;s certainly quite an experience. I must say on-the-job experience helped a lot, and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=167&subd=fredericktang&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have taken a brief break from blogging for some personal reasons, and lately I have taken the time to pass and complete a couple of Oracle certifications: 1Z0-047 (Oracle Database SQL Expert Exam), and 1Z0-042 (Oracle Database 10g: Administration I Exam).</p>
<p>It&#8217;s certainly quite an experience. I must say on-the-job experience helped a lot, and reading up the Oracle documentation helped me to learn a lot of concepts that I obviously overlooked, such as restrictions and notes about a specific feature.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredericktang.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredericktang.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredericktang.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredericktang.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredericktang.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredericktang.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredericktang.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredericktang.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredericktang.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredericktang.wordpress.com/167/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=167&subd=fredericktang&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fredericktang.wordpress.com/2009/07/06/completed-oce-and-oca/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9edbce5b92b99efa9994731f963bf783?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredericktang</media:title>
		</media:content>
	</item>
		<item>
		<title>Client side connect time load balancing for RAC</title>
		<link>http://fredericktang.wordpress.com/2009/03/13/client-side-connect-time-load-balancing-for-rac/</link>
		<comments>http://fredericktang.wordpress.com/2009/03/13/client-side-connect-time-load-balancing-for-rac/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 05:26:08 +0000</pubDate>
		<dc:creator>fredericktang</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[9i]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://fredericktang.wordpress.com/2009/03/13/client-side-connect-time-load-balancing-for-rac/</guid>
		<description><![CDATA[Recently, I took an interest in studying how various load balancing features work in a 10g RAC. I thought Jim has written a very good article on this, in a language most people can understand. In my opinion, there are 3 types of load balancing on a 10g RAC. I say in my opinion because [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=152&subd=fredericktang&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Recently, I took an interest in studying how various load balancing features work in a 10g RAC. I thought Jim has written a very good article on <a href="http://www.dbasupport.com/oracle/ora10g/LBA01.shtml" target="_blank">this</a>, in a language most people can understand. In my opinion, there are 3 types of load balancing on a 10g RAC. I say in my opinion because Run Time Load Balancing relies on Server Side Load Balancing configurations, but I have separated it out anyways.</p>
<ol>
<li>Client Side Load Balancing</li>
<li>Server Side Load Balancing</li>
<li><a href="http://youngcow.net/doc/oracle10g/java.102/b14355/rlb.htm" target="_blank">Run Time Load Balancing</a> (using Implicit Connection Cache)</li>
</ol>
<p>In this post, I wanted to test for evidence of Client Side Load Balancing, using Client Side Oracle Net Tracing.</p>
<p><strong>Definition</strong></p>
<p>Client Side Load Balancing is by definition &#8220;evenly spreads new connection requests across all listeners&#8221;, and &#8220;Oracle Database randomly selects an address in the address list and connects to that node&#8217;s listener. This provides a balancing of client connections across the available listeners in the cluster.&#8221; [<a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b25159/configbp.htm#sthref262" target="_blank">source</a>]. Another definition, &#8220;whereby if more than one listener services a single database, a client can randomly choose between the listeners for its connect requests. This randomization enables all listeners to share the burden of servicing incoming connect requests.&#8221; [<a href="http://download.oracle.com/docs/cd/B19306_01/network.102/b14213/glossary.htm#i431711" target="_blank">source</a>].</p>
<p>Client Side Load Balancing is configured by adding LOAD_BALANCE=ON in tnsnames.ora file. The Net Services Reference tells us how and were to embed this parameter &#8211; &#8220;embed this parameter <strong>under</strong> either the DESCRIPTION_LIST parameter, the DESCRIPTION parameter, or the ADDRESS_LIST parameter.&#8221; [<a href="http://download.oracle.com/docs/cd/B19306_01/network.102/b14213/tnsnames.htm#i468530" target="_blank">source</a>]. Note however, whether you place LOAD_BALANCE under ADDRESS_LIST or outside, will make a different in terms of load balancing ADDRESS_LISTs or load balancing ADDRESSes.</p>
<p><strong>Configuration</strong></p>
<p>I have a 2-node 10g RAC cluster, and for load balancing, I have the following entry in my tnsnames.ora file.</p>
<blockquote>
<pre>
MODDB=
 (description=
  (load_balance=on)
   (address=(protocol=tcp)(host=moddb1-vip)(port=2521))
   (address=(protocol=tcp)(host=moddb2-vip)(port=2521))
  (connect_data=
      (service_name=MODDB)
  )
 )
</pre>
</blockquote>
<p>I want to trace the Client Side Load Balancing behaviour from the client side, so I enable Oracle net tracing by adding the following lines in sqlnet.ora [<a href="http://download.oracle.com/docs/cd/B19306_01/network.102/b14212/troublestng.htm#sthref1734" target="_blank">source</a>], and I should fine trace files for each physical connection made under $ORACLE_HOME/network/trace.</p>
<blockquote>
<pre>
TRACE_LEVEL_CLIENT = USER
TRACE_FILE_CLIENT = SQLTRC
</pre>
</blockquote>
<p><strong>Testing a connection</strong></p>
<p>We can first test one connection&#8230;</p>
<blockquote>
<pre>
$ sqlplus -s tester/tester@MODDB

exit
</pre>
</blockquote>
<p>Now take a look at the trace file produced, under $ORACLE_HOME/network/trace. An inspection of of the trace file shows two entries that are of interest (it is possible to observe server-side load balancing as well, but that&#8217;s a topic for another post):</p>
<pre class="brush: sql;">
niotns: Calling address: (description=(load_balance=on)(failover=on)(address=(protocol=tcp)(host=moddb1-vip)(port=2521))(address=(protocol=tcp)(host=moddb2-vip)(port=2521))(connect_data=(service_name=MODDB)(CID=(PROGRAM=e:\oracle\product\10.2.0\client_1\bin\sqlplus.exe)(HOST=LADDO)(USER=tester))))
nsc2addr: (DESCRIPTION=(load_balance=on)(failover=on)(address=(protocol=tcp)(host=moddb2-vip)(port=2521))(connect_data=(service_name=MODDB)(CID=(PROGRAM=e:\oracle\product\10.2.0\client_1\bin\sqlplus.exe)(HOST=LADDO)(USER=tester))))
</pre>
<p>Unfortunately, I couldn&#8217;t find much documentation on how to read a trace file, I can only guess&#8230;</p>
<p>* niotns entry shows a lookup of tns information based on the service name I supplied &#8220;MODDB&#8221;.<br />
* nsc2addr entry shows Oracle Net connects to listener on moddb2-vip.</p>
<p>It&#8217;s difficult to observe load balancing with just one connection, so I wrote a script to run 1000 connections, using Bash Shell scripting:</p>
<blockquote>
<pre>
#!/bin/bash

for a in {1..1000}
do
echo $a
sqlplus -s tester/tester@MODDB&lt;&lt;EOF
EOF
done

exit 0
</pre>
</blockquote>
<p><strong>Examining the traces</strong></p>
<p>Extending the idea above, we can use a combination of <span style="font-family:Courier;">grep</span>, and <span style="font-family:Courier;">wc</span> to see the result of load balancing. For some reason, each connection produced 2 trace files, so we have 2000 trace files for 1000 connections.</p>
<blockquote>
<pre>
$ ls -l *.trc |wc -l
2000

$ grep nsc2addr *.trc | grep load_balance |grep moddb1-vip |wc -l
498

$ grep nsc2addr *.trc | grep load_balance |grep moddb2-vip |wc -l
502
</pre>
</blockquote>
<p>We can see over 1000 connections, 498 were made to moddb1-vip listener, whilst 502 were made to moddb2-vip listener. It is a fairly even distribution. But just how random is it? I have used the output of the trace files, and plot the first 100 connections on a scattered chart. The first note one can observe is that, these connections are not in a round-robin fashion. (1 = moddb1-vip; 2 = moddb2-vip)</p>
<p><img class="alignnone size-medium wp-image-155" title="timeplot" src="http://fredericktang.files.wordpress.com/2009/03/timeplot.png?w=300&#038;h=154" alt="timeplot" width="300" height="154" /></p>
<p><strong>Conclusion</strong></p>
<p>As demonstrated above, it is quite simple to setup Oracle Net tracing on the client, to test and show whether Client Side Load Balancing is working properly. It is worth to note (again), that this type of load balancing has nothing to do with balancing server side load. It is to do with balancing load across the listeners.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredericktang.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredericktang.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredericktang.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredericktang.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredericktang.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredericktang.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredericktang.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredericktang.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredericktang.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredericktang.wordpress.com/152/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=152&subd=fredericktang&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fredericktang.wordpress.com/2009/03/13/client-side-connect-time-load-balancing-for-rac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9edbce5b92b99efa9994731f963bf783?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredericktang</media:title>
		</media:content>

		<media:content url="http://fredericktang.files.wordpress.com/2009/03/timeplot.png?w=300" medium="image">
			<media:title type="html">timeplot</media:title>
		</media:content>
	</item>
		<item>
		<title>Yonex Nanospeed 7000</title>
		<link>http://fredericktang.wordpress.com/2009/02/16/yonex-nanospeed-7000/</link>
		<comments>http://fredericktang.wordpress.com/2009/02/16/yonex-nanospeed-7000/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 05:04:05 +0000</pubDate>
		<dc:creator>fredericktang</dc:creator>
				<category><![CDATA[Social]]></category>

		<guid isPermaLink="false">http://fredericktang.wordpress.com/2009/02/16/yonex-nanospeed-7000/</guid>
		<description><![CDATA[Having recently broken my Yonex Nanospeed 6000 racquet, I purchased a Yonex Nanospeed 7000 racquet. I thought I would write a few random thoughts&#8230; 
Disclaimer: I am certainly not a graded badminton player, and I play casually at my local club mainly doing doubles. The following thoughts are my own impressions, given my play style, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=148&subd=fredericktang&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Having recently broken my Yonex Nanospeed 6000 racquet, I purchased a Yonex Nanospeed 7000 racquet. I thought I would write a few random thoughts&#8230; </p>
<p>Disclaimer: I am certainly not a graded badminton player, and I play casually at my local club mainly doing doubles. The following thoughts are my own impressions, given my play style, experiences and skills (or lack thereof). Always consult experts when choosing your own racquet.</p>
<p>I have been reading badminton forums a lot about how to choose a racquet. I found that it was important to first understand my own play style &#8211; receive or control based, or smash based, and the speed of my racquet swing&#8230; etc. Secondly, it was really important to learn some of the terminology used to describe a badminton racquet like head light/heavy, extra-stiff/stiff/flex, grip size&#8230; etc, because it helps to establish some criteria to choose a racquet. If you are into the Yonex brand, make sure you take a look at their latest Yonex Racquet Chart (search google).</p>
<p>I read on some forum post that 95% of the game depends on techniques, and 5% on racquet. This is true because no matter how fancy is the racquet you are wielding, if you don&#8217;t have the skills to go with it, its power is not maximised. But I would add that choosing the wrong racquet that doesn&#8217;t suit your own style can actually worse your game.</p>
<p>&nbsp;</p>
<p>NS6000:</p>
<ul>
<li>A head-light racquet, feels a bit funny at first but can get used to it at play time.</li>
<li>I bought this racquet based on a local retail shop&#8217;s recommendation. I told them the majority of my game is doubles and received based. </li>
<li>Sometimes I don&#8217;t feel the shuttle hitting the racquet, a bit too soft&#8230; </li>
<li>Very easy to manoeuvre and defend smashes with&#8230; (but in the end, I thought to myself, something must be wrong with my game if I am always in a defensive position).</li>
<li>Paints were chipping off quiet easily (or you may like to say I am very rough)&#8230;</li>
<li>A flexible shaft racquet, plays well with whippy action. Clears are no problems if I *whip* it properly.</li>
<li>A bit hard to smash with, really have to try hard.</li>
<li>I can perform drops pretty well with this racquet (but not as good as the NS7000).</li>
<li>My net game is quite poor, so I can&#8217;t comment on this.</li>
</ul>
<p>&nbsp;</p>
<p>NS7000:</p>
<ul>
<li>A head-light racquet, but I feel it is not as light as NS6000. It has a much more solid feel than NS6000.</li>
<li>I bought this racquet based on what I read in the forums, tried a few swings in the shops. It was a decision between NS7000 and NS8000, but the NS8000 is classed as extra-stiff, which I was a bit weary of&#8230; I wanted to defend well, but be a bit more attacking when opportunities arise. I smash quite a bit&#8230;</li>
<li>It has a stiff shaft, as opposed to a flexible shaft on a NS6000. Which I think a faster swing is required to generate the power. Not very good for *whippy* style&#8230; It took some getting used before I can hit the shuttle properly.</li>
<li>Techniques and especially footwork has to be spot on with this racquet. Hitting without the right technique will likely result in lollypopping into opponent&#8217;s mid-court for a smash.</li>
<li>Drops are much more accurate, and controlled.</li>
<li>Smashes are more powerful, a little faster than what I can do with NS6000.</li>
</ul>
<p>&nbsp;</p>
<p>Head-heavy racquets are definitely not for me, I tried hitting with Arcsaber 10, it&#8217;s a bit too heavy for me to handle, maybe because of my weak wrist&#8230; In summary, I am quite happy with my new purchase&#8230;. now if only I can improve on my techniques and stamina on the court <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredericktang.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredericktang.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredericktang.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredericktang.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredericktang.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredericktang.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredericktang.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredericktang.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredericktang.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredericktang.wordpress.com/148/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=148&subd=fredericktang&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fredericktang.wordpress.com/2009/02/16/yonex-nanospeed-7000/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9edbce5b92b99efa9994731f963bf783?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredericktang</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing Oracle10g JAccelerator (NCOMP) on Solaris 10 (SPARC)</title>
		<link>http://fredericktang.wordpress.com/2009/01/21/installing-oracle10g-jaccelerator-ncomp-on-solaris-10-sparc/</link>
		<comments>http://fredericktang.wordpress.com/2009/01/21/installing-oracle10g-jaccelerator-ncomp-on-solaris-10-sparc/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 06:02:15 +0000</pubDate>
		<dc:creator>fredericktang</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://fredericktang.wordpress.com/2009/01/21/installing-oracle10g-jaccelerator-ncomp-on-solaris-10-sparc/</guid>
		<description><![CDATA[Let&#8217;s suppose you find the need to natively compile some Java code on an Oracle10g database, then you would need to have JAccelerator (NCOMP) installed. I have prepared a few installations steps to follow that worked for me. It took me a few days to work this out&#8230;
Disclaimer: These steps were tested on Solaris 10 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=143&subd=fredericktang&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Let&#8217;s suppose you find the need to natively compile some Java code on an Oracle10g database, then you would need to have <a href="http://download.oracle.com/docs/cd/B19306_01/java.102/b14187/chten.htm" target="_blank">JAccelerator (NCOMP)</a> installed. I have prepared a few installations steps to follow that worked for me. It took me a few days to work this out&#8230;</p>
<p>Disclaimer: These steps were tested on Solaris 10 SPARC platform, with a Oracle10g 10.2.0.4 standalone database. Best efforts were made to ensure the steps are correct, but please take extra care when executing them on your platform. Do not run this on your Production environment if you are unsure what it will do.</p>
<p>Let&#8217;s start from the beginning&#8230;</p>
<p>1. To find out whether you have NCOMP installed, there are two things you can do:</p>
<blockquote>
<pre>
select dbms_java.full_ncomp_enabled from dual
*
ERROR at line 1:
ORA-29558: JAccelerator (NCOMP) not installed. Refer to Install Guide for
instructions.
ORA-06512: at "SYS.DBMS_JAVA", line 236
</pre>
</blockquote>
<p>&nbsp;</p>
<p>or try executing this on command line, which should show two lines if NCOMP is installed. </p>
<blockquote>
<pre>
$ORACLE_HOME/OPatch/opatch lsinventory -detail |grep JAccelerator
JAccelerator (COMPANION)                                             10.2.0.1.0
JAccelerator (COMPANION) Patch                                       10.2.0.4.0
</pre>
</blockquote>
<p>&nbsp;
<p>2. Suppose NCOMP is not installed, then you would need to get the Oracle10g Companion CD (downloadable <a href="http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201sol64soft.html" target="_blank">here</a>). Run the installer, and select the &#8220;Oracle Database 10g Products&#8221; option which will install into your existing Oracle home. Full installation guide is available <a href="http://download.oracle.com/docs/cd/B19306_01/install.102/b15694/install_sw.htm" target="_blank">here</a>. This will install JAccelerator 10.2.0.1.0 along with other 10g Companion products. If you run the opatch command again, you should now see JAccelerator listed.
<p>&nbsp;
<p>3. Next, we need to patch JAccelerator to the latest patchset &#8211; 10.2.0.4. Download the 10.2.0.4 patchset from Metalink and start the installer as usual. Metalink Note 293658.1 explains that the OUI will see the new components installed and only install the 10.2 patches associated to the new products. Re-run catupgrd.sql and utlrp.sql .
<p><a href="http://fredericktang.files.wordpress.com/2009/01/10204-1.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="192" alt="10204_1" src="http://fredericktang.files.wordpress.com/2009/01/10204-1-thumb.png?w=244&#038;h=192" width="244" border="0"></a> <a href="http://fredericktang.files.wordpress.com/2009/01/10204-2.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="192" alt="10204_2" src="http://fredericktang.files.wordpress.com/2009/01/10204-2-thumb.png?w=244&#038;h=192" width="244" border="0"></a>
<p>&nbsp;</p>
<p>4. After completing the patchset installation, re-running the first two checks should show you some good news.</p>
<blockquote>
<pre>
SQL&gt; select dbms_java.full_ncomp_enabled from dual;

FULL_NCOMP_ENABLED
----------------------------------------------------
OK
</pre>
</blockquote>
<p>&nbsp;</p>
<blockquote>
<pre>
$ORACLE_HOME/OPatch/opatch lsinventory -detail |grep JAccelerator
JAccelerator (COMPANION)                                             10.2.0.1.0
JAccelerator (COMPANION) Patch                                       10.2.0.4.0
</pre>
</blockquote>
<p>&nbsp;</p>
<p>5. Before one can natively compile anything, we need to follow a few more steps as documented <a href="http://download.oracle.com/docs/cd/B19306_01/java.102/b14187/chten.htm#BABDJAEB" target="_blank">here</a>. Verify a C compiler and linker is installed, and the ncomp properties file knows their full path. Suppose your platform is like mine, then it means you probably need a proper C compiler:</p>
<blockquote>
<pre>
$ which cc
/usr/ucb/cc
$ cc
/usr/ucb/cc:  language optional software package not installed
</pre>
</blockquote>
<p>&nbsp;
<p>6. Metalink Note: 43208.1 documents a list of Certified Compilers. For Solaris SPARC: </p>
<blockquote>
<pre>
* 10.1.0 Sun ONE Studio 8, C/C++ 5.5
* 10.2.0 Sun ONE Studio 8, C/C++ 5.5
* 11.1.0 Sun ONE Studio 11, C/C++ 5.8
Note: Sun ONE Studio 8 or higher is supported with 9.2, 10.1, 10.2
</pre>
</blockquote>
<p>&nbsp;</p>
<p>In any case, I downloaded Sun Studio 11 software <a href="http://developers.sun.com/sunstudio/downloads/previous/index.jsp" target="_blank">here</a>. This software installation requires root privilege and installs the C compiler into /opt/SUNWspro by default. Check all system requirements before installation. As an aside, I also tried gcc 3.4.6 but NCOMP didn&#8217;t like it very much&#8230;
<p>&nbsp;
<p>7. After the Sun Studio software is installed, update the PATH and LD_LIBRARY_PATH environment variables, e.g.  </p>
<blockquote>
<pre>
export PATH=/opt/SUNWspro/bin:$PATH
export LD_LIBRARY_PATH=/opt/SUNWspro/lib:$LD_LIBRARY_PATH
</pre>
</blockquote>
<p>&nbsp;
<p>8. Inside the $ORACLE_HOME/javavm/jahome directory, you will possibly find two properties files. </p>
<blockquote>
<pre>
$ grep 'CC =' Settings*.properties
Settings.properties:CC = cc
Settings_os.properties:CC = /opt/SunProd/SUNWspro8/bin/cc
</pre>
</blockquote>
<p>&nbsp;</p>
<p>Update these two lines to the C compiler location, such that if I do another grep:</p>
<blockquote>
<pre>
Settings.properties:CC = /opt/SUNWspro/bin/cc
Settings_os.properties:CC = /opt/SUNWspro/bin/cc
</pre>
</blockquote>
<p>&nbsp;</p>
<p>9. We are just about done&#8230; to enable the database user to perform native compilation, the user needs to be granted certain privileges as documented <a href="http://download.oracle.com/docs/cd/B19306_01/java.102/b14187/chten.htm#BABDJAEB" target="_blank">here</a>, where /app/oracle/10/db is my $ORACLE_HOME:</p>
<blockquote>
<pre>
grant java_deploy to fredt;
grant javasyspriv to fredt;
call dbms_java.grant_permission('FREDT', 'java.io.FilePermission', '/app/oracle/10/db/-', 'read,write');
</pre>
</blockquote>
<p>&nbsp;</p>
<p>10. We can now ncomp away!</p>
<blockquote>
<pre>ncomp -u fredt/fredt@MODDB &lt;myJar.jar&gt;
</pre>
</blockquote>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredericktang.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredericktang.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredericktang.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredericktang.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredericktang.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredericktang.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredericktang.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredericktang.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredericktang.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredericktang.wordpress.com/143/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=143&subd=fredericktang&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fredericktang.wordpress.com/2009/01/21/installing-oracle10g-jaccelerator-ncomp-on-solaris-10-sparc/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9edbce5b92b99efa9994731f963bf783?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredericktang</media:title>
		</media:content>

		<media:content url="http://fredericktang.files.wordpress.com/2009/01/10204-1-thumb.png" medium="image">
			<media:title type="html">10204_1</media:title>
		</media:content>

		<media:content url="http://fredericktang.files.wordpress.com/2009/01/10204-2-thumb.png" medium="image">
			<media:title type="html">10204_2</media:title>
		</media:content>
	</item>
		<item>
		<title>PL/SQL Instrumentation using ILO</title>
		<link>http://fredericktang.wordpress.com/2009/01/13/plsql-instrumentation-using-ilo/</link>
		<comments>http://fredericktang.wordpress.com/2009/01/13/plsql-instrumentation-using-ilo/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 07:11:50 +0000</pubDate>
		<dc:creator>fredericktang</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[9i]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://fredericktang.wordpress.com/2009/01/13/plsql-instrumentation-using-ilo/</guid>
		<description><![CDATA[I worked on a project to develop a domain index using the Oracle Data Cartridge Interface last year, When I was testing my code, I needed to know what the progress and state of the PL/SQL execution, and found dbms_output.put_line() inadequate as it only outputs when the call is returned to SQL*Plus, i.e. the output [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=132&subd=fredericktang&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I worked on a project to develop a domain index using the <a href="http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96595/dci01wht.htm" target="_blank">Oracle Data Cartridge Interface</a> last year, When I was testing my code, I needed to know what the progress and state of the PL/SQL execution, and found dbms_output.put_line() inadequate as it only outputs when the call is returned to SQL*Plus, i.e. the output is not displayed during run-time. This is better explained by <a href="http://thinkoracle.blogspot.com/2005/10/dbmsoutputputline.html" target="_blank">Robert Vollman</a>. That was until <a href="http://yaocm.wordpress.com/" target="_blank">Douglas</a> showed me how to use DBMS_APPLICATION_INFO, MODULE, ACTION and CLIENT_INFO.</p>
<p>Whilst reading blogs of my favourite Oracle bloggers, I found <a href="http://www.method-r.com/software/ilo-info" target="_blank">Instrumentation Library for Oracle</a> (ILO) developed by Method-R, presented <a href="http://www.method-r.com/downloads/cat_view/37-presentations" target="_blank">here</a> by Karen Morton. Instrumentation is described by Tom Kyte in this <a href="http://tkyte.blogspot.com/2005/06/instrumentation.html" target="_blank">blog post</a>. The idea behind ILO is quite interesting, a <a href="http://technology.amis.nl/blog/2178/odtug-kaleidoscope-hotsos-instrumentation-library-for-oracle" target="_blank">comment</a> by Cary Millsap reveals the motivation behind this tool. I downloaded ILO 2.2, installed it on my 10g test database and test ran a very simple test case. I will write a few words about what I found.</p>
<p>I start off with a very simple test code, I granted myself privilege to execute dbms_lock:</p>
<pre class="brush: css;">
DECLARE
BEGIN
   -- Start Task 1
   ILO_TASK.BEGIN_TASK(module=&gt;'ILO Tester', action=&gt;'Task 1', comment=&gt;'Time 0s', begin_time=&gt;sysdate);
   dbms_lock.sleep(10);
   -- Start Task 2
   ILO_TASK.BEGIN_TASK(module=&gt;'ILO Tester', action=&gt;'Task 2', comment=&gt;'Time 10s',begin_time=&gt;sysdate);
   dbms_lock.sleep(10);

   -- End Task 1
   ILO_TASK.END_TASK(end_time=&gt;sysdate);
   -- End Task 2
   ILO_TASK.END_TASK(end_time=&gt;sysdate);
EXCEPTION
   WHEN OTHERS
   THEN
      dbms_output.put_line('Exception thrown');
      ILO_TASK.END_ALL_TASKS(p_error_num=&gt;SQLCODE, p_end_time=&gt;sysdate);
   END;
</pre>
<p>I am logged on the database using SQL*Plus, before I execute the above PL/SQL block, my session information looks like this:</p>
<blockquote>
<pre>
SQL&gt; select module, action, client_info from v$session where username='FREDT';

MODULE          ACTION          CLIENT_INFO
--------------- --------------- ---------------
SQL*Plus
</pre>
</blockquote>
<p>When the PL/SQL block is executed:</p>
<blockquote>
<pre>
MODULE          ACTION          CLIENT_INFO
--------------- --------------- ---------------
ILO Tester      Task 1
</pre>
</blockquote>
<p>10 seconds later inside the PL/SQL block:</p>
<blockquote>
<pre>
MODULE          ACTION          CLIENT_INFO
--------------- --------------- ---------------
ILO Tester      Task 2
</pre>
</blockquote>
<p>10 seconds more, and PL/SQL block exits:</p>
<blockquote>
<pre>
MODULE          ACTION          CLIENT_INFO
--------------- --------------- ---------------
SQL*Plus
</pre>
</blockquote>
<p>ILO manages tasks in a stack like data structure, therefore, a developer can start multiple tasks using BEGIN_TASK and end the last (started) task using END_TASK, or end all tasks using END_ALL_TASKS. To view session information, one needs either DBA or SELECT ANY DICTIONARY privilege.</p>
<p>This most basic use of ILO requires continuous query on v$session to get anything meaningful. If one wants to take this further, ILO provides the framework to do so. For example, one can enable tracing by inserting this line of code at the beginning of the PL/SQL block (after the line BEGIN):</p>
<blockquote>
<pre>
ILO_TIMER.set_mark_all_tasks_interesting(true, true);
</pre>
</blockquote>
<p>A trace file will be produced in USER_DUMP_DEST, and one can find ILO information inside the trace file. It seems feasible to develop a script which can extract this information out of a trace file into something meaningful or simply more human-readable:</p>
<pre class="brush: css;">
ILO_TASK.BEGIN_TASK[][ILO Tester][Task 1][oracle~pts/2~sqlplus@moddb1 (TNS V1-V3)~SYS$USERS][Time 0s]
*** 2009-01-13 16:50:02.919
*** ACTION NAME: (Task 1) 2009-01-13 16:50:02.919
*** MODULE NAME: (ILO Tester) 2009-01-13 16:50:02.919

ILO_TASK.BEGIN_TASK[][ILO Tester][Task 2][oracle~pts/2~sqlplus@moddb1 (TNS V1-V3)~SYS$USERS][Time 10s]
*** 2009-01-13 16:50:12.921
*** ACTION NAME: (Task 2) 2009-01-13 16:50:12.921
*** MODULE NAME: (ILO Tester) 2009-01-13 16:50:12.921

ILO_TASK.END_TASK[][ILO Tester][Task 2][oracle~pts/2~sqlplus@moddb1 (TNS V1-V3)~SYS$USERS][Time 10s][]
*** ACTION NAME: (Task 1) 2009-01-13 16:50:22.931
*** MODULE NAME: (ILO Tester) 2009-01-13 16:50:22.931

ILO_TASK.END_TASK[][ILO Tester][Task 1][oracle~pts/2~sqlplus@moddb1 (TNS V1-V3)~SYS$USERS][Time 0s][]
*** ACTION NAME: () 2009-01-13 16:50:22.931
*** MODULE NAME: (SQL*Plus) 2009-01-13 16:50:22.931
</pre>
<p>After reading the ILO source code, and playing around, I could think of a few more ways to take this idea further, but it will require additional development of the library. Most of the &#8220;hooks&#8221; are inside ILO_TIMER. Indeed, I believe that is why ILO is licensed as LGPL, allowing developers the flexibility to decide how they want to make use of the instrumentation.</p>
<p>Perhaps I will write about these ideas in another post. My parting thoughts were how to have Developers instrument their code the same way, if I am the DBA. Perhaps, if DBA=Developer then it would be a different story. I think about <a href="http://logging.apache.org/log4j/1.2/index.html" target="_blank">Apache Log4j</a> and if the same adoption can be applied to a tool like ILO, that would be great.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredericktang.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredericktang.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredericktang.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredericktang.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredericktang.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredericktang.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredericktang.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredericktang.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredericktang.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredericktang.wordpress.com/132/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=132&subd=fredericktang&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fredericktang.wordpress.com/2009/01/13/plsql-instrumentation-using-ilo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9edbce5b92b99efa9994731f963bf783?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredericktang</media:title>
		</media:content>
	</item>
		<item>
		<title>HP-UX PA-RISC or Itanium</title>
		<link>http://fredericktang.wordpress.com/2008/11/07/hp-ux-pa-risc-or-itanium/</link>
		<comments>http://fredericktang.wordpress.com/2008/11/07/hp-ux-pa-risc-or-itanium/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 07:56:14 +0000</pubDate>
		<dc:creator>fredericktang</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://fredericktang.wordpress.com/?p=128</guid>
		<description><![CDATA[Don&#8217;t do what I did&#8230; I got this error when mistakenly installing Oracle 10gR2 (10.2.0.1) HP-UX PA-RISC distribution on a HP-UX Itanium platform:
ar: warning: the file &#60;some_file&#62; is from an incompatible architecture 
Metalink Note: 603735.1 - HP-UX: &#8220;Incompatible Architecture&#8221; Error During The Relink Phase
&#8230; explains this.
uname -m
On HP-UX Itanium systems, the &#8220;uname -m&#8221; command returns &#8220;ia64&#8243;.
On HP-UX [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=128&subd=fredericktang&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Don&#8217;t do what I did&#8230; I got this error when mistakenly installing Oracle 10gR2 (10.2.0.1) HP-UX PA-RISC distribution on a HP-UX Itanium platform:</p>
<p><span style="font-family:Courier New;">ar: warning: the file &lt;some_file&gt; is from an incompatible architecture</span> </p>
<p>Metalink Note: <strong>603735.1 -</strong> HP-UX: &#8220;Incompatible Architecture&#8221; Error During The Relink Phase</p>
<p>&#8230; explains this.</p>
<p>uname -m</p>
<p>On HP-UX Itanium systems, the &#8220;uname -m&#8221; command returns &#8220;ia64&#8243;.<br />
On HP-UX PA-RISC systems, the &#8220;uname -m&#8221; command returns something similar to &#8220;9000/800&#8243;.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredericktang.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredericktang.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredericktang.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredericktang.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredericktang.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredericktang.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredericktang.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredericktang.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredericktang.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredericktang.wordpress.com/128/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredericktang.wordpress.com&blog=1519164&post=128&subd=fredericktang&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fredericktang.wordpress.com/2008/11/07/hp-ux-pa-risc-or-itanium/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9edbce5b92b99efa9994731f963bf783?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredericktang</media:title>
		</media:content>
	</item>
	</channel>
</rss>