Oracle E-Business Suite 12.1.3 Installation Guidelines

Stone大约 58 分钟

Oracle E-Business Suite 12.1.3 Installation Guidelines

本文介绍如何在 Linux 5.9 上安装 Oracle E-Business Suite 12.1.3。

安装包

官方网站open in new window下载安装包,版本为:Oracle E-Business Suite 12.1.1.0.0。

image-20231015094058225

安装包如下:

安装包名称sha1sum
B53824-01_1of4.zip2D7C0236FB389D0930923FB0DD26F8166AFA37F7
B53824-01_2of4.zip412200EFAE9D273B6D595E38A1C1E4CEFD23B693
B53824-01_3of4.zip561BB7EF8B3D178BB23FA9B3149DD78D52D05583
B53824-01_4of4.zip30B131BF700C2AC4417B5A883E7EBAEF88C08CD9
B53825-01.zipD95FA85897F9F3CBDE66296D1485D1CDE55A3B3B
V15680-01_1of3.zip4E6E00DD71B249BC2E81D2537A21A5B410D91119
V15680-01_2of3.zip014A289E79C5CA696198BF3FF89D4725E4FB501D
V15680-01_3of3.zipA7950D4CA08EE76957F9528CC6AB317645C9F819
V15681-01_1of3.zip1A7C7DBD7108691788A7E5BB84D2EC5D2FDD0763
V15681-01_2of3.zipC66D24CCBB60792C94440B8AC53794A3523E292B
V15681-01_3of3.zipF65A4E2464D46E1DD70CEE652A5E11262124B3C5
V15682-01_1of3.zip126AB6A9D90EEB30A4C587D24AD748192446929B
V15682-01_2of3.zipED336285584BD1B5865A518EDF8A888F79652E74
V15682-01_3of3.zip7AAEC31B1E9A4A9C7E9BFC271881ED515ABA8D14
V15683-01_1of3.zipEE6C9333822999F6E5A30112A932778CCC9D7462
V15683-01_2of3.zip2848E9B9BA19B04B5EF08B9FCAF871C9A4AF0FB1
V15683-01_3of3.zip11FD2395E957D13FCFD4BEB817580E01B1567908
V15684-01_1of3.zip2B4B1B4BF2DEA091E693AD7FCD483985398B9D2D
V15684-01_2of3.zip41CED969BC314C511A9082E648BF75CE9D19D20B
V15684-01_3of3.zip6F11526D19C6E2AAF52AA0B42E5118B9BC8337F4
V15685-01_1of3.zipA71DBC11B07CF755B74E03D70A69B074E22224E5
V15685-01_2of3.zip1C63391DE871633B1A1E9428337E616FED95643C
V15685-01_3of3.zip4778BE319DB0FFBA7A5D471070C6C299541EF176
V15686-01_1of3.zip93A849C3E80A07458E4694F5A079402A66ED87D7
V15686-01_2of3.zipCE4814DF62A31F2E12F238199986F7CF0184F958
V15686-01_3of3.zip3DF5FD45944D2BBED64947D46769E72D17C8C10D
V15687-01_1of3.zipCD45E11C26DDD2F04FFFD9A71B9E953CDDFE1EB4
V15687-01_2of3.zip159561FC50F72C2D1E87A5055CD2F5DFC4E11894
V15687-01_3of3.zip1DB6CD0C138FACE82120A168F9BC9586A7AFC0D2
V15688-01_1of2.zip22590C255A168C46353B54101277D923FA883302
V15688-01_2of2.zip0E22F0FC62B256EDF5367E2926B90AA9F5D78DDD
V15689-01.zip067E8653BBBBDA1B2EA0CB83F062D8AF9F16AB4F
V15690-01_1of3.zip0B6F468089AB71EC8911C6E411D6E04D9975B424
V15690-01_2of3.zipB6DBAE09B5EEED1B055E4FB13037CDCA730F489D
V15690-01_3of3.zipE1D1BB3EC8E874345951F15BC27959A3FB28E852
V15691-01_1of3.zip5AE4DF552690AE16ABE1DEEDF66F9EFD31012C08
V15691-01_2of3.zipDB86BE10E420338F54F4A6C3F567E1025D452067
V15691-01_3of3.zip975AA0EDC9965F894454D73EF59F0C5A567F77B4
V16181-01.zipE80246EA835622D5F6D5330DDBEAF1A34C21F274
V35224-01_1of3.zipF6886018C70ED832D8B083D8A277355CA30762B6
V35224-01_2of3.zip43CD1DDE4BDADFA7B5956AC70361EE55832C7EB9
V35224-01_3of3.zip7F49910DA59ADF5C3F846780068CEABA1AE108C9
V861706-01_1of4.zip038AED46C6DF576A927BE30B4C2D16A04E36DDC0
V861706-01_2of4.zip6D1F20211BA622B1893E623A70AB10A842C9F2A1
V861706-01_3of4.zipE2DAEAAFCF0D5BF0618C2E3A172C43B09223278F
V861706-01_4of4.zipEB6A15282E1FCAAB79C034D7DAFEE7D161AE17DA
V886647-01.zip16EB2DAF093A3107E30E64AE85C1A9396BB14ECF

操作系统

根据官方文档和最佳实践,建议将 Oracle E-Business Suite 12.1.3 安装在 Linux 5.9 操作系统上。

操作系统环境如下:

OSHost NameIPCPUMemorySwapDisk
CentOS 5.9ebst1.stonecoding.netopen in new window192.168.92.151416 GB8 GB500

本文是将应用和数据库安装在同一主机上。

安装系统

先根据配置创建虚拟机open in new window,然后开启虚拟机并回车。

image-20231014175116635

选择 “Skip” 并回车,进行安装:

image-20231014175251330

点击 ”Next“:

image-20231014180243930

语言选择 ”English“,点击 ”Next“:

image-20231014180414808

键盘选择 ”U.S. English“,点击 ”Next“:

image-20231014180506555

点击 ”Yes“,初始化磁盘:

image-20231014180644234

选择 “Create custom layout”,点击 ”Next“:

image-20231014181105162

点击 “New”,创建分区:

image-20231014181651369

创建 “/boot” 分区:

image-20231014181733193

创建 “swap” 分区,指定大小为 8 GB:

image-20231014182052193

将剩余空间都分配给根分区:

image-20231014182216256

然后点击 “Next”:

image-20231014182317827

保持默认安装 GRUB,点击 “Next”:

image-20231014182405393

点击 “Edit”,指定 IP 地址:

image-20231014182811985

选择 “Manual configuration”,配置分配的 IP 地址:

image-20231014182925775

指定 Hostname,Gateway 和 Primary DNS,点击 “Next”:

image-20231014183139104

选项时区为 “Asia/Shanghai”,不要勾选 “System clock uses UTC”,点击 “Next”:

image-20231014183524991

设置密码,点击 “Next”:

image-20231014183647471

取消勾选 “Desktop - Gnome”,采用最小化安装,点击 “Next”:

image-20231014183943767

点击 “Next” 开始安装:

image-20231014184047373

安装中:

image-20231014184225231

点击 “Reboot” 重启:

image-20231014184254179

配置系统

防火墙

关闭防火墙:

[root@ebst1 ~]# /etc/init.d/iptables stop
Flushing firewall rules:                                   [  OK  ]
Setting chains to policy ACCEPT: filter                    [  OK  ]
Unloading iptables modules:                                [  OK  ]
[root@ebst1 ~]# /etc/init.d/iptables status
Firewall is stopped.
[root@ebst1 ~]# chkconfig iptables off
[root@ebst1 ~]# chkconfig --list iptables
iptables        0:off   1:off   2:off   3:off   4:off   5:off   6:off

SELinux

关闭 SELinux:

[root@ebst1 ~]# getenforce 
Enforcing
[root@ebst1 ~]# sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
[root@ebst1 ~]# init 6
[root@ebst1 ~]# getenforce 
Disabled

依赖包

配置本地 YUMopen in new window,然后安装以下依赖包:

[root@ebst1 ~]# yum -y groupinstall "X Window System"
[root@ebst1 ~]# yum install -y gcc gcc-c++ glibc glibc-common glibc-devel libgcc libXrender libstdc++-devel libstdc++ libXi libXp libaio libgomp make gdbm sysstat util-linux compat-libstdc++-296 compat-libstdc++-33 elfutils-libelf-devel elfutils-libelf-devel-static libaio-devel unixODBC unixODBC-devel unixODBC kernel-headers ksh

官方网站open in new window下载额外依赖包到 Windows 目录,启用目录共享:

image-20231014230937397

再在 Windows 宿主机上启用 SMB 1.0/CIFS 文件共享支持并重启:

image-20231014230457353

然后挂载共享目录并安装:

[root@ebst1 ~]# mount -t cifs //192.168.92.1/software /mnt/hgfs -o user=xxxx,password=xxxx,vers=2.0
[root@ebst2 ~]# echo "mount -t cifs //192.168.92.1/software /mnt/hgfs -o user=xxxx,password=xxxx,vers=2.0" >> /etc/rc.local
[root@ebst1 ~]# cd /mnt/hgfs/ebs/12.1.1/patch/rhel5dependency/
[root@ebst1 rhel5dependency]# yum localinstall -y --nogpgcheck openmotif21-2.1.30-11.EL5.i386.rpm xorg-x11-libs-compat-6.8.2-1.EL.33.0.1.i386.rpm binutils-2.17.50.0.6-9.0.1.el5.x86_64.rpm
[root@ebst1 rhel5dependency]# which ar gcc g++ ksh ld linux32 make startx   
/usr/bin/ar
/usr/bin/gcc
/usr/bin/g++
/bin/ksh
/usr/bin/ld
/usr/bin/linux32
/usr/bin/make
/usr/bin/startx

内核参数

修改以下内核参数:

[root@ebst1 ~]# vim /etc/sysctl.conf
kernel.sem = 250 32000 100 142
kernel.shmall = 4294967296
kernel.shmmax = 68719476736
kernel.shmmni = 4096
kernel.msgmax = 8192
kernel.msgmnb = 65535
kernel.msgmni = 2878
fs.file-max = 131072
net.ipv4.ip_local_port_range = 10000 65000
net.ipv4.tcp_tw_recycle = 0
net.core.rmem_default = 262144
net.core.rmem_max =     4194304
net.core.wmem_default = 262144
net.core.wmem_max =     262144

[root@ebst1 ~]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
kernel.sem = 250 32000 100 142
kernel.shmall = 4294967296
kernel.shmmax = 68719476736
kernel.shmmni = 4096
kernel.msgmax = 8192
kernel.msgmnb = 65535
kernel.msgmni = 2878
fs.file-max = 131072
net.ipv4.ip_local_port_range = 10000 65000
net.ipv4.tcp_tw_recycle = 0
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144

资源限制

修改资源限制:

[root@ebst1 ~]# vim /etc/security/limits.conf
* hard nofile 65535
* soft nofile 4096
* hard nproc 16384
* soft nproc 2047

主机名

验证 /etc/hosts 文件的格式如下:

127.0.0.1 localhost.localdomain localhost
[ip_address] [node_name].[domain_name] [node_name]
[root@ebst1 ~]# vim /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6

192.168.92.151   ebst1.stonecoding.net   ebst1

验证 /etc/sysconfig/network 文件的格式如下:

[root@ebst1 ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=ebst1.stonecoding.net
GATEWAY=192.168.92.2

如果文件 /etc/sysconfig/networking/profiles/default/network 存在, 则删除:

[root@ebst1 ~]# rm /etc/sysconfig/networking/profiles/default/network
rm: cannot lstat `/etc/sysconfig/networking/profiles/default/network': No such file or directory

测试:

[root@ebst1 ~]# ping 192.168.92.151 -c 1     
PING 192.168.92.151 (192.168.92.151) 56(84) bytes of data.
64 bytes from 192.168.92.151: icmp_seq=1 ttl=64 time=0.012 ms

--- 192.168.92.151 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.012/0.012/0.012/0.000 ms

[root@ebst1 ~]# ping ebst1 -c 1       
PING ebst1.stonecoding.net (192.168.92.151) 56(84) bytes of data.
64 bytes from ebst1.stonecoding.net (192.168.92.151): icmp_seq=1 ttl=64 time=0.008 ms

--- ebst1.stonecoding.net ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.008/0.008/0.008/0.000 ms

[root@ebst1 ~]# ping ebst1.stonecoding.net -c 1
PING ebst1.stonecoding.net (192.168.92.151) 56(84) bytes of data.
64 bytes from ebst1.stonecoding.net (192.168.92.151): icmp_seq=1 ttl=64 time=0.009 ms

--- ebst1.stonecoding.net ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.009/0.009/0.009/0.000 ms

DNS

调整 DNS 解析参数:

[root@ebst1 ~]# vim /etc/resolv.conf
search stonecoding.net
nameserver 192.168.92.2
options attempts:5
options timeout:15

目录

创建 /u01 目录和 /u02 目录用于存放数据库和应用:

[root@ebst1 ~]# mkdir -p /u01/oracle
[root@ebst1 ~]# mkdir -p /u02/oracle

用户

创建 dba 组,再创建 oracleapplmgr 用户,分别对应数据库和应用,然后修改前面创建目录的属组:

[root@ebst1 ~]# groupadd dba
[root@ebst1 ~]# useradd -g dba oracle
[root@ebst1 ~]# useradd -g dba applmgr
[root@ebst1 ~]# chown -R oracle:dba /u01
[root@ebst1 ~]# chown -R applmgr:dba /u02
[root@ebst1 ~]# echo "123456" | passwd --stdin oracle
Changing password for user oracle.
passwd: all authentication tokens updated successfully.
[root@ebst1 ~]# echo "123456" | passwd --stdin applmgr
Changing password for user applmgr.
passwd: all authentication tokens updated successfully.

仓库目录

[root@ebst1 ~]# echo inventory_loc=/u01/oracle/oraInventory > /etc/oraInst.loc
[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ mkdir /u01/oracle/oraInventory

端口

确认 OPMN 端口号是否冲突。应用缺省的 OPMN 服务的端口号是 6000,这个可能和 Linux 服务器的 X11 图形控制台端口有冲突。

为了解决这个问题,在安装和升级前执行以下命令以检查端口号 6000 是否被占用。

[oracle@ebst1 ~]$ netstat -tuan | grep 6000

如果被占用,需要在 Linux 服务器上禁用图形控制台登录程序,使用 root 帐号,通过以下命令可以完成:

  • 找到使用端口号 6000 的程序 lsof -i TCP:6000
  • 使用 kill -9 命令结束之前步骤中找到的程序
  • 执行 netstat -a | grep 6000 确保不会再有占用端口 6000 的程序出现
  • 修改文件 /etc/inittab 中的 id:5:initdefault:id:3:initdefault:
  • 运行 /sbin/init 3 来重启 dtlogin

服务

检查 /etc/services 的大小。为了避免在安装 12.1 时注册 10.1.2 Oracle Home 发生 Java stack overflow 错误,请务必备份 /etc/services。如果文件的注释行数很多(>~1300),请删除这些注释行并在安装完成后再进行恢复。

[oracle@ebst1 ~]$ grep ^# /etc/services | wc -l
76

由于注释的行数为 76 行,小于 1300,故此处不做修改。

重启

[root@ebst1 ~]# ldconfig -v
[root@ebst1 ~]# init 6

解压

进入安装包目录并解压:

[root@ebst1 ~]# cd /mnt/hgfs/ebs/12.1.1/package/
[root@ebst1 package]# unzip \*.zip

BUG

修复 Link to Motif library in Oracle Application Server 10.1.2 (on Oracle Linux 5 and RHEL 5 only) 这个 Bug,否则将会在安装到 99% 时提示 HTTP 检查错误。

[root@ebst1 ~]# unlink /usr/lib/libXtst.so.6
unlink: cannot unlink `/usr/lib/libXtst.so.6': No such file or directory
[root@ebst1 ~]# ln -s /usr/X11R6/lib/libXtst.so.6.1 /usr/lib/libXtst.so.6

从 My Oracle Support 网站上下载并应用补丁 6078836,用来修订 Oracle HTTP Server 问题(缺少libdb.so.2),请注意这个补丁(包含一个必须的操作系统库)必须在 Oracle E-Business Suite 之前安装。

[root@ebst1 ~]# cd /mnt/hgfs/ebs/12.1.1/patch/beforeinstallpatch/
[root@ebst1 beforeinstallpatch]# unzip p6078836_101330_LINUX.zip
[root@ebst1 beforeinstallpatch]# cd 6078836/
[root@ebst1 6078836]# mv /usr/lib/libdb.so.2 /usr/lib/libdb.so.2.6078836
mv: cannot stat `/usr/lib/libdb.so.2': No such file or directory
[root@ebst1 6078836]# cp libdb.so.2 /usr/lib

安装 EBS

安装服务端

使用 RapidWizVersion 查看快速安装向导的版本:

[root@ebst1 ~]# cd /mnt/hgfs/ebs/12.1.1/package/startCD/Disk1/rapidwiz/
[root@ebst1 rapidwiz]# export DISPLAY=192.168.92.1:0.0
[root@ebst1 rapidwiz]# ./RapidWizVersion

Oracle Applications Rapid Install Wizard

Version 12.1.1.9

(c) Copyright 2000-2006 Oracle Corporation.  All rights reserved.

当前最新版本为12.1.1.13,如果不是该版本,需要下载安装补丁11072566:

[root@ebst1 ~]# cd /mnt/hgfs/ebs/12.1.1/package/
[root@ebst1 package]# unzip -o p11072566_R12_GENERIC.zip
[root@ebst1 package]# cd /mnt/hgfs/ebs/12.1.1/package/startCD/Disk1/rapidwiz/
[root@ebst1 rapidwiz]# ./RapidWizVersion

Oracle Applications Rapid Install Wizard

Version 12.1.1.13

(c) Copyright 2000-2006 Oracle Corporation.  All rights reserved.

然后启动安装向导,如果应用和数据库位于不同的服务器上,则先在数据库服务器上运行。

[root@ebst1 rapidwiz]# ./rapidwiz


Rapid Install Wizard is validating your file system......
4 dvd labels found
Rapid Install Wizard will now launch the Java Interface.....

image-20231015105305353

选择 “Install Oracle Applications Release 12.1.1”:

image-20231015105450352

不获取安全更新:

image-20231015105552275

选择 “Create a new configuration”:

image-20231015105640013

如果在安装过程中出现中断,需要重新启动后(./rapidwiz -restart)再进行安装,或者在安装多节点的情况下,才需要选择 “Load the following saved configuration”。

可以在命令行界面看到新产生的安装配置参数文件 conf_<SID>.txt,保存的是数据库节点和应用节点信息。该文件在点击 Next 按钮后会自动产生,存放在以下3个不同的位置:

  • 数据库节点:存放在 <ORACLE_HOME>/appsutil 目录下,该文件将被永久存储。
  • 应用节点:存放在 $INST_TOP 目录下,该文件将被永久存储。
  • 临时目录:存放在 tmp/<time_stamp> 目录下,安装完成后自动删除。

数据库和应用物理分开是生产系统最常见的一种部署架构,需要先在数据库服务器上运行 “Rapid Install”,再在应用服务器上运行 “Rapid Install”。

保持默认的端口设置:

image-20231015110139642

默认端口池为 0,如果选择 1,则所有端口都会增加 1。

默认端口如下:

Variable NameDescriptionDefault ValueTechnologyComponent
s_dbportPort on the database server used by the database listener1521RDBMSTNS listener
s_rpcportRPC port on the concurrent processing server that receives incoming Report Review Agent requests1626ApplicationsApplication tier TNS listener
s_formsport(a)Port on the Forms server used by the Forms Listener9000Forms 10Forms
s_mwaPortNoMSCA Server Port Number10200ApplicationsMobile
s_mwaDispatcherPortMSCA Dispatcher Port Number10300ApplicationsMobile
s_webportPort on the webserver where http server listens for non-TLS requests8000Oracle Fusion MiddlewareOracle HTTP Server
s_webssl_portPort on the webserver where http server listens for TLS requests4443Oracle Fusion MiddlewareOracle HTTP Server
s_active_webportValue of this variable is set to value of s_webport when Listener is configured in non-TLS mode and to the value of s_webssl_port when TLS is configured8000/4443Oracle Fusion MiddlewareOracle HTTP Server
s_jtfuf_portJTF fulfilment server port11000ApplicationsJTF
s_ons_localportOracle Notification Service6100Oracle Fusion MiddlewareOPMN (manages OHS & oc4j)
s_ons_remoteportOracle Notification Service6200Oracle Fusion MiddlewareOPMN
s_ons_requestportOracle Notification Service6500Oracle Fusion MiddlewareOPMN
s_ohs_adminportOHS Administration Proxy Port9999Oracle HTTP Server
s_java_object_cache_portJava Object Cache Port12345Oracle Fusion MiddlewareJava Object Cache

配置数据库节点:

image-20231015110802801

其中:

  • “Database Type” 选择 “Fresh Database”。
  • “Base directory” 就是 $ORACLE_HOME 变量。
  • 可以通过点击 “Edit Paths” 将数据库软件和数据文件制定到不同的目录。

image-20231015111119412

许可类型选择 “Suite Licensing":

image-20231015111208547

选择所有功能:

image-20231015112136592

选择特定国家功能,在中国使用需要选择 “China - CN”:

image-20231015112246609

国际化设置:

image-20231015112442215

其中:

  • ”Languages“ 选择 “American_English - US” 和 “Simplified_Chinese - ZHS”
  • “Default territory” 选择 “CHINA”
  • “Database character set” 选择 “AL32UTF8”
  • “APPL_TOP character set” 选择 “AL32UTF8”
  • “IANA character set” 选择 “UTF8”

配置应用节点:

image-20231015112753910

image-20231015112913395

查看节点信息:

image-20231015112956633

  • 对于较小的ERP环境,一个数据库服务器节点和一个应用服务器节点就已经足够了。
  • 对于大型的ERP环境,需要配置多个应用服务器才能满足企业业务需求,这时单击 “Add Server” 来增加新的应用服务器。

对于新增加的应用服务器的管理,一般有两种架构方式:

  • 第一种是配置共享模式的应用服务器节点,维护方便,占用空间少,应用补丁程序时可以在所有节点上一次完成,实际工作中用得比较多。
  • 第二种是配置非共享模式的应用服务器节点,这种方式需要在每个应用节点上存放一份 $APPL_TOP 文件,并且要求每个应用节点的 $APPL_TOP 的路径必须和主应用节点完成一样。维护成本比较高,一般不建议采用。

可以为应用服务器配置不同的服务,例如配置一台应用服务器只做 Application 服务,一台只做 Web 服务,一台只做并发管理服务。但是 Root Services,Web Entry Point Services 和 Web Application Services 要在同一个节点上。

系统检查:

image-20231015113041553

安装前验证系统配置:

image-20231015113258621

组件安装回顾:

image-20231015113418888

开始安装,大概需要 1 小时:

image-20231015113502750

image-20231015113537664

安装日志:


Configuration file written to: /u02/oracle/PROD/inst/apps/PROD_ebst1/conf_PROD.txt
Configuration file written to: /u01/oracle/PROD/db/tech_st/11.1.0/appsutil/conf_PROD.txt
Database logfile - /u01/oracle/PROD/db/tech_st/11.1.0/appsutil/log/PROD_ebst1/10151020.log
Appltop logfile - /u02/oracle/PROD/inst/apps/PROD_ebst1/logs/10151020.log

安装后验证系统配置:

image-20231015123131506

安装完成:

image-20231015123223500

完成后查看空间占用情况:

[root@ebst1 ~]# du -sh /u01 /u02
53G     /u01
27G     /u02

配置服务端

配置环境变量

  • DB 用户
[oracle@ebst1 ~]$ echo '. /u01/oracle/PROD/db/tech_st/11.1.0/PROD_ebst1.env' >> .bash_profile                                                   
[oracle@ebst1 ~]$ source .bash_profile
[oracle@ebst1 ~]$ env | grep ORACLE
ORACLE_SID=PROD
ORACLE_HOME=/u01/oracle/PROD/db/tech_st/11.1.0
  • AP 用户
[oracle@ebst1 ~]$ echo '. /u01/oracle/PROD/db/tech_st/11.1.0/PROD_ebst1.env' >> .bash_profile                                                   
[oracle@ebst1 ~]$ source .bash_profile

调整文件权限

在多用户安装环境下,需要授予 Net Service Listeners 使用的临时文件 /var/tmp/.oracle 777 权限。

[root@ebst1 ~]# ll -d /var/tmp/.oracle/
drwxrwxrwt 2 oracle dba 4096 Oct 15 11:56 /var/tmp/.oracle/
[root@ebst1 ~]# chmod 777 /var/tmp/.oracle
[root@ebst1 ~]# ll -d /var/tmp/.oracle/
drwxrwxrwx 2 oracle dba 4096 Oct 15 11:56 /var/tmp/.oracle/

用户初始密码

数据库用户:

UsernamePassword
SYSchange_on_install
SYSTEMmanager
APPSapps
APPLSYSPUBpub

应用用户:

UsernamePassword
sysadminsysadmin

安装客户端

参考 R12: Recommended Browsers for Oracle E-Business Suite (Doc ID 389422.1) 文档使用兼容版本的浏览器。

在 DNS 或者客户端配置域名解析,然后使用浏览器访问地址:http://ebst1.stonecoding.net:8000/OA_HTML/AppsLoginopen in new window,输入用户名:sysadmin,密码:sysadmin,点击 “Login”:

image-20231015162849732

点击 “System Administrator”,再点击 “Define Profile Options”:

image-20231015163122535

根据提示,下载并安装 JRE:

image-20231015163236194

安装后信息如下:

C:\Users\stone>java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)

然后重启浏览器,开启兼容模式,加入信任站点,将受信任的站点的安全级别设置为低。再次点击 “Define Profile Options”,即可访问 Form。

安装中文

建议:

如果是虚拟机,安装前做一个快照。

配置应用

注册简体中文

使用 sysadmin 登录应用后,访问菜单 “System Administrator/Oracle Applications Manager/License Manager/“:

image-20231015165050660

选择 “Languages”:

image-20231015165450801

勾选 “Simplefied Chinese”,然后点击 “Next”:

image-20231015165559028

保持 “American English“ 为 “Base Language“。注意:不要使用 “Simplified Chinese” 作为 “Base Language“,否则以后打多语言包补丁会有麻烦。点击 “Next”:

image-20231015165917479

确认无误后,点击 “Submit”:

image-20231015170001229

点击 “OK” 完成:

image-20231015170107069

维护多语言表

先关闭应用:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ $ADMIN_SCRIPTS_HOME/adstpall.sh apps/apps
[applmgr@ebst1 ~]$ ps -ef | grep java | grep applmgr

等待关闭所有应用进程后,使用 applmgr 用户运行 adadmin,进入 adadmin 的菜单,选择 “4. Maintain Applications Databa Entities menu” -> “3. Maintain multi-lingual tables” 选项:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ adadmin
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adadmin.log] : 回车
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
            AD Administration Main Menu
   --------------------------------------------------
   1.    Generate Applications Files menu
   2.    Maintain Applications Files menu
   3.    Compile/Reload Applications Database Entities menu
   4.    Maintain Applications Database Entities menu
   5.    Change Maintenance Mode
   6.    Exit AD Administration
Enter your choice [6] : 4
         Maintain Applications Database Entities
   ---------------------------------------------------
   1.    Validate APPS schema
   2.    Re-create grants and synonyms for APPS schema
   3.    Maintain multi-lingual tables
   4.    Check DUAL table
   5.    Return to Main Menu
Enter your choice [5] : 3
Enter the number of workers [8] : 回车
Review the messages above, then press [Return] to continue. 回车
Enter your choice [5] : 回车
Enter your choice [6] : 回车

启用维护模式

使用 applmgr 用户运行 adadmin,进入 adadmin 的菜单,选择 “5. Change Maintenance Mode” -> “1. Enable Maintenance Mode” 选项:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ adadmin
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adadmin.log] : 回车
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
            AD Administration Main Menu
   --------------------------------------------------
   1.    Generate Applications Files menu
   2.    Maintain Applications Files menu
   3.    Compile/Reload Applications Database Entities menu
   4.    Maintain Applications Database Entities menu
   5.    Change Maintenance Mode
   6.    Exit AD Administration
Enter your choice [6] : 5
             Change Maintenance Mode
   ----------------------------------------
Maintenance Mode is currently: [Disabled].
Maintenance mode should normally be enabled when patching
Oracle Applications and disabled when users are logged on
to the system.  See the Oracle Applications Maintenance
Utilities manual for more information about maintenance mode.
Please select an option:
   1.    Enable Maintenance Mode
   2.    Disable Maintenance Mode
   3.    Return to Main Menu
Enter your choice [3] : 1
Review the messages above, then press [Return] to continue. 回车
Enter your choice [3] : 回车
Enter your choice [6] : 回车

安装补丁

性能补丁

p8576725 这个补丁包是与语言包相关的性能修复包,如果不提前修复这个bug,则在打语言补丁的过程中整体速度会非常慢。

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ cd /mnt/hgfs/ebs/12.1.1/patch/langpatch12.1.1/
[applmgr@ebst1 langpatch12.1.1]$ unzip \*.zip
[applmgr@ebst1 langpatch12.1.1]$ cd 8576725/
[applmgr@ebst1 8576725]$ adpatch
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adpatch.log] : 8576725.log
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
The default directory is [/mnt/hgfs/ebs/12.1.1/patch/langpatch12.1.1/8576725] : 回车
Please enter the name of your AutoPatch driver file : u8576725.drv

中文补丁

在 Oracle E-Business Suite 12.1.1.0.0 解压安装包中找到6678700_ZHS。

[applmgr@ebst1 8576725]$ cd /mnt/hgfs/ebs/12.1.1/package/6678700_ZHS/
[applmgr@ebst1 6678700_ZHS]$ adpatch
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adpatch.log] : 6678700_ZHS.log
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
The default directory is [/mnt/hgfs/ebs/12.1.1/package/6678700_ZHS] : 回车
Please enter the name of your AutoPatch driver file : u6678700.drv
Enter the number of parallel workers [8] : 回车

中文帮助补丁

[applmgr@ebst1 6678700_ZHS]$ cd /mnt/hgfs/ebs/12.1.1/patch/langpatch12.1.1/6746000_ZHS/
[applmgr@ebst1 6746000_ZHS]$ adpatch
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adpatch.log] : 6746000_ZHS.log
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
The default directory is [/mnt/hgfs/ebs/12.1.1/patch/langpatch12.1.1/6746000_ZHS] : 回车
Please enter the name of your AutoPatch driver file : u6746000.drv
Enter the number of parallel workers [8] : 回车

配置应用

生成消息文件

使用 applmgr 用户运行 adadmin,进入 adadmin 的菜单,选择 “1. Generate Applications Files menu” -> “1. Generate message files” 选项:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ adadmin
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adadmin.log] : 回车
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
            AD Administration Main Menu
   --------------------------------------------------
   1.    Generate Applications Files menu
   2.    Maintain Applications Files menu
   3.    Compile/Reload Applications Database Entities menu
   4.    Maintain Applications Database Entities menu
   5.    Change Maintenance Mode
   6.    Exit AD Administration
Enter your choice [6] : 1
         Generate Applications Files
   ----------------------------------------
   1.    Generate message files
   2.    Generate form files
   3.    Generate report files

   4.    Generate product JAR files
   5.    Return to Main Menu
Enter your choice [5] : 1
Enter the number of workers [8] : 回车
using this character set [Yes] ? 回车
Enter list of products ('all' for all products) [all] : 回车
Enter list of languages ('all' for all of the above) [all] : 回车
Is this the correct set of languages [Yes] ? 回车
Enter your choice [3] : 回车
Enter your choice [6] : 回车

禁用维护模式

使用 applmgr 用户运行 adadmin,进入 adadmin 的菜单,选择 “5. Change Maintenance Mode” -> “2. Disable Maintenance Mode” 选项:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ adadmin
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adadmin.log] : 回车
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
            AD Administration Main Menu
   --------------------------------------------------
   1.    Generate Applications Files menu
   2.    Maintain Applications Files menu
   3.    Compile/Reload Applications Database Entities menu
   4.    Maintain Applications Database Entities menu
   5.    Change Maintenance Mode
   6.    Exit AD Administration
Enter your choice [6] : 5
             Change Maintenance Mode
   ----------------------------------------
Maintenance Mode is currently: [Enabled].
Maintenance mode should normally be enabled when patching
Oracle Applications and disabled when users are logged on
to the system.  See the Oracle Applications Maintenance
Utilities manual for more information about maintenance mode.
Please select an option:
   1.    Enable Maintenance Mode
   2.    Disable Maintenance Mode
   3.    Return to Main Menu
Enter your choice [3] : 2
Review the messages above, then press [Return] to continue. 回车
Enter your choice [3] : 回车
Enter your choice [6] : 回车

启动应用

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ $ADMIN_SCRIPTS_HOME/adstrtal.sh apps/apps
adstrtal.sh: Exiting with status 0

登录验证

使用浏览器访问地址:http://ebst1.stonecoding.net:8000/OA_HTML/AppsLoginopen in new window,输入用户名:sysadmin,密码:sysadmin,单击 “选择语言” 下的 “简体中文”。

image-20231015204054550

进入系统后显示的将是中文的操作界面:

image-20231015204140640

升级应用

安装完成后,E-Business Suite 的版本为 12.1.1,下面将其升级到 12.1.3。

官方网站open in new window下载升级包,然后解压:

[root@ebst1 ~]# cd /mnt/hgfs/ebs/12.1.1/patch/upgradeto12.1.3/
[root@ebst1 upgradeto12.1.3]# ll
total 3912540
-rwxrwSrwx 1 root root   2341567 Sep 21 16:15 p9239089_R12.AD.B_R12_LINUX.zip
-rwxrwSrwx 1 root root 609622272 Sep 21 16:16 p9239090_R12_LINUX_1of6.zip
-rwxrwSrwx 1 root root 654995406 Sep 21 16:15 p9239090_R12_LINUX_2of6.zip
-rwxrwSrwx 1 root root 512166913 Sep 21 16:14 p9239090_R12_LINUX_3of6.zip
-rwxrwSrwx 1 root root 666180097 Sep 21 16:15 p9239090_R12_LINUX_4of6.zip
-rwxrwSrwx 1 root root 622577389 Sep 21 16:16 p9239090_R12_LINUX_5of6.zip
-rwxrwSrwx 1 root root 564904307 Sep 21 16:15 p9239090_R12_LINUX_6of6.zip
-rwxrwSrwx 1 root root 311726061 Sep 21 16:14 p9239090_R12_zhs.zip
-rwxrwSrwx 1 root root  60535265 Sep 21 16:15 p9239095_R12_GENERIC.zip
-rwxrwSrwx 1 root root   1358042 Sep 21 16:14 p9817770_R12.ATG_PF.B_R12_LINUX.zip
-rwxrwSrwx 1 root root     13018 Sep 21 16:15 p9966055_R12.FND.B_R12_GENERIC.zip
[root@ebst1 upgradeto12.1.3]# unzip \*.zip

升级前配置

关闭应用

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ $ADMIN_SCRIPTS_HOME/adstpall.sh apps/apps
[applmgr@ebst1 ~]$ ps -ef | grep java | grep applmgr

关闭数据库

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ cd $ORACLE_HOME/appsutil/scripts/PROD_ebst1/  
[oracle@ebst1 PROD_ebst1]$ addlnctl.sh stop PROD
[oracle@ebst1 PROD_ebst1]$ addbctl.sh stop immediate

调整数据库参数

[oracle@ebst1 PROD_ebst1]$ vim $ORACLE_HOME/dbs/initPROD.ora 
sga_target=4G
pga_aggregate_target=4G
_disable_fast_validate=TRUE

如果机器配置不高,内存小于 4 GB, PGA 小于 2 GB ,跑起来是很慢的。通常会建议打升级包前,修改$ORACLE_HOME/dbs/init<SID>.ora 文件,把 SGA 和 PGA 的参数调到至少 2 GB, 再加上参数_disable_fast_validate=TRUE,打好升级补丁后,再把参数 _disable_fast_validate 注掉。

启动数据库

[oracle@ebst1 PROD_ebst1]$ addlnctl.sh start PROD
[oracle@ebst1 PROD_ebst1]$ addbctl.sh start

调整数据文件

数据文件默认是关闭自动扩展的。

SQL> select tablespace_name,file_name,bytes/1024/1024/1024 Gb,maxbytes/1024/1024/1024 MGb,autoextensible from dba_data_files order by 1;

TABLESPACE_NAME      FILE_NAME                                                       GB        MGB AUT
-------------------- ------------------------------------------------------- ---------- ---------- ---
APPS_TS_ARCHIVE      /u01/oracle/PROD/db/apps_st/data/a_archive01.dbf        .845703125          0 NO
APPS_TS_INTERFACE    /u01/oracle/PROD/db/apps_st/data/a_int01.dbf            1.00195313          0 NO
APPS_TS_INTERFACE    /u01/oracle/PROD/db/apps_st/data/a_int02.dbf            .014648438          0 NO
APPS_TS_MEDIA        /u01/oracle/PROD/db/apps_st/data/a_media01.dbf          1.41210938          0 NO
APPS_TS_NOLOGGING    /u01/oracle/PROD/db/apps_st/data/a_nolog01.dbf               .0625          0 NO
APPS_TS_QUEUES       /u01/oracle/PROD/db/apps_st/data/a_queue01.dbf           .48828125          0 NO
APPS_TS_QUEUES       /u01/oracle/PROD/db/apps_st/data/a_queue02.dbf           .48828125          0 NO
APPS_TS_SEED         /u01/oracle/PROD/db/apps_st/data/a_ref03.dbf            .357421875          0 NO
APPS_TS_SEED         /u01/oracle/PROD/db/apps_st/data/a_ref02.dbf            1.14453125          0 NO
APPS_TS_SEED         /u01/oracle/PROD/db/apps_st/data/a_ref01.dbf            1.46484375          0 NO
APPS_TS_SUMMARY      /u01/oracle/PROD/db/apps_st/data/a_summ01.dbf           1.11914063          0 NO
APPS_TS_TOOLS        /u01/oracle/PROD/db/apps_st/data/apps_ts_tools01.dbf     .48828125          0 NO
APPS_TS_TX_DATA      /u01/oracle/PROD/db/apps_st/data/a_txn_data03.dbf       1.29199219          0 NO
APPS_TS_TX_DATA      /u01/oracle/PROD/db/apps_st/data/a_txn_data01.dbf       1.23779297          0 NO
APPS_TS_TX_DATA      /u01/oracle/PROD/db/apps_st/data/a_txn_data04.dbf         1.703125          0 NO
APPS_TS_TX_DATA      /u01/oracle/PROD/db/apps_st/data/a_txn_data02.dbf       1.61877441          0 NO
APPS_TS_TX_IDX       /u01/oracle/PROD/db/apps_st/data/a_txn_ind06.dbf        1.07800293          0 NO
APPS_TS_TX_IDX       /u01/oracle/PROD/db/apps_st/data/a_txn_ind05.dbf        1.80847168          0 NO
APPS_TS_TX_IDX       /u01/oracle/PROD/db/apps_st/data/a_txn_ind04.dbf         1.7578125          0 NO
APPS_TS_TX_IDX       /u01/oracle/PROD/db/apps_st/data/a_txn_ind03.dbf        1.05358887          0 NO
APPS_TS_TX_IDX       /u01/oracle/PROD/db/apps_st/data/a_txn_ind02.dbf        1.47741699          0 NO
APPS_TS_TX_IDX       /u01/oracle/PROD/db/apps_st/data/a_txn_ind01.dbf        1.08789063          0 NO
APPS_UNDOTS1         /u01/oracle/PROD/db/apps_st/data/undo01.dbf             1.68945313          0 NO
CTXD                 /u01/oracle/PROD/db/apps_st/data/ctxd01.dbf             .017578125          0 NO
ODM                  /u01/oracle/PROD/db/apps_st/data/odm.dbf                 .01171875          0 NO
OLAP                 /u01/oracle/PROD/db/apps_st/data/olap.dbf               .016601563          0 NO
OWAPUB               /u01/oracle/PROD/db/apps_st/data/owad01.dbf             .009765625          0 NO
PORTAL               /u01/oracle/PROD/db/apps_st/data/portal01.dbf            .09765625          0 NO
SYSAUX               /u01/oracle/PROD/db/apps_st/data/sysaux02.dbf           .162109375          0 NO
SYSAUX               /u01/oracle/PROD/db/apps_st/data/sysaux01.dbf            .27355957          0 NO
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system04.dbf             .9765625          0 NO
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system03.dbf             .9765625          0 NO
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system02.dbf             .9765625          0 NO
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system01.dbf             .9765625          0 NO
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system10.dbf           .638671875          0 NO
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system06.dbf           .732421875          0 NO
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system09.dbf           1.46484375          0 NO
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system12.dbf           1.49316406          0 NO
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system07.dbf           .732421875          0 NO
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system08.dbf            1.7578125          0 NO
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system05.dbf             .9765625          0 NO
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system11.dbf           .680664063          0 NO

42 rows selected.

SQL> select tablespace_name,file_name,bytes/1024/1024/1024 Gb,maxbytes/1024/1024/1024 MGb,autoextensible from dba_temp_files order by 1;

TABLESPACE_NAME      FILE_NAME                                                       GB        MGB AUT
-------------------- ------------------------------------------------------- ---------- ---------- ---
TEMP1                /u01/oracle/PROD/db/apps_st/data/temp01.dbf             1.07421875          0 NO
TEMP2                /u01/oracle/PROD/db/apps_st/data/temp02.dbf                      1          0 NO

在安装 12.1.3 RUP 补丁时,会由于表空间不足导致失败,需提前修改 UNDO 空间和临时表空间数据文件大小,打开其余数据文件自动扩展功能。UNDO 空间和临时表空间不设置自动扩展。

扩展 UNDO 表空间数据文件:

SQL> alter database datafile '/u01/oracle/PROD/db/apps_st/data/undo01.dbf' resize 5G;

Database altered.

扩展临时表空间临时文件:

SQL> alter database tempfile '/u01/oracle/PROD/db/apps_st/data/temp01.dbf' resize 5G;

Database altered.

SQL> alter database tempfile '/u01/oracle/PROD/db/apps_st/data/temp02.dbf' resize 5G;

Database altered.

生成修改其他数据文件自动扩展的脚本:


SQL> select 'ALTER DATABASE DATAFILE ''' || file_name || ''' AUTOEXTEND ON;' from dba_data_files where tablespace_name != 'APPS_UNDOTS1';

'ALTERDATABASEDATAFILE'''||FILE_NAME||'''AUTOEXTENDON;'
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system12.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system11.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system10.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system01.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system02.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system03.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system04.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system05.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system06.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system07.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system08.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system09.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/ctxd01.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/owad01.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_queue02.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/odm.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/olap.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/sysaux01.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/apps_ts_tools01.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_data04.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_ind06.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_ref03.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_int02.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/sysaux02.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/portal01.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_data01.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_ind01.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_ref01.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_int01.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_summ01.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_nolog01.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_archive01.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_queue01.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_media01.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_data02.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_data03.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_ind02.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_ind03.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_ind04.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_ind05.dbf' AUTOEXTEND ON;
ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_ref02.dbf' AUTOEXTEND ON;

41 rows selected.

然后执行脚本。

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system12.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system11.dbf' AUTOEXTEND ON;
Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system10.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system01.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system02.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system03.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system04.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system05.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system06.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system07.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system08.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/system09.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/ctxd01.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/owad01.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_queue02.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/odm.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/olap.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/sysaux01.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/apps_ts_tools01.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_data04.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_ind06.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_ref03.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_int02.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/sysaux02.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/portal01.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_data01.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_ind01.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_ref01.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_int01.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_summ01.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_nolog01.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_archive01.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_queue01.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_media01.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_data02.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_data03.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_ind02.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_ind03.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_ind04.dbf' AUTOEXTEND ON;
Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_txn_ind05.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE '/u01/oracle/PROD/db/apps_st/data/a_ref02.dbf' AUTOEXTEND ON;

Database altered.

最后结果如下:

SQL> select tablespace_name,file_name,bytes/1024/1024/1024 Gb,maxbytes/1024/1024/1024 MGb,autoextensible from dba_data_files order by 1;

TABLESPACE_NAME      FILE_NAME                                                       GB        MGB AUT
-------------------- ------------------------------------------------------- ---------- ---------- ---
APPS_TS_ARCHIVE      /u01/oracle/PROD/db/apps_st/data/a_archive01.dbf        .845703125 31.9999847 YES
APPS_TS_INTERFACE    /u01/oracle/PROD/db/apps_st/data/a_int01.dbf            1.00195313 31.9999847 YES
APPS_TS_INTERFACE    /u01/oracle/PROD/db/apps_st/data/a_int02.dbf            .014648438 31.9999847 YES
APPS_TS_MEDIA        /u01/oracle/PROD/db/apps_st/data/a_media01.dbf          1.41210938 31.9999847 YES
APPS_TS_NOLOGGING    /u01/oracle/PROD/db/apps_st/data/a_nolog01.dbf               .0625 31.9999847 YES
APPS_TS_QUEUES       /u01/oracle/PROD/db/apps_st/data/a_queue01.dbf           .48828125 31.9999847 YES
APPS_TS_QUEUES       /u01/oracle/PROD/db/apps_st/data/a_queue02.dbf           .48828125 31.9999847 YES
APPS_TS_SEED         /u01/oracle/PROD/db/apps_st/data/a_ref03.dbf            .357421875 31.9999847 YES
APPS_TS_SEED         /u01/oracle/PROD/db/apps_st/data/a_ref02.dbf            1.14453125 31.9999847 YES
APPS_TS_SEED         /u01/oracle/PROD/db/apps_st/data/a_ref01.dbf            1.46484375 31.9999847 YES
APPS_TS_SUMMARY      /u01/oracle/PROD/db/apps_st/data/a_summ01.dbf           1.11914063 31.9999847 YES
APPS_TS_TOOLS        /u01/oracle/PROD/db/apps_st/data/apps_ts_tools01.dbf     .48828125 31.9999847 YES
APPS_TS_TX_DATA      /u01/oracle/PROD/db/apps_st/data/a_txn_data03.dbf       1.29199219 31.9999847 YES
APPS_TS_TX_DATA      /u01/oracle/PROD/db/apps_st/data/a_txn_data01.dbf       1.23779297 31.9999847 YES
APPS_TS_TX_DATA      /u01/oracle/PROD/db/apps_st/data/a_txn_data04.dbf         1.703125 31.9999847 YES
APPS_TS_TX_DATA      /u01/oracle/PROD/db/apps_st/data/a_txn_data02.dbf       1.61877441 31.9999847 YES
APPS_TS_TX_IDX       /u01/oracle/PROD/db/apps_st/data/a_txn_ind06.dbf        1.07800293 31.9999847 YES
APPS_TS_TX_IDX       /u01/oracle/PROD/db/apps_st/data/a_txn_ind05.dbf        1.80847168 31.9999847 YES
APPS_TS_TX_IDX       /u01/oracle/PROD/db/apps_st/data/a_txn_ind04.dbf         1.7578125 31.9999847 YES
APPS_TS_TX_IDX       /u01/oracle/PROD/db/apps_st/data/a_txn_ind03.dbf        1.05358887 31.9999847 YES
APPS_TS_TX_IDX       /u01/oracle/PROD/db/apps_st/data/a_txn_ind02.dbf        1.47741699 31.9999847 YES
APPS_TS_TX_IDX       /u01/oracle/PROD/db/apps_st/data/a_txn_ind01.dbf        1.08789063 31.9999847 YES
APPS_UNDOTS1         /u01/oracle/PROD/db/apps_st/data/undo01.dbf                      5          0 NO
CTXD                 /u01/oracle/PROD/db/apps_st/data/ctxd01.dbf             .017578125 31.9999847 YES
ODM                  /u01/oracle/PROD/db/apps_st/data/odm.dbf                 .01171875 31.9999847 YES
OLAP                 /u01/oracle/PROD/db/apps_st/data/olap.dbf               .016601563 31.9999847 YES
OWAPUB               /u01/oracle/PROD/db/apps_st/data/owad01.dbf             .009765625 31.9999847 YES
PORTAL               /u01/oracle/PROD/db/apps_st/data/portal01.dbf            .09765625 31.9999847 YES
SYSAUX               /u01/oracle/PROD/db/apps_st/data/sysaux02.dbf           .162109375 31.9999847 YES
SYSAUX               /u01/oracle/PROD/db/apps_st/data/sysaux01.dbf            .27355957 31.9999847 YES
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system04.dbf             .9765625 31.9999847 YES
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system03.dbf             .9765625 31.9999847 YES
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system02.dbf             .9765625 31.9999847 YES
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system01.dbf             .9765625 31.9999847 YES
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system10.dbf           .638671875 31.9999847 YES
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system06.dbf           .732421875 31.9999847 YES
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system09.dbf           1.46484375 31.9999847 YES
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system12.dbf           1.49316406 31.9999847 YES
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system07.dbf           .732421875 31.9999847 YES
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system08.dbf            1.7578125 31.9999847 YES
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system05.dbf             .9765625 31.9999847 YES
SYSTEM               /u01/oracle/PROD/db/apps_st/data/system11.dbf           .680664063 31.9999847 YES

42 rows selected.

SQL> select tablespace_name,file_name,bytes/1024/1024/1024 Gb,maxbytes/1024/1024/1024 MGb,autoextensible from dba_temp_files order by 1;

TABLESPACE_NAME      FILE_NAME                                                       GB        MGB AUT
-------------------- ------------------------------------------------------- ---------- ---------- ---
TEMP1                /u01/oracle/PROD/db/apps_st/data/temp01.dbf                      5          0 NO
TEMP2                /u01/oracle/PROD/db/apps_st/data/temp02.dbf                      5          0 NO

启用维护模式

使用 applmgr 用户运行 adadmin,进入 adadmin 的菜单,选择 “5. Change Maintenance Mode” -> “1. Enable Maintenance Mode” 选项:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ adadmin
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adadmin.log] : 回车
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
            AD Administration Main Menu
   --------------------------------------------------
   1.    Generate Applications Files menu
   2.    Maintain Applications Files menu
   3.    Compile/Reload Applications Database Entities menu
   4.    Maintain Applications Database Entities menu
   5.    Change Maintenance Mode
   6.    Exit AD Administration
Enter your choice [6] : 5
             Change Maintenance Mode
   ----------------------------------------
Maintenance Mode is currently: [Disabled].
Maintenance mode should normally be enabled when patching
Oracle Applications and disabled when users are logged on
to the system.  See the Oracle Applications Maintenance
Utilities manual for more information about maintenance mode.
Please select an option:
   1.    Enable Maintenance Mode
   2.    Disable Maintenance Mode
   3.    Return to Main Menu
Enter your choice [3] : 1
Review the messages above, then press [Return] to continue. 回车
Enter your choice [3] : 回车
Enter your choice [6] : 回车

安装补丁

9239089

使用 oracle 用户执行脚本:

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ mkdir $ORACLE_HOME/appsutil/admin
[oracle@ebst1 ~]$ cp /mnt/hgfs/ebs/12.1.1/patch/upgradeto12.1.3/9239089/admin/adgrants.sql $ORACLE_HOME/appsutil/admin
[oracle@ebst1 ~]$ sqlplus /nolog

SQL*Plus: Release 11.1.0.7.0 - Production on Mon Oct 16 19:15:00 2023

Copyright (c) 1982, 2008, Oracle.  All rights reserved.

SQL> @$ORACLE_HOME/appsutil/admin/adgrants.sql apps

使用 applmgr 用户安装补丁:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ cd /mnt/hgfs/ebs/12.1.1/patch/upgradeto12.1.3/9239089/
[applmgr@ebst1 9239089]$ adpatch
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adpatch.log] : 9239089.log
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
The default directory is [/mnt/hgfs/ebs/12.1.1/patch/upgradeto12.1.3/9239089] : 回车
Please enter the name of your AutoPatch driver file : u9239089.drv
Enter the number of parallel workers [8] : 回车

9239090

重新链接高级供应链规划(ASCP)可执行文件:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ vim $AD_TOP/bin/adrelinknew.sh
将:
CPP_LDFLAGS=' -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/lib/stubs -lclntsh'
改为:
CPP_LDFLAGS=' -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/lib/stubs -lclntsh -Wl,--noinhibit-exec'
[applmgr@ebst1 ~]$ fgrep 'lib/stubs -lclntsh' $AD_TOP/bin/adrelinknew.sh
      CPP_LDFLAGS=' -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/lib/stubs -lclntsh -Wl,--noinhibit-exec'

使用 applmgr 用户安装升级补丁:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ cd /mnt/hgfs/ebs/12.1.1/patch/upgradeto12.1.3/9239090
[applmgr@ebst1 9239090]$ adpatch
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adpatch.log] : 9239090.log
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
The default directory is [/mnt/hgfs/ebs/12.1.1/patch/upgradeto12.1.3/9239090] : 回车
Please enter the name of your AutoPatch driver file : u9239090.drv
Do you wish to apply this patch now [No] ? yes
Enter the number of parallel workers [8] : 回车

9239090_ZHS

如果之前已经安装了中文语言,则需要安装该补丁。

使用 applmgr 用户安装补丁:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ cd /mnt/hgfs/ebs/12.1.1/patch/upgradeto12.1.3/9239090_ZHS
[applmgr@ebst1 9239090_ZHS]$ adpatch
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adpatch.log] : 9239090_ZHS.log
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
The default directory is [/mnt/hgfs/ebs/12.1.1/patch/upgradeto12.1.3/9239090_ZHS] : 回车
Please enter the name of your AutoPatch driver file : u9239090.drv
Enter the number of parallel workers [8] : 回车

9239095

使用 applmgr 用户安装补丁:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ cd /mnt/hgfs/ebs/12.1.1/patch/upgradeto12.1.3/9239095
[applmgr@ebst1 9239095]$ adpatch
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adpatch.log] : 9239095.log
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
The default directory is [/mnt/hgfs/ebs/12.1.1/patch/upgradeto12.1.3/9239095] : 回车
Please enter the name of your AutoPatch driver file : u9239095.drv
Enter the number of parallel workers [8] : 回车

9817770

使用 applmgr 用户安装补丁:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ cd /mnt/hgfs/ebs/12.1.1/patch/upgradeto12.1.3/9817770
[applmgr@ebst1 9817770]$ adpatch
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adpatch.log] : 9817770.log
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
The default directory is [/mnt/hgfs/ebs/12.1.1/patch/upgradeto12.1.3/9817770] : 回车
Please enter the name of your AutoPatch driver file : u9817770.drv

9966055

使用 applmgr 用户安装补丁:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ cd /mnt/hgfs/ebs/12.1.1/patch/upgradeto12.1.3/9966055
[applmgr@ebst1 9966055]$ adpatch
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adpatch.log] : 9966055.log
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
The default directory is [/mnt/hgfs/ebs/12.1.1/patch/upgradeto12.1.3/9966055] : 回车
Please enter the name of your AutoPatch driver file : u9966055.drv

升级后配置

禁用维护模式

使用 applmgr 用户运行 adadmin,进入 adadmin 的菜单,选择 “5. Change Maintenance Mode” -> “2. Disable Maintenance Mode” 选项:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ adadmin
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adadmin.log] : 回车
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
            AD Administration Main Menu
   --------------------------------------------------
   1.    Generate Applications Files menu
   2.    Maintain Applications Files menu
   3.    Compile/Reload Applications Database Entities menu
   4.    Maintain Applications Database Entities menu
   5.    Change Maintenance Mode
   6.    Exit AD Administration
Enter your choice [6] : 5
             Change Maintenance Mode
   ----------------------------------------
Maintenance Mode is currently: [Enabled].
Maintenance mode should normally be enabled when patching
Oracle Applications and disabled when users are logged on
to the system.  See the Oracle Applications Maintenance
Utilities manual for more information about maintenance mode.
Please select an option:
   1.    Enable Maintenance Mode
   2.    Disable Maintenance Mode
   3.    Return to Main Menu
Enter your choice [3] : 2
Review the messages above, then press [Return] to continue. 回车
Enter your choice [3] : 回车
Enter your choice [6] : 回车

更新数据库

applmgr 用户运行 adautocfg.sh,然后生成 appsutil.zip

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ $ADMIN_SCRIPTS_HOME/adautocfg.sh
Enter the APPS user password:apps

The log file for this session is located at: /u02/oracle/PROD/inst/apps/PROD_ebst1/admin/log/10172040/adconfig.log

AutoConfig is configuring the Applications environment...

AutoConfig will consider the custom templates if present.
        Using CONFIG_HOME location     : /u02/oracle/PROD/inst/apps/PROD_ebst1
        Classpath                   : /u02/oracle/PROD/apps/apps_st/comn/java/lib/appsborg2.zip:/u02/oracle/PROD/apps/apps_st/comn/java/classes

        Using Context file          : /u02/oracle/PROD/inst/apps/PROD_ebst1/appl/admin/PROD_ebst1.xml

Context Value Management will now update the Context file

        Updating Context file...COMPLETED

        Attempting upload of Context file and templates to database...COMPLETED

Configuring templates from all of the product tops...
        Configuring AD_TOP........COMPLETED
        Configuring FND_TOP.......COMPLETED
        Configuring ICX_TOP.......COMPLETED
        Configuring MSC_TOP.......COMPLETED
        Configuring IEO_TOP.......COMPLETED
        Configuring BIS_TOP.......COMPLETED
        Configuring AMS_TOP.......COMPLETED
        Configuring CCT_TOP.......COMPLETED
        Configuring WSH_TOP.......COMPLETED
        Configuring CLN_TOP.......COMPLETED
        Configuring OKE_TOP.......COMPLETED
        Configuring OKL_TOP.......COMPLETED
        Configuring OKS_TOP.......COMPLETED
        Configuring CSF_TOP.......COMPLETED
        Configuring IGS_TOP.......COMPLETED
        Configuring IBY_TOP.......COMPLETED
        Configuring JTF_TOP.......COMPLETED
        Configuring MWA_TOP.......COMPLETED
        Configuring CN_TOP........COMPLETED
        Configuring CSI_TOP.......COMPLETED
        Configuring WIP_TOP.......COMPLETED
        Configuring CSE_TOP.......COMPLETED
        Configuring EAM_TOP.......COMPLETED
        Configuring FTE_TOP.......COMPLETED
        Configuring ONT_TOP.......COMPLETED
        Configuring AR_TOP........COMPLETED
        Configuring AHL_TOP.......COMPLETED
        Configuring OZF_TOP.......COMPLETED
        Configuring IES_TOP.......COMPLETED
        Configuring CSD_TOP.......COMPLETED
        Configuring IGC_TOP.......COMPLETED

AutoConfig completed successfully.

[applmgr@ebst1 ~]$ perl $AD_TOP/bin/admkappsutil.pl
Starting the generation of appsutil.zip
Log file located at /u02/oracle/PROD/inst/apps/PROD_ebst1/admin/log/MakeAppsUtil_10172131.log
output located at /u02/oracle/PROD/inst/apps/PROD_ebst1/admin/out/appsutil.zip
MakeAppsUtil completed successfully.

使用 oracle 用户解压 appsutil.zip,执行 adautocfg.sh

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ cp /u02/oracle/PROD/inst/apps/PROD_ebst1/admin/out/appsutil.zip $ORACLE_HOME
[oracle@ebst1 ~]$ cd $ORACLE_HOME
[oracle@ebst1 11.1.0]$ unzip -o appsutil.zip
[oracle@ebst1 11.1.0]$ cd appsutil/scripts/PROD_ebst1/
[oracle@ebst1 PROD_ebst1]$ ./adautocfg.sh
Enter the APPS user password:apps
The log file for this session is located at: /u01/oracle/PROD/db/tech_st/11.1.0/appsutil/log/PROD_ebst1/10172158/adconfig.log

AutoConfig is configuring the Database environment...

AutoConfig will consider the custom templates if present.
        Using ORACLE_HOME location : /u01/oracle/PROD/db/tech_st/11.1.0
        Classpath                   : :/u01/oracle/PROD/db/tech_st/11.1.0/jdbc/lib/ojdbc6.jar:/u01/oracle/PROD/db/tech_st/11.1.0/appsutil/java/xmlparserv2.jar:/u01/oracle/PROD/db/tech_st/11.1.0/appsutil/java:/u01/oracle/PROD/db/tech_st/11.1.0/jlib/netcfg.jar:/u01/oracle/PROD/db/tech_st/11.1.0/jlib/ldapjclnt11.jar

        Using Context file          : /u01/oracle/PROD/db/tech_st/11.1.0/appsutil/PROD_ebst1.xml

Context Value Management will now update the Context file

        Updating Context file...COMPLETED

        Attempting upload of Context file and templates to database...COMPLETED

Updating rdbms version in Context file to db111
Updating rdbms type in Context file to 64 bits
Configuring templates from ORACLE_HOME ...

AutoConfig completed successfully.

DB 层执行预克隆操作:

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ cd /u01/oracle/PROD/db/tech_st/11.1.0/appsutil/scripts/PROD_ebst1/
[oracle@ebst1 PROD_ebst1]$ perl adpreclone.pl dbTier

                     Copyright (c) 2002 Oracle Corporation
                        Redwood Shores, California, USA

                        Oracle Applications Rapid Clone

                                 Version 12.0.0

                      adpreclone Version 120.20.12010000.5

Enter the APPS User Password: apps
Running:
perl /u01/oracle/PROD/db/tech_st/11.1.0/appsutil/bin/adclone.pl java=/u01/oracle/PROD/db/tech_st/11.1.0/appsutil/jre mode=stage stage=/u01/oracle/PROD/db/tech_st/11.1.0/appsutil/clone component=dbTier method=CUSTOM dbctx=/u01/oracle/PROD/db/tech_st/11.1.0/appsutil/PROD_ebst1.xml showProgress 
APPS Password : 

Beginning database tier Stage - Tue Oct 17 22:01:15 2023

/u01/oracle/PROD/db/tech_st/11.1.0/appsutil/jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=false  -Doracle.installer.oui_loc=/u01/oracle/PROD/db/tech_st/11.1.0/oui -classpath /u01/oracle/PROD/db/tech_st/11.1.0/lib/xmlparserv2.jar:/u01/oracle/PROD/db/tech_st/11.1.0/jdbc/lib/ojdbc6.jar:/u01/oracle/PROD/db/tech_st/11.1.0/appsutil/java:/u01/oracle/PROD/db/tech_st/11.1.0/oui/jlib/OraInstaller.jar:/u01/oracle/PROD/db/tech_st/11.1.0/oui/jlib/ewt3.jar:/u01/oracle/PROD/db/tech_st/11.1.0/oui/jlib/share.jar:/u01/oracle/PROD/db/tech_st/11.1.0/oui/jlib/srvm.jar:/u01/oracle/PROD/db/tech_st/11.1.0/jlib/ojmisc.jar   oracle.apps.ad.clone.StageDBTier -e /u01/oracle/PROD/db/tech_st/11.1.0/appsutil/PROD_ebst1.xml -stage /u01/oracle/PROD/db/tech_st/11.1.0/appsutil/clone -tmp /tmp -method CUSTOM    -showProgress
APPS Password : 
Log file located at /u01/oracle/PROD/db/tech_st/11.1.0/appsutil/log/PROD_ebst1/StageDBTier_10172201.log

  -     50% completed       

Completed Stage...
Tue Oct 17 22:01:39 2023

AP 层执行预克隆操作:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ cd /u02/oracle/PROD/inst/apps/PROD_ebst1/admin/scripts/
[applmgr@ebst1 scripts]$ perl adpreclone.pl appsTier

                     Copyright (c) 2002 Oracle Corporation
                        Redwood Shores, California, USA

                        Oracle Applications Rapid Clone

                                 Version 12.0.0

                      adpreclone Version 120.20.12010000.5

Running:
perl /u02/oracle/PROD/apps/apps_st/appl/ad/12.0.0/bin/adclone.pl java=/u02/oracle/PROD/apps/tech_st/10.1.3/appsutil/jdk mode=stage stage=/u02/oracle/PROD/apps/apps_st/comn/clone component=appsTier method= appctx=/u02/oracle/PROD/inst/apps/PROD_ebst1/appl/admin/PROD_ebst1.xml showProgress 
APPS Password : 
method defaulted to CUSTOM


Beginning application tier Stage - Tue Oct 17 22:05:29 2023

/u02/oracle/PROD/apps/tech_st/10.1.3/appsutil/jdk/bin/java -Xmx600M -DCONTEXT_VALIDATED=false  -Doracle.installer.oui_loc=/oui -classpath /u02/oracle/PROD/apps/tech_st/10.1.3/lib/xmlparserv2.jar:/u02/oracle/PROD/apps/tech_st/10.1.3/jdbc/lib/ojdbc14.jar:/u02/oracle/PROD/apps/apps_st/comn/java/classes:/u02/oracle/PROD/apps/tech_st/10.1.3/oui/jlib/OraInstaller.jar:/u02/oracle/PROD/apps/tech_st/10.1.3/oui/jlib/ewt3.jar:/u02/oracle/PROD/apps/tech_st/10.1.3/oui/jlib/share.jar:/u02/oracle/PROD/apps/tech_st/10.1.3/oui/jlib/srvm.jar:/u02/oracle/PROD/apps/tech_st/10.1.3/jlib/ojmisc.jar  oracle.apps.ad.clone.StageAppsTier -e /u02/oracle/PROD/inst/apps/PROD_ebst1/appl/admin/PROD_ebst1.xml -stage /u02/oracle/PROD/apps/apps_st/comn/clone -tmp /tmp -method CUSTOM   -showProgress

Log file located at /u02/oracle/PROD/inst/apps/PROD_ebst1/admin/log/StageAppsTier_10172205.log

  -     80% completed       

Completed Stage...
Tue Oct 17 22:05:55 2023

调整数据库参数

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ vim $ORACLE_HOME/dbs/initPROD.ora 
#_disable_fast_validate=TRUE

重启数据库

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ cd /u01/oracle/PROD/db/tech_st/11.1.0/appsutil/scripts/PROD_ebst1/
[oracle@ebst1 PROD_ebst1]$ addlnctl.sh stop PROD
[oracle@ebst1 PROD_ebst1]$ addbctl.sh stop immediate
[oracle@ebst1 PROD_ebst1]$ addlnctl.sh start PROD
[oracle@ebst1 PROD_ebst1]$ addbctl.sh start

从数据库查询 EBS 版本信息:

SQL> SELECT fpg.applications_system_name,fpg.release_name,fpg.aru_release_name FROM apps.fnd_product_groups fpg;

APPLICATIONS_SYSTEM_NAME       RELEASE_NAME         ARU_RELEASE_NAME
------------------------------ -------------------- --------------------
PROD                           12.1.3               R12

启动应用

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ $ADMIN_SCRIPTS_HOME/adstrtal.sh apps/apps

升级数据库

将数据库版本由 11.1.0.7(11gR1)升级到 11.2.0.4(11gR2)。建议在升级前对虚拟机进行快照。

升级包

应用补丁

参考文档 1058763.1 下载应用补丁,并解压:

[root@ebst1 ~]# cd /mnt/hgfs/ebs/12.1.1/patch/appatchfordb11204/
[root@ebst1 appatchfordb11204]# unzip \*.zip

数据库安装包

官方网站open in new window下载数据库安装包,并解压:

[root@ebst1 ~]# cd /mnt/hgfs/ebs/12.1.1/patch/db11204/
[root@ebst1 db11204]# unzip \*.zip

数据库补丁

参考文档 1058763.1 下载数据库补丁,并解压:

[root@ebst1 ~]# cd /mnt/hgfs/ebs/12.1.1/patch/dbpatch11204/
[root@ebst1 dbpatch11204]# unzip \*.zip

安装补丁前配置

关闭应用

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ $ADMIN_SCRIPTS_HOME/adstpall.sh apps/apps
[applmgr@ebst1 ~]$ ps -ef | grep java | grep applmgr

启用维护模式

使用 applmgr 用户运行 adadmin,进入 adadmin 的菜单,选择 “5. Change Maintenance Mode” -> “1. Enable Maintenance Mode” 选项:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ adadmin
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adadmin.log] : 回车
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
            AD Administration Main Menu
   --------------------------------------------------
   1.    Generate Applications Files menu
   2.    Maintain Applications Files menu
   3.    Compile/Reload Applications Database Entities menu
   4.    Maintain Applications Database Entities menu
   5.    Change Maintenance Mode
   6.    Exit AD Administration
Enter your choice [6] : 5
             Change Maintenance Mode
   ----------------------------------------
Maintenance Mode is currently: [Disabled].
Maintenance mode should normally be enabled when patching
Oracle Applications and disabled when users are logged on
to the system.  See the Oracle Applications Maintenance
Utilities manual for more information about maintenance mode.
Please select an option:
   1.    Enable Maintenance Mode
   2.    Disable Maintenance Mode
   3.    Return to Main Menu
Enter your choice [3] : 1
Review the messages above, then press [Return] to continue. 回车
Enter your choice [3] : 回车
Enter your choice [6] : 回车

安装应用补丁

9062910

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ cd /mnt/hgfs/ebs/12.1.1/patch/appatchfordb11204/9062910/
[applmgr@ebst1 9062910]$ adpatch
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adpatch.log] : 9062910.log
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
The default directory is [/mnt/hgfs/ebs/12.1.1/patch/appatchfordb11204/9062910] : 回车
Please enter the name of your AutoPatch driver file : u9062910.drv
Enter the number of parallel workers [8] : 回车

9868229

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ cd /mnt/hgfs/ebs/12.1.1/patch/appatchfordb11204/9868229
[applmgr@ebst1 9868229]$ adpatch
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adpatch.log] : 9868229.log
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
The default directory is [/mnt/hgfs/ebs/12.1.1/patch/appatchfordb11204/9868229] : 回车
Please enter the name of your AutoPatch driver file : u9868229.drv
Enter the number of parallel workers [8] : 回车

10163753

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ cd /mnt/hgfs/ebs/12.1.1/patch/appatchfordb11204/10163753
[applmgr@ebst1 10163753]$ adpatch
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adpatch.log] : 10163753.log
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
The default directory is [/mnt/hgfs/ebs/12.1.1/patch/appatchfordb11204/10163753] : 回车
Please enter the name of your AutoPatch driver file : u10163753.drv
Enter the number of parallel workers [8] : 回车

9738085

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ cd /mnt/hgfs/ebs/12.1.1/patch/appatchfordb11204/9738085
[applmgr@ebst1 9738085]$ adpatch
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adpatch.log] : 9738085.log
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
The default directory is [/mnt/hgfs/ebs/12.1.1/patch/appatchfordb11204/9738085] : 回车
Please enter the name of your AutoPatch driver file : u9738085.drv

9852070

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ cd /mnt/hgfs/ebs/12.1.1/patch/appatchfordb11204/9852070
[applmgr@ebst1 9852070]$ adpatch
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adpatch.log] : 9852070.log
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
The default directory is [/mnt/hgfs/ebs/12.1.1/patch/appatchfordb11204/9852070] : 回车
Please enter the name of your AutoPatch driver file : u9852070.drv

禁用维护模式

使用 applmgr 用户运行 adadmin,进入 adadmin 的菜单,选择 “5. Change Maintenance Mode” -> “2. Disable Maintenance Mode” 选项:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ adadmin
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adadmin.log] : 回车
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
            AD Administration Main Menu
   --------------------------------------------------
   1.    Generate Applications Files menu
   2.    Maintain Applications Files menu
   3.    Compile/Reload Applications Database Entities menu
   4.    Maintain Applications Database Entities menu
   5.    Change Maintenance Mode
   6.    Exit AD Administration
Enter your choice [6] : 5
             Change Maintenance Mode
   ----------------------------------------
Maintenance Mode is currently: [Enabled].
Maintenance mode should normally be enabled when patching
Oracle Applications and disabled when users are logged on
to the system.  See the Oracle Applications Maintenance
Utilities manual for more information about maintenance mode.
Please select an option:
   1.    Enable Maintenance Mode
   2.    Disable Maintenance Mode
   3.    Return to Main Menu
Enter your choice [3] : 2
Review the messages above, then press [Return] to continue. 回车
Enter your choice [3] : 回车
Enter your choice [6] : 回车

安装数据库及示例

安装数据库

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ mkdir /u01/oracle/PROD/db/tech_st/11.2.0
[oracle@ebst1 ~]$ export ORACLE_BASE=/u01/oracle/PROD
[oracle@ebst1 ~]$ export ORACLE_HOME=/u01/oracle/PROD/db/tech_st/11.2.0
[oracle@ebst1 ~]$ export DISPLAY=192.168.92.1:0.0
[oracle@ebst1 ~]$ cd /mnt/hgfs/ebs/12.1.1/patch/db11204/database/
[oracle@ebst1 database]$ ./runInstaller 

不勾选 “I wish to receive security updates via My Oracle Support”:

image-20231018214153668

点击 “Yes”:

image-20231018214334834

选择 “Skip software updates”:

image-20231018214404263

选择 “Install database software only”:

image-20231018214442777

选择 “Single instance database installation”:

image-20231018214523957

产品语言保持默认 “English”:

image-20231018214609708

数据库版本保持默认 “Enterprise Edition”:

image-20231018214700789

保存默认 “Oracle Base” 和 “Software Location”:

image-20231018214827580

保持 “Databa Administrator(OSDBA) Group” 为默认 “dba”,选择 “Database Operator(OSOPER) Group(Optional)” 为 “dba”:

image-20231018214918305

点击 “Fix & Check Again”:

image-20231018215506212

弹出 “Execute Fixup Scripts” 对话框,提示生成了一个脚本:/tmp/CVU_11.2.0.4.0_oracle/runfixup.sh,执行该修复脚本的步骤如下:

  1. 打开一个新的终端窗口
  2. 使用 root 用户登录
  3. 运行该脚本
  4. 然后再点击该对话框的 “Ok”

image-20231018215547656

执行脚本:

[root@ebst1 ~]# /tmp/CVU_11.2.0.4.0_oracle/runfixup.sh 
Response file being used is :/tmp/CVU_11.2.0.4.0_oracle/fixup.response
Enable file being used is :/tmp/CVU_11.2.0.4.0_oracle/fixup.enable
Log file location: /tmp/CVU_11.2.0.4.0_oracle/orarun.log
Setting Kernel Parameters...
fs.file-max = 131072
fs.file-max = 6815744
net.core.wmem_max =     262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
uid=500(oracle) gid=500(dba) groups=500(dba)

再次进行检查,暂时解决不了又不影响安装的问题,勾选 “Ignore All”:

image-20231018215834066

点击 “Yes” 继续:

image-20231018215910430

点击 “Install” 开始安装:

image-20231018215958106

安装到 94% 的时候,弹出 “Execute Configuration Scripts” 对话框,执行脚本的步骤如下:

  1. 打开一个新的终端窗口
  2. 使用 root 用户登录
  3. 依次运行脚本
  4. 然后再点击该对话框的 “Ok”

image-20231018220442368

执行脚本:

[root@ebst1 ~]# /u01/oracle/PROD/db/tech_st/11.2.0/root.sh
Performing root user operation for Oracle 11g 

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/oracle/PROD/db/tech_st/11.2.0

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finished product-specific root actions.

安装成功:

image-20231018220654583

安装数据库示例

[oracle@ebst1 database]$ cd /mnt/hgfs/ebs/12.1.1/patch/db11204/examples/
[oracle@ebst1 examples]$ ./runInstaller 

选择 “Skip software updates”:

image-20231018225245648

保存默认 “Software Location”:

image-20231018225346596

勾选 “Ignore All”,忽略 “Swap Size” 的警告:

image-20231018225452869

点击 “Yes” 继续:

image-20231018225625595

点击 “Install” 开始安装:

image-20231018225649763

安装成功:

image-20231018225750218

配置环境变量

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ export ORACLE_BASE=/u01/oracle/PROD
[oracle@ebst1 ~]$ export ORACLE_HOME=/u01/oracle/PROD/db/tech_st/11.2.0
[oracle@ebst1 ~]$ cd $ORACLE_HOME
[oracle@ebst1 11.2.0]$ mv perl/ perl.old
[oracle@ebst1 11.2.0]$ cp -r /u01/oracle/PROD/db/tech_st/11.1.0/perl/ .
[oracle@ebst1 11.2.0]$ export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/perl/bin:$PATH
[oracle@ebst1 11.2.0]$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib
[oracle@ebst1 11.2.0]$ export PERL5LIB=$ORACLE_HOME/perl/lib/5.8.3:$ORACLE_HOME/perl/lib/site_perl/5.8.3
[oracle@ebst1 11.2.0]$ perl $ORACLE_HOME/nls/data/old/cr9idata.pl
Creating directory /u01/oracle/PROD/db/tech_st/11.2.0/nls/data/9idata ...
Copying files to /u01/oracle/PROD/db/tech_st/11.2.0/nls/data/9idata...
Copy finished. 
Please reset environment variable ORA_NLS10 to /u01/oracle/PROD/db/tech_st/11.2.0/nls/data/9idata!
[oracle@ebst1 11.2.0]$ export ORA_NLS10=$ORACLE_HOME/nls/data/9idata

注意:

由于前面安装 EBS 的时候已经在 oracle 用户的 .bash_profile 文件中配置了 11gR1 版本数据库的环境变量,故如果切换到 oracle 用户,默认是 11gR1 版本数据库的环境变量。此时安装 11gR2 版本的数据库,故需要重新设置 11gR2 版本的环境变量。

设置好环境变量后就可以为 11gR2 安装以下补丁了(注意是在同一终端窗口安装补丁,如果切换到其他终端窗口,则需要再配置一下环境变量)。

安装数据库补丁

先查看当前补丁安装情况:

[oracle@ebst1 11.2.0]$ $ORACLE_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/PROD/db/tech_st/11.2.0
Central Inventory : /u01/oracle/oraInventory
   from           : /u01/oracle/PROD/db/tech_st/11.2.0/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /u01/oracle/PROD/db/tech_st/11.2.0/cfgtoollogs/opatch/opatch2023-10-19_19-53-44PM_1.log

Lsinventory Output file location : /u01/oracle/PROD/db/tech_st/11.2.0/cfgtoollogs/opatch/lsinv/lsinventory2023-10-19_19-53-44PM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (2): 

Oracle Database 11g                                                  11.2.0.4.0
Oracle Database 11g Examples                                         11.2.0.4.0
There are 2 products installed in this Oracle Home.


There are no Interim patches installed in this Oracle Home.


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

OPatch succeeded.

可以看到当前还没有安装补丁。

4247037

[oracle@ebst1 11.2.0]$ cd /mnt/hgfs/ebs/12.1.1/patch/dbpatch11204/4247037/
[oracle@ebst1 4247037]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/PROD/db/tech_st/11.2.0
Central Inventory : /u01/oracle/oraInventory
   from           : /u01/oracle/PROD/db/tech_st/11.2.0/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /u01/oracle/PROD/db/tech_st/11.2.0/cfgtoollogs/opatch/4247037_Oct_19_2023_19_56_51/apply2023-10-19_19-56-51PM_1.log

Applying interim patch '4247037' to OH '/u01/oracle/PROD/db/tech_st/11.2.0'
Verifying environment and performing prerequisite checks...
All checks passed.
Backing up files...

Patching component oracle.sdo.locator, 11.2.0.4.0...

Verifying the update...
Patch 4247037 successfully applied
Log file location: /u01/oracle/PROD/db/tech_st/11.2.0/cfgtoollogs/opatch/4247037_Oct_19_2023_19_56_51/apply2023-10-19_19-56-51PM_1.log

OPatch succeeded.

17402822

[oracle@ebst1 4247037]$ cd /mnt/hgfs/ebs/12.1.1/patch/dbpatch11204/17402822
[oracle@ebst1 17402822]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/PROD/db/tech_st/11.2.0
Central Inventory : /u01/oracle/oraInventory
   from           : /u01/oracle/PROD/db/tech_st/11.2.0/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /u01/oracle/PROD/db/tech_st/11.2.0/cfgtoollogs/opatch/17402822_Oct_19_2023_19_58_49/apply2023-10-19_19-58-49PM_1.log

Applying interim patch '17402822' to OH '/u01/oracle/PROD/db/tech_st/11.2.0'
Verifying environment and performing prerequisite checks...
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/oracle/PROD/db/tech_st/11.2.0')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...

Patching component oracle.ctx.rsf, 11.2.0.4.0...

Patching component oracle.rdbms, 11.2.0.4.0...

Verifying the update...
Patch 17402822 successfully applied
Log file location: /u01/oracle/PROD/db/tech_st/11.2.0/cfgtoollogs/opatch/17402822_Oct_19_2023_19_58_49/apply2023-10-19_19-58-49PM_1.log

OPatch succeeded.

17468141

[oracle@ebst1 17402822]$ cd /mnt/hgfs/ebs/12.1.1/patch/dbpatch11204/17468141
[oracle@ebst1 17468141]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/PROD/db/tech_st/11.2.0
Central Inventory : /u01/oracle/oraInventory
   from           : /u01/oracle/PROD/db/tech_st/11.2.0/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /u01/oracle/PROD/db/tech_st/11.2.0/cfgtoollogs/opatch/17468141_Oct_19_2023_20_02_08/apply2023-10-19_20-02-08PM_1.log

Applying interim patch '17468141' to OH '/u01/oracle/PROD/db/tech_st/11.2.0'
Verifying environment and performing prerequisite checks...
Patch 17468141: Optional component(s) missing : [ oracle.precomp.lang, 11.2.0.4.0 ] 
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/oracle/PROD/db/tech_st/11.2.0')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...

Patching component oracle.rdbms, 11.2.0.4.0...

Patching component oracle.rdbms.rman, 11.2.0.4.0...

Patching component oracle.rdbms.rsf, 11.2.0.4.0...

Verifying the update...
Patch 17468141 successfully applied
Log file location: /u01/oracle/PROD/db/tech_st/11.2.0/cfgtoollogs/opatch/17468141_Oct_19_2023_20_02_08/apply2023-10-19_20-02-08PM_1.log

OPatch succeeded.

17501296

[oracle@ebst1 17468141]$ cd /mnt/hgfs/ebs/12.1.1/patch/dbpatch11204/17501296
[oracle@ebst1 17501296]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/PROD/db/tech_st/11.2.0
Central Inventory : /u01/oracle/oraInventory
   from           : /u01/oracle/PROD/db/tech_st/11.2.0/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /u01/oracle/PROD/db/tech_st/11.2.0/cfgtoollogs/opatch/17501296_Oct_19_2023_20_03_24/apply2023-10-19_20-03-24PM_1.log

Applying interim patch '17501296' to OH '/u01/oracle/PROD/db/tech_st/11.2.0'
Verifying environment and performing prerequisite checks...
All checks passed.
Backing up files...

Patching component oracle.ctx, 11.2.0.4.0...

Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...

Verifying the update...
Patch 17501296 successfully applied
Log file location: /u01/oracle/PROD/db/tech_st/11.2.0/cfgtoollogs/opatch/17501296_Oct_19_2023_20_03_24/apply2023-10-19_20-03-24PM_1.log

OPatch succeeded.

17892268

[oracle@ebst1 17501296]$ cd /mnt/hgfs/ebs/12.1.1/patch/dbpatch11204/17892268
[oracle@ebst1 17892268]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/PROD/db/tech_st/11.2.0
Central Inventory : /u01/oracle/oraInventory
   from           : /u01/oracle/PROD/db/tech_st/11.2.0/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /u01/oracle/PROD/db/tech_st/11.2.0/cfgtoollogs/opatch/17892268_Oct_19_2023_20_04_29/apply2023-10-19_20-04-29PM_1.log

Applying interim patch '17892268' to OH '/u01/oracle/PROD/db/tech_st/11.2.0'
Verifying environment and performing prerequisite checks...
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/oracle/PROD/db/tech_st/11.2.0')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...

Patching component oracle.rdbms, 11.2.0.4.0...

Verifying the update...
Patch 17892268 successfully applied
Log file location: /u01/oracle/PROD/db/tech_st/11.2.0/cfgtoollogs/opatch/17892268_Oct_19_2023_20_04_29/apply2023-10-19_20-04-29PM_1.log

OPatch succeeded.

19393542

[oracle@ebst1 17892268]$ cd /mnt/hgfs/ebs/12.1.1/patch/dbpatch11204/19393542
[oracle@ebst1 19393542]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/PROD/db/tech_st/11.2.0
Central Inventory : /u01/oracle/oraInventory
   from           : /u01/oracle/PROD/db/tech_st/11.2.0/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /u01/oracle/PROD/db/tech_st/11.2.0/cfgtoollogs/opatch/19393542_Oct_19_2023_20_05_35/apply2023-10-19_20-05-35PM_1.log

Applying interim patch '19393542' to OH '/u01/oracle/PROD/db/tech_st/11.2.0'
Verifying environment and performing prerequisite checks...
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/oracle/PROD/db/tech_st/11.2.0')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...

Patching component oracle.rdbms, 11.2.0.4.0...

Verifying the update...
Patch 19393542 successfully applied
Log file location: /u01/oracle/PROD/db/tech_st/11.2.0/cfgtoollogs/opatch/19393542_Oct_19_2023_20_05_35/apply2023-10-19_20-05-35PM_1.log

OPatch succeeded.

22731026

[oracle@ebst1 19393542]$ cd /mnt/hgfs/ebs/12.1.1/patch/dbpatch11204/22731026
[oracle@ebst1 22731026]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/PROD/db/tech_st/11.2.0
Central Inventory : /u01/oracle/oraInventory
   from           : /u01/oracle/PROD/db/tech_st/11.2.0/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /u01/oracle/PROD/db/tech_st/11.2.0/cfgtoollogs/opatch/22731026_Oct_19_2023_20_06_27/apply2023-10-19_20-06-27PM_1.log

Applying interim patch '22731026' to OH '/u01/oracle/PROD/db/tech_st/11.2.0'
Verifying environment and performing prerequisite checks...
All checks passed.
Backing up files...

Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...

Verifying the update...
Patch 22731026 successfully applied
Log file location: /u01/oracle/PROD/db/tech_st/11.2.0/cfgtoollogs/opatch/22731026_Oct_19_2023_20_06_27/apply2023-10-19_20-06-27PM_1.log

OPatch succeeded.

升级前准备

关闭应用

确认应用已经关闭,如果没有关闭,则关闭应用。

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ $ADMIN_SCRIPTS_HOME/adstpall.sh apps/apps
[applmgr@ebst1 ~]$ ps -ef | grep java | grep applmgr

关闭 11gR1 数据库监听

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ cd $ORACLE_HOME/appsutil/scripts/PROD_ebst1/
[oracle@ebst1 PROD_ebst1]$ addlnctl.sh stop PROD

删除 11gR1 数据库对象

[oracle@ebst1 PROD_ebst1]$ sqlplus / as sysdba

SQL> drop table sys.enabled$indexes;
drop table sys.enabled$indexes
               *
ERROR at line 1:
ORA-00942: table or view does not exist


SQL> drop index system.REPCAT$_AUDIT_COLUMN_IDX1;

Index dropped.

如果此处不删除该对象,则会在升级的时候报 ORA-01408 错误。

修改 oratab 文件

[oracle@ebst1 PROD_ebst1]$ echo PROD:/u01/oracle/PROD/db/tech_st/11.1.0:N >> /etc/oratab

升级前检查

[oracle@ebst1 PROD_ebst1]$ cd
[oracle@ebst1 ~]$ sqlplus / as sysdba
SQL> SPOOL upgrade_info.log
SQL> @/u01/oracle/PROD/db/tech_st/11.2.0/rdbms/admin/utlu112i.sql
Oracle Database 11.2 Pre-Upgrade Information Tool 10-19-2023 20:21:41
Script Version: 11.2.0.4.0 Build: 001
.
**********************************************************************
Database:
**********************************************************************
--> name:          PROD
--> version:       11.1.0.7.0
--> compatible:    11.1.0
--> blocksize:     8192
--> platform:      Linux x86 64-bit
--> timezone file: V10
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 11440 MB
--> CTXD tablespace is adequate for the upgrade.
.... minimum required size: 18 MB
--> ODM tablespace is adequate for the upgrade.
.... minimum required size: 10 MB
--> APPS_UNDOTS1 tablespace is adequate for the upgrade.
.... minimum required size: 400 MB
--> APPS_TS_TX_DATA tablespace is adequate for the upgrade.
.... minimum required size: 6103 MB
--> APPS_TS_QUEUES tablespace is adequate for the upgrade.
.... minimum required size: 116 MB
--> SYSAUX tablespace is adequate for the upgrade.
.... minimum required size: 633 MB
.
**********************************************************************
Flashback: OFF
**********************************************************************
**********************************************************************
Update Parameters: [Update Oracle Database 11.2 init.ora or spfile]
Note: Pre-upgrade tool was run on a lower version 64-bit database.
**********************************************************************
--> If Target Oracle is 32-Bit, refer here for Update Parameters:
-- No update parameter changes are required.
.

--> If Target Oracle is 64-Bit, refer here for Update Parameters:
-- No update parameter changes are required.
.
**********************************************************************
Renamed Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
-- No renamed parameters found. No changes are required.
.
**********************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
--> plsql_native_library_dir     11.2       OBSOLETE
--> plsql_native_library_subdir_ 11.2       OBSOLETE
.

**********************************************************************
Components: [The following database components will be upgraded or installed]
**********************************************************************
--> Oracle Catalog Views         [upgrade]  VALID
--> Oracle Packages and Types    [upgrade]  VALID
--> JServer JAVA Virtual Machine [upgrade]  VALID
--> Oracle XDK for Java          [upgrade]  VALID
--> Real Application Clusters    [upgrade]  INVALID
--> OLAP Analytic Workspace      [upgrade]  VALID
--> OLAP Catalog                 [upgrade]  VALID
--> Oracle Text                  [upgrade]  VALID
--> Oracle XML Database          [upgrade]  VALID
--> Oracle Java Packages         [upgrade]  VALID
--> Oracle interMedia            [upgrade]  VALID
--> Spatial                      [upgrade]  VALID
--> Data Mining                  [upgrade]  VALID
--> Oracle OLAP API              [upgrade]  VALID
.
**********************************************************************
Miscellaneous Warnings
**********************************************************************
WARNING: --> Database is using a timezone file older than version 14.
.... After the release migration, it is recommended that DBMS_DST package
.... be used to upgrade the 11.1.0.7.0 database timezone version
.... to the latest version which comes with the new release.
WARNING: --> Your recycle bin contains 186 object(s).
.... It is REQUIRED that the recycle bin is empty prior to upgrading
.... your database.  The command:
        PURGE DBA_RECYCLEBIN
.... must be executed immediately prior to executing your upgrade.
WARNING: --> Database contains schemas with objects dependent on DBMS_LDAP package.
.... Refer to the 11g Upgrade Guide for instructions to configure Network ACLs.
.... USER APPS has dependent objects.
WARNING: --> JOB_QUEUE_PROCESS value must be updated
.... Your current setting of "2" is too low.

.... Starting with Oracle Database 11g Release 2 (11.2), setting
.... JOB_QUEUE_PROCESSES to 0 causes both DBMS_SCHEDULER and
.... DBMS_JOB jobs to not run. Previously, setting JOB_QUEUE_PROCESSES
.... to 0 caused DBMS_JOB jobs to not run, but DBMS_SCHEDULER jobs were
.... unaffected and would still run. This parameter must be updated to
.... a value greater than 8  (default value is 1000) prior to upgrade.
.... Not doing so will affect the running of utlrp.sql after the upgrade
.
**********************************************************************
Recommendations
**********************************************************************
Oracle recommends gathering dictionary statistics prior to
upgrading the database.
To gather dictionary statistics execute the following command
while connected as SYSDBA:

    EXECUTE dbms_stats.gather_dictionary_stats;

**********************************************************************
Oracle recommends removing all hidden parameters prior to upgrading.

To view existing hidden parameters execute the following command
while connected AS SYSDBA:

    SELECT name,description from SYS.V$PARAMETER WHERE name
        LIKE '\_%' ESCAPE '\'

Changes will need to be made in the init.ora or spfile.

**********************************************************************
Oracle recommends reviewing any defined events prior to upgrading.

To view existing non-default events execute the following commands
while connected AS SYSDBA:
  Events:
    SELECT (translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter2
      WHERE  UPPER(name) ='EVENT' AND  isdefault='FALSE'

  Trace Events:
    SELECT (translate(value,chr(13)||chr(10),' ')) from sys.v$parameter2
      WHERE UPPER(name) = '_TRACE_EVENTS' AND isdefault='FALSE'

Changes will need to be made in the init.ora or spfile.

**********************************************************************
The DMSYS schema exists in the database.  Prior to performing an
upgrade Oracle recommends that the DMSYS schema, and its associated
objects be removed from the database.

Refer to the Oracle Data Mining Administration Guide for the
instructions on how to perform this task.

**********************************************************************

SQL> SPOOL OFF
SQL> exit

根据检查结果,进行修改:

  1. 注释掉过时参数 plsql_native_library_dirplsql_native_library_subdir_count,修改 JOB_QUEUE_PROCESSES 为 1000。
[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ vim /u01/oracle/PROD/db/tech_st/11.1.0/dbs/initPROD.ora
#plsql_native_library_dir = /u01/oracle/PROD/db/tech_st/11.1.0/plsql/nativelib 
#plsql_native_library_subdir_count = 149
job_queue_processes             = 1000
  1. 清空回收站。
[oracle@ebst1 ~]$ sqlplus / as sysdba

SQL> PURGE DBA_RECYCLEBIN;

DBA Recyclebin purged.
  1. 收集统计信息。
[oracle@ebst1 ~]$ sqlplus / as sysdba

SQL> EXECUTE dbms_stats.gather_dictionary_stats;

PL/SQL procedure successfully completed.
  1. 处理隐藏参数,可以手动处理,也可以交给之后的 DBUA 自动处理。

先查询出当前使用的隐藏参数:

SQL> SELECT name,description from SYS.V$PARAMETER WHERE name LIKE '\_%' ESCAPE '\';

NAME                           DESCRIPTION
------------------------------ -----------------------------------------------------------------
_system_trig_enabled           are system triggers enabled
_sort_elimination_cost_ratio   cost ratio for sort eimination under first_rows mode
_b_tree_bitmap_plans           enable the use of bitmap plans for tables w. only B-tree indexes
_fast_full_scan_enabled        enable/disable index fast full scan
_index_join_enabled            enable the use of index joins
_sqlexec_progression_cost      sql execution progression monitoring cost threshold
_like_with_bind_as_equality    treat LIKE predicate with bind as an equality predicate
_optimizer_autostats_job       enable/disable auto stats collection job
_trace_files_public            Create publicly accessible trace files

9 rows selected.

然后修改参数文件 /u01/oracle/PROD/db/tech_st/11.1.0/dbs/initPROD.ora,将这些隐藏参数注释掉。

  1. 查询非默认事件参数,如果存在,则在参数文件中进行注释。
SQL> SELECT (translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter2 WHERE  UPPER(name) ='EVENT' AND  isdefault='FALSE';

no rows selected

SQL> SELECT (translate(value,chr(13)||chr(10),' ')) from sys.v$parameter2 WHERE UPPER(name) = '_TRACE_EVENTS' AND isdefault='FALSE';

no rows selected
  1. 删除DMSYS用户。
SQL> DROP USER DMSYS CASCADE; 

User dropped.

重启数据库,再次进行检查:

[oracle@ebst1 ~]$ cd $ORACLE_HOME/appsutil/scripts/PROD_ebst1
[oracle@ebst1 PROD_ebst1]$ addbctl.sh stop immediate
[oracle@ebst1 PROD_ebst1]$ sqlplus / as sysdba
SQL> @/u01/oracle/PROD/db/tech_st/11.2.0/rdbms/admin/utlu112i.sql

设置环境变量

将 11gR1 数据库的环境变量从 .bash_profile 中去掉。

[oracle@ebst1 ~]$ vim .bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
#. /u01/oracle/PROD/db/tech_st/11.1.0/PROD_ebst1.env

[oracle@ebst1 ~]$ source .bash_profile

升级数据库

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ export DISPLAY=192.168.92.1:0.0
[oracle@ebst1 ~]$ cd /u01/oracle/PROD/db/tech_st/11.2.0/bin
[oracle@ebst1 bin]$ ./dbua -initParam "_disable_fast_validate=TRUE"

点击 “Next”:

image-20231019214026558

检测到可以升级的数据库,点击 “Next”:

image-20231019214121407

确认升级,点击 “Yes”:

image-20231019214214046

选择 “Upgrade Timezone Version and TIMESTAMP WITH TIME ZONE Data”,点击 “Next”:

image-202310192144815

保存默认选择,不移动数据文件,点击 “Next”:

image-20231019214645635

勾选 “Specify Fast Recovery Area”,设置 “Fast Recovery Area Size” 为 1096200,点击 “Next”:

image-20231019214812903

不勾选 “Configure the Database with Enterprise Manager”,点击 “Next”:

image-20231019214936872

此处显示升级摘要,如果前面没有将隐藏参数注释掉,这里会列出将会被注释的参数。确认无误后,点击 “Finish” 进行升级:

image-20231019215135649

升级中:

image-20231019215434159

升级完成,点击 “OK”:

image-20231019222318715

升级结果:

image-20231019222359735

升级后配置

创建网络文件

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ cp -r /u01/oracle/PROD/db/tech_st/11.1.0/network/admin/PROD_ebst1/ /u01/oracle/PROD/db/tech_st/11.2.0/network/admin/
[oracle@ebst1 ~]$ cd /u01/oracle/PROD/db/tech_st/11.2.0/network/admin/PROD_ebst1/
[oracle@ebst1 PROD_ebst1]$ sed -i 's#11.1.0#11.2.0#g' sqlnet.ora
[oracle@ebst1 PROD_ebst1]$ sed -i 's#11.1.0#11.2.0#g' listener.ora
[oracle@ebst1 PROD_ebst1]$ sed -i 's#11.1.0#11.2.0#g' tnsnames.ora

设置环境变量

将 11gR2 数据库的环境变量添加到 .bash_profile 中。

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ vim .bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
#. /u01/oracle/PROD/db/tech_st/11.1.0/PROD_ebst1.env

export ORACLE_SID=PROD
export ORACLE_BASE=/u01/oracle/PROD
export ORACLE_HOME=/u01/oracle/PROD/db/tech_st/11.2.0
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/perl/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PERL5LIB=$ORACLE_HOME/perl/lib/5.8.3:$ORACLE_HOME/perl/lib/site_perl/5.8.3
export ORA_NLS10=$ORACLE_HOME/nls/data/9idata
export TNS_ADMIN=$ORACLE_HOME/network/admin/PROD_ebst1/

[oracle@ebst1 ~]$ source .bash_profile

修改初始化参数

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ mkdir -p /u01/oracle/PROD/db/tech_st/11.2.0/admin/PROD_ebst1
[oracle@ebst1 ~]$ cp /u01/oracle/PROD/db/tech_st/11.1.0/dbs/PROD_ebst1_ifile.ora /u01/oracle/PROD/db/tech_st/11.2.0/dbs/
[oracle@ebst1 ~]$ cd /u01/oracle/PROD/db/tech_st/11.2.0/dbs/
[oracle@ebst1 dbs]$ mv initPROD.ora initPROD.ora.old
[oracle@ebst1 dbs]$ cp /u01/oracle/PROD/db/tech_st/11.1.0/dbs/initPROD.ora /u01/oracle/PROD/db/tech_st/11.2.0/dbs/
[oracle@ebst1 dbs]$ sed -i 's#11.1.0#11.2.0#g' initPROD.ora
[oracle@ebst1 dbs]$ vim initPROD.ora
processes                       = 1200    # Max. no. of users x 2
sessions                        = 2400     # 2 X processes
shared_pool_size = 600M
shared_pool_reserved_size = 60M
[oracle@ebst1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Nov 27 15:57:53 2019
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup pfile='/u01/oracle/PROD/db/tech_st/11.2.0/dbs/initPROD.ora';
ORACLE instance started.

Total System Global Area 4275781632 bytes
Fixed Size                  2260088 bytes
Variable Size             469762952 bytes
Database Buffers         3791650816 bytes
Redo Buffers               12107776 bytes
Database mounted.
Database opened.

SQL> create spfile from pfile;

File created.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

执行补丁安装后脚本

  1. 补丁 4247037 的脚本
[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ sqlplus / as sysdba
SQL> drop user mgdsys cascade;
SQL> @/u01/oracle/PROD/db/tech_st/11.2.0/md/admin/catmgdidcode.sql
SQL> @/u01/oracle/PROD/db/tech_st/11.2.0/md/support/patchset_mgdsys_validity.sql

没有发现无效对象,如果有则运行脚本 $ORACLE_HOME/rdbms/admin/utlrp.sql

  1. 补丁 17501296 的脚本
SQL> @/mnt/hgfs/ebs/12.1.1/patch/dbpatch11204/17501296/postinstall.sql
  1. 补丁 22731026 的脚本
SQL> @/mnt/hgfs/ebs/12.1.1/patch/dbpatch11204/22731026/postinstall.sql

启动 11gR2 数据库监听

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ lsnrctl start PROD

执行授权脚本

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ cp /u02/oracle/PROD/apps/apps_st/appl/admin/adgrants.sql /home/oracle/
[oracle@ebst1 ~]$ sqlplus / as sysdba
SQL> @adgrants.sql apps

赋予 CTXSYS 创建过程权限

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ cp /u02/oracle/PROD/apps/apps_st/appl/ad/12.0.0/patch/115/sql/adctxprv.sql /home/oracle/
[oracle@ebst1 ~]$ sqlplus apps/apps @adctxprv.sql manager CTXSYS

设置 CTXSYS 参数

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ sqlplus / as sysdba
SQL> exec ctxsys.ctx_adm.set_parameter('file_access_role', 'public');

验证工作流规则集

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ cp /u02/oracle/PROD/apps/apps_st/appl/fnd/12.0.0/patch/115/sql/wfaqupfix.sql /home/oracle/
[oracle@ebst1 ~]$ sqlplus apps/apps @wfaqupfix.sql APPLSYS APPS

运行 autoconfig

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ perl $AD_TOP/bin/admkappsutil.pl
Starting the generation of appsutil.zip
Log file located at /u02/oracle/PROD/inst/apps/PROD_ebst1/admin/log/MakeAppsUtil_10192216.log
output located at /u02/oracle/PROD/inst/apps/PROD_ebst1/admin/out/appsutil.zip
MakeAppsUtil completed successfully.

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ cp /u02/oracle/PROD/inst/apps/PROD_ebst1/admin/out/appsutil.zip $ORACLE_HOME  
[oracle@ebst1 ~]$ cd $ORACLE_HOME
[oracle@ebst1 11.2.0]$ unzip -o appsutil.zip
[oracle@ebst1 11.2.0]$ perl $ORACLE_HOME/appsutil/bin/adbldxml.pl

Starting context file generation for db tier..
Using JVM from /u01/oracle/PROD/db/tech_st/11.2.0/jdk/jre/bin/java to execute java programs..
APPS Password: apps

The log file for this adbldxml session is located at:
/u01/oracle/PROD/db/tech_st/11.2.0/appsutil/log/adbldxml_10192219.log

Enter the value for Display Variable: ebst1:0.0

The context file has been created at:
/u01/oracle/PROD/db/tech_st/11.2.0/appsutil/PROD_ebst1.xml

[oracle@ebst1 11.2.0]$ $ORACLE_HOME/appsutil/bin/adconfig.sh contextfile=/u01/oracle/PROD/db/tech_st/11.2.0/appsutil/PROD_ebst1.xml
Enter the APPS user password: apps
The log file for this session is located at: /u01/oracle/PROD/db/tech_st/11.2.0/appsutil/log/PROD_ebst1/10192220/adconfig.log

AutoConfig is configuring the Database environment...

AutoConfig will consider the custom templates if present.
        Using ORACLE_HOME location : /u01/oracle/PROD/db/tech_st/11.2.0
        Classpath                   : :/u01/oracle/PROD/db/tech_st/11.2.0/jdbc/lib/ojdbc5.jar:/u01/oracle/PROD/db/tech_st/11.2.0/appsutil/java/xmlparserv2.jar:/u01/oracle/PROD/db/tech_st/11.2.0/appsutil/java:/u01/oracle/PROD/db/tech_st/11.2.0/jlib/netcfg.jar:/u01/oracle/PROD/db/tech_st/11.2.0/jlib/ldapjclnt11.jar

        Using Context file          : /u01/oracle/PROD/db/tech_st/11.2.0/appsutil/PROD_ebst1.xml

Context Value Management will now update the Context file

        Updating Context file...COMPLETED

        Attempting upload of Context file and templates to database...COMPLETED

Updating rdbms version in Context file to db112
Updating rdbms type in Context file to 64 bits
Configuring templates from ORACLE_HOME ...

AutoConfig completed successfully.

安装 ECX 补丁 9151516

使用 applmgr 用户运行 adadmin,进入 adadmin 的菜单,选择 “5. Change Maintenance Mode” -> “1. Enable Maintenance Mode” 选项:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ adadmin
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adadmin.log] : 回车
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
            AD Administration Main Menu
   --------------------------------------------------
   1.    Generate Applications Files menu
   2.    Maintain Applications Files menu
   3.    Compile/Reload Applications Database Entities menu
   4.    Maintain Applications Database Entities menu
   5.    Change Maintenance Mode
   6.    Exit AD Administration
Enter your choice [6] : 5
             Change Maintenance Mode
   ----------------------------------------
Maintenance Mode is currently: [Disabled].
Maintenance mode should normally be enabled when patching
Oracle Applications and disabled when users are logged on
to the system.  See the Oracle Applications Maintenance
Utilities manual for more information about maintenance mode.
Please select an option:
   1.    Enable Maintenance Mode
   2.    Disable Maintenance Mode
   3.    Return to Main Menu
Enter your choice [3] : 1
Review the messages above, then press [Return] to continue. 回车
Enter your choice [3] : 回车
Enter your choice [6] : 回车

安装补丁 9151516:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ cd /mnt/hgfs/ebs/12.1.1/patch/appatchfordb11204/9151516/
[applmgr@ebst1 9151516]$ adpatch
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adpatch.log] : 9151516.log
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
The default directory is [/mnt/hgfs/ebs/12.1.1/patch/appatchfordb11204/9151516] : 回车
Please enter the name of your AutoPatch driver file : u9151516.drv
Enter the number of parallel workers [8] : 回车

使用 applmgr 用户运行 adadmin,进入 adadmin 的菜单,选择 “5. Change Maintenance Mode” -> “2. Disable Maintenance Mode” 选项:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ adadmin
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adadmin.log] : 回车
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
            AD Administration Main Menu
   --------------------------------------------------
   1.    Generate Applications Files menu
   2.    Maintain Applications Files menu
   3.    Compile/Reload Applications Database Entities menu
   4.    Maintain Applications Database Entities menu
   5.    Change Maintenance Mode
   6.    Exit AD Administration
Enter your choice [6] : 5
             Change Maintenance Mode
   ----------------------------------------
Maintenance Mode is currently: [Enabled].
Maintenance mode should normally be enabled when patching
Oracle Applications and disabled when users are logged on
to the system.  See the Oracle Applications Maintenance
Utilities manual for more information about maintenance mode.
Please select an option:
   1.    Enable Maintenance Mode
   2.    Disable Maintenance Mode
   3.    Return to Main Menu
Enter your choice [3] : 2
Review the messages above, then press [Return] to continue. 回车
Enter your choice [3] : 回车
Enter your choice [6] : 回车

收集 SYS 统计信息

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ cp /u02/oracle/PROD/apps/apps_st/appl/admin/adstats.sql /home/oracle
[oracle@ebst1 ~]$ sqlplus / as sysdba
SQL> alter system enable restricted session;
SQL> @adstats.sql
[oracle@ebst1 ~]$ sqlplus / as sysdba
SQL> alter system disable restricted session;

重建授权和同义词

使用 applmgr 用户运行 adadmin,进入 adadmin 的菜单,选择 “4. Maintain Applications Database Entities menu” -> “2. Re-create grants and synonyms for APPS schema” 选项:

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ adadmin
Is this the correct APPL_TOP [Yes] ? 回车
Filename [adadmin.log] : 回车
Do you wish to activate this feature [No] ? 回车
Please enter the batchsize [1000] : 回车
Is this the correct database [Yes] ? 回车
Enter the password for your 'SYSTEM' ORACLE schema:  manager
Enter the ORACLE password of Application Object Library [APPS] : 回车
            AD Administration Main Menu
   --------------------------------------------------
   1.    Generate Applications Files menu
   2.    Maintain Applications Files menu
   3.    Compile/Reload Applications Database Entities menu
   4.    Maintain Applications Database Entities menu
   5.    Change Maintenance Mode
   6.    Exit AD Administration
Enter your choice [6] : 4
         Maintain Applications Database Entities
   ---------------------------------------------------
   1.    Validate APPS schema
   2.    Re-create grants and synonyms for APPS schema
   3.    Maintain multi-lingual tables
   4.    Check DUAL table
   5.    Return to Main Menu 
Enter your choice [3] : 2
Enter the number of workers [8] : 回车
Enter your choice [5] : 回车
Enter your choice [6] : 回车

重启数据库

[root@ebst1 ~]# su - oracle
[oracle@ebst1 ~]$ cd /u01/oracle/PROD/db/tech_st/11.2.0/appsutil/scripts/PROD_ebst1/
[oracle@ebst1 PROD_ebst1]$ ./addlnctl.sh stop PROD
[oracle@ebst1 PROD_ebst1]$ ./addbctl.sh stop immediate
[oracle@ebst1 PROD_ebst1]$ ./addlnctl.sh start PROD
[oracle@ebst1 PROD_ebst1]$ ./addbctl.sh start

启用应用

[root@ebst1 ~]# su - applmgr
[applmgr@ebst1 ~]$ $ADMIN_SCRIPTS_HOME/adstrtal.sh apps/apps
上次编辑于:
贡献者: stone,stonebox