« 2011年11月 | トップページ | 2012年1月 »

2011年12月31日 (土)

よいお年を!

3日前にインフルエンザにかかりやっと復活、インフル寝たきり正月はなんとか回避したがネタがあるような無いような、で、いつもの、画像で締めくくり :)


よいお年をお迎えください。

風邪ひかないようにね

35

| | | コメント (0) | トラックバック (0)

2011年12月20日 (火)

VIrtualBox 4.1.8 released :)

クリスマス前にリリース! されてたのでupdate. Linuxのは後で。

https://www.virtualbox.org/wiki/Downloads

20111220_12000


20111220_12335


特に問題なく起動したし:)

20111220_12543


| | | コメント (0) | トラックバック (0)

2011年12月14日 (水)

PL/SQL de Conditional Compile #6

随分前にPL/SQL de Conditional Compile #5ってエントリ書いてたのを思い出して、11g R1/R2用のを見てみたらソースに丁寧なコメント(マニュアルよりいいんじゃね?w )が書かれていてうれしくなった。

オラクルさんとして見せたくない部分は見えないようになっているけど、見せても問題ないところはコードが見える(all_sourceビュー)わけで、それはそれでうれしいわけです。はい。マニュアルが意外に不親切だったりするので。

(マニュアル、良くなりましたよ。昔より。 > 褒めておかないとね、だれとなくw。)...文字サイズも多くしておきましたw

● Oracle11g R1 11.1 の DBMS_DB_VERSION

package dbms_db_version is
version constant pls_integer := 11; -- RDBMS version number
release constant pls_integer := 1; -- RDBMS release number

/* The following boolean constants follow a naming convention. Each
constant gives a name for a boolean expression. For example,
ver_le_9_1 represents version <= 9 and release <= 1
ver_le_10_2 represents version <= 10 and release <= 2
ver_le_10 represents version <= 10

A typical usage of these boolean constants is

$if dbms_db_version.ver_le_10 $then
version 10 and ealier code
$elsif dbms_db_version.ver_le_11 $then
version 11 code
$else
version 12 and later code
$end

This code structure will protect any reference to the code
for version 12. It also prevents the controlling package
constant dbms_db_version.ver_le_11 from being referenced
when the program is compiled under version 10. A similar
observation applies to version 11. This scheme works even
though the static constant ver_le_11 is not defined in
version 10 database because conditional compilation protects
the $elsif from evaluation if the dbms_db_version.ver_le_10 is
TRUE.
*/

ver_le_9_1 constant boolean := FALSE;
ver_le_9_2 constant boolean := FALSE;
ver_le_9 constant boolean := FALSE;
ver_le_10_1 constant boolean := FALSE;
ver_le_10_2 constant boolean := FALSE;
ver_le_10 constant boolean := FALSE;
ver_le_11_1 constant boolean := TRUE;
ver_le_11 constant boolean := TRUE;

end dbms_db_version;


● Oracle11g R2 11.2 の DBMS_DB_VERSION

package dbms_db_version is
version constant pls_integer := 11; -- RDBMS version number
release constant pls_integer := 2; -- RDBMS release number

/* The following boolean constants follow a naming convention. Each
constant gives a name for a boolean expression. For example,
ver_le_9_1 represents version <= 9 and release <= 1
ver_le_10_2 represents version <= 10 and release <= 2
ver_le_10 represents version <= 10

A typical usage of these boolean constants is

$if dbms_db_version.ver_le_10 $then
version 10 and ealier code
$elsif dbms_db_version.ver_le_11 $then
version 11 code
$else
version 12 and later code
$end

This code structure will protect any reference to the code
for version 12. It also prevents the controlling package
constant dbms_db_version.ver_le_11 from being referenced
when the program is compiled under version 10. A similar
observation applies to version 11. This scheme works even
though the static constant ver_le_11 is not defined in
version 10 database because conditional compilation protects
the $elsif from evaluation if the dbms_db_version.ver_le_10 is
TRUE.
*/

ver_le_9_1 constant boolean := FALSE;
ver_le_9_2 constant boolean := FALSE;
ver_le_9 constant boolean := FALSE;
ver_le_10_1 constant boolean := FALSE;
ver_le_10_2 constant boolean := FALSE;
ver_le_10 constant boolean := FALSE;
ver_le_11_1 constant boolean := FALSE;
ver_le_11_2 constant boolean := TRUE;
ver_le_11 constant boolean := TRUE;

end dbms_db_version;

version 12 and later codeなんて箇所、いいですね〜w



・PL/SQL de Conditional Compile #1
・PL/SQL de Conditional Compile #2
・PL/SQL de Conditional Compile #3
・PL/SQL de Conditional Compile #4
・PL/SQL de Conditional Compile #5

| | | コメント (0) | トラックバック (0)

2011年12月 5日 (月)

Oracle11g R1のAWRレポートでは%idleと%iowaitが逆なのな。

Oracle11g R1のAWRって仕事でも使うこともそれなりにあるわけですが、なんと、いままで気づかなかったAWRレポートのバグみつけ〜ということで(とっくに気づいていた人はいたはずだけど、基本、11g R1だと修正する気はナッシングと思われw)。メモ代わり。
(でも、リリースされてからづ〜〜と気づかなかったということは私はOperating System Statisticsセクションはスルーしてて見てなかったということなんだろーなー多分)


以下、AWRレポートを出力した時間帯のsarの結果、どう見ても暇な状況なわけですよ。

02時33分37秒       CPU     %user     %nice   %system   %iowait    %steal     %idle
02時33分47秒 all 0.29 0.00 0.13 0.14 0.00 99.44
02時33分57秒 all 0.10 0.00 0.08 0.01 0.00 99.81
02時34分07秒 all 0.20 0.00 0.10 0.02 0.00 99.68
02時34分17秒 all 0.04 0.00 0.02 0.08 0.00 99.86
02時34分27秒 all 0.14 0.00 0.03 0.03 0.00 99.80
02時34分37秒 all 0.13 0.00 0.03 0.03 0.00 99.82
02時34分47秒 all 0.14 0.00 0.02 0.01 0.00 99.83
02時34分57秒 all 0.03 0.00 0.01 0.00 0.00 99.97
02時35分07秒 all 0.11 0.00 0.02 0.03 0.00 99.84
02時35分17秒 all 0.08 0.00 0.03 0.01 0.00 99.88

AWRレポートのHost CPUセクションを見るとまあ、そんな感じなわけです。はい。


20111205_23655

でも、Operating SYstem Statistics - Detailセクションを見ると、%iowaitが99.77で、%idleが0.12となっていて、ここだけみるとびっくり〜しちゃうわけですよ〜。

20111205_23726


Oracle11g R1 11.1.0.x.xのAWRレポートは皆こんな状態でリストされるので、Operating System Statistics - Detailセクション見る場合は%ildeと%iowaitの値は脳内で入れ替えてね :) というお話でした。

ちなみに、Oracle11g R2ではしっかり修正されていますね。Oracle11g R1のAWRレポート見て驚かないためのメモw でした。

| | | コメント (0) | トラックバック (0)