主线文档为Cloning Oracle E-Business Suite Release 12.2 with Rapid Clone (文档 ID 1383621.1)
克隆的过程是先克隆好数据库环境,再克隆应用环境,在应用克隆时会需要连接到已经克隆好的数据库环境。
根据生产环境的特点,在克隆之前的准备阶段与标准克隆的操作是一致的,实际克隆阶段中参考该文档的如下两个章节。主要依照文档的如下章节来做
--------------------注意的要点是-----------------------
1、每次重新开始:直接删除/u01/app下的所有文件 ,杀掉所有oracle进程、重新建立oraInventory目录
2、应用层克隆完成后,在删除单点登录的操作前,不能启动应用层服务
失败的过程:
因第一次数据库克隆时,归档和控制文件备份没有一致备份,导致克隆后datafile 1号文件有损坏,不能打开数据库。因此,重新执行克隆操作。因此,在备份时一定要将归档日志文件和控制文件一起备份。
因第二次数据库克隆时,在目标环境执行数据库perl adclone.pl操作时,时间太长,导致用SSH界面操作被取消。
因第三次数据库克隆时,在目标环境执行数据库perl adclone.pl操作时,执行/u01/app/oracle/product/12.1.0/db_1/appsutil/out/PRDTEST1_****dbcl/restore-rac3.rman 时关闭数据库shutdown nomal 超过一个小时的等待后,自动退出。导致失败。因此,尝试采用修改/restore-rac3.rman的脚本将shutdown nomal 改为 shutdown immediate.
--------------------本次操作注意事项:---------------------
1、备份数据库文件时全被备份到挂载的/backup盘
2\执行所有的perl adclone时都用vncview来操作。
------------------ ---环境准备------------
5.10--数据库5.13---应用
现有生产环境总数据量
select round(sum(bytes)/1024/1024/1024,2)||'GB' from dba_data_files
425.74GB
生产环境应用环境文件量
[root@***app1 prdapp]# du -sh
358G .
---------------------开始克隆----------------------------------
1、执行 rapid克隆 --参考文档(文档 ID 1383621.1)
a\ run fs_clone 将各文件系统一致,避免在克隆过程中需要对系统打补丁
b\准备目标系统操作系统及安装环境
c\确认Inventory 这次为global inventory.(沿用源环境的方式)
[root@****dbcl u01]# vi /etc/oraInst.loc
inventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall
~
d\软件及版本准备,参考 Oracle? E-Business Suite Installation Guide: Using Rapid Install
CPU, Memory, and Disk Space Requirements
cpu-- more /proc/cpuinfo
Memory--数据库至少6G,应用至少10G。现有32G--符合
设置 java jvm 每个实例不超过4G--!!没做
Database configuration was as follows:--备用
SGA: 10 GB
Shared pool: 1 GB
PGA: 10 GB
Log buffer: 30 MB
job_queue_processes: 24
Oracle E-Business Suite Installation and Upgrade Notes Release 12 (12.2) for Linux x86-64 (文档 ID 1330701.1)
4a. Ensure that swap space meets the requirements as documented in the 'Swap Space' section. 推荐 16G,现有12G
4b. Ensure that the hostname settings meet the requirements as documented in the ' Verifying Host Names' section. --完成
4c. Check threading model as documented in the 'Threading Model in Linux must be NPTL' section.--完成
4d. Check for OPMN port conflict.
4e. Check /etc/services for size as documented below . ---sed -i 's/#.*$//g' /etc/services--完成
安装pre-install rpm ,
它的作用如下:
downloading and installing all software package versions and dependencies required for installing E-Business Suite R12
creating the users oracle and applmgr for use as owners of the database and application tiers respectively, while setting hard and soft shell resource limits in /etc/security/limits.conf for Oracle Linux 5 and in /etc/security/limits.d/oracle-ebs-server-R12-preinstall.conf for Oracle Linux 6 and 7
updating kernel parameters in /etc/sysctl.conf to recommended values
sets DNS resolver parameters in /etc/resolv.conf to minimum recommended values
sets 'numa=off' in the kernel commandline
disables 'Transparent Huge Pages (THP)' for Oracle Linux 6 and 7 if it is enabled
报错:
现象:
[root@****appcl yum.repos.d]# yum install oracle-ebs-server-R12-preinstall
下载软件包
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
解决办法:
[root@*****dbcl yum.repos.d]# wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
e\Cloning a Multi-Node System
f\Cloning an Oracle RAC System
参考文档 Cloning Oracle E-Business Suite Release 12.2 RAC Enabled Systems with Rapid Clone (文档 ID 1679270.1)
RAC to Single Instance Cloning
f1. Perform a full clone (including the prepare, copy and configure steps) of the database tier node
Preparing the Source Oracle RAC System for Cloning
Prepare the Source System database tier for cloning
$ cd
$ perl adpreclone.pl dbTier
Create Database Image---登陆源数据库主节点
挂载克隆节点盘到源主节点
[oracle@****db1 bin]$ perl adclone.pl \
java=/u01/app/oracle/product/12.1.0/db_1/jdk \
mode=stage \
stage=/backup/****DBU01/db1/clone \
component=database \
method=RMAN \
dbctx=/u01/app/oracle/product/12.1.0/db_1/appsutil/PRD1_****db1.xml \
showProgress
Target System Primary Node Configuration (Clone Initial Node)
Uncompress ORACLE_HOME ---解压oracle_home
tar -xvzf rac_db_oh.tgz
create pairsfile.txt ---创建文件
[oracle@***dbcl clone]$ vi pairsfile.txt
s_undo_tablespace=APPS_UNDOTS1
s_db_oh=/u01/app/oracle/product/12.1.0/db_1
Create Context File for Primary Node
Navigate to [NEW_ORACLE_HOME]/appsutil/clone/bin and run adclonectx.pl with the following parameters:
perl adclonectx.pl \
contextfile=/u01/app/oracle/product/12.1.0/db_1/appsutil/PRD1_****db1.xml \
template=/u01/app/oracle/product/12.1.0/db_1/appsutil/template/adxdbctx.tmp \
pairsfile=/u01/app/oracle/product/12.1.0/db_1/appsutil/clone/pairsfile.txt initialnode
Restore Database on Target System Primary Node---vnc客户端执行,大约执行命令10分钟左右后,将/u01/app/oracle/product/12.1.0/db_1/appsutil/out/PRDTEST1_****dbcl/restore-rac3.rman中的脚本文件 由shutdown nomal 改为shutdown immediate
[oracle@****dbcl bin]$ perl adclone.pl \
java=/u01/app/oracle/product/12.1.0/db_1/jdk \
component=dbTier \
mode=apply \
stage=/u01/app/oracle/product/12.1.0/db_1/appsutil/clone \
method=RMAN \
dbctxtg=/u01/app/oracle/product/12.1.0/db_1/appsutil/PRDTEST1_****dbcl.xml \
rmanstage=/backup/data/stage \
rmantgtloc=/u01/app/oracle/oradata \
srcdbname=PRD \
showProgress
报错:---这个报错是正常的
Database listener started...
Executing the FND_NODES Cleanup process
/ 50% completed
ERROR: FND_NODES and Topology model could not be cleaned.
Run FND_CONC_CLONE.SETUP_CLEAN as APPS user and run adconfig on DB tier to correct the topology information.
Completed Apply...
Tue Jul 23 16:59:09 2019
操作:
a\ [oracle@****dbcl PRDTEST1_***dbcl]$ sqlplus apps/****---用apps连接执行FND_CONC_CLONE.SETUP_CLEAN
SQL*Plus: Release 12.1.0.2.0 Production on Wed Jul 24 09:39:55 2019
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Last Successful login time: Tue Jul 23 2019 16:58:50 +08:00
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> EXEC FND_CONC_CLONE.SETUP_CLEAN;
PL/SQL procedure successfully completed.
SQL> commit;
Commit complete.
SQL> exit
Verify TNS Listener has been started---确认监听已经启动
$ ps -ef | grep tns | awk '{ print $9}'
在db层运行autoconfig --ORACLE_HOME]/appsutil/scripts/[CONTEXT_NAME]
---$ ./adautocfg.sh appspass=[APPS Password]
[oracle@***dbcl bin]$ perl adconfig.pl
Enter the full file path to the Context file: /u01/app/oracle/product/12.1.0/db_1/appsutil/PRDTEST1_***idbcl.xml
Enter the APPS user password:
The log file for this session is located at: /u01/app/oracle/product/12.1.0/db_1/appsutil/log/PRDTEST1_****dbcl/07240952/adconfig.log
AutoConfig is configuring the Database environment...
AutoConfig will consider the custom templates if present.
Using ORACLE_HOME location : /u01/app/oracle/product/12.1.0/db_1
Classpath : :/u01/app/oracle/product/12.1.0/db_1/jdbc/lib/ojdbc6.jar:/u01/app/oracle/product/12.1.0/db_1/appsutil/java/xmlparserv2.jar:/u01/app/oracle/product/12.1.0/db_1/appsutil/java:/u01/app/oracle/product/12.1.0/db_1/jlib/netcfg.jar:/u01/app/oracle/product/12.1.0/db_1/jlib/ldapjclnt12.jar
Using Context file : /u01/app/oracle/product/12.1.0/db_1/appsutil/PRDTEST1_****dbcl.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 db121
Updating rdbms type in Context file to 64 bits
Configuring templates from ORACLE_HOME ...
AutoConfig completed successfully
修改参数文件 init[sid].ora
#aq_tm_processes = 1
#job_queue_processes = 2
在~/.bash_profile中添加环境变量文件--不引用这个环境变量,启动数据库会报错
. /u01/app/oracle/product/12.1.0/db_1/PRDTEST1_****dbcl.env
重启数据库
f2\Clone the Application Tier
准备阶段
建立OUI目录
[root@****appcl dbrman]# cat /etc/oraInst.loc
inventory_loc=/u01/oraInventory
drwxrwxrwx 2 root root 4096 7月 18 14:58 oraInventory---确认目录的权限是777
打包run文件系统到目标系统,解压
/u01/prdapp/fs2/EBSapps--生产环境需要打包的文件
Configure the Target System application tier server nodes
[applmgr@***appcl bin]$ pwd
/u01/app/fs2/EBSapps/comn/clone/bin
[applmgr@***appcl bin]$ perl adcfgclone.pl appsTier dualfs
报错:
Running /u01/app/fs1/FMW_Home/oracle_common/bin/pasteConfig.sh -javaHome /u01/app/fs1/EBSapps/comn/util/jdk64 -al /u01/app/fs2/EBSapps/comn/clone/FMW/WLS/EBSdomain.jar -tdl
/u01/app/fs1/FMW_Home/user_projects/domains/EBS_domain_PRDTEST1 -tmw /u01/app/fs1/FMW_Home -mpl /u01/app/fs2/EBSapps/comn/clone/FMW/WLS/plan/moveplan.xml -ldl /u01/app/fs2
/inst/apps/PRDTEST1_****appcl/admin/log/clone/patch/wlsT2PApply -silent true -debug true -domainAdminPassword /u01/app/fs2/EBSapps/comn/clone/FMW/tempinfo.txt
Script Executed in 28234 milliseconds, returning status 255
ERROR: Script failed, exit code 255
操作: -- 1986208.1--不能成功,依然报错
删除OUI目录里的信息
删除run文件系统的FMW_Home
用vnc重新进一个终端运行
不能成功,依然报错
操作:----2215729.1----此方法验证合适
删除OUI目录里的信息
删除run文件系统的FMW_HomeI、inst directory
删除了新生成的patch fs1和 fs_ne
删除了新生成的EBSapp.env
采用大于源系统的5个的端口号,target 端口 6,另一个文件系统端口 7--!!!完成后不能启动应用层服务
用vnc重新进一个终端运行
Finishing Tasks
Remove the Oracle Internet Directory Configuration--1614793.1
Deregister Oracle E-Business Suite from Oracle Access Manager ---1576425.1--不做,因为在现有的OAM服务器里并没有克隆环境记录
Remove Oracle E-Business Suite AccessGate from the cloned Oracle E-Business Suite instance.--1614793.1
run文件系统下启动weblogic admin
$ $ADMIN_SCRIPTS_HOME/adadminsrvctl.sh start
patch 文件系统下
$ADMIN_SCRIPTS_HOME/adadminsrvctl.sh start forcepatchfs
Delete the Deployed Oracle E-Business Suite AccessGate application
http://10.10.5.13:7007/console ,删除"accessgate"--run
http://10.10.5.13:7008/console,删除"accessgate"--patch
关闭patch weblogic admin
Delete Managed Server oaea_server---1581920.1
run环境weblogic 控制台,删除 oaea_server ---和小权的文档上有区别在于:不通过命令,只通过weglogic控制台删除
Remove the Oracle Internet Directory Configuration from the Cloned Oracle E-Business Suite Instance
Remove all references to the original OID/SSO instance
$FND_TOP/bin/txkrun.pl -script=SetSSOReg -removereferences=Yes
设置profile:set the APPS_SSO_LDAP_SYNC profile option to "Disabled"
Delink all Oracle E-Business Suite users that were linked to the original Oracle Internet Directory users
数据库层执行SQL>@$FND_TOP/patch/115/sql/fndssouu.sql %
其它操作
将数据库的processes设置为2000,否则启动应用会报错
Oracle Applications SSO LDAP 同步-改为“禁用”
修改sysadmin密码 ,要求至少8位
FNDCPASS apps/*** 0 Y system/**** USER sysadmin welcome1
其它密码可以通过sysadmin用户来设置
修改system密码
Alter user system identified by system
修改apps密码 ----参考文档437260.1
关闭应用层
备份表
create table fnd_user_bak20190726 as select * from fnd_user;
create table fnd_oracle_userid_bak20190726 as select * from fnd_oracle_userid;
修改apps密码
Log into the Operating system level by way of the applmgr user.
2. Run the environment script APPSORA.env:
a. cd $APPL_TOP
b. Run APPSORA.env.
c. The above should also run
d. cd admin.
e. Run adovars.env.
II. Basic DBA Tasks 6-11
1. Shut down the application tier services using the $INST_TOP/admin/scripts/adstpall.sh script.
2. Change the APPLSYS password, as described for the utility you are using.
3. Start AdminServer using the $INST_TOP/admin/scripts/adadminsrvctl.sh script. Do not start any other application tier services.
4. Change the APPS password in WLS Data Source by running the the following script as shown:
$ perl $FND_TOP/patch/115/bin/txkManageDBConnectionPool.pl
When prompted, select 'updateDSPassword' to change the APPS password in the WLS Datasource.
5. Start all the application tier services using the $INST_TOP/admin/scripts/adstrtal.sh script.
6. Verify the WLS data source changes as follows:
A.Log in to the WLS Administration Console.
B. In the Domain Structure tree, expand Services, then select Data Sources.
C. On the Summary of JDBC Data Sources page, select EBSDataSource.
D. On the Settings for EBSDataSource page, select Monitoring > Testing.
E. Select "oacore_server1".
F. Click Test DataSource.
G. Look for the message "Test of EBSDataSource on server oacore_server1 was successful".