Oracle大师Thomas Kyte

这次来北京做项目,有幸遇到Oracle大师Thomas Kyte (就是asktom背后的那个的Tom大师)。

Tom大师这次的中国之行还包括北京和上海等地的巡回活动,详细可以参考ACOUG的网站介绍。

跟大师的合影(2012.2.20)

Tom and Ricky
IMGP0266

Posted in 数据库 | Leave a comment

Oracle Shenzhen Job List

下面是近期Oracle Shenzhen的职位列表,覆盖了销售,售前,销售顾问,研发等等。产品覆盖了应用,中间件和数据库产品。
有兴趣请发mail至 ricky[dot]zhu[at]gmail[dot]com所要详细JD。
如果对其他城市的职位感兴趣,也可以直接发简历到上述邮箱。

[2012年1月]

ID209404: Solution Specialist SZ
ID221076: System Sales Consultant SZ/GZ
ID221903: Senior Sales Consultant – DB SZ/GZ
ID217291: China Account manager – Huawei SZ/GZ
ID209640: Huawei/ZTE Account Architect SZ/HK
ID220137: Strategic Sales Manager – Huawei SZ/HK
ID216267: Oracle Linux and VM Sales Consultant HK/SZ
ID204838: Consulting Sales Manager-MRD SZ/GZ
ID212513: Principal (Senior) Database Architect SZ
ID210826: Sr. Technical Analyst (Oracle DB) SZ
ID221346: SOA Software Specialist / Architect – Fusion Middleware SZ
ID221350: ACS Solution Consultant SZ/GZ
ID221483: i-Flex Senior/Principal Technical Consultant SZ
ID221468: i-Flex Core Banking Senior/Principal Functional Consultant SZ
ID221467: Database Kernel Java Developer SZ
ID220279: (Senior) Member of Technical Staff SZ
ID218879: Sr. Linux Engineer SZ
ID218221: OFA Product Manager SZ
ID216591: Member of Technical Staff – ST SZ
ID216594: Warehouse Builder Engineer SZ/BJ
ID215879: EM QA Analyst SZ
ID214715: (Senior) Member of Technical Staff – (Real Application Clusters) SZ
ID204653: (Senior) Application Developer – Financial Application Developments SZ
ID213875: (Senior) Software Engineer (Java/J2EE, C) SZ
ID207679: EBS Applications Engineer SZ
ID216596: ATG – Apps DBA SZ
ID221067: ATG – Product Lead SZ
ID221900: Senior QA Engineer – ITT SZ
ID221901: EBS SCM QA SZ
ID216595: RAC, (Senior) Member of Technical Staff SZ
ID216806: (Senior) Member of Technical Staff SZ
ID214044: iTech Pre-sales Consultant (Japanese Speaking) SZ
ID217300: Senior Sales Consultant – FMW SZ
ID217301: Senior Sales Consultant – DB SZ
ID218186: Senior Sales Consultant – DB Security SZ
ID218187: Senior Sales Consultant – EM/Cloud SZ
ID220227: Java Developer – iTech Presales Consultant SZ
ID221746: Principal Sales Consultant – Data Modeling Analysis SZ
ID221747: Senior Sales Consultant – R Language SZ

Posted in 求职招聘 | Tagged | 5 Comments

霸气侧漏

许多年不贴照片了!
许多年不上台了!
年度最佳节目都选上了,哥没啥低调的了,上照片!

IMG_1353

IMG_1354

IMG_1373

IMG_1326

Posted in 生活点滴 | Tagged | 1 Comment

如何在11gR2 RAC上配置GoldenGate (下)

上回书说到在11gR2上配置GoldenGate,今天应要求继续贴出下篇,下面的步骤是针对GoldenGate的HA配置

第一步 Add VIP resource for OGG


1. Create new VIP resource, use IP address 10.245.48.47 as example, login as root and run:
# /u01/app/11.2.0/grid/bin/appvipcfg create -network=1 -ip=10.245.48.47 -vipname=ggatevip -user=root

NOTE 1: '/u01/app/11.2.0/grid' is the default Oracle GRID infrastructure software directory.
NOTE 2: The example VIP resource name is 'ggatevip' and will be used in the rest of this document.
NOTE 3: -network refers to the network number, default value is '1'.

And you can find the network number using this command:

# /u01/app/11.2.0/grid/bin/crsctl stat res -p |grep -ie .network -ie
subnet |grep -ie name -ie subnet
NAME=ora.net1.network
USR_ORA_SUBNET=10.245.48.0
net1 indicates this is network 1, and the second line indicates the subnet on which the VIP will be created.

2. Allow oracle user to start the VIP, run this command as root:
# /u01/app/11.2.0/grid/bin/crsctl setperm resource ggatevip -u user:oracle:r-x

3. Log on as oracle user, start the VIP resource:
$ /u01/app/11.2.0/grid/bin/crsctl start resource ggatevip

4. Validate VIP is running:
$ /u01/app/11.2.0/grid/bin/crsctl status resource ggatevip
NAME=ggatevip
TYPE=app.appvip.type
TARGET=ONLINE
STATE=ONLINE on node452


NOTE: The TARGET and STATE should both be ONLINE.

5. Ping the VIP's IP address(10.245.48.47) and make sure it's reachable.
NOTE: If you also prefer to set up HA on target system, follow the same steps, and make necessary changes to directory, VIP resource name, IP address, etc.

第二步 Develop an agent script


1. Save the script in a file 11gr2_gg_action.scr and copy it to OGG directory.
NOTE: Make necessary changes to GGS_HOME(OGG directory) and ORACLE_HOME.

2. Make sure the script is executable:
$ chmod +x 11gr2_gg_action.scr

NOTE: If you also prefer to set up HA on target system, follow the same steps, and make necessary changes to GGS_HOME, ORACLE_HOME in this file.

第三步 Register OGG resource in Oracle Clusterware


1. Register OGG as a resource in Oracle Clusterware:
$ /u01/app/11.2.0/grid/bin/crsctl add resource ggateapp -type cluster_resource -attr "ACTION_SCRIPT=/cloudfs/goldengate/11gr2_gg_action.scr, \
CHECK_INTERVAL=30, START_DEPENDENCIES='hard(ggatevip,ora.ggdb.db) \
pullup(ggatevip)', STOP_DEPENDENCIES='hard(ggatevip)'"

NOTE 1: 'ggateapp' is the example OGG resource name and will be used in the rest of this document.
NOTE 2: 'ora.ggdb.db' is the resource name for database 'ggdb'.

2. Check the ggateapp resource is available as Oracle Clusterware resource:
$ /u01/app/11.2.0/grid/bin/crsctl status resource ggateapp
NAME=ggateapp
TYPE=cluster_resource
TARGET=OFFLINE
STATE=OFFLINE

NOTE: If you also prefer to set up HA on target system, follow the same steps, and make necessary changes to directory, VIP and database resource
name, etc.

第四步 Start the OGG resource

1. Start the resource, from now on you should always use Oracle Clusterware to start OGG:

$ /u01/app/11.2.0/grid/bin/crsctl start resource ggateapp

2. Check the status of OGG resource:
$ /u01/app/11.2.0/grid/bin/crsctl status resource ggateapp
NAME=ggateapp
TYPE=cluster_resource
TARGET=ONLINE
STATE=ONLINE on node452
NOTE: TARGET and STATE should both be ONLINE.

3. Check status of OGG processes:
GGSCI > info all
Program Status Group Lag
Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING MYEXT 00:00:07
00:00:04
EXTRACT RUNNING MYPUMP 00:00:00 0
0:00:05

NOTE: If you also prefer to set up HA on target system, follow the same steps.

第五步. Test OGG resource failover


1. Log on to node source node as oracle user:
$ /u01/app/11.2.0/grid/bin/crsctl relocate resource ggateapp -f
CRS-2673: Attempting to stop 'ggateapp' on 'node452'
CRS-2677: Stop of 'ggateapp' on 'node452' succeeded
CRS-2673: Attempting to stop 'ggatevip' on 'node452'
CRS-2677: Stop of 'ggatevip' on 'node452' succeeded
CRS-2672: Attempting to start 'ggatevip' on 'node453'
CRS-2676: Start of 'ggatevip' on 'node453' succeeded
CRS-2672: Attempting to start 'ggateapp' on 'node453'
CRS-2676: Start of 'ggateapp' on 'node453' succeeded

2. Check the status of OGG resource:
$ /u01/app/11.2.0/grid/bin/crsctl status resource ggateapp
NAME=ggateapp
TYPE=cluster_resource
TARGET=ONLINE
STATE=ONLINE on node453

NOTE: TARGET and STATE should both be ONLINE on node453.

3. Log on to another node 'node453' in this example as oracle user, go to OGG directory.

4. Set up LD_LIBRARY_PATH as described in Section 1, start GGSCI program:
$ ggsci

5. Check status of OGG processes:
GGSCI > info all
Program Status Group Lag
Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING MYEXT 00:00:09 0
0:00:04
EXTRACT RUNNING MYPUMP 00:00:00 0
0:00:05

NOTE: If you also prefer to set up HA on target system, follow the same steps, and make necessary changes to directory, etc.

如下是script的详细代码


#!/bin/sh
#set the Oracle Goldengate installation directory
export GGS_HOME=/cloudfs/goldengate
#set the oracle home to the database to ensure GoldenGate will get the
#right environment settings to be able to connect to the database
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
#specify delay after start before checking for successful start
start_delay_secs=5
#Include the GoldenGate home in the library path to start GGSCI
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:${GGS_HOME}:${LD_LIBRARY_PATH}
#check_process validates that a manager process is running at the PID
#that GoldenGate specifies.

check_process () {
if ( [ -f "${GGS_HOME}/dirpcs/MGR.pcm" ] )
then
  pid=`cut -f8 "${GGS_HOME}/dirpcs/MGR.pcm"`
  if [ ${pid} = `ps -e |grep ${pid} |grep mgr |cut -d " " -f2` ]
  then
    #manager process is running on the PID exit success
    exit 0
  else
  if [ ${pid} = `ps -e |grep ${pid} |grep mgr |cut -d " " -f1` ]
  then
    #manager process is running on the PID exit success
    exit 0
  else
    #manager process is not running on the PID
    exit 1
  fi
fi
else
  #manager is not running because there is no PID file
  exit 1
fi
}

#call_ggsci is a generic routine that executes a ggsci command
call_ggsci () {
  ggsci_command=$1
  ggsci_output=`${GGS_HOME}/ggsci < < EOF
  ${ggsci_command}
  exit
  EOF`
}

case $1 in
'start')
  #start manager
  call_ggsci 'start manager'
  #there is a small delay between issuing the start manager command
  #and the process being spawned on the OS. wait before checking
  sleep ${start_delay_secs}
  #check whether manager is running and exit accordingly
  check_process
  ;;
'stop')
  #attempt a clean stop for all non-manager processes
  #call_ggsci 'stop er *'
  #ensure everything is stopped
  call_ggsci 'stop er *!'
  #call_ggsci 'kill er *'
  #stop manager without (y/n) confirmation
  call_ggsci 'stop manager!'
  #exit success
  exit 0
  ;;
'check')
  check_process
  ;;
'clean')
  #attempt a clean stop for all non-manager processes
  #call_ggsci 'stop er *'
  #ensure everything is stopped
  #call_ggsci 'stop er *!'
  #in case there are lingering processes
  call_ggsci 'kill er *'
  #stop manager without (y/n) confirmation
  call_ggsci 'stop manager!'
  #exit success
  exit 0
  ;;
'abort')
  #ensure everything is stopped
  call_ggsci 'stop er *!'
  #in case there are lingering processes
  call_ggsci 'kill er *'
  #stop manager without (y/n) confirmation
  call_ggsci 'stop manager!'
  #exit success
  exit 0
  ;;
esac

Posted in 数据库 | Tagged , | Leave a comment

RAC知识问与答

之前申请过一个短域名,一直没想好怎么用起来…

前两天晚上抽空的时候利用Vanilla做了一个内容管理系统 Oracle RAC Q&A (http://racqa.com/f) (QA本意是Quality and Assurance,亦作Question & Answer)

刚开始主要是我自己自问自答的形式,大家有兴趣可以提问,当然如果有人帮忙回答更是十分感谢了…

看效果,呵呵,如果人气不旺,最后也许就变成我自己的自留地和知识管理平台了。

let’s see!

Posted in 生活点滴 | Tagged | Leave a comment

installment loans 如何在11gR2 RAC上配置GoldenGate (上)

Oracle 11gR2 RAC和GoldenGate都是Oracle比较热门的产品,经过简单的学习和阅读文档,配置单节点的GoldenGate进行数据的复制相信不是什么太有难度的事情,但是对于利用GoldenGate进行RAC系统到RAC系统的复制,还是有些配置的技巧和策略设置的,前阵子就遇到一个这样一个问题:假设源和目标分别是两节点的RAC系统,如何保证目标部分节点失效的时候replicate会自动切换? 其实如果了解GG的工作机制和RAC的资源管理,问题的解决就十分清晰了。
best installment loans for bad credit
今天就从系统的介绍下11gR2 RAC上OGG (Oracle GoldenGate的简称,下同)的完整配置步骤,并简单谈谈如何解决上面这个场景的问题。

第一阶段:下载OGG(可以参考之前的单节点的复制例子,不再赘述)
OGG的下载地址

第二阶段:OGG的安装

1)登录源端的RAC系统中的任一个节点,并在ACFS上建立一个供OGG使用的共享目录,比如叫/cloudfs/goldengate

2)解压OGG的安装包到/cloudfs/goldengate目录

3) 设置好OGG工作的环境变量,比如

export LIBRARY_PATH=/cloudfs/goldengate:$ORACLE_HOME/lib:$LD_LIBRARY_PATH

4)启动ggsci并创建目录,然后进行必要的设置,启动manager

$ ggsci

GGSCI > create subdirs

(optional, support for DDL/Sequence) 
Create and edit the parameter file for GLOBALS:

GGSCI > EDIT PARAMS ./GLOBALS
Add this line to GLOBALS parameter file:

GGSCHEMA ggs

NOTE: 'ggs' is the example OGG user and will be used in the rest of this document.

GGSCI > EDIT PARAMS mgr

Add the following lines to Manager parameter file:

PORT 7809
AUTOSTART ER *
AUTORESTART ER *

GGSCI > START mgr

5)在目标端重复上面的步骤1-4,注意目录名的使用,我们在目标端使用/mycloudfs/goldengate以示区分。

第三阶段:源和目标RAC数据库准备步骤

1) Create OGG user 'ggs' on both the source and target database, connect to database using SQL*Plus as SYSDBA:

SQL> CREATE USER ggs IDENTIFIED BY ggs;
SQL> GRANT CONNECT,RESOURCE,DBA TO ggs;

2)(optional, add Oracle sequence replication support) On both source and target database, go to OGG directory and run this SQL, enter OGG user 'ggs' as prompted:
SQL> @sequence.sql

3) Enable supplemental logging on source ODA database:
SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;
SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (UNIQUE) COLUMNS;
SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (FOREIGN KEY) COLUMNS;
SQL> ALTER SYSTEM SWITCH LOGFILE;

(Optional) Add Oracle DDL replication support
4) On the source system, go to OGG directory, connect to database using SQL*Plus as SYSDBA.

SQL> GRANT EXECUTE ON utl_file TO ggs;

5 On the source system, run the following script, provide OGG user 'ggs' as prompted.

SQL> @marker_setup.sql
SQL> @ddl_setup.sql

NOTE: enter 'INITIALSETUP' when prompted for the mode of installation.

SQL> @role_setup.sql
SQL> @ddl_enable.sql
SQL> @ddl_pin ggs

NOTE: 'ggs' here is the OGG user.

第四阶段:配置源端的extract group

1) Issue the following command to log on to the database.
GGSCI > DBLOGIN USERID ggs, PASSWORD ggs

2) Create a primary Extract group 'myext':

GGSCI > ADD EXTRACT myext, TRANLOG, BEGIN NOW, THREADS 2
NOTE: THREADS value is the number of your RAC instances.

3) Create a local trail. The primary Extract writes to this trail, and the data-pump Extract reads it.

GGSCI > ADD EXTTRAIL /cloudfs/goldengate/dirdat/et, EXTRACT myext
NOTE: 'et' is the example trail identifier for Extract 'myext'.

4) Create and edit the parameter file for Extract 'myext':

GGSCI > EDIT PARAMS myext
Add following lines to this parameter file:

EXTRACT myext
SETENV (ORACLE_HOME = "/u01/app/oracle/product/11.2.0/dbhome_1")
USERID ggs@ggdb, PASSWORD ggs
TRANLOGOPTIONS DBLOGREADER
THREADOPTIONS MAXCOMMITPROPAGATIONDELAY 20000
EXTTRAIL /cloudfs/goldengate/dirdat/et
DYNAMICRESOLUTION
DDL INCLUDE ALL
TABLE hr.*;

NOTE 1: make sure the SQL*Net connection string 'ggdb' works.
NOTE 2: 'hr' is the example schema which will be synchronized to the target system.

第五阶段:在源端配置data pump extract group

1)Create a data pump group 'mypump':
GGSCI > ADD EXTRACT mypump, EXTTRAILSOURCE /cloudfs/goldengate/dirdat/et, BEGIN now

2) Specify a remote trail that will be created on the target system.

GGSCI > ADD RMTTRAIL /mycloudfs/goldengate/dirdat/rt, EXTRACT mypump
NOTE: 'rt' is the example trail identifier for Extract 'mypump', and use the target OGG directory '/mycloudfs/goldengate' here.

3) Create and edit the parameter file for Extract 'mypump':
GGSCI > EDIT PARAMS mypump

Add following lines to this parameter file:

EXTRACT mypump
RMTHOST rac12box-scan, MGRPORT 7809
RMTTRAIL /mycloudfs/goldengate/dirdat/rt
PASSTHRU
TABLE hr.*;

NOTE: RMTHOST is the target host. If you also prefer to set up HA on the target system, specify the VIP for your target system as RMTHOST,
otherwise just use the IP address/hostname of your target system.

4) Start Extract 'myext' and 'mypump':

GGSCI > START myext
GGSCI > START mypump

5) Check the status of OGG processes:
GGSCI > info all

第六阶段:在目标端配置Replicat group

1) Create a Replicat group 'rept', which reads trails from Extract 'mypump':

GGSCI > ADD REPLICAT rept, EXTTRAIL /mycloudfs/goldengate/dirdat/rt, nodbcheckpoint

2) Create and edit the parameter file for Replicat 'rept':

GGSCI > EDIT PARAMS rept
Add following lines to this parameter file, assume the same ORACLE_HOME and target database 'ggdb' as in source ODA environment:

REPLICAT rept
SETENV (ORACLE_HOME = "/u01/app/oracle/product/11.2.0/dbhome_1")
USERID ggs@ggdb,PASSWORD ggs
ASSUMETARGETDEFS
HANDLECOLLISIONS
REPERROR (DEFAULT, DISCARD)
DDLERROR DEFAULT DISCARD
DDLOPTIONS REPORT
DISCARDFILE /mycloudfs/goldengate/repsz.dsc,append,megabytes 100
MAP hr.*, TARGET hr.*;

NOTE: make sure the SQL*Net connection string 'ggdb' works.

3) Start Replicat 'rept':

GGSCI > START rept

4) Check the status of OGG processes:
GGSCI > info all

第七阶段:验证Goldengate功能

1) Log on to source database as user 'hr', do some simple DDL and DML operations.
2) Check the data change has been captured by Extract on source system:

GGSCI > STATS myext
GGSCI > STATS mypump

3)Log on to target system as oracle user, check the status of Replicat 'rept':

GGSCI > STATS rept

4) Compare the output and make sure data change is synchronized.
5)(optional, for further HA setup) Stop OGG on source system:

GGSCI > STOP myext
GGSCI > STOP mypump
GGSCI > STOP mgr

6)(optional, for further HA setup) Stop OGG on target system:

GGSCI > STOP rept
GGSCI > STOP mgr

关于HA的设置,请继续关注下篇。

Posted in 数据库 | Tagged , | Leave a comment

srvctl起停Oracle实例内幕

早上跟小荷 @oracleblog 探讨说利用srvctl 和sqlplus启动Oracle实例上有什么不同,大概的工作过程是怎样的。 并且他在Solaris上遇到了一个因为project设置问题导致srvctl启动失败的bug,详细过程可以参考这个帖子

今天就简单介绍下在Oracle 11gR2中利用srvctl启动和停止Oracle instance的过程以及对应的日志查看方法。

简单来说,过程就是:srvctl->srvm (UIserver)->CRSD PE(proxy engine)->CRSD AGFW(agent framework)->agent->GIMH

1)环境是11.2.0.3,Linux64bit,两个节点的RAC


$ ./crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [11.2.0.3.0]
[Wed Nov 30 09:11:43][crsusr@node05:/scratch/u01/11203/grid/bin]
$

2)首先检查下,当前的数据库状态和资源状态


$ date; ./srvctl status database -d mynewracdb
Wednesday, November 30, 2011  9:07:47 AM UTC
Instance mynewrac1 is running on node node05
Instance mynewrac2 is running on node node06
[Wed Nov 30 09:07:50][crsusr@node05:/scratch/u01/11203/grid/bin]

$ ./crsctl stat res -t

...

ora.mynewracdb.db
      1        ONLINE  ONLINE       node05                 Open
      2        ONLINE  ONLINE       node06                 Open
ora.oc4j
      1        ONLINE  ONLINE       node05
ora.scan1.vip
      1        ONLINE  ONLINE       node06
ora.scan2.vip
      1        ONLINE  ONLINE       node05
ora.scan3.vip
      1        ONLINE  ONLINE       node05

...

3)停止数据库在节点1上的实例,查看crsd日志和agent日志



$ date; ./srvctl stop instance -d mynewracdb -i mynewrac1
Wednesday, November 30, 2011  9:08:59 AM UTC
[Wed Nov 30 09:09:21][crsusr@node05:/scratch/u01/11203/grid/bin]
$ ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DB_DG.dg
               ONLINE  ONLINE       node05
               ONLINE  ONLINE       node06
ora.LISTENER.lsnr
               ONLINE  ONLINE       node05
               ONLINE  ONLINE       node06
ora.OCR_VD.dg
               ONLINE  ONLINE       node05
               ONLINE  ONLINE       node06
ora.asm
               ONLINE  ONLINE       node05                 Started
               ONLINE  ONLINE       node06                 Started
ora.gsd
               OFFLINE OFFLINE      node05
               OFFLINE OFFLINE      node06
ora.net1.network
               ONLINE  ONLINE       node05
               ONLINE  ONLINE       node06
ora.ons
               ONLINE  ONLINE       node05
               ONLINE  ONLINE       node06
ora.registry.acfs
               ONLINE  ONLINE       node05
               ONLINE  ONLINE       node06
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       node06
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       node05
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       node05
ora.cvu
      1        ONLINE  ONLINE       node05
ora.node05.vip
      1        ONLINE  ONLINE       node05
ora.node06.vip
      1        ONLINE  ONLINE       node06
ora.mynewracdb.db
      1        OFFLINE OFFLINE                               Instance Shutdown
      2        ONLINE  ONLINE       node06                 Open
ora.oc4j
      1        ONLINE  ONLINE       node05
ora.scan1.vip
      1        ONLINE  ONLINE       node06
ora.scan2.vip
      1        ONLINE  ONLINE       node05
ora.scan3.vip
      1        ONLINE  ONLINE       node05
[Wed Nov 30 09:09:45][crsusr@node05:/scratch/u01/11203/grid/bin]
$



crsd.log 日志

/scratch/u01/11203/grid/log/node05/crsd

crsd.log

 30559  2011-11-30 09:09:02.508: [UiServer][49] CS(103727c10)set Properties ( crsusr,10330b690)
===>UI server 收到停止的命令,发给Proxy Engine

 30560  2011-11-30 09:09:02.527: [UiServer][48] {1:52451:782} Sending message to PE. ctx= 1047fa450, Client PID: 16523
 30561  2011-11-30 09:09:02.529: [   CRSPE][47] {1:52451:782} Processing PE command id=838. Description: [Stat Resource : 104622f50]
 30562  2011-11-30 09:09:02.532: [   CRSPE][47] {1:52451:782} Expression Filter : ((TYPE == ora.database.type) AND (NAME == ora.mynewracdb.db))
 30563  2011-11-30 09:09:02.557: [UiServer][48] {1:52451:782} Done for ctx=1047fa450
 30564  2011-11-30 09:09:02.678: [UiServer][49] CS(103727c10)set Properties ( crsusr,10384c290)
 30565  2011-11-30 09:09:02.696: [UiServer][48] {1:52451:783} Container [ Name: UI_STOP
 30566          API_HDR_VER:
 30567          TextMessage[2]
 30568          CLIENT:
 30569          TextMessage[]
 30570          CLIENT_NAME:
 30571          TextMessage[/scratch/u01/11203/grid/jdk/jre/bin/sparcv9/java]
 30572          CLIENT_PID:
 30573          TextMessage[16523]
 30574          CLIENT_PRIMARY_GROUP:
 30575          TextMessage[oinstall]
 30576          FILTER:
 30577          TextMessage[(^A(^A(^A(^A(^A(^ANAME^Ast^Aora.mynewracdb.^A)^A&&^A(^ANAME^Aen^A.svc^A)^A)^A&&^A(^ATYPE^A==^Aora.service.type^A)^A)^A&&^A(^A(^ASTATE^A!=^AOFFLINE^A)^A||^A(^ATARGET^A!=^
AOFFLINE^A)^A)^A)^A||^A(^A(^A(^ANAME^A==^Aora.mynewracdb.db^A)^A&&^A(^ATYPE^A==^Aora.database.type^A)^A)^A&&^A(^ASTATE^A!=^AOFFLINE^A)^A)^A)^A&&^A(^ALAST_SERVER^A==^Anode05^A)^A)]
 30578          FILTER_TAG:
 30579          TextMessage[1]
 30580          KEEP_D_TARGETS_TAG:
 30581          TextMessage[1]
 30582          LOCALE:
 30583          TextMessage[AMERICAN_AMERICA.US7ASCII]
 30584          QUEUE_TAG:
 30585          TextMessage[1]
 30586  ]
 30587  2011-11-30 09:09:02.697: [UiServer][48] {1:52451:783} Sending message to PE. ctx= 1047fb9d0, Client PID: 16523
 30588  2011-11-30 09:09:02.698: [   CRSPE][47] {1:52451:783} Cmd : 104622f50 : flags: KEEP_D_TARGETS_TAG | QUEUE_TAG
 30589  2011-11-30 09:09:02.699: [   CRSPE][47] {1:52451:783} Processing PE command id=839. Description: [Stop Resource : 104622f50]
 30590  2011-11-30 09:09:02.703: [   CRSPE][47] {1:52451:783} Expression Filter : ((((((NAME st ora.mynewracdb.) AND (NAME en .svc)) AND (TYPE == ora.service.type)) AND ((STATE != OFFLINE) OR (TARG
ET != OFFLINE))) OR (((NAME == ora.mynewracdb.db) AND (TYPE == ora.database.type)) AND (STATE != OFFLINE))) AND (LAST_SERVER == node05))
 30591  2011-11-30 09:09:02.713: [   CRSPE][47] {1:52451:783} Expression Filter : ((((((NAME st ora.mynewracdb.) AND (NAME en .svc)) AND (TYPE == ora.service.type)) AND ((STATE != OFFLINE) OR (TARG
ET != OFFLINE))) OR (((NAME == ora.mynewracdb.db) AND (TYPE == ora.database.type)) AND (STATE != OFFLINE))) AND (LAST_SERVER == node05))
 30592  2011-11-30 09:09:02.737: [   CRSPE][47] {1:52451:783} RI [ora.mynewracdb.db 1 1] new target state: [OFFLINE] old value: [ONLINE]
 30593  2011-11-30 09:09:02.740: [  CRSOCR][45] {1:52451:783} Multi Write Batch processing...
 30594  2011-11-30 09:09:02.742: [   CRSPE][47] {1:52451:783} RI [ora.mynewracdb.db 1 1] new internal state: [STOPPING] old value: [STABLE]

===> PE发送诶agent framework

 30595  2011-11-30 09:09:02.744: [   CRSPE][47] {1:52451:783} Sending message to agfw: id = 22058
 30596  2011-11-30 09:09:02.744: [    AGFW][42] {1:52451:783} Agfw Proxy Server received the message: RESOURCE_STOP[ora.mynewracdb.db 1 1] ID 4099:22058
 30597  2011-11-30 09:09:02.744: [   CRSPE][47] {1:52451:783} CRS-2673: Attempting to stop 'ora.mynewracdb.db' on 'node05'
 30598
 30599  2011-11-30 09:09:02.745: [    AGFW][42] {1:52451:783} Agfw Proxy Server forwarding the message: RESOURCE_STOP[ora.mynewracdb.db 1 1] ID 4099:22058 to the agent /scratch/u01/11203/grid/bin/o
raagent_crsusr
 30600  2011-11-30 09:09:02.749: [UiServer][48] {1:52451:783} Container [ Name: ORDER
 30601          MESSAGE:
 30602          TextMessage[CRS-2673: Attempting to stop 'ora.mynewracdb.db' on 'node05']

 30603          MSGTYPE:
 30604          TextMessage[3]
 30605          OBJID:
 30606          TextMessage[ora.mynewracdb.db 1 1]
 30607          WAIT:
 30608          TextMessage[0]
 30609  ]
 30610  2011-11-30 09:09:02.809: [  CRSOCR][45] {1:52451:783} Multi Write Batch done.
 30611  2011-11-30 09:09:13.319: [UiServer][49] CS(10333fad0)set Properties ( crsusr,1043d8e50)
 30612  2011-11-30 09:09:13.336: [UiServer][48] {1:52451:784} Container [ Name: UI_STOP
 30613          API_HDR_VER:
 30614          TextMessage[2]
 30615          CLIENT:
 30616          TextMessage[]
 30617          CLIENT_NAME:
 30618          TextMessage[Unknown process]
 30619          CLIENT_PID:
 30620          TextMessage[9788]
 30621          CLIENT_PRIMARY_GROUP:
 30622          TextMessage[oinstall]
 30623          EVENT_TAG:
 30624          TextMessage[1]
 30625          FILTER:
 30626          TextMessage[(^A(^A(^ANAME^A==^Aora.mynewracdb.db^A)^A&&^A(^ALAST_SERVER^A==^Anode05^A)^A)^A&&^A(^ASTATE^A!=^AOFFLINE^A)^A)^AUSR_ORA_OPI=true^AUSR_ORA_INST_NAME=mynewrac1]
 30627          FILTER_TAG:
 30628          TextMessage[1]
 30629          FORCE_TAG:
 30630          TextMessage[1]
 30631          LOCALE:
 30632          TextMessage[AMERICAN_AMERICA.WE8ISO8859P1]
 30633          NO_WAIT_TAG:
 30634          TextMessage[1]
 30635  ]
 30636  2011-11-30 09:09:13.337: [UiServer][48] {1:52451:784} Sending message to PE. ctx= 1047fa890, Client PID: 9788
 30637  2011-11-30 09:09:13.339: [   CRSPE][47] {1:52451:784} Cmd : 104622950 : flags: EVENT_TAG | FORCE_TAG
 30638  2011-11-30 09:09:13.339: [   CRSPE][47] {1:52451:784} Processing PE command id=840. Description: [Stop Resource : 104622950]
 30639  2011-11-30 09:09:13.341: [   CRSPE][47] {1:52451:784} Expression Filter : (((NAME == ora.mynewracdb.db) AND (LAST_SERVER == node05)) AND (STATE != OFFLINE))
 30640  2011-11-30 09:09:13.345: [   CRSPE][47] {1:52451:784} Expression Filter : (((NAME == ora.mynewracdb.db) AND (LAST_SERVER == node05)) AND (STATE != OFFLINE))
 30641  2011-11-30 09:09:13.354: [   CRSPE][47] {1:52451:784} Attribute overrides for the command: USR_ORA_INST_NAME = mynewrac1;USR_ORA_OPI = true;

====》 PE处理完毕,发给我UIserver,并由UIserver返回给sender,也就是最终的用户UI,在这里是svrctl

 30642  2011-11-30 09:09:13.367: [   CRSPE][47] {1:52451:784} PE Command [ Stop Resource : 104622950 ] has completed
 30643  2011-11-30 09:09:13.368: [   CRSPE][47] {1:52451:784} UI Command [Stop Resource : 104622950] is replying to sender.


agent 日志

/scratch/u01/11203/grid/log/node05/agent/crsd/oraagent_crsusr

oraagent_crsusr.log
 

====> agent 收到PE 发来的命令,开始准备停止的命令
 
2011-11-30 09:09:02.759: [    AGFW][10] {1:52451:783} Agent received the message: RESOURCE_STOP[ora.mynewracdb.db 1 1] ID 4099:22059
2011-11-30 09:09:02.759: [    AGFW][10] {1:52451:783} Preparing STOP command for: ora.mynewracdb.db 1 1
2011-11-30 09:09:02.759: [    AGFW][10] {1:52451:783} ora.mynewracdb.db 1 1 state changed from: ONLINE to: STOPPING
2011-11-30 09:09:02.767: [ora.mynewracdb.db][18] {1:52451:783} [stop] (:CLSN00108:) clsn_agent::stop {
2011-11-30 09:09:02.768: [ora.mynewracdb.db][18] {1:52451:783} [stop] InstAgent::stop_option stop mode immediate option 1
2011-11-30 09:09:02.768: [ora.mynewracdb.db][18] {1:52451:783} [stop] InstAgent::stop {
2011-11-30 09:09:02.771: [ora.mynewracdb.db][18] {1:52451:783} [stop] InstAgent::stop  shutdown mode: 3
2011-11-30 09:09:02.772: [ora.mynewracdb.db][18] {1:52451:783} [stop] DbAgent::preStopCbk {
2011-11-30 09:09:02.772: [ora.mynewracdb.db][18] {1:52451:783} [stop] DbAgentEventModule::stop stopping event bridge
2011-11-30 09:09:02.805: [ USRTHRD][18] {1:52451:783} CssSemaphore::release, released semaphore CLSN.AQPROC.mynewracdb.MASTER
2011-11-30 09:09:02.805: [ USRTHRD][18] {1:52451:783} AQPROC.mynewracdb CssSemMM::relinquishMastership I am no longer the master
2011-11-30 09:09:02.810: [ USRTHRD][18] {1:52451:783} WorkerThread::removeWorker total workers: 3
2011-11-30 09:09:02.819: [ USRTHRD][18] {1:52451:783} InstConnection:~InstConnection: this 014e6fd0
2011-11-30 09:09:02.820: [ora.mynewracdb.db][18] {1:52451:783} [stop] DbAgentEventModule::stop stopping rlb event bridge
2011-11-30 09:09:02.855: [ USRTHRD][18] {1:52451:783} CssSemaphore::release, released semaphore CLSN.RLB.mynewracdb.MASTER
2011-11-30 09:09:02.855: [ USRTHRD][18] {1:52451:783} RLB.mynewracdb CssSemMM::relinquishMastership I am no longer the master
2011-11-30 09:09:02.860: [ USRTHRD][18] {1:52451:783} WorkerThread::removeWorker total workers: 2
2011-11-30 09:09:02.863: [ USRTHRD][18] {1:52451:783} InstConnection:~InstConnection: this 014e6f70
2011-11-30 09:09:02.866: [ CRSCEVT][18] {1:52451:783} ClusterPublisher::disconnect Disconnected
2011-11-30 09:09:02.867: [ USRTHRD][18] {1:52451:783} Thread:DedicatedThreadstop {
2011-11-30 09:09:02.867: [ USRTHRD][18] {1:52451:783} Thread:DedicatedThreadstop }
2011-11-30 09:09:02.867: [ora.mynewracdb.db][18] {1:52451:783} [stop] DbAgent::preStopCbk }
2011-11-30 09:09:02.869: [ora.mynewracdb.db][18] {1:52451:783} [stop] ConnectionPool::getConnection 260 pConnxn 014e76f0
2011-11-30 09:09:02.869: [ora.mynewracdb.db][18] {1:52451:783} [stop] InstAgent::stop pool pConnxn 014e76f0
2011-11-30 09:09:02.870: [ora.mynewracdb.db][18] {1:52451:783} [stop] InstConnection::shutdown mode 3
2011-11-30 09:09:07.147: [ora.mynewracdb.db][18] {1:52451:783} [stop] DbAgent::stopCbk: {
2011-11-30 09:09:07.147: [ora.mynewracdb.db][18] {1:52451:783} [stop] DbAgent::stopCbk {
2011-11-30 09:09:07.148: [ora.mynewracdb.db][18] {1:52451:783} [stop] DbAgent::stopCbk close - ALTER DATABASE CLOSE NORMAL /* db agent *//* {1:52451:783} */
2011-11-30 09:09:13.156: [ora.mynewracdb.db][18] {1:52451:783} [stop] DbAgent::stopCbk dismount - ALTER DATABASE DISMOUNT /* db agent *//* {1:52451:783} */
2011-11-30 09:09:13.266: [ USRTHRD][18] {1:52451:783} Thread:DedicatedThreadstop {
2011-11-30 09:09:13.266: [ USRTHRD][18] {1:52451:783} Thread:DedicatedThreadstop }
2011-11-30 09:09:13.266: [ora.mynewracdb.db][18] {1:52451:783} [stop] DbAgent::stopCbk }
2011-11-30 09:09:13.266: [ora.mynewracdb.db][18] {1:52451:783} [stop] InstConnection::shutdown mode 5
2011-11-30 09:09:18.103: [ora.asm][13] {1:52451:2} [check] CrsCmd::ClscrsCmdData::stat entity 1 statflag 1 useFilter 0
2011-11-30 09:09:18.186: [ora.asm][13] {1:52451:2} [check] AsmProxyAgent::check clsagfw_res_status 0
2011-11-30 09:09:21.785: [ora.mynewracdb.db][18] {1:52451:783} [stop] ConnectionPool::releaseConnection InstConnection 014e76f0
2011-11-30 09:09:21.786: [ora.mynewracdb.db][18] {1:52451:783} [stop] ConnectionPool::stopConnection
2011-11-30 09:09:21.786: [ora.mynewracdb.db][18] {1:52451:783} [stop] ConnectionPool::removeConnection connection count 1
2011-11-30 09:09:21.786: [ora.mynewracdb.db][18] {1:52451:783} [stop] ConnectionPool::removeConnection sid  mynewrac1, InstConnection 014e76f0
2011-11-30 09:09:21.787: [ USRTHRD][18] {1:52451:783} InstConnection::breakCall pConnxn:014e76f0  DetachLock:00ac96f8 m_pSvcH:01e150b0
2011-11-30 09:09:21.787: [ USRTHRD][18] {1:52451:783} InstConnection:~InstConnection: this 014e76f0
2011-11-30 09:09:21.789: [ora.mynewracdb.db][18] {1:52451:783} [stop] ConnectionPool::removeConnection delete InstConnection 014e76f0
2011-11-30 09:09:21.789: [ora.mynewracdb.db][18] {1:52451:783} [stop] ConnectionPool::removeConnection freed 1

2011-11-30 09:09:21.789: [ora.mynewracdb.db][18] {1:52451:783} [stop] ConnectionPool::stopConnection sid mynewrac1 status  1
2011-11-30 09:09:21.790: [ora.mynewracdb.db][18] {1:52451:783} [stop] InstAgent::stop db/asm
2011-11-30 09:09:21.790: [ora.mynewracdb.db][18] {1:52451:783} [stop] ConnectionPool::stopConnection
2011-11-30 09:09:21.790: [ora.mynewracdb.db][18] {1:52451:783} [stop] ConnectionPool::removeConnection connection count 0
2011-11-30 09:09:21.791: [ora.mynewracdb.db][18] {1:52451:783} [stop] ConnectionPool::removeConnection freed 0
2011-11-30 09:09:21.791: [ora.mynewracdb.db][18] {1:52451:783} [stop] ConnectionPool::stopConnection sid mynewrac1 status  1
2011-11-30 09:09:21.791: [ora.mynewracdb.db][18] {1:52451:783} [stop] InstAgent::stop: }
2011-11-30 09:09:21.792: [ora.mynewracdb.db][18] {1:52451:783} [stop] (:CLSN00108:) clsn_agent::stop }
2011-11-30 09:09:21.792: [    AGFW][18] {1:52451:783} Command: stop for resource: ora.mynewracdb.db 1 1 completed with status: SUCCESS
2011-11-30 09:09:21.795: [    AGFW][10] {1:52451:783} Agent sending reply for: RESOURCE_STOP[ora.mynewracdb.db 1 1] ID 4099:22059
2011-11-30 09:09:21.797: [ora.mynewracdb.db][9] {1:52451:783} [check] ConnectionPool::resetConnection  s_statusOfConnectionMap 00ab1f68
2011-11-30 09:09:21.797: [ora.mynewracdb.db][9] {1:52451:783} [check] ConnectionPool::resetConnection sid mynewrac1 status  2
2011-11-30 09:09:21.798: [ora.mynewracdb.db][9] {1:52451:783} [check] Gimh::check condition changes to (GIMH_NEXT_NUM) 1 exists

====》注意这里的GIMH,这是instance提供的一个接口,可以直接访问到实例,这里的agent就是通过这个接口判断instance是否healthy的,决定database资源是否online或者offline等状态。


2011-11-30 09:09:21.798: [ora.mynewracdb.db][9] {1:52451:783} [check] clsnDbAgent:checkCbk clsagfw_res_status 22
2011-11-30 09:09:21.798: [ USRTHRD][9] {1:52451:783} Thread:DedicatedThreadstop {
2011-11-30 09:09:21.798: [ USRTHRD][9] {1:52451:783} Thread:DedicatedThreadstop }
2011-11-30 09:09:21.799: [ USRTHRD][9] {1:52451:783} Gimh::destructor gimh_dest_query_ctx rc=0
2011-11-30 09:09:21.800: [ USRTHRD][9] {1:52451:783} Gimh::destructor gimh_dest_inst_ctx rc=0
2011-11-30 09:09:21.800: [ora.mynewracdb.db][9] {1:52451:783} [check] ConnectionPool::stopConnection
2011-11-30 09:09:21.800: [ora.mynewracdb.db][9] {1:52451:783} [check] ConnectionPool::removeConnection connection count 0
2011-11-30 09:09:21.801: [ora.mynewracdb.db][9] {1:52451:783} [check] ConnectionPool::removeConnection freed 0
2011-11-30 09:09:21.801: [ora.mynewracdb.db][9] {1:52451:783} [check] ConnectionPool::stopConnection sid mynewrac1 status  1
2011-11-30 09:09:21.801: [ora.mynewracdb.db][9] {1:52451:783} [check] InstAgent::check checkCounter 34 prev clsagfw_res_status 2 current clsagfw_res_status 2
2011-11-30 09:09:21.803: [    AGFW][10] {1:52451:783} ora.mynewracdb.db 1 1 state changed from: STOPPING to: PLANNED_OFFLINE
2011-11-30 09:09:21.803: [    AGFW][10] {1:52451:783} ora.mynewracdb.db 1 1 state details has changed from: Open to: Instance Shutdown
2011-11-30 09:09:21.804: [    AGFW][10] {1:52451:783} Agent sending last reply for: RESOURCE_STOP[ora.mynewracdb.db 1 1] ID 4099:22059
2011-11-30 09:09:21.829: [ USRTHRD][23] ClusterSubscriber::SubscriberWorker::InternalClusterSubscriber::handleEventCBexecuting for reason 1



4)启动实例,并再次验证crsd日志和agnet日志



$ date; ./srvctl start instance -d mynewracdb -i mynewrac1
Wednesday, November 30, 2011  9:10:48 AM UTC
[Wed Nov 30 09:11:25][crsusr@node05:/scratch/u01/11203/grid/bin]
$


crsd 日志类似,不再贴出来,下面看看crsd agent日志:

 41386  2011-11-30 09:10:33.788: [    AGFW][10] {1:52451:2} Agent received the message: AGENT_HB[Engine] ID 12293:22088
 41387  2011-11-30 09:10:50.810: [    AGFW][10] {1:52451:809} Agent received the message: RESOURCE_START[ora.mynewracdb.db 1 1] ID 4098:22138
 41388  2011-11-30 09:10:50.810: [    AGFW][10] {1:52451:809} Preparing START command for: ora.mynewracdb.db 1 1
 41389  2011-11-30 09:10:50.810: [    AGFW][10] {1:52451:809} ora.mynewracdb.db 1 1 state changed from: PLANNED_OFFLINE to: STARTING
 41390  2011-11-30 09:10:50.818: [ora.mynewracdb.db][13] {1:52451:809} [start] (:CLSN00107:) clsn_agent::start {
 41391  2011-11-30 09:10:50.819: [ora.mynewracdb.db][13] {1:52451:809} [start] InstAgent::start {
 41392  2011-11-30 09:10:50.819: [ora.mynewracdb.db][13] {1:52451:809} [start] ConnectionPool::stopConnection
 41393  2011-11-30 09:10:50.820: [ora.mynewracdb.db][13] {1:52451:809} [start] ConnectionPool::removeConnection connection count 0
 41394  2011-11-30 09:10:50.820: [ora.mynewracdb.db][13] {1:52451:809} [start] ConnectionPool::removeConnection freed 0
 41395  2011-11-30 09:10:50.820: [ora.mynewracdb.db][13] {1:52451:809} [start] ConnectionPool::stopConnection sid mynewrac1 status  1
 41396  2011-11-30 09:10:50.820: [ USRTHRD][13] {1:52451:809} ConnectionPool::~ConnectionPool m_oracleHome:/scratch/u02/product/dbhome_1, m_oracleSid:mynewrac1, m_usrOraEnv:
 41397  2011-11-30 09:10:50.821: [ USRTHRD][13] {1:52451:809} Thread:DedicatedThreadstop {
 41398  2011-11-30 09:10:50.821: [ USRTHRD][13] {1:52451:809} Thread:DedicatedThreadstop }
 41399  2011-11-30 09:10:50.822: [ora.mynewracdb.db][13] {1:52451:809} [start] DbAgent:getOracleSid 13 oracle_sid = mynewrac1
 41400  2011-11-30 09:10:50.822: [ora.mynewracdb.db][13] {1:52451:809} [start] DbAgent:getOracleSid  oracle_sid = mynewrac1
 41401  2011-11-30 09:10:50.823: [ora.mynewracdb.db][13] {1:52451:809} [start] getOracleHomeAttrib: oracle_home = /scratch/u02/product/dbhome_1
 41402  2011-11-30 09:10:50.823: [ora.mynewracdb.db][13] {1:52451:809} [start] ConnectionPool::ConnectionPool 2 m_oracleHome:/scratch/u02/product/dbhome_1, m_oracleSid:mynewrac1, m_usrOraEnv:
 41403  2011-11-30 09:10:50.824: [ora.mynewracdb.db][13] {1:52451:809} [start] DbAgent::setOracleSidAttrib updating GEN_USR_ORA_INST_NAME@SERVERNAME(node05) to mynewrac1
 41404  2011-11-30 09:10:50.824: [ora.mynewracdb.db][13] {1:52451:809} [start] clsnUtils::setResAttrib nonPerX current value GEN_USR_ORA_INST_NAME value mynewrac1
 41405  2011-11-30 09:10:50.826: [ora.mynewracdb.db][13] {1:52451:809} [start] CrsCmd::ClscrsCmdData::stat entity 1 statflag 32 useFilter 0
 41406  2011-11-30 09:10:50.899: [ora.mynewracdb.db][13] {1:52451:809} [start] setResAttrib: attr GEN_USR_ORA_INST_NAME@SERVERNAME(node05) clsagfw attribVal mynewrac1 clscrs tmpAttrValue mynewrac
1
 41407  2011-11-30 09:10:50.899: [ora.mynewracdb.db][13] {1:52451:809} [start] setResAttrib clsagfw_modify_attribute attr GEN_USR_ORA_INST_NAME@SERVERNAME(node05) value mynewrac1 retCode 0
 41408  2011-11-30 09:10:50.900: [ora.mynewracdb.db][13] {1:52451:809} [start] sModifyConfig for mynewracdb
 41409  2011-11-30 09:10:50.900: [ora.mynewracdb.db][13] {1:52451:809} [start] getOracleHomeAttrib: oracle_home = /scratch/u02/product/dbhome_1
 41410  2011-11-30 09:10:50.901: [ora.mynewracdb.db][13] {1:52451:809} [start] Utils::getCrsHome crsHome /scratch/u01/11203/grid
 41411  2011-11-30 09:10:50.919: [ora.mynewracdb.db][13] {1:52451:809} [start] sclsnInstAgent::sUpdateOratab oratab is /var/opt/oracle/oratab
 41412  2011-11-30 09:10:50.921: [ora.mynewracdb.db][13] {1:52451:809} [start] sclsnInstAgent::sUpdateOratab CssLock
 41413  2011-11-30 09:10:50.938: [ora.mynewracdb.db][13] {1:52451:809} [start] ConfigFile::getValue name mynewracdb value
 41414  2011-11-30 09:10:50.962: [ora.mynewracdb.db][13] {1:52451:809} [start] ConfigFile::updateInPlace file /var/opt/oracle/oratab is updated
 41415  2011-11-30 09:10:50.962: [ora.mynewracdb.db][13] {1:52451:809} [start] sclsnInstAgent::sUpdateOratab file updated with dbName mynewracdb value /scratch/u02/product/dbhome_1:N
 41416  2011-11-30 09:10:50.962: [ora.mynewracdb.db][13] {1:52451:809} [start] sclsnInstAgent::sUpdateOratab CSS unlock
 41417  2011-11-30 09:10:50.977: [ora.mynewracdb.db][13] {1:52451:809} [start] ConfigFile:update file is /scratch/u02/product/dbhome_1/dbs/initmynewrac1.ora not modified
 41418  2011-11-30 09:10:50.985: [ora.mynewracdb.db][13] {1:52451:809} [start] Utils::getCrsHome crsHome /scratch/u01/11203/grid
 41419  2011-11-30 09:10:50.985: [ora.mynewracdb.db][13] {1:52451:809} [start] crsHome = /scratch/u01/11203/grid
 41420  2011-11-30 09:10:50.985: [ora.mynewracdb.db][13] {1:52451:809} [start] oracleHome = /scratch/u02/product/dbhome_1
 41421  2011-11-30 09:10:50.985: [ora.mynewracdb.db][13] {1:52451:809} [start] command = '/scratch/u01/11203/grid/bin/setasmgidwrap oracle_binary_path=/scratch/u02/product/dbhome_1/bin/oracle'
 41422  2011-11-30 09:10:50.986: [ora.mynewracdb.db][13] {1:52451:809} [start] start dependency = hard(ora.DB_DG.dg) weak(type:ora.listener.type,global:type:ora.scan_listener.type,uniform:ora.ons,g
lobal:ora.gns) pullup(ora.DB_DG.dg)
 41423  2011-11-30 09:10:50.986: [ora.mynewracdb.db][13] {1:52451:809} [start] ASM disk group dependency found
 41424  2011-11-30 09:10:50.986: [ora.mynewracdb.db][13] {1:52451:809} [start] Utils:execCmd action = 1 flags = 6 ohome = /scratch/u01/11203/grid cmdname = setasmgidwrap.

 
  41425  2011-11-30 09:10:51.245: [ora.mynewracdb.db][13] {1:52451:809} [start] execCmd ret = 0
 41426  2011-11-30 09:10:51.247: [ora.mynewracdb.db][13] {1:52451:809} [start] Utils::getCrsHome crsHome /scratch/u01/11203/grid
 41427  2011-11-30 09:10:51.247: [ora.mynewracdb.db][13] {1:52451:809} [start] clsnInstConnection::makeConnectStr UsrOraEnv  m_oracleHome /scratch/u02/product/dbhome_1 Crshome /scratch/u01/11203/gr
id
 41428  2011-11-30 09:10:51.247: [ora.mynewracdb.db][13] {1:52451:809} [start] Utils::getCrsHome crsHome /scratch/u01/11203/grid
 41429  2011-11-30 09:10:51.247: [ora.mynewracdb.db][13] {1:52451:809} [start] clsnInstConnection::makeConnectStr LIBRARY_PATH1 ,LD_LIBRARY_PATH=
 41430  2011-11-30 09:10:51.248: [ora.mynewracdb.db][13] {1:52451:809} [start] Utils::getCrsHome crsHome /scratch/u01/11203/grid
 41431  2011-11-30 09:10:51.248: [ora.mynewracdb.db][13] {1:52451:809} [start] clsnInstConnection::makeConnectStr LIBRARY_PATH2 ,LD_LIBRARY_PATH=,LD_LIBRARY_PATH_64=
 41432  2011-11-30 09:10:51.248: [ora.mynewracdb.db][13] {1:52451:809} [start] makeConnectStr = (DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/scratch/u02/product/dbhome_1/bin/oracle)(ARGV0=oraclemy
newrac1)(ENVS='ORACLE_HOME=/scratch/u02/product/dbhome_1,ORACLE_SID=mynewrac1,LD_LIBRARY_PATH=,LD_LIBRARY_PATH_64=')(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))'))(CONNECT_DATA=(SID=myn
ewrac1)))
 41433  2011-11-30 09:10:51.251: [ora.mynewracdb.db][13] {1:52451:809} [start] Container:start oracle home /scratch/u02/product/dbhome_1
 41434  2011-11-30 09:10:51.251: [ora.mynewracdb.db][13] {1:52451:809} [start] InstConnection::connectInt: server not attached
 41435  2011-11-30 09:10:51.470: [ora.mynewracdb.db][13] {1:52451:809} [start] InstAgent::startup

 ...
  41561  2011-11-30 09:11:25.513: [ USRTHRD][13] {1:52451:809} DbAgentEventModule::notifyDbOpen database is now open
 41562  2011-11-30 09:11:25.513: [ USRTHRD][13] {1:52451:809} DbAgentEventModule::notifyDbOpen starting AQ
 41563  2011-11-30 09:11:25.513: [ USRTHRD][13] {1:52451:809} DbAgentEventModule::notifyDbOpen starting RLB
 41564  2011-11-30 09:11:25.514: [ CRSCEVT][13] {1:52451:809} ClusterPublisher::connect connecting
 41565  2011-11-30 09:11:25.532: [ CRSCEVT][13] {1:52451:809} ClusterPublisher::connect Connected
 41566  2011-11-30 09:11:25.533: [ora.mynewracdb.db][13] {1:52451:809} [start] DbAgent::startCbk: }
 41567  2011-11-30 09:11:25.535: [ora.mynewracdb.db][13] {1:52451:809} [start] InstAgent::start: startConnection pool
 41568  2011-11-30 09:11:25.535: [ora.mynewracdb.db][13] {1:52451:809} [start] ConnectionPool::stopConnection
 41569  2011-11-30 09:11:25.535: [ora.mynewracdb.db][13] {1:52451:809} [start] ConnectionPool::removeConnection connection count 0
 41570  2011-11-30 09:11:25.536: [ora.mynewracdb.db][13] {1:52451:809} [start] ConnectionPool::removeConnection freed 0
 41571  2011-11-30 09:11:25.536: [ora.mynewracdb.db][13] {1:52451:809} [start] ConnectionPool::stopConnection sid mynewrac1 status  1
 41572  2011-11-30 09:11:25.536: [ USRTHRD][13] {1:52451:809} ConnectionPool::~ConnectionPool m_oracleHome:/scratch/u02/product/dbhome_1, m_oracleSid:mynewrac1, m_usrOraEnv:
 41573  2011-11-30 09:11:25.536: [ora.mynewracdb.db][13] {1:52451:809} [start] ConnectionPool::ConnectionPool 2 m_oracleHome:/scratch/u02/product/dbhome_1, m_oracleSid:mynewrac1, m_usrOraEnv:
 41574  2011-11-30 09:11:25.537: [ora.mynewracdb.db][13] {1:52451:809} [start] ConnectionPool::startConnection  s_statusOfConnectionMap 00ab1f68
 41575  2011-11-30 09:11:25.537: [ora.mynewracdb.db][13] {1:52451:809} [start] ConnectionPool::startConnection sid mynewrac1 status  2
 41576  2011-11-30 09:11:25.537: [ora.mynewracdb.db][13] {1:52451:809} [start] InstAgent::start release pConnxn 01b3d528 pConnxn
 41577  2011-11-30 09:11:25.538: [ora.mynewracdb.db][13] {1:52451:809} [start] ConnectionPool::releaseConnection InstConnection 019bf570
 41578  2011-11-30 09:11:25.539: [ora.mynewracdb.db][13] {1:52451:809} [start] InstAgent::start: }
 41579  2011-11-30 09:11:25.539: [ora.mynewracdb.db][13] {1:52451:809} [start] (:CLSN00107:) clsn_agent::start }
 41580  2011-11-30 09:11:25.540: [    AGFW][13] {1:52451:809} Command: start for resource: ora.mynewracdb.db 1 1 completed with status: SUCCESS
 41581  2011-11-30 09:11:25.544: [ora.mynewracdb.db][9] {1:52451:809} [check] Gimh::check OH /scratch/u02/product/dbhome_1 SID mynewrac1
 41582  2011-11-30 09:11:25.544: [    AGFW][10] {1:52451:809} Agent sending reply for: RESOURCE_START[ora.mynewracdb.db 1 1] ID 4098:22138
 41583  2011-11-30 09:11:25.545: [ora.mynewracdb.db][9] {1:52451:809} [check] Gimh::check condition changes to (GIMH_NEXT_NUM) 9 exists
 41584  2011-11-30 09:11:25.546: [ora.mynewracdb.db][9] {1:52451:809} [check] updating GEN_START_OPTIONS from  to open
 41585  2011-11-30 09:11:25.546: [ USRTHRD][9] {1:52451:809} Thread:DedicatedThreadstart {
 41586  2011-11-30 09:11:25.547: [ USRTHRD][9] {1:52451:809} Thread:DedicatedThreadstart }
 41587  2011-11-30 09:11:25.547: [ USRTHRD][2425] {1:52451:809} DbAgent::Dedicated Thread {
 41588  2011-11-30 09:11:25.548: [ USRTHRD][2425] {1:52451:809} CrsCmd::ClscrsCmdData::stat entity 1 statflag 32 useFilter 0
 41589  2011-11-30 09:11:25.549: [    AGFW][10] {1:52451:809} ora.mynewracdb.db 1 1 state changed from: STARTING to: ONLINE
 41590  2011-11-30 09:11:25.550: [    AGFW][10] {1:52451:809} Started implicit monitor for [ora.mynewracdb.db 1 1] interval=1000 delay=1000
 41591  2011-11-30 09:11:25.550: [    AGFW][10] {1:52451:809} ora.mynewracdb.db 1 1 state details has changed from: Instance Shutdown to: Open
 41592  2011-11-30 09:11:25.551: [    AGFW][10] {1:52451:809} Agent sending last reply for: RESOURCE_START[ora.mynewracdb.db 1 1] ID 4098:22138

 
 


Posted in 数据库 | Tagged , | 2 Comments

如何在Windows平台上使用OPatch

之前的工作平台清一色都是在Linux/Unix,自从来了新的部门,因为资源缺乏,只能自给自足,在自己的Windows机器上安装了两个虚拟机(OEL5和Solaris.X64),另外宿主机的Windows7(64bit)也装了一个11gR2的数据库,工作需要,很多之前没太接触的软件,包括ODI (Oracle Data Integrator),Oracle Fusion Middleware,Oracle WebLogic Server, Oracle GoldenGate (OGG)等等,该装的也都装上了。

上面是几句题外话了,下面步入正题。

最近因为涉及项目需要,一直在学习和演练ODI,在11.1.0.5.0上遇到了一个bug#12798243,打bug的过程中发现OPatch在Windows平台的使用也没想象的那么复杂,下面简单介绍下过程和使用中的注意事项:

1)首先下载下来最新版本的OPatch,这个在bug#6880880中追踪,只需要下载对应的patch,并解压到ODI_HOME/OPatch下面覆盖即可。
2)下载补丁10288265,这个是打其他ODI的patch之前必须的一个patch,直接解压patch,并运行setup.exe即可

3)下载补丁12798243,这个一个one-off patch,使用刚才步骤1中下载的OPatch进行apply

4)使用之前首先列出来当前ODI的版本和已有的patch

注意:在系统路径中增加OPatch的路径,并且在OPatch/ocm/bin/下面运行生成ocm.rsp文件,这在最新的opatch中是一个必须。


E:\Download\ofm_odi_generic_11.1.1.5.0_disk1_1of1\p12798243_111150_Generic\12798
243\opatch\12798243>opatch lsinventory -oh d:\Oracle\Middleware\Oracle_ODI1
Invoking OPatch 11.1.0.8.5

Oracle 临时补丁程序安装程序版本 11.1.0.8.5
版权所有 (c) 2011, Oracle Corporation。保留所有权利。


Oracle 主目录       : d:\Oracle\Middleware\Oracle_ODI1
主产品清单: C:\Program Files\Oracle\Inventory
   从           : n/a
OPatch 版本    : 11.1.0.8.5
OUI 版本       : 11.1.0.9.0
OUI 位置      : d:\Oracle\Middleware\Oracle_ODI1\oui
日志文件位置 : d:\Oracle\Middleware\Oracle_ODI1\cfgtoollogs\opatch\opatch2011-11
-29_16-10-08下午.log

Patch history file: d:\Oracle\Middleware\Oracle_ODI1\cfgtoollogs\opatch\opatch_h
istory.txt


OPatch detects the Middleware Home as "D:\Oracle\Middleware"

Lsinventory Output file location : d:\Oracle\Middleware\Oracle_ODI1\cfgtoollogs\
opatch\lsinv\lsinventory2011-11-29_16-10-08下午.txt

--------------------------------------------------------------------------------

已安装的顶级产品 (2):

Oracle Data Integrator 11g                                           11.1.1.5.0
Oracle Data Integrator Patchset                                      11.1.1.5.1
此 Oracle 主目录中已安装 2 个产品。


此 Oracle 主目录中未安装任何临时补丁程序。


--------------------------------------------------------------------------------

5)调用OPatch apply 打patch,注意这个版本的OPatch auto暂时并不支持在Windows平台上使用。另外就是ocm.rsp文件可以使用参数 -ocmrf 进行指定(使用我们之前生成的response file文件。


E:\Download\ofm_odi_generic_11.1.1.5.0_disk1_1of1\p12798243_111150_Generic\12798
243\opatch\12798243>opatch.bat apply -jdk d:\Java\jdk1.6.0_27 -oh d:\Oracle\Midd
leware\Oracle_ODI1 -ocmrf d:\oracle\Middleware\Oracle_ODI1\OPatch\ocm\bin\ocm.rs
p
Invoking OPatch 11.1.0.8.5

Oracle 临时补丁程序安装程序版本 11.1.0.8.5
版权所有 (c) 2011, Oracle Corporation。保留所有权利。


Oracle 主目录       : d:\Oracle\Middleware\Oracle_ODI1
主产品清单: C:\Program Files\Oracle\Inventory
   从           : n/a
OPatch 版本    : 11.1.0.8.5
OUI 版本       : 11.1.0.9.0
OUI 位置      : d:\Oracle\Middleware\Oracle_ODI1\oui
日志文件位置 : d:\Oracle\Middleware\Oracle_ODI1\cfgtoollogs\opatch\opatch2011-11
-29_16-38-20下午.log

Patch history file: d:\Oracle\Middleware\Oracle_ODI1\cfgtoollogs\opatch\opatch_h
istory.txt


OPatch detects the Middleware Home as "D:\Oracle\Middleware"

ApplySession 将临时补丁程序 '12798243' 应用到 OH 'd:\Oracle\Middleware\Oracle_OD
I1'

Running prerequisite checks...

OPatch 从产品清单中检测到非集群 Oracle 主目录, 将仅对本地系统打补丁。


请关闭本地系统上在此 ORACLE_HOME 之外运行的 Oracle 实例。
(Oracle 主目录 = 'd:\Oracle\Middleware\Oracle_ODI1')


本地系统是否已准备打补丁? [y|n]
y
User Responded with: Y
为 Oracle 主目录备份文件和产品清单 (不是用于自动回退)
正在备份受补丁程序 '12798243' 影响的文件以用于还原。此操作将需要一些时间...
正在备份受补丁程序 '12798243' 影响的文件以用于回退。此操作将需要一些时间...

正在为组件 oracle.odi.common, 11.1.1.5.0 打补丁...
将文件复制到 "d:\Oracle\Middleware\Oracle_ODI1\oracledi.common\odi\lib\odi-core.
jar"

正在为组件 oracle.odi.agent, 11.1.1.5.0 打补丁...
将文件复制到 "d:\Oracle\Middleware\Oracle_ODI1\oracledi.sdk\lib\odi-core.jar"

正在为组件 oracle.odi.studio, 11.1.1.5.0 打补丁...
将文件复制到 "d:\Oracle\Middleware\Oracle_ODI1\oracledi\client\jdev\extensions\o
racle.odi.navigator\lib\odi-core.jar"
ApplySession 将临时补丁程序 '12798243' 添加到产品清单

Verifying the update...
Inventory check OK: Patch ID 12798243 is registered in Oracle Home inventory wit
h proper meta-data.
Files check OK: Files from Patch ID 12798243 are present in Oracle Home.

本地系统已打补丁, 可以重新启动。


OPatch succeeded.


6)确定补丁打完之后,进行验证


E:\Download\ofm_odi_generic_11.1.1.5.0_disk1_1of1\p12798243_111150_Generic\12798
243\opatch\12798243>opatch lsinventory -oh d:\Oracle\Middleware\Oracle_ODI1
Invoking OPatch 11.1.0.8.5

Oracle 临时补丁程序安装程序版本 11.1.0.8.5
版权所有 (c) 2011, Oracle Corporation。保留所有权利。


Oracle 主目录       : d:\Oracle\Middleware\Oracle_ODI1
主产品清单: C:\Program Files\Oracle\Inventory
   从           : n/a
OPatch 版本    : 11.1.0.8.5
OUI 版本       : 11.1.0.9.0
OUI 位置      : d:\Oracle\Middleware\Oracle_ODI1\oui
日志文件位置 : d:\Oracle\Middleware\Oracle_ODI1\cfgtoollogs\opatch\opatch2011-11
-29_16-39-40下午.log

Patch history file: d:\Oracle\Middleware\Oracle_ODI1\cfgtoollogs\opatch\opatch_h
istory.txt


OPatch detects the Middleware Home as "D:\Oracle\Middleware"

Lsinventory Output file location : d:\Oracle\Middleware\Oracle_ODI1\cfgtoollogs\
opatch\lsinv\lsinventory2011-11-29_16-39-40下午.txt

--------------------------------------------------------------------------------

已安装的顶级产品 (2):

Oracle Data Integrator 11g                                           11.1.1.5.0
Oracle Data Integrator Patchset                                      11.1.1.5.1
此 Oracle 主目录中已安装 2 个产品。


临时补丁程序 (1) :

Patch  12798243     : applied on Tue Nov 29 16:38:46 CST 2011
Unique Patch ID:  14166630
   Created on 5 Oct 2011, 13:21:47 hrs
   Bugs fixed:
     12798243



--------------------------------------------------------------------------------


OPatch succeeded.

E:\Download\ofm_odi_generic_11.1.1.5.0_disk1_1of1\p12798243_111150_Generic\12798
243\opatch\12798243>


至此,在Windows上使用最新版本的OPatch给ODI打补丁完成。

Posted in 数据库 | Tagged | Leave a comment