SessionID:
Preparedby:
Upgradingto12.2.5ACaseStudy
10162
MichaelBrown,BlueStar
@MichaelBrownOrg
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
April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown
Agenda
• OverallApproach• TechnicalUpgrade• MovingfromDiscoverertoacustomsolutioninApplicationsExpress
• MovingcustomapplicationsfromtheEBSiAS
OverallApproach
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
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
April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown
OverallApproach
• Go-livewasscheduledtostartaftershippingDec30,2016andtobecompletedbeforestartofbusinessonJan3,2017(roughly80hours).
• Thebusinesspostponedthego-liveatthelastminutebecauseofsomenewcontractsstartinginJanuary2017.
• Go-liverescheduledforJuly.• Decisionwasmadetocarryforwardwithsomeofourchangesnow
• ReplacedDiscoverer• Replacinghowweloadspreadheets
• Released11iCodeFreeze
TechnicalUpgrade
April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown
GeneralUpgradeConcepts
• Readthedocumentation• 12.2isanewstartingpointforthetechnicalteam
• Haveanupgradenotebook• ManyOracledocumentsarelive,keepcopies
• MOSNotes• Documentation
• Alldecisions• WhoandWhy
• EveryIssueineverypassthroughtheupgrade• Timinginformationoneachstep
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
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
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
April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown
TechnicalUpgrade
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
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
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
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
April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown
TechnicalUpgrade
• CompleteHistoricalDataUpgrade• Setupforcloning
• adpreclone.pl
• Takefullbackup• Clonefrombackuptocreatesupport,DEVandTESTinstances
• KeeponeR12instancefrompreviousupgradecycleforacoupleofweeks
ReplacingDiscoverer
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
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
April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown
Authorization
• InApex,youcanrestrictaccesstomenuitems,pages,andevenobjectsonpagesbasedupAuthorizationrules.
• AswetookthereportsfromDiscoverer,webrokethemdownbytheusersthathadaccessintojobcategories
• Sales• Purchasing• Marketing• Etc
• Wefurtheraddedlevelstothesesincetherearereportsthatareappropriateformanagersbutnotasalesperson.
• UsersthathaveaccesstodefineaccessintheEBSalsohavetheabilitytoassignEBSresponsibilitiestothereportauthorizationlevels
April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown
HomePage
April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown
Menus
April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown
ExampleReport
April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown
ExampleReport
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
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)))
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;
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;
CustomJavaApplications
April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown
CustomJava
• WeallowcertaincustomerstoupdatetheirinformationusingSOAP• Wealsofoundthatourcreditcardprocessordidnotsupport12.2• Alreadyusingglassfishondb tier
• Installedglassfishonappstiers• Onebenefitisthatthiscanjustbeanotherapplicatons tiermigration
• UsedproxyservertokeepcustomersideURLsthesame
April2-6,2017inLasVegas,NVUSA#C17LVCopyright©2017MichaelBrown
Cloning
• Glassfishisnotimpactedbytheclone• Meansdevelopmentisnotoverwrittenbyproduction
• GenerallygoodsinceIrestoredevelopmentcodeasmuchaspossiblewitharefresh
• However,inallotherenviroments,Iwantproductioncodeaftercloning
• Oursolution:• Wehaveaknownlocation(thatisrefreshedduringcloning)whichcontainsallthewarfilesinstalledintheglassfishserver.
• Forthemostrecentversionofeachwar,thereisanotherfilefile.MIGRATION thatlinksbacktothemigrationdirectory
• PostCloning,wereviewthefilesinwarfilesandreinstallthemusingtheinstructionsintheappropriatemigrationdirectory.
Q&[email protected]://blog.michael-brown.org
PleaseCompleteYourSessionEvaluation
EvaluatethissessioninyourCOLLABORATEapp.Pullupthissessionandtap"SessionEvaluation"tocompletethesurvey.
SessionID: 10162