35
Session ID: Prepared by: Upgrading to 12.2.5 A Case Study 10162 Michael Brown, BlueStar @MichaelBrownOrg

Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

Embed Size (px)

Citation preview

Page 1: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

SessionID:

Preparedby:

Upgradingto12.2.5ACaseStudy

10162

MichaelBrown,BlueStar

@MichaelBrownOrg

Page 2: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

Who Am I?

Over 22 years experience with Oracle DatabaseOver 18 years experience with E-Business SuiteChair, OAUG Database SIGCo-Founder AppsPerfOracle ACEOAUG Member of the Year 2013Applications DBA, BlueStar

2

Page 3: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

Agenda

• OverallApproach• TechnicalUpgrade• MovingfromDiscoverertoacustomsolutioninApplicationsExpress

• MovingcustomapplicationsfromtheEBSiAS

Page 4: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

OverallApproach

Page 5: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

OverallApproach

• BlueStar isaninternationaldistributor• Partnumbersdictatedbythemanufacturer• ManufacturerRebates• Retailer/Manufacturerpricelevels• Regularlyneedtomatchpurchasing/receivingwithorders/shipping• Extensiveuseofspreadsheets• NLS:FrenchCanadianandLatinAmericanSpanish

• BlueStar usinganoff-shoregroupformostdevelopmentandfunctionalsupport• MostITemployeesinHebron,KY• DBAsareremote

• 11.5.10.2decisions• Heavilycustomized– didnotfollowbestpractices• AllreportsinDiscoverer

• R12.2wastomaintainfunctionality• GOAL:developmentwastoconformtobestpractices• GOAL:EliminateDiscoverer

Page 6: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

OverallApproach

• Neededatooltotrackcodemigrations,configurations,customobjects,andtesting

• ConfigSnapshot• Panaya

• Ourchoice• Decidedfixingcustomizationsandtesttrackingwereourmajorissues• Hasbeenagreatchoiceforuseinourproject

• NeededawaytotrackissuesandupgradeplanbetweenemployeesinKentucky,NorthCarolina,Florida,andCanadaaswellasouroff-shoreresourcesinIndia.

• UsingGoogleSheets• 11.5.10.2environmentis32-bitOracleLinux5applicationstier(4nodes),64-bitOracleLinux5Databasetier

• 12.2.5is64-bitOracleLinux7applicationstier,64-bitOracleLinux6Databasetier

Page 7: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

OverallApproach

• Go-livewasscheduledtostartaftershippingDec30,2016andtobecompletedbeforestartofbusinessonJan3,2017(roughly80hours).

• Thebusinesspostponedthego-liveatthelastminutebecauseofsomenewcontractsstartinginJanuary2017.

• Go-liverescheduledforJuly.• Decisionwasmadetocarryforwardwithsomeofourchangesnow

• ReplacedDiscoverer• Replacinghowweloadspreadheets

• Released11iCodeFreeze

Page 8: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

TechnicalUpgrade

Page 9: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

GeneralUpgradeConcepts

• Readthedocumentation• 12.2isanewstartingpointforthetechnicalteam

• Haveanupgradenotebook• ManyOracledocumentsarelive,keepcopies

• MOSNotes• Documentation

• Alldecisions• WhoandWhy

• EveryIssueineverypassthroughtheupgrade• Timinginformationoneachstep

Page 10: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

HighLevelUpgradeSteps• CurrentenvironmentEBS11.5.10.2,DB11.2.0.4• Beforetheupgrade

• Gothroughthefunctionalpre-upgradesteps• PreparingfortheUpgradechapterinOracleE-BusinessSuiteUpgradeGuide:Release11ito12.2

• Ensureallcodechangesin11iarealsomadeinR12.2

• Prestage the12.2appstier,includingappstierETCCidentifiedpatches• Downtime

• Finalpassthroughpre-upgradesteps• Databasepatches• Preupgrade patchesin12.2• Upgradeto12.2.0• Converttoonlinepatching• Apply12.2.5• SigntheJARfiles• Applypostupgradepatchesandmigratecustomcode• Completepostupgradefunctionalsteps

Page 11: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

TechnicalUpgrade• Oncethedowntimestarts

• BlueStar hasover150stepsintheupgradescript• Database

• Applyoutstandingdatabasepatches• Businessdecision:timeindowntimev.costoffull11iregressiontestifpatchesareinstalledpreupgrade

• Switchto12.2init.ora parameters• Sizefortheupgrade(job_queue_processses andparallel_max_servers maxedforhardware)

• ChangestoUTL_FILE_DIR• APPLPTMPonappstiermustpointtoalocationontheapptierthatcanbeaccessedusingthesamepathfromthedatabasetierviaUTL_FILE.

• 11iappswereNFSmountedfromdatabaseserver• WechosetochangetheinR12.2

• Disablecustomtriggers• Addrequireddatafile space

Page 12: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

TechnicalUpgrade

• AppsTier• Initiallylikeanyotherpatch• EnableMaintenanceMode• ADmustswitchtoR12

• Runadgrants.sql onthedatabaseserver• Mergetheadpatches(makesureyouremember–admode)

• Applypre-installpatches• MOSNote1448102.1

• Includes awget.sh script todownload the patches

Page 13: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

TechnicalUpgrade

Page 14: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

TechnicalUpgrade

• Mergethepreinstallpatcheswiththe12.2.0driver• cd$AU_TOP/patch/115/drive• admrgpch -d.-preinstall-masteru10124646.drv

• Applyfixesforknownissues• VNC

• adpatch options=nocopyportion,nogenerateportion• u_merged.drv

• Listofknownissuesandfixesinnotebook• Forexample

• About3.5hoursintotheupgrade,pycofuna.ldt fails• MOSNote1615918.1says toskip if not using payroll

• DisableMaintenanceMode• Migrateautoconfig tothedatabasetier

Page 15: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

TechnicalUpgrade

• InVNC,runrapidwiz toconfiguretheappstier• About1timein3,nodomainsareconfigured

• $FMW_HOME/webtier/instances orisempty• MOSNote1953456.1• cd$FND_TOP/patch/115/bin• perl txkEBSDomainConfig.pl

• EnableCustomTriggers• EnableOnlinePatching• ApplyAD/TXKDelta8

• RuncheckMTpatch.sh fromETCCtostoretheresultsinthedatabase• Migrateautoconfig todatabasetier

Page 16: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

TechnicalUpgrade

• Apply12.2.5(19676458)indowntimemode• adop phase=applyapply_mode=downtimepatches=19676458

• SigntheJARfiles• Starttheappstier• Completepatchingcyclebyrunningcleanup

• adopphase=cleanup•Updatethecurrentsnapshotusingadadmin• SwitchtoFrameworkSimplifiedhomepage• SetupCorporateBrandingtouseBlueStar logo•Deregisterandadsplice customschema

Page 17: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

TechnicalUpgrade

• Applytherestofthe12.2/12.2.5postupgradepatches• Updatethesnapshot• GetandapplytheNLSsynchronizationpatches

• Allfurtherpatchesrequirealllanguages

• Completethepatchcycle• Migratethecustomizations

• ForBlueStar thisincludes• Changesto11icustomizations• FixestoR12issues• Moveapplicationsinstalledin11iiAS toGlassfish

• ApplysomeadditionalpatchesthatwerenotincludedbeforetheNLSgeneration

• Turnovertothefunctionalteamtocompletepostupgradesetups

Page 18: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

TechnicalUpgrade

• CompleteHistoricalDataUpgrade• Setupforcloning

• adpreclone.pl

• Takefullbackup• Clonefrombackuptocreatesupport,DEVandTESTinstances

• KeeponeR12instancefrompreviousupgradecycleforacoupleofweeks

Page 19: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

ReplacingDiscoverer

Page 20: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

OracleApplicationsExpress

• UsingOracleApplicationsExpress5.1,ORDS,andGlassfishCommunityServer

• DiscovererusedOracleApplicationslogin• 12.2hashookstoallowasimilarcapabilityinOracleApplicationsExpress(Apex)

• DecidedtouseEBSuserauthentication,butnotresponsibilitiessincehooksdonotexistbetweenApexand11i

• UseanapplicationaliasandaURLforwardtoaccess• http://ebsrpt.bluestarinc.com =>http://pdbdb1.bluestarinc.com:8080/ebs/f?p=EBS_REPORTS_11i

• Afterupgradeislive,willchangetoEBS_REPORTS_R12

Page 21: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

Authentication

• Createacustomfunctionunderappstovalidatelogins• Thiswilljustcallfnd_user_pkg.validatelogin• Thefnd_user_pkg containsoperationsthatyoudonotwanttoreleasetoanotherschema,bywritingawrapperfunctionwecanjustgrantexecuteonthespecificfeaturesthatarerequired.

• AtBlueStar wesettheorganizationattheresponsibilitylevel• InDiscoverer,thiswasusedtosettheorgforareport• IntheReportingapp,wedecidedtoalltheusertoselectfromalistofallowedorgs(orinsomecasestoselectallallowedorgs).

• Wedidthisbytakingtheuserid andfindingthelistofallowedorgs

Page 22: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

Authorization

• InApex,youcanrestrictaccesstomenuitems,pages,andevenobjectsonpagesbasedupAuthorizationrules.

• AswetookthereportsfromDiscoverer,webrokethemdownbytheusersthathadaccessintojobcategories

• Sales• Purchasing• Marketing• Etc

• Wefurtheraddedlevelstothesesincetherearereportsthatareappropriateformanagersbutnotasalesperson.

• UsersthathaveaccesstodefineaccessintheEBSalsohavetheabilitytoassignEBSresponsibilitiestothereportauthorizationlevels

Page 23: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

HomePage

Page 24: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

Menus

Page 25: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

ExampleReport

Page 26: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

ExampleReport

Page 27: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

ExporttoExcel

• Builtindownloadproducesacsv• DoesnotworkwellforBlueStar

• Wantedtoexporttoxlsx• AntonScheffer wroteautility(as_xlsx)toconvertaquerytoxlsx

• https://technology.amis.nl/2011/02/19/create-an-excel-file-with-plsql/• Youcanalsopullthequerybehindaninteractivereportandthebindvariablesusingthebuiltin apex_ir package.

• Usedtheget_report_sql fromhttp://deneskubicek.blogspot.com/2013/05/getting-interactive-report-query.html

• Usedacoupleofapplicationlevelitemsandapagetoimplementaroutinethatcouldbecalledfromanyinteractivereporttoproduceanxlsx file

• Thexlsx isbuiltinthelargepool,makesureitislargeenough

Page 28: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

Internals

• Somelessonslearned• Identifythequeriessoyoucandealwithperformanceissueseasier:

• SELECT/*Page156,2008MasterSalesout share*/• Discovererproducessomeuglycode

• Makesurefilterlocationsmakesense• Checkforallowedorgs

(((xss.OPERATING_UNIT_ID =:P156_ORG)and (:P156_ORG>0))OR

((nvl(:P156_ORG,-1)<0) ANDxss.OPERATING_UNIT_ID IN(select organization_id

from apps.xxbsi_allowed_sales_org where user_name=:APP_USER)))

Page 29: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

ExporttoExcel

• CreateanAfterSubmitprocesstofirewhentheExportbuttonispressed:DECLAREv_sql VARCHAR2(32767);v_name varchar2(200);

BEGINv_sql :=xbsi.xx_get_report_sql (:app_id,:app_page_id,FALSE);selectPAGE_TITLEintov_name fromAPEX_APPLICATION_PAGESwherePAGE_ID=

v('APP_PAGE_ID')andAPPLICATION_ID=v('APP_ID');APEX_UTIL.set_session_state(p_name =>'IR_SQL',p_value =>v_sql);APEX_UTIL.set_session_state(p_name =>'IR_NAME',p_value =>v_name);APEX_UTIL.REDIRECT_URL('f?p='||v('APP_ID')||':179:'||v('SESSION'));

END;

Page 30: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

ExporttoExcel• ExportPage

• CreateaPre-RenderingBeforeHeaderprocessDECLARE

v_mime VARCHAR2(100);v_length NUMBER;v_file_name VARCHAR2(2000);file_blob BLOB;

BEGINxxbsi.as_xlsx.query2sheet(v('IR_SQL'));selectxxbsi.as_xlsx.finish,v('IR_NAME')||'.xlsx'intofile_blob,v_file_namefromdual;

v_mime:='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';SELECTDBMS_LOB.GETLENGTH(file_blob)INTOv_lengthFROMdual;owa_util.mime_header(nvl(v_mime,'application/octet'),FALSE,'UTF-8');htp.p('Content-length:'||v_length);htp.p('Content-Disposition:attachment;filename="'||v_file_name||'"');owa_util.http_header_close;wpg_docload.download_file(file_blob );apex_application.stop_apex_engine;

end;

Page 31: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

CustomJavaApplications

Page 32: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

CustomJava

• WeallowcertaincustomerstoupdatetheirinformationusingSOAP• Wealsofoundthatourcreditcardprocessordidnotsupport12.2• Alreadyusingglassfishondb tier

• Installedglassfishonappstiers• Onebenefitisthatthiscanjustbeanotherapplicatons tiermigration

• UsedproxyservertokeepcustomersideURLsthesame

Page 33: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown

Cloning

• Glassfishisnotimpactedbytheclone• Meansdevelopmentisnotoverwrittenbyproduction

• GenerallygoodsinceIrestoredevelopmentcodeasmuchaspossiblewitharefresh

• However,inallotherenviroments,Iwantproductioncodeaftercloning

• Oursolution:• Wehaveaknownlocation(thatisrefreshedduringcloning)whichcontainsallthewarfilesinstalledintheglassfishserver.

• Forthemostrecentversionofeachwar,thereisanotherfilefile.MIGRATION thatlinksbacktothemigrationdirectory

• PostCloning,wereviewthefilesinwarfilesandreinstallthemusingtheinstructionsintheappropriatemigrationdirectory.

Page 34: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

Q&[email protected]://blog.michael-brown.org

Page 35: Upgrading to 12.2 - ebs-dba.com · •Preparing for the Upgrade chapter in Oracle E-Business Suite Upgrade Guide: ... •Ensure all code changes in 11i are also made in R12.2

PleaseCompleteYourSessionEvaluation

EvaluatethissessioninyourCOLLABORATEapp.Pullupthissessionandtap"SessionEvaluation"tocompletethesurvey.

SessionID: 10162