123
 123

2007-09-26 Wed

23:14 How to pass parameters to your program in Shell script. (2578 Bytes) » DBA Tools

    I wrote some OCI program and compiled them into 32 bit executable on 64 bit Solaris machine. So I need to set the proper Oracle library path to get it work. I wrote a shell script to set some environment variables first, and then call my utility.

#!/bin/sh

if [ "A${ORACLE_HOME}A" = "AA" ]; then
   echo "ORACLE_HOME environment variable not setted."
   exit
fi

if [ "A${LD_LIBRARY_PATH}A" = "AA" ];then
   LD_LIBRARY_PATH=/lib:/usr/lib
fi

if [ -d ${ORACLE_HOME}/lib32 ]; then
   LD_LIBRARY_PATH=${ORACLE_HOME}/lib32:${LD_LIBRARY_PATH}
else
   LD_LIBRARY_PATH=${ORACLE_HOME}/lib:${LD_LIBRARY_PATH}
fi

ociuldr.bin "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"

    Later I added more and more command line options to my utility. Someday I found that my script did not work fine, some option values were not passed correctly to my utility. The reason was that only the first 9 options were passed to my utility. So I change the last line as following.

ociuldr.bin "$@"

    Now the problem get resolved.

Related Posts

Leave New Comment(Current: 0)

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

21:33 到达以及离开 下一站昆明 (1511 Bytes) » Oracle Life

©作者:eygle 发布在 eygle.com

昨晚到达成都,现在已经完成了我的演讲。

成都是第二次来到,想不到也是来去匆匆,下午,因为一个客户的关系,下午我将要赶往昆明。
回到那曾经离开了4年的地方。

.....

相关文章|Related Articles

评论数量(0)|Add Comments

本文网址:

21:30 安装和配置 NIS+ (390 Bytes) » developerWorks : AIX 专区的文章,教程
减轻系统管理任务并使用网络信息服务扩充版本(Network Information Service plus,NIS+),以便快速处理信息的维护和安全问题。NIS+ 是在客户机-服务器模式上工作的网络范围命名和管理服务。服务器在中央数据库维护用户和客户机的所有详细信息。在本文中,将详细说明如何安装、配置和管理 NIS+。
21:12 如何应对生活中的重大变化 (1460 Bytes) » 生活帮-LifeBang

生活并不总是一成不变的,失去工作、结婚、生孩子、搬家、退休、失去亲人…我们总是面临各种各样的冲击。如何在适应变化,将其对生活的影响降到最低,下面是一些建议:

  1. 接受现实。不要总是想“怎么才能恢复正常生活?”,将它看作一次让你有崭新生活的机遇。
  2. 给自己一些安静适应的时间。在这种时候,不用为休假而感到内疚。
  3. 做一些有建设性的事情。
  4. 问问自己到底害怕什么?
  5. 试一些以前没有尝试过的事情。
  6. 锻炼锻炼身体。
  7. 卸掉一些义务和责任,给自己一些独处的时间。
  8. 整理整理凌乱的房间。

“八个让你走出痛苦艰难变化的方法”-来自”逃离格子间”

20:13 马来西亚之行 - 香港机场 (2304 Bytes) » Chanel [K]
香港机场有PCCW的免费wifi,可惜的是笔记本的电池不太争气,充满了也只能支持40分钟左右,我一直觉得只有笔记本使用上太阳能才能算得上真正的移动电脑。 早上10点多的飞机从北京首都机场出发,国际离港口的人出奇的多,队伍七转八弯,可以看到Oracle的人占了不小的一部分。下午1点多到达香港国际机场,发现Oracle的人更多了,据说是因为前一天从北京出发到香港的同事们因为去马来西亚的飞机延误,因此在香港逗留了一个晚上,今天下午又全都出现在香港机场。 看到一辆印有DataCraft的车,忽然觉得当初为什么没有想到这个域名呢? 香港机场吸烟室的红椅子,硬梆梆的,但是坐上去还挺舒服。旁边那个是我的无敌大包包,无论去哪儿,无论去多少时间都是这一个包,装了我的全部家当。 机场候机厅旁边名店摩肩接踵,Gucci, Chanel, Prada,一个Gucci夸张的大墨镜大概1500,倒是还算好,可见有没有税差别还是很大。 本来这篇文章应该在昨天出现的,但是在准备按下Publish的那一刻,笔记本没电了。。。

20:00 系统管理工具包: 测试系统的有效性 (183 Bytes) » developerWorks : AIX 专区的文章,教程
研究存储然后检查配置文件有效性的方法。尽管您已经拥有各种安全系统,但是某些人仍可能访问您的系统,并更改您的配置或安全设置。
18:46 mod_rewrite实例: Learn Apache mod_rewrite: 13 Real-world Examples [del.icio.us] (139 Bytes) » 车东[Blog^2]
包含有URL 静态改写,防盗链等设置样例。
14:23 Hit Ratios (4) (283 Bytes) » Oracle Scratchpad
From the Oracle-L mailing list in the last 48 hours: I am working on tuning an app running against oracle 10.2.0.3 We have 48G on the server; my db_cache is 18G. When I look at the awr reports, I see db hit ratio being over 99% and a lot of waits for db sequential reads. Based [...]
12:40 InnoDB auto-inc scalability fixed (3219 Bytes) » MySQL Performance Blog

There was long played scalability issue with InnoDB auto-increment field. For details check Bug 16979. In short words the problem is in case of insert into table with auto-increment column the special AUTO_INC table level lock is obtained, instead of usual row-level locks. With many concurrent inserted threads this causes serious scalability problems, and in our consulting practice we had a lot of customers who was affected by InnoDB auto-inc. For several of them we even advised to replace auto-inc column by that or another solution.
Good news is the bug is fixed. Bad news is it is fixed only 5.1.22, which is not released yet.
I wonder if the fix is going to be ported to 5.0, as I mentioned it affected many production systems and not all of them are ready to upgrade to 5.1.
The interesting also is the fix introduces new system variable innodb_autoinc_lock_mode which determines behavior of InnoDB for tables with autoinc. I do not want to copy-paste MySQL documentation, the very good and informative description of the problem and solution is available here.


Entry posted by Vadim | No comment

Add to: delicious | digg | reddit | netscape | Google Bookmarks |

09:03 Oracle Database 11g: Automatic SQL Tuning (221 Bytes) » DBASupport
This article delves into a new Oracle Database 11g feature that significantly extends this powerful 10g feature by providing the ability to implement improved execution plans automatically within DBA-specified boundaries.
05:44 广州蒙难记 (2783 Bytes) » Oracle Life

©作者:eygle 发布在 eygle.com

这个题目有点大,不过,在数次往来广州,全身而退之后,这一次,终于是在广州栽了一个跟头。

话要从头说起。
24日从北京飞往广州,到广州的时候还下点小雨,打了一辆出租车直奔香格里拉大酒店。
大约用了一个小时,达到酒店,恩,确切的说,是差一点就到了酒店。

大约差50米的距离,司机的车熄火了,我看着他弄了好半天仍然无法启动,说,算了,我自己过去吧。
然后我付给他车费,大约是160块,我给了他200元,结果他还给我一张,说这个钱掉了一个角。
我接过来一看果然缺个角,于是又换了一张给他。

结果可想而知,他调包了我的100元。

事后分析,这个司机真是十分的狡猾。
首先,他的车坏在哪里,肯定是个计策,估计他怕到酒店门口不好骗我,或者害怕酒店的人记下他的车牌 。
然后,当我拿出他给我的出租车票时,我发现除了价格、时间外,他刚好把车牌号那一段撕掉了。

而我,又丝毫没有意识到这个骗局,根本没有记下他的车牌号。
于是,在我打了几个电话投诉之后,基本上知道,这个跟头是载下了。

终于,从一个侧面体验到了广州的欺骗。
100块买一个教训,其实便宜的很,以后出入广州,要千万小心谨慎了。

-The End-

相关文章|Related Articles

评论数量(14)|Add Comments

本文网址:

02:02 如何制作一个小火炉 (642 Bytes) » 生活帮-LifeBang

下面这段录像,教你如何用一些非常简单的材料制作一个方便实用的小火炉。

来源:metacafe.com

2007-09-25 Tue

23:00 系统管理工具包: 使用 SSH 进行分布式管理 » developerWorks : AIX 专区的文章,教程
05:22 祝大家中秋快乐 » dba on unix
03:21 明天马来西亚 » Chanel [K]
00:09 Reviewme:St Thomas Villa Rental » 给你点color see see

2007-09-24 Mon

17:26 又是一年中秋到 » OracleDBA Blog
09:28 挺住不动,真的很难! » Fenng's shared items in Google Reader
08:39 如何写一个很小的 CSS 文件 » Fenng's shared items in Google Reader
08:32 30year_logo » Photos from dbanotes
08:30 Parallel Query and 11g - Part 2 - Doug's Oracle Blog » del.icio.us/fenng/oracle
06:39 比特海日志18月23日,短信得来终觉浅 » Fenng's shared items in Google Reader
06:15 将方便进行到底——有道推出桌面词典和工具栏 » Fenng's shared items in Google Reader
06:13 我看blog上的广告 » 给你点color see see
05:30 淘宝的 Web 2.0 应用 » DBA notes