Session ID: Controlling CEMLI 10154
Prepared by: Michael Brown Applications DBA A Code Migration Methodology BlueStar @MichaelBrownOrg
Remember to complete your evaluation for this session within the app!
Who Am I
• Over 22 years experience with Oracle Database • Over 18 years experience with E-Business Suite • Chair, OAUG Database SIG • Co-Founder AppsPerf • Oracle ACE • OAUG Member of the Year 2013 • Applications DBA, BlueStar What
• What are customizations? – R12.2 • Migration flow Customizations CEMLI
• Definition – Configuration – Extensions – Modification – Localization – Integration CEMLI
• Definition – Configuration – Extensions – Modification – Localization – Integration • Simpler – Changes made to the application outside of the applications • Not setups • Not personalizations • Potentially completely separate, e.g. Applications Express 12.2
• Standards are now requirements • Patch Cycle • If custom application server applications are used (including Applications Express), you must use a separate application server • Rest of presentation will assume 12.2 since the requirements are a superset of previous releases. Migration Flow Migration Flow
• Minimum of two instances prior to production.
Development Migration Flow
• Minimum of two instances prior to production.
Development Test Migration Flow
• Minimum of two instances prior to production.
Development Test Production Migration Flow
R&D, Patch, etc.
Development Test Production
Development Production Two Support How do we control the migrations
• Various tools exist, but they are expensive • What can we do with what we have – FNDLOAD – XDOLoader – scripting A Manual Methodology Migration Template
• All migrations are in the same place – Environment variable $MIGRATE • Pre 12.2, actually under custom_top • 12.2, Outside of 12.2 filesystems – /u01/app/oracle/apps/fs1 – /u01/app/oracle/apps/fs2 – /u01/app/oracle/apps/fs_ne – /u01/app/oracle/apps/migrate • Cloning • Each migration is put into a single directory – Naming convention: Development_Instance-#, e.g. DEV-1439 Migration Directory • Required contents – Readme.txt • Who requested • Who did development • Why • Specs • Files • Instructions – Master Script • Once script to complete the migration if possible – Sometimes precluded by intermediate manual steps » For example, code fix that requires a concurrent request to be run in the middle. – Complexity may make debugging easier with multiple scripts – Rollback directoy • Same content that reverts the migration • Not always possible (e.g. data changes) Workflow
• All communications are via email with the migration name in the subject, CC includes key IT and relevant end users in all messages. • Developers are required to use the migration scripts to install changes in development instance where possible • End User is asked to unit test in development • A request is made to the DBA team to code review and migrate • If the code review passes, the migration directory is rsynced to the test system • DBAs run the migration script(s) and coordinate any others who need to be involved • The change is integration tested. If both the end user and applications team sign off, a request is sent to the DBAs to migrate to production. • The DBAs repeat the same process that was used for test in production. • Once a migration has been made to production, it is frozen – If further changes are required, a new migration is created in development – If available, the rollback scripts can be run in production but otherwise the migration is closed Migration Directory • Master Script if [ "$CONTEXT_FILE" = '' -o ! -f "$CONTEXT_FILE" ]; then echo "Environment not set" exit 1 fi SCRIPT_MODE=NORMAL if [ $# -eq 1 ]; then if [ "$1" = "HOT" -o "$1" = "hot" ]; then SCRIPT_MODE=HOT else echo "$(basename $0): Usage $(basename $0) [HOT]" exit 1 fi fi Migration Directory • Master Script if [ "$SCRIPT_MODE" = "NORMAL" ]; then if [ "$FILE_EDITION" != 'patch' ]; then echo "Must be in patch file system" exit 1 fi echo "Enter APPS Password" read APPS_PASS sqlplus -s apps/$APPS_PASS <
MIGRATION=$(basename $(pwd)) DATE=$(date +'%y%m%d') Migration Directory • Master Script Considerations – Are any other user inputs required? • XDOLoader does a a jdbc load, need the values (could actualy be done by parsing tnsnames, but easier to ask) – Does the migration include jsp files? Is the migration HOT? • Need to remind the person running the script to do an fs_clone before it is possible to patch. – What is needed to check if a step completes successfully? • $? (command status) • Grep against a log file – Can the migration be run multiple times or is part of it a one time only script? Archive Previous Versions of Files if [ -f $AU_TOP/forms/US/XXCUSTOMFORM.fmb ]; then cp $AU_TOP/forms/US/XXCUSTOMFORM.fmb $AU_TOP/forms/US/XXCUSTOMFORM.fmb.pre${MIGRATION}.${DATE} fi cp XXCUSTOMFORM.fmb $AU_TOP/forms/US Different Type of Files Forms cd $AU_TOP/forms/US frmcmp_batch userid=apps/$APPS_PASS module=$AU_TOP/forms/US/XXCUSTOMFORM.fmb output_file=$XXCUSTOM_TOP/forms/US/ XXCUSTOMFORM.fmx module_type=form batch=no compile_all=special > FORM.log grep 'FRM-' FORM.log > /dev/null status=$? if [ $status -eq 0 ]; then echo "XXCUSTOMFORM.fmb Execution Failed" tail -100 FORM.log exit 1 else echo "XXCUSTOMFORM.fmb File executed Successfully" fi BI Publisher • XDOLoader (BI Publisher) java oracle.apps.xdo.oa.util.XDOLoader UPLOAD \ -DB_USERNAME apps \ -DB_PASSWORD $apps_pw \ -JDBC_CONNECTION $v_host:$v_port:$v_sid \ -LOB_TYPE TEMPLATE_SOURCE \ -APPS_SHORT_NAME ”XXX" \ -LOB_CODE ”XXLOBCODE" \ -XDO_FILE_TYPE RTF \ -FILE_NAME XXFileName.rtf \ -LANGUAGE en \ -CUSTOM_MODE FORCE \ -LOG_FILE XXFile.log SQL and PL/SQL sqlplus apps/$APPS_PASS @$XXCUSTOM_TOP/admin/sql/xxcustomsql.sql > xxcustomsql.log grep 'ORA-' xxcustomsql.log > /dev/null status=$? if [ $status -eq 0 ]; then echo "xxcustomsql.sql Execution Failed" tail -100 xxcustomsql.log exit 1 else echo "xxcustomsql.sql File executed Successfully" fi EBS Settings • For example, concurrent_progam and request group FNDLOAD apps/$APPS_PASS 0 Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct XXConcProgram.ldt CUSTOM_MODE=FORCE FNDLOAD apps/$APPS_PASS 0 Y UPLOAD $FND_TOP/patch/115/import/afcpreqg.lct XXRequestGroup.ldt CUSTOM_MODE=FORCE [email protected]
Session ID: 10154
Remember to complete your evaluation for this session within the app!