山上有风

学佛,居家

Archive for 十二月, 2006

Where to find Step-By-Step RAC setup guides

without comments  277 Views

Where to find Step-By-Step RAC setup guides:

Posted by Alejandro Vargas, 3/29/06 at 2:56:16 AM. Where to find Step-By-Step RAC setup guides:Wednesday, March 29, 2006

RAC Step-By-Step Installation on IBM RS/6000 see Note 199457.1 . RAC Step-By-Step Installation on LINUX see Note 184821.1 .

RAC Step-By-Step Installation on COMPAQ OPEN VMS see Note 180012.1 .

RAC Step-By-Step Installation on SUN CLUSTER V3 see Note 175465.1 .

RAC Step-By-Step Installation on WINDOWS 2000 or NT see Note 178882.1 .

RAC Step-By-Step Installation on HP TRU64 UNIX CLUSTER see Note 175480.1 .

RAC Step-By-Step Installation on HP-UX see Note 182177.1 .

Written by lyf

十二月 26th, 2006 at 12:12 下午

Posted in Oracle数据库

Tagged with , ,

如何查找/下载oracle文档?

without comments  176 Views

http://blogs.oracle.com/AlejandroVargas/stories/storyReader$14

10gr2:

http://www.oracle.com/pls/db102/homepage?remark=tahiti

9ir2:

http://www.oracle.com/pls/db92/homepage?remark=tahiti

Written by lyf

十二月 25th, 2006 at 10:12 下午

Posted in Oracle数据库

Tagged with ,

受苦是了苦 享福是消福

without comments  208 Views

受苦是了苦 享福是消福

—宣化上人

Written by lyf

十二月 22nd, 2006 at 11:12 下午

Posted in 花在旧时红处红

Tagged with ,

算生肖必须看立春(转)

without comments  310 Views

  1. 算生肖必须看立春

    一开始提出“狗年是从立春开始”观点的叶春生教授无疑是这场争论的焦点人物。昨天晚上,记者拨通他的电话时,他刚刚结束另一家媒体的采访,电话中的声音略显疲惫。

    “我的观点很明确,春节是从农历正月初一开始算起,但算生肖必须从立春开始。”叶春生肯定地说,“其实这也不是什么新的观点了,你翻开任何一本皇历,上面都是这么标注的。”

    叶春生告诉记者,春节在每年农历正月初一是近代才确定下来的。“1912年,孙中山先生宣布废除旧历,采用公历纪年。到了1914年,时任民国 大总统袁世凯颁布法令,规定每年农历正月初一为春节。在此之前,传统上以立春作为岁首,更早的时候也有过以冬至为岁首的情况。”

    “因此,狗年应该是以立春为起点,因为立春在24节气中位列第一,表示春天的开始,也标志着新的一年的到来。”叶春生表示,“也因为这样,立春 不仅是一个节气,更是一个节日。古代帝王都会在立春这一天举行祭祀活动,以求新的一年国泰民安。而农历中像这样既是节气又是节日的很多,比如清明、冬至 等。”

    一个农历年出现仨属相

    因为有一个闰七月,农历今年有385天,除了年头上有一个立春以外,年尾腊月十七还有一个立春(2007年2月4日)。如果按照叶春生的观点,将会出现一个有趣的现象:农历今年出生的孩子有3种属相——正月初七前属鸡,正月初七到腊月十六属狗,腊月十七以后属猪。

    “没错,类似这样‘两头春’的年份就会出现这样的情况。这种情况在农历中并不罕见,基本上十几年就会有一次。”叶春生说道,“如果再精确一点,农历正月初七7时25分以后出生的孩子才属狗,因为立春是在那一刻。”

    “所以大家也要注意,除了年头有‘小鸡仔’,年尾还有一批‘小猪仔’出世。”叶春生笑道。


Written by lyf

十二月 19th, 2006 at 4:12 下午

Posted in 大杂烩

Tagged with

OTL介绍(转)

without comments  203 Views

今天和一个朋友聊起来在网络游戏里面使用oracle数据库 。他们开发使用OTL,OTL是什么?

google了一下,查到一个文档:

 http://otl.sourceforge.net/

 

 

使用OTL调用Oracle的存储函数

OTL介绍:
OTL 是 Oracle, Odbc and DB2-CLI Template Library 的缩写,是一个C++操控关系数据库的模板库,最新 版本4.0.104,参见http://otl.sourceforge.net/,下载地址http://otl.sourceforge.net/otlv4_h.zip
优点:a. 跨平台
b. 运行效率高,与C语言直接调用API相当
c. 开发效率高,起码比ADO.net使用起来更简单,更简洁
d. 部署容易,不需要ADO组件,不需要.net framework 等
缺点:
a. 只有C++才可以使用她
b. 说明以及范例不足(暂时性的)

总的说来,对于C++程序员而言,使用OTL操作关系数据库是最好的选择,其网站上有很多的范例,本人在这 里对使用OTL调用Oracle的存储函数(存储函数比存储过程多个返回值)作一个 示范,而其他的比如查询、更新、存储过程等就太简单了,直接看otl.sourceforge.net的范例

Oracle 存储函数 TEST 代码:
( a In Integer, b Out Integer, c in out Integer, d In Long ) Return Long
is
begin
b := a;
c := 2 * c;
Return( ‘<’ || d || ‘>’ );
end;
说明:Oracle中的long不是C/C++中的长整型,而是varchar_long,对应着OTL中的otl_long_string,这是一 种很复杂的类型,本人就用它来举例。

C++调用TEST的代码:
#include <string>
#include <iostream>
//#define OTL_ORA9I // 使用这个宏就表示使用Oracle9i的API,而不是ODBC API
#define OTL_ODBC    // 使用这个宏就表示使用通用的ODBC API
#include “otlv4.h”
using namespace std;

void main( void )
{
otl_connect::otl_initialize();
try {
otl_connect db;
db.rlogon( “Driver={Microsoft ODBC for Oracle};Server=ZZZ;Uid=XXX;Pwd=YYY;” );
// db.set_max_long_size(?); 如果varchar_long长 度非常长,超过默认值的话,你需要这一句

otl_stream o( 1, “{ :E<varchar_long,out> = call TEST(  :A<int,in>,:B<int,out>,:C<int,inout>,:D<varchar_long,in&g t; ) }”, db );
o.set_commit(0);

int a = 1;
int b = 0;
int c = 2;
otl_long_string d( “abc”, 0, 3 );
otl_long_string e;
o << a << c << d;
o >> e >> b >> c;

cout << “b = ” << b   << ‘n’;
cout << “c = ” << c   << ‘n’;
cout << “e = ” << e.v << ‘n’;

//db.commit();
db.logoff();
}
catch( otl_exception& p ) {
cerr << p.msg << “n”
<< p.stm_text << “n”
<< p.sqlstate << “n”
<< p.var_info << “n”
<< endl;
}
}

说明:”{ :E<varchar_long,out> = call TEST(  :A<int,in>,:B<int,out>,:C<int,inout>,:D<varchar_long,in&g t; ) }”这一句中的A、B、C、D、E就是一个名字,随各人喜欢可写成其他任何名称。但这个格式需要注 意,它不是
“{ call :Name1<int,out> := function( Name2<int,in> }”
也不是
“{ call :Name1<int,out> \:= function( Name2<int,in> }”
而是
“{ :Name1<int,out> = call function( Name2<int,in> }”
这一点和otl.sourceforge.net上的说明不一样。

Written by lyf

十二月 19th, 2006 at 2:12 下午

Posted in IT相关

Tagged with

32bit linux为何oracle 只能使用1.75G SGA(转)

without comments  233 Views

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ RedHat Advanced Server (RHAS) 2.1
~
~ Default Configuration w/o Enterprise Kernel with <4Gb of RAM
~
~ >>>SGA MAX Size 1.7 GB<<<
~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Configuration : 3+1 3Gb user process +1Gb Kernel
On normal kernel we have the following default memory layout for every process:

1.0 GB    Text/code
1.7 GB    available process memory for mmap, malloc /
address space  (e.g. usable by shared Pool)
0.3 GB    Stack
1.0 GB    Kernel

==> 4 – 1 – 1 – 0.3 = 1.7GB left for SGA

A picture of Memory Layout:
---------------------------

4GB     +------------------+ 0xFFFFFFFF
|                  |
|  Kernel stuff    |
|                  | 0xE0000000 SSKGMTOP
|                  |  (from sskgm.h may17 label)
|                  |
3GB     +------------------+ 0xC0000000 __PAGE_OFFSET
|  |  Stack grows  | (include/asm-i386/page.h)
|  v    down...    |
2.98GB  |------------------| 0xBF000000
|                  |
|                  |
|  Oracle SGA      |
|  max 1776MB      |
|  max 1.75GB      |
|                  |
|                  |
|                  |
|                  |
|                  |
|                  |
|                  |
|                  |
1.25GB  +------------------| 0x50000000  GENKSMS_SGA_ADDR
| Shared libraries |
|   lib*.so        |
|                  |
|                  |
|                  |
|                  |
1GB     +------------------+ 0x40000000  TASK_UNMAPPED_BASE
| applicaton code  |
|  (Oracle .text)  |                              ^
|                  |                              |
|                  | 0x20000000  SSKGMBOTTOM      |
|                  | (from sskgm.h may17 label)   |
|                  |                              |
|                  |                              |
128MB   |------------------| 0x08000000                   |
|                  |                              |
|                  |                              |
0       +------------------+ 0x00000000                   |

check
Note 260152.1

https://metalink.oracle.com/metalink/plsql/f?p=130:14:5739562173496231439::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,260152.1,1,1,1,helvetica

Written by lyf

十二月 16th, 2006 at 1:12 下午

Posted in Oracle数据库

Tagged with , , ,

Oracle Diagnostic Tools(转)

without comments  272 Views

Oracle Diagnostic Tools

RACDDTa data collection tool designed and configured specifically for gathering diagnostic data related to Oracle’s Real Application Cluster (RAC) technology.
See MetalinkNote:301138.1

RDA – Remote Diagnostic Agent – a set of command line diagnostic scripts that are used to gather detailed information about an Oracle environment.
See Metalink Note:314422.1
RDA 4 – Health Check / Validation Engine Guide
RDA 4 – RAC Cluster Guide

OSW - OS Watcher – a collection of UNIX shell scripts intended to collect and archive operating system and network metrics to aid support in diagnosing complex RAC issues as well as generic performance issues.
SeeMetalinkNote:301137.1

LTOM – The On-Board Monitor – a java program designed as a real-time diagnostic platform for deployment to a customer site. LTOM differs from other support tools, as it is proactive rather than reactive. LTOM provides real-time automatic problem detection and data collection.
See
MetalinkNote:352363.1

Support Diagnostics Tools Catalog for E-Business Suite -
a test repository, execution engine, and user interface for customers, support analysts, and developers to plug-in diagnostic test tools/scripts
See MetalinkNote:179661.1

Written by lyf

十二月 16th, 2006 at 1:12 下午

Posted in Oracle数据库

Tagged with

下载RHEL, SLES的站点

without comments  227 Views

http://linux.xnol.com  (感谢小粥提供 )  很好.


http://mirror.vmmatrix.net/  又新增一个,(感谢archangle推荐 )
http://it.cnlinux.net

http://mirrors.cn99.com/   (感谢 清茶淡淡 推荐 )
http://mirror.lupaworld.com/   (感谢 sanool 清茶淡淡 推荐 )

Written by lyf

十二月 9th, 2006 at 8:12 上午

Posted in IT相关

Tagged with , ,

总结一下

without comments  194 Views

这周因为这种或者那种的原因,都没有写blog.

今天讲课较早结束,趁着有点随意的时间,把这段的总结一下。

因为客户数据库基本稳定,除了几次巡检,基本没有出去,这么长一段时间不出去,还真有点不适应。

上周六时有个客户报告误删除了全部的redo log 文件,担心数据库会出问题,(当时数据库还正常)。
疑问: windows上,正在使用的log应该是删不掉的。

我刚好前几天刚做过巡检,看了一下redo log 文件目录,让客户确认是否还在。交流一下才知道,删除的不是当前数据库使用的redo log,是以前安装的数据库,没有清除干净留下来的。是一场虚惊。

这个事情一方面说明管理存在问题,也显示做服务的,一定要珍惜平安无事的环境啊(说不定哪个客户不小心搞一下就够折腾一阵的)。

再说说持斋的事情。

前周六开始计划持斋3周,到现在已经2/3完成了。

感觉持斋真是不容易。

首先,素食,不容易做到。在家里吃的时候,老婆每餐都会有至少一个素菜,有时候全素的。

但是中午在公司吃,不在家里的时候,吃素真是比较麻烦,小饭馆里基本上没有。都是肉,鱼炒什么,要吃个素菜有点难为他们。不过鸡蛋炒的还是有的,虽然大部分同修认为鸡蛋不能吃的,我还是吃了,鸡蛋炒西红柿是最多的。

不过也吃过一次全素的,竟然名字就是“炒素”,我看了真是又惊又喜。当即叫了一个,不过味道真是不敢恭维。

另外,芹菜,韭菜,葱等也不是素,我也没有戒,这个很难。比如葱,经常是调料,可能每个菜都有。每次吃饭都说也够麻烦的,所以就没有戒。

 这次持戒,对后面开始吃5天斋,算是有了一些体会。后面逐步从5天,7天,逐步实现全素。

老婆怀孕已经7个月了,真是有苗不愁长(岳母语)。想想刚开始检查是怀孕了时,总是有些不相信的。比较前面已经有诈孕的情况。用了几种测试方法,确认是怀孕,自己才相信了。

虽说有苗不愁长,但是老婆这段时间“十月怀胎”,经受的种种苦楚,也是让人着急让人疼。从腱鞘炎到牙疼,糖尿病风险,不一而足,而最痛苦的分娩也是指月可待,大约在春节。

现在当自己要过生日时,除了自己的感受,应该想想当时的母亲的痛苦,生日,真的就是母亲的受难日。

这几天培训ocp-007,因为前面一端时间没有努力,所以后面准备的比较累。做事情,真的不能偷懒。

阴天心情比较低沉,适合整理东西,脑子。

刚才整理了一下,清爽多了。

Written by lyf

十二月 6th, 2006 at 3:12 下午

Posted in 曾经的你

Tagged with , , , ,