Learning ODI – Set ODI_JAVA_HOME

项目需要,所以正在学习使用Oracle Data Integrator,一个收购了Sunopsis之后整合的Oracle BI产品。

ODI + CDC可以实现异构数据库之间的数据抽取和数据同步,至少到目前看来是一个强大的工具。目前在测试使用的是Windows版本的Oracle Data Integrator 10.1.3.4.0。

简单记录一下学习过程中发现的问题以及解决方法。

发布过程中,在创建了一个Scenario之后,可以通过操作系统命令行的方式调用这个Scenario。但是可能会出现以下的问题:

C:\OraODI\oracledi\bin>startscen LOAD_SALES_ADMINISTRATION 001 GLOBAL “-v=2”
The Java Virtual Machine was not found at the following location:
The ODI_JAVA_HOME environment variable is not defined correctly.
Please set this variable in odiparams.bat.
OracleDI: Starting scenario LOAD_SALES_ADMINISTRATION 001 in context GLOBAL …
The system cannot find the path specified.

简单的解决方法就是使用安装ODI时自带的JVM,设置操作系统的环境变量ODI_JAVA_HOME即可。

C:\OraODI\oracledi\bin>set ODI_JAVA_HOME=C:\OraODI\jre\1.4.2

C:\OraODI\oracledi\bin>echo %ODI_JAVA_HOME%
C:\OraODI\jre\1.4.2

C:\OraODI\oracledi\bin>startscen LOAD_SALES_ADMINISTRATION 001 GLOBAL “-v=2”
A JDK is required to execute Web Services with OracleDI. You are currently using
a JRE.
OracleDI: Starting scenario LOAD_SALES_ADMINISTRATION 001 in context GLOBAL …
08/15/2008 08:05:59 下午(main): 正在为方案创建会话 :LOAD_SALES_ADMINISTRATION –
001
08/15/2008 08:05:59 下午(main): Session : 8005 is running
08/15/2008 08:06:05 下午(main): Session : 8005 finished with return code : 0
DwgJv.main: 退出。 返回代码:0

Why VKTM background process in Oracle 11g

在Oracle11g中,我们可以发现一个新的基础后台进程叫做VKTM (virtual keeper of time),这个进程是必须存在的。

在数据库启动时候的告警日志中可以看到:
VKTM started with pid=3, OS id=2256 at elevated priority
VKTM running at (20)ms precision

在数据字典中也可以查询到如下信息:


SQL> select name,description from v$bgprocess where name=’VKTM’;

NAME DESCRIPTION
—– —————————————–
VKTM Virtual Keeper of TiMe process

阅读Concepts文档可以看到对这个后台进程的解释是:

VKTM (virtual keeper of time) is responsible for providing a wall-clock time (updated every second) and reference-time counter (updated every 20 ms and available only when running at elevated priority).

我想这个解释仍然不足以描述这个进程到底是做什么的。

好吧,那这个进程到底是做什么的?

在11g之前所有的Oracle数据库后台或者前台进程如果需要获得当前时间信息,就需要调用操作系统的gettimeofday()函数或者说是相类似的函数。而VKTM进程就是专门用来获得时间信息然后将信息存放在SGA中供其它进程使用,这样其它进程当需要时间信息的时候,只要到SGA的某个内存位置去获得就好,而不用频繁调用gettimeofday()函数。毫无疑问,这样效率会更高。

在RAC测试中,Oracle 1.1.0.6版本LMSx进程获取时间信息时,可以从VKTM进程中获益大概70%的速度提升,而11.1.0.7将会更高。

同时,因为gettimeofday()函数也引发了很多bug,所以无论是RAC还是NORAC库,都将从VKTM进程中获益。

Issues about oracle bin file s bit not set

很早之前记录过一个问题 – oracle可执行文件s位导致的Cluster资源组无法正常启动的问题解决。

今天在另外一个客户处又出现了同样的问题,解决方法一样,但是问题现象却不一样,着实折腾了很久。问题现象是,启动数据库没有任何报错,启动监听也没有任何问题,lsnrctl services命令显示一切正常,但是在远程客户端通过监听登陆数据库,第一次会报Oracle not available的错误,之后再次尝试会报TNS-12516错误, “TNS:listener could not find instance with matching protocol stack”,此时再次检查lsnrctl services,会发现监听的状态变为blocked。

同样是使用tar包安装的Oracle9i软件,同样是在Solaris 9中,似乎这是Solaris系统中tar命令的一个毛病。

最后执行chmod解决问题。

chmod u+s,g+s $ORACLE_HOME/bin/oracle