123
 123

2007-09-27 Thu

23:07 How to compile Oracle Call Interface (OCI) program? (2414 Bytes) » DBA Tools

    On Linux/Unix we can use gcc to compile OCI source code. Use the following command to compile the text unload utility as 64 bit binary.

gcc -m64 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I${ORACLE_HOME}/rdbms/public -I${ORACLE_HOME}/rdbms/demo -L${ORACLE_HOME}/lib -lclntsh -o ociuldr.bin ociuldr.c

    I usually compile it as 32 bit executable file by the following command.

gcc -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I${ORACLE_HOME}/rdbms/public -I${ORACLE_HOME}/rdbms/demo -L${ORACLE_HOME}/lib32 -lclntsh -o ociuldr.bin ociuldr.c

    On windows, I will use Microsoft Visual C++ as compiler. Run the following command to compile it.

set ORACLE_HOME=c:\oracle\product\10.2.0
set LIB=%LIB%;%ORACLE_HOME%\oci\include
set INCLUDE=%INCLUDE%;%ORACLE_HOME%\oci\lib\msvc
cl /ML /Feociuldr.exe ociuldr.c oci.lib

    For the Pro*C compilation, you just need to change the include file path and library path.

Related Posts

Leave New Comment(Current: 0)

Link: http://www.dbatools.net/experience/compile_oci_program.html

09:15 且听风吟 (1157 Bytes) » Chanel [K]
Whitedeep-且听风吟 神一样的照片!No more words…

08:11 在obj$基表中大量的non-existant类型对象是咋回事? (4925 Bytes) » 缥缈游侠-logzgh

今天hoterran跟我说obj$中怎么会有那么多type#=10的对象存在。即select obj#,name,type# from obj$ where type#=10;

其type#为10表示的是什么类型呢?


对obj$基表字段的解释可以从sql.bsq文件中获得,关于type#的解释,我们可以从中得到:
type# number not null, /* object type (see KQD.H): */
/* 1 = INDEX, 2 = TABLE, 3 = CLUSTER, 4 = VIEW, 5 = SYNONYM, 6 = SEQUENCE, */
/* 7 = PROCEDURE, 8 = FUNCTION, 9 = PACKAGE, 10 = NON-EXISTENT, */
/* 11 = PACKAGE BODY, 12 = TRIGGER, 13 = TYPE, 14 = TYPE BODY, */
/* 19 = TABLE PARTITION, 20 = INDEX PARTITION, 21 = LOB, 22 = LIBRARY, */
/* 23 = DIRECTORY , 24 = QUEUE, */
/* 25 = IOT, 26 = REPLICATION OBJECT GROUP, 27 = REPLICATION PROPAGATOR, */
/* 28 = JAVA SOURCE, 29 = JAVA CLASS, 30 = JAVA RESOURCE, 31 = JAVA JAR, */
/* 32 = INDEXTYPE, 33 = OPERATOR , 34 = TABLE SUBPARTITION, */
/* 35 = INDEX SUBPARTITION */
/* 57 = SECURITY PROFILE */

即type#=10表示的是non-existant类型的对象。

随便找个db来看一下:
select">sys@alisoft_std3>select count(*) from obj$ where type#=10;

COUNT(*)
----------
111
有111个non-existant类型的对象,并且这些对象的创建时间(ctime)都很早,不可能是最近12个小时内产生的。

首先说说什么情况下会产生non-existant类型的对象。
有两大类情况会生成non-existant类型的对象:
1.删除,重命名之类的操作,也就是说原来的对象不存在了,oracle会将这些对象的type#改成10。
这种情况相信大家都好理解。

2.第二种情况相对来说就不太好理解了,用oracle的话来说"object entries created for negative dependency reasons"
即为了negative依赖关系而创建的。这种主要表现为系统包、视图和dual表。后面会找个例子来说明。

我们都知道smon进程有一大功能就是理清obj$中不存在的对象,其实就是清理type#为10的对象。
即然smon进程会清理,那为什么还会有这么多non-existant的对象呢?

其实smon只清理那些没有任何依赖关系的non-existant的对象,如果那些没有被任何其他对象使用的non-existant对象没有
被smon进程清理掉的话,都可以认为是oracle的bug.
其实前面所说的第一种情况正常情况下都会被smon清理掉的(当然也可以通过event来禁止smon这种功能),
而那些不会被smon进程清理掉的non-existant对象正常情况下都是属于前面所说的第二种情况。


select">sys@alisoft_std3>select obj#,name from obj$ where type#=10 and obj# not in (select p_obj# from dependency$);

no rows selected
可以发现所有type#=10的对象都是被别人使用的。

还有有个存过,里面有这段代码:
SELECT substr(child_id, 9, length(child_id) - 8), b.aw
FROM rry_im_child_user a,
(SELECT '201' aw
FROM dual
UNION
SELECT '202' aw
FROM dual
UNION
SELECT '203' aw
FROM dual
UNION
SELECT '301' aw
FROM dual
UNION
SELECT '302' aw
FROM dual
UNION
SELECT '305' aw FROM dual) b
WHERE a.login_id = x.login_id
AND a.gmt_expire >= v_gmt_online;
END IF;
EXCEPTION
WHEN no_data_found THEN
dbms_output.put_line('no data found by : ' || x.login_id);
END;

当创建这个存过(object_id为21300)的时候,由于第二种原因,会产生两个non-existant的对象。

select">sys@alisoft_std3>select obj#,name,type# from obj$ where obj# in (select p_obj# from dependency$ where d_obj#=21300) and type#=10;

OBJ# NAME TYPE#
---------- ------------------------------ ----------
6614 DUAL 10
6616 DBMS_OUTPUT 10

不过有一点还没弄明白的是,oracle这么做会带来什么好处。

07:11 Creative Commons Artist Spotlight: Monsieur Madame (2699 Bytes) » Red Hat Magazine

In this week’s Creative Commons Artist Spotlight, we interview French artists Monsieur Madame about their CC-licensed album Et Maintenant, available at Jamendo.com.

Why did you decide to release your music under a Creative Commons license?

Because we just want to be heard. It’s hard to sell music because there are a lot of bands. We just like to play live music and share it with people. The Creative Commons is a good way to share directly.

How much of your work is CC-licensed?

All tracks of the CD (Et Maintenant) are CC-licensed. The new ones, not yet.

Who are your musical influences?

Maybe are we influenced by French bands, such as Rita Mitsouko or Thomas Fersen, for example.

What tools do you use to produce your music?

A guitar and a pen (to write songs!)

Which of your CC-licensed songs is your favorite?

I think that it’s “Du sable entre les doigts de pied” because it’s sweet!

Are you touring, and if so, how can readers find you?

No, for the moment. We are trying to play in live once a month in Paris, in the Bibax Bar (10th arrondissement) for example.

Anything you’d like our readers to know about you?

We’re going to work on a new CD in october. We’ve already got 12 new songs so… Let’s go!

06:14 A guide to GNU Screen (9728 Bytes) » Red Hat Magazine

written by Steve ‘Ashcrow’ Milner and Anderson Silva

The same way tabbed browsing revolutionized the web experience, GNU Screen can do the same for your experience in the command line. GNU Screen allows you to manage several interactive shell instances within the same “window.” By using different keyboard shortcuts, you are able to shuffle through the shell instances, access any of them directly, create new ones, kill old ones, attach and detach existing ones.

Instead of opening up several terminal instances on your desktop or using those ugly GNOME/KDE-based tabs, Screen can do it better and simpler.

Not only that, with GNU Screen, you can share sessions with others and detach/attach terminal sessions. It is a great tool for people who have to share working environments between work and home.

By adding a status bar to your screen environment, you are able to name your shell instances on the fly or via a configuration file called .screenrc that can be created on the user’s home directory.

Installing

Installing Screen on a Fedora or Red Hat® Enterprise Linux® 5 system is quite easy with yum, assuming you have sudo access.

  1. Login as root:
    su # enter root password
  2. Use yum to install it:
    yum install screen

Enter your password. After a few minutes (depending on your network connection), Screen will be installed. But before you start playing around with it, let’s look at how to do some basic configuration.

Customizing the configuration file

Screen keeps its configuration file in the same vein that many applications do: in a dot file in your user’s home directory. This file is aptly named .screenrc. In my experience, most people use ~/.screenrc to do two things:

  • Make a hardstatus line. This is basically a line at the bottom of the screen that lists your current terminal and all opened ones. It can also display the system clock and the hostname.
  • Default screens on startup. It’s quite nice to have your IRC connection, mail client, and default SSH connections auto-start for you!

The lines below are numbered for reference. Your config file should not have numbered lines.

1 hardstatus alwayslastline
2 hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]'
3
4 # Default screens
5 screen -t shell1	0
6 screen -t shell2	1
7 screen -t server	2	ssh me@myserver

On lines 1 and 2, you are setting the hardstatus. Line 1 makes the hardstatus always show up as the last line. Line 2 is about what will be shown in the hardstatus line. In this case you will see something like so at the bottom:

As you change screens, you will see the parentheses move around the active screen.

Line 4 is a comment, as it starts with #. Lines 5-7 are all screen statements in the following format:

	screen -t NameOfScreen ScreenNumber ShellCommand

Shortcuts

The following are some of the most used shortcuts that lets you navigate through your screen environment. Note that unless modified by your .screenrc, by default every screen shortcut is preceded by Ctrl+a. Note that these shortcuts are case-sensitive.

  • 0 through 9 – Switches between windows
  • Ctrl+n – Switches to the next available window
  • Backspace – Switches to the previous available
  • Ctrl+a – Switches back to the last window you were on
  • A – Changes window session name
  • K – Kills a window session
  • c – Creates a new window
  • [ - Then use arrows to scroll up and down terminal

Find out about more shortcuts in Screen’s man pages. In your terminal, run: man screen.

Sharing a session with others

Another great application of Screen is to allow other people to login to your station and to watch the work you are doing. It is a great way to teach someone how to do things on the shell.

Setup to allow screen to be shared

  1. As root: chmod u+s /usr/bin/screen (Screen has to be SUID if you want to share a term between two users.)
    Note: SUID allows an executable to be run by the owner of that file, instead of with the user’s own permission. There are some security concerns when doing this, so use this tip at your own discretion.
  2. chmod 755 /var/run/screen
  3. Log out of root, and run Screen as the user who is going to share the session:
    screen
  4. Press Ctrl+a, then type :multiuser on and press Enter.
  5. Press Ctrl+a, then type :acladd steve (”steve” is the username of the person who will connect to your screen session).

Connecting to the shared screen:

  1. SSH into the workstation that you are going to watch the screen session on.
  2. On your terminal type: screen -x anderson/ (”anderson” is the username of the person who is sharing the screen session. You need the / at the end.).

And now both users (from the host and guest) will be sharing a screen session and can run commands on the terminal.

Working from multiple locations

Let’s say you have a screen session open at work with X number of windows on it. Within those screens you may be running an IRC client, an SSH connection to the web server, and your favorite text-based email client. It’s 5 p.m. and you have to go home, but you still have work left to do.

Without Screen you would probably go home, VPN into your company’s network, and fire up all the shells you need to keep working from home. With Screen, life gets a little easier.

You can simply SSH into your workstation at work and list your available screen sessions with the command:

screen -ls

And connect to the sessions you were running at work with the command:

screen -x screen_session_name

This way screen will let you pick things up exactly from where you left off.

Applications to make Screen your window manager

Now that you have seen what Screen can do for you, you probably are wondering how to make it your main interaction point, like a terminal window manager.

Let’s start with IRC, a very common and popular chat system. Instead of using a graphical client like Pidgin, install Irssi. Irssi sports a slick console interface, tons of add-ons and scripts, and can be enhanced with Perl. It’s even theme-able!

Another important part of any user’s setup is email. Today most people use graphical clients such as Thunderbird, Evolution, or Sylpheed. My favorite client happens to run in a terminal: Mutt. While Mutt isn’t the easiest client in the world to set up, it sure is a joy to use. You can even use your favorite console text editor for doing emails.

Speaking of favorite text editors, there is a good chance that you work on some code projects or configurations. Instead of using gedit/kedit or powering up a heavy IDE such as Eclipse, you can pick up on Vim. Vim is a powerful text editor which, as is stated on the Vim website, could be considered an entire IDE in itself and sports syntax coloring in over 200 programming languages. If Vim doesn’t fit your style, there is always emacs, nano, or JOE.

Now all you need you need to do is edit your ~/.screenrc to meet your needs.

My ~/.screenrc looks like the following:

	1 hardstatus alwayslastline
	2 hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=
kw}%?%-Lw%?%{r}(%{W}%n*%f %t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}
%Y-%m-%d %{W}%c %{g}]'
	3
	4 # Default screens
	5 screen -t shell1	0
	6 screen -t shell2	1
	7 screen -t server	2 	sh me@myserver
	8 screen -t IRC	7	irssi
	9 screen -t Mail	8	mutt

Once you get used to the shortcuts in GNU screen, not only will your desktop become more organized (due to the lower number of open windows), but your efficiency as a developer or system administrator will increase not only at work but at your home office as well.

03:20 Lilina设置:Atom格式的RSS全文输出 (791 Bytes) » 车东[Blog^2]
之前我一直以为WordPress的atom输出是不包含全文的,因为用Lilina订阅总是只显示几十个字的摘要。后来看了一下atom的源代码,发现是包含的全文内容的,为什么Lilina没有输出呢。 原因在于atom的输出有summary和content这2个字段。而Lilina缺省只输出了summary。MagpieRSS也是支持输出content的:用atom_content代替summary即...
03:00 马来西亚之行 - Kota Kinabalu 第二天 (6127 Bytes) » Chanel [K]
睡了一个懒觉,起床拉开窗帘,蓝天白云绿草地,阳光万里,休假的感觉油然心头,哈。 酒店的大厅里面竖着这次公司活动的标牌,07 club excellence QOOL。 入住的Pacific Sutera外观。 酒店外随处可见的扇形热带植物,这才是芭蕉扇。 今天按理说是有Businese Meeting,正式的游玩活动是明天才开始的,因此没有具体的活动安排,但是似乎没有人去参加?大家都坐上酒店的Shuttle Bus奔赴市中心血拼去了,这一点从中午吃饭的地方满眼是Oracle的员工可知。 在奔赴市中心的路上,看到的百盛购物中心,同样的Parkson,同样的百盛,我差点儿以为自己回到北京了。 班车停靠在Centre Point,一家很大的Shopping Mall,门口身穿马来西亚民族服装的购物者颇引人注意。酒店里虽然有Exchange Money的地方,但是居然不接受人民币,所以林吉特是在这里兑换的,2000元人民币兑换了944林吉特(Ringgit,货币标号是RM,RM是Ringgit Malaysia的简称),而这里的每一家超市据说都有兑换外币的柜台。 到市中心的时候已经该吃中饭了,于是决定先吃饭再逛街,既然到了沙巴,不去吃些海鲜实在说不过去,于是就近找了一家比较大的海鲜城 - 不夜天。随处可见的中文几乎让人没觉得自己已经在另外的一个国家了。 在去海鲜城的路上,路过一处农贸时常,椰子变成2RM一个,这种椰子饮料1RM一杯,天热的时候很不错的选择。 这种叫Salak的水果,以前从来没有见过,果壳好像蛇鳞一样,老板说可以尝尝,打开一个,看上去很像一个小小的榴莲,尝一口,OMG!毫不夸张的说,一股浓重的尿味!没错,就是尿味!遂落荒而逃。 海鲜城在海边,靠着海搭建了长长的木质露台,带我们来的司机说过,在沙巴,你不要去找什么好玩的地方,也没有什么特别好玩的地方,这里有的是休闲,就是休闲。 我们吃饭的一共4个人,虎皮虾4只,每只40RM,巨大的龙虾,我一个食指还没这虾的头长,一只虾就几乎把人吃饱了,新鲜而且美味,稍有些甜,微辣。 这鱼端上来的时候忘了照相,等想起来要拍的时候,已经被折磨的体无完肤。这鱼叫青石斑?青石板?不是我军战斗力不行,而是敌人实在太大了,等我们买单走人的时候,这鱼剩下的场景跟照片里还是差不太多。这条鱼。。。嗯,折合人民币400元,我们恐怕浪费了有将近200元,作孽啊。除了海鲜,还点了一种沙巴的特产蔬菜,用虾酱作为佐料烹制的,YL这小子一口不吃,说是虾酱味道太冲,其实闻起来不怎么样,入口还是不错的。 茶足饭饱,开始体验沙巴的风土人情,最好的方法就是Shopping了,我们的目标是刚下车时候的Centre Point,一个5层的购物中心。基本上说来,马来西亚的物价几乎跟国内没有太大差别,所以购物的时候不用换算来换算去,觉得想买就出手好了。当然还是有些东西会比较便宜的,比如最后我拿下的Biotherm Homme。 maxis是马来西亚的移动运营商,类似国内的中国移动,Hotlink是maxis的移动设备贩卖店。 书店里面中文杂志不少,当然基本上都是繁体的。 Starbucks Everywhere!这杯Ice Latte需要12.81RM,20多人民币,跟国内仍然是差不多。 马来西亚货币林吉特的5元钱很有意思,票面上有一块塑料薄膜覆盖的透明部分,只有5元是这样的,不知道当初为何如此设计? 我手头上有的Ringgit纸币全家福,少一张50的,所有的纸币上都可以看到这个戴帽子的老爷爷,他是马来西亚第一任最高元首,森美兰州的前任苏丹,名字叫端姑阿都拉曼,全名超长,是Tuanku Abdul Rahman ibni Almarhum Tuanku Muhammad。 最后逛了一圈下来,买了Biotherm Homme Acnoclean,洁面摩丝95RM,保湿露135RM,打折以后总共需要210RM,而在北京,商场价大概需要将近600人民币,因此这里还是便宜的,基本跟taobao价持平。买贵的东西来用是善待自己,我暂时是这样理解的,因为人生在世,你都不知道是不是还能看到下一个日出,为什么要在大宝还是碧欧泉之间做那么痛苦的选择呢? 从购物中心出来,打车回到酒店,出租费用只有10RM,完全可以接受,本来是想放下东西然后去酒店后面的海边坐快艇出海去,结果刚刚收拾完,天空就忽然黑云压顶,片刻之后就开始下雨,中间偶尔放晴,阳光灿烂一下,然后又开始重新下雨,沙巴的天气还真是古怪啊。 被雨水挡在屋子里,干脆就整理一下照片,完成今天的游记好了。而明天是Mamutik Island之旅,会经历我人生的第一次潜水。好了,各位,明天见。 Powered by ScribeFire.

01:57 马来西亚之行 - Kota Kinabalu 第一晚 (3782 Bytes) » Chanel [K]
从香港机场下午4:15起飞,半空中的天气时而晴空万里,时而乌云密布,飞机在平稳和颠簸之间晃晃悠悠到达了Kinabalu机场,从机舱跨出,已经是晚上7:40,并不是想像中那般热浪扑面,即使是身穿长裤长袖也觉得还可以忍受。 已经站在马来西亚的土地上了。 从各种语言的欢迎标语上已经知道中文在这里非常普遍。 入境手续比较简单,填写一张Arrival Card就可以了,机场的出口处有免费的Infocenter,可以拿到本市的地图还有旅游指南,这跟欧洲国家的风格很像,北京已经快2008奥运会了,机场是不是也该考虑设置一个这样的Infocneter呢? 出了机场,坐上公司预定的Shuttle Bus,不到20分钟就抵达入住的Pacific Sutera Hotel了,一路上看着窗外的道路和热带植物,感觉自己仿佛到了海南的农村。开车的老司机很健谈,一路上滔滔不绝,介绍了马来西亚的货币单位林吉特(Ringgit,RM)该怎么发音,其实就跟汉语差不多 - ling gi,他说马来西亚人会很多种语言,有本地的马来西亚语,还有中文普通话,客家话,粤语,当然还有英文。 作者语:抱歉,没什么夜景的照片,等下一篇吧。 在大厅办理入住手续的时候,有免费的果汁和蛋糕可以填肚子,还有现场表演的卡拉OK,当然人家称那几位是歌手。房间还算干净,但是怎么看也没有国内的5星酒店豪华,电视小的可怜,据目测大概只有14寸。房间里设施倒也比较齐全,除了牙具之外其它一应俱全,宽带是免费的。 在房间里稍事休息之后,跟同事一起坐出租到海边的大排档TANJUNG ARU去吃夜宵,玉米棒很好吃,比国内的玉米要甜很多,煮花生也挺香,就是花生米的颗粒稍小,通红的鸡翅烤的不错,但是偏甜,鸡肉串配沙茶酱味道也过得去,最差的是一种米饭块,用荷叶包着,可惜的是不但没有荷叶香,而且米饭入口也很面,毫无颗粒感,仿似在吃隔夜饭,椰子居然比海南要贵,一个需要3RM(1RM约等于2.1元人民币)。 吃完饭,这才觉得几乎坐了一天的屁股开始发牢骚了,带着整个大腿都酸疼起来,遂决定回酒店休息。这里的私家车很多,但是绝大部分都是小小的两厢车,在国内属于奥拓级别的,基本上是马来西亚的国产品牌,问出租车司机,居然每辆也需要4万RM,不便宜呢。 回到酒店,本来想把这篇文章发上来,结果躺在床上没一会儿直接睡死过去,一宿无话。 Powered by ScribeFire.

01:13 Choosing right separators when unload (export) rows to text file (2780 Bytes) » DBA Tools

    I am moving some data by ociuldr with the following field and record option.

ociuldr ... field=0x07 record=0x06 ...

    I think it will work well, but actually not, there are rows rejected when loading with sqlldr. The database use UTF8 character set and contains some Asia language data. The I change the separator option with following.

Unix: ociuldr ... field=\<#\> record=\<$\> ...
Windows: ociuldr ... field="<#>" record="<$>" ...

    This time it works very well, no rows are rejected, and the source and target tables are matched.

SQL> SELECT COUNT(*) FROM CR_8875106_UTNS19;

  COUNT(*)
----------
    100000

SQL> SELECT * FROM CR_8875106_SRC
  2  minus
  3  select * from CR_8875106_DEST;

no rows selected

SQL> SELECT * FROM CR_8875106_DEST
  2  minus
  3  SELECT * FROM CR_8875106_SRC;

no rows selected

    The only reason is the database character set, we should specify separators with the same character set as the database. Some invisible chars do not work well under UTF8 character set.

Related Posts

Leave New Comment(Current: 0)

Link: http://www.dbatools.net/experience/choose_right_separators.html

00:31 动态视图v$session_longops (1668 Bytes) » Welcome to brotherxiao's Home
很多时候数据库管理员需要监控数据中有哪些长时间运行的操作或者估算末个操作需要花费的时间。这有点类似windows进度条,事实是要真正做到100%准确是不太现实的,计算机中机会没有任何运算能够线性的运行。oracle也提供了动态性能视图v$session_longops来反映一些长时间运行的操作。最基本的原则是超过6s的事务将会在视图记录中。但也并不是所有超过6s的事务都会记录,例如hash join会被记录,而nested loop join就不会出现在其中。这个地方有时候会有些困惑,事务时间超过6s也没有在v$session_longops中显示?首先我们要明白的是:v$session_longops线性计算事务进度的(通常以读取的block为单位)而不计其它因素的影响,我们在估算事务时间需要考虑到其中的误差值。通常记录的事务类型包括:Table scan,Index Fast Full Scan,hash join,sort/merge,sort/output等等,在每一个新的release版本,oracle都会加入新支持的事务类型。 在实际当中(以table scan为例)除了需要满足6s这个条件外,进入v$session_longops还需要一个附加条件:至少包含10000个database block。只有同时满足两个条件的table scan操作才会记录到视图中。当然不同的操作类型,条件可能不同。 应用程序也可以通过DBMS_APPLICATION_INFO.SET_SESSION_LONGOPS定义自己的事务进度,写入v$session_longops。 另外需要注意的是v$session_longops反应的不一定是当前的session信息,可能需要结合v$session。v$session_longops中的条目会被自动重用。
00:31 oracle分布式事务-in-doubt transaction处理方法 (991 Bytes) » Welcome to brotherxiao's Home
通常情况下,在oracle分布式事务遇到故障时,由RECO进程负责在故障恢复时自动完成事务的提交/回滚,以保证分布式事务的一致性。只有在某些少数情况下(如故障点主机、网络或software不可恢复或者事务锁定了关键系统资源、回滚段等,因为in-doubt事务会阻塞读和写)才需要手工处理in-doubt transaction。 根据具体情况的不同,管理员需要选择不同的处理策略,说起来还是比较复杂的,首先你需要了解oracle分布式事务的two-phase commit机制。对于不同阶段prepare,commit,forget发生的故障(需要管理员去调查判断,oracle提供了视图dba_2pc_pending,dba_2pc_neighbors),需要采用不同的处理方式force commit/rollback。必须得非常小心,否则将可能导致数据的不一致性。 在采用了分布式事务时,一个值得注意的参数是commit_point_strength,它决定了commit point site。 更多可参考metalink

2007-09-26 Wed

21:30 安装和配置 NIS+ » developerWorks : AIX 专区的文章,教程
21:12 如何应对生活中的重大变化 » 生活帮-LifeBang
20:00 系统管理工具包: 测试系统的有效性 » developerWorks : AIX 专区的文章,教程
14:23 Hit Ratios (4) » Oracle Scratchpad
12:40 InnoDB auto-inc scalability fixed » MySQL Performance Blog
05:44 广州蒙难记 » Oracle Life
02:02 如何制作一个小火炉 » 生活帮-LifeBang

2007-09-25 Tue

23:00 系统管理工具包: 使用 SSH 进行分布式管理 » developerWorks : AIX 专区的文章,教程