Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

35
July 18, 2004 Letting Go: A DBA's Letting Go: A DBA's Guide to AutoConfig and Guide to AutoConfig and Rapid Clone Rapid Clone Mark Morgan siMMian systems, inc. 415-585-4242 [email protected]

description

Letting Go: A DBA's Guide to AutoConfig and Rapid Clone. Mark Morgan siMMian systems, inc. 415-585-4242 [email protected]. AutoConfig and Rapid Clone. Overview Implementation and Operation Troubleshooting, Tips, and Tricks. AutoConfig Overview. 10.7 --> 2 config files APPSORA.env - PowerPoint PPT Presentation

Transcript of Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

Page 1: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004

Letting Go: A DBA's Guide to Letting Go: A DBA's Guide to AutoConfig and Rapid CloneAutoConfig and Rapid Clone

Mark Morgan

siMMian systems, inc.

415-585-4242

[email protected]

Page 2: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

AutoConfig and Rapid CloneAutoConfig and Rapid Clone

• Overview• Implementation and Operation• Troubleshooting, Tips, and Tricks

Page 3: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

AutoConfig OverviewAutoConfig Overview

• 10.7 --> 2 config files• APPSORA.env• FNDENV

• 11.5.9 --> 100? config files• Database• DB Networking• Apache• Framework (jsp, AOL.J,pls,servlets, TCF)• Applications environment• Discoverer server• Portal

Page 4: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

AutoConfig OverviewAutoConfig Overview

• Context file (XML)• Template files• File drivers

• lists of template files

• AD scripts• shell scripts, perl, SQL, java

Page 5: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

AutoConfig ImplementationAutoConfig Implementation

• Doc 165195.1• Oracle Applications Maintenance

Procedures

Page 6: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

AutoConfig ImplementationAutoConfig Implementation

• Patch Current• ADX E• TXK H• AD F+• 2873456 (Context Editor)• 2674529 (Apache pre 11.5.8)• OAM G (optional)• zip 2.3• JDK 1.3.1

Page 7: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Migrate to AutoConfigMigrate to AutoConfig

• Will need to migrate if• pre 11.5.7 installation• applied templates patch

Page 8: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Migrate to AutoConfigMigrate to AutoConfig

• Apps Tier• adbldxml.sh• adconfig.sh

• DB Tier• admkappsutil.sh• adbldxml.sh• adconfig.sh

• Always check logs after running scripts!

Page 9: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Maintaining AutoConfigMaintaining AutoConfig

• Apps Tier:• $COMMON_TOP/admin/scripts/<CONTEXT>/adautocfg.sh

• DB Tier:• $ORACLE_HOME/appsutil/scripts/<CONTEXT>/adautocfg.sh

Page 10: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Context FileContext File

• $APPL_TOP/admin/$SID/<CONTEXT>.xml

• 3 Ways to Change Configuration:• editcontext• OAM• vi

Page 11: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Context FileContext File

• XML

<web_port_pls oa_var="s_webport_pls" oa_type="PORT">8202</web_port_pls>

<url_protocol oa_var="s_url_protocol">http</url_protocol>

<local_url_protocol oa_var="s_local_url_protocol">http</local_url_protocol>

<oprocmgr_port oa_var="s_oprocmgr_port" oa_type="PORT">8102</oprocmgr_port>

Page 12: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Restoring an AutoConfig Restoring an AutoConfig ConfigurationConfiguration

• OAM

• restore.sh• $APPL_TOP/admin/<CONTEXT>/out/MMDDhhmm• $ORACLE_HOME/appsutil/out/<CONTEXT>/MMDDhhmm

Page 13: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Customizing ConfigurationsCustomizing Configurations

• Apps Tier:

# Begin customizations

...

# End customizations

• $APPL_TOP/custom<CONTEXT>.env• Doc 236618.1 Personalizing OA Framework• .profile

Page 14: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Customizing ConfigurationsCustomizing Configurations

• DB Tier:• tnsname.ora --> ifile• init.ora --> ifile

Page 15: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

AutoConfig AutoConfig Troubleshooting, TipsTroubleshooting, Tips

and Tricksand Tricks• oprocmgr_prt• s_webport_pls• s_conctimeout• s_discostatus• JDK 131 setups• TCF Port

• CLASSPATH• AF_CLASSPATH• LD_LIBRARY_PATH• Followsymlinks• DISPLAY

Page 16: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

AutoConfig AutoConfig Troubleshooting, TipsTroubleshooting, Tips

and Tricksand Tricks• Keep accessible backups of context file• Don't break out of adautocfg.sh• Use aoljtest.jsp to test configs• Updates some profile options• init.ora db_cache_size does not work (as of ADX D)• Use adautocg.sh to change apps password after

running FNDCPASS• Keep copies of db configs (init.ora, listener.ora,

tnsnames.ora)

Page 17: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Rapid Clone OverviewRapid Clone Overview

• Builds DB init.ora• Builds DB controlfiles• Creates DB networking config files• Creates all Apps config files for

AutoConfig• Updates Apps profile values• Updates/builds oraInventory

Page 18: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Rapid Clone ImplementationRapid Clone Implementation

• Doc 230672.1• Oracle Applications Maintenance

Procedures

Page 19: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Rapid Clone ImplementationRapid Clone Implementation

• Patch Current• ADX• OUI• Current AutoConfig patches

Page 20: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Running Rapid Clone -- Running Rapid Clone -- preclonepreclone

• Copies current configurations to templates• DB Tier:

• perl adpreclone.pl dbTier

• outputs to $ORACLE_HOME/appsutil//clone

• Apps Tier:• perl adpreclone.pl appsTier

• outputs to $COMMON_TOP/clone

Page 21: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Running Rapid Clone -- Running Rapid Clone -- copy filescopy files

• Apps Tier:• APPL_TOP• OA_HTML• OA_JAVA• COMMON_TOP/util• COMMON_TOP/clone• 806 ORACLE_HOME• iAS ORACLE_HOME

Page 22: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Running Rapid Clone -- Running Rapid Clone -- copy filescopy files

• DB tier:• Cold copy of database files*• ORACLE_HOME (9i/8i)

Page 23: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Running Rapid Clone -- Running Rapid Clone -- postclonepostclone

• DB Tier:• perl ./adcfgclone.pl dbTier

• control files• init.ora• tnsnames.ora• listener.ora• starts database and listener

Page 24: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Running Rapid Clone -- Running Rapid Clone -- postclonepostclone

• Apps Tier:• perl ./adcfgclone.pl appsTier

• applications configurations• profile values• starts all services

Page 25: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Running Rapid Clone -- Running Rapid Clone -- finishingfinishing

• Verify profile options• Verify printers• Update workflow• Verify APPLCSF• Change passwords• Update login user responsibilities

Page 26: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Rapid Clone -- optionsRapid Clone -- options

• ADX E allows all node cloning options

• multi --> single• multi --> multi• single --> multi

Page 27: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Rapid Clone Rapid Clone TroubleshootingTroubleshooting

• Always check postclone logfiles for 'ERRORCODE = 1'

• errors cause rollbacks• Verify utl_file entries in init.ora• Verify profile values• Verify dbc files• Verify GLOBAL_NAME

Page 28: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Rapid Clone Rapid Clone TroubleshootingTroubleshooting

• Verify data:• FND_NODES• FND_APPLICATION_SERVERS (desupporting)• AD_APPL_TOPS

• Verify context file entries for:• CLASSPATH• AF_CLASSPATH• LD_LIBRARY_PATH• hostname• DISPLAY

Page 29: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Rapid Clone Tips and TricksRapid Clone Tips and Tricks

• Set ORACLE_HOME/JRE to relative path

• If selectively refreshing environment, make sure to copy• $COMMON_TOP/clone• $ORACLE_HOME/appsutil/clone

• Before running postclone, verify /var/opt/oracle/oraInst.loc on target machine

Page 30: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Rapid Clone Tips and TricksRapid Clone Tips and Tricks

• Create script to display paths that will be entered in postclone

• APPL_TOP• COMMON_TOP• 806 ORACLE_HOME• iAS_HOME

Page 31: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Rapid Clone Tips and TricksRapid Clone Tips and Tricks

• To use online backup, follow Appendix A steps to manually create controlfiles

• After cloning, re-login to reset environment

• Truncate FND_CONCURRENT_REQUESTS before Apps Tier postclone

• Truncate WF_NOTIFICATIONS

Page 32: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Rapid Clone Tips and TricksRapid Clone Tips and Tricks

• Modify adcfgclone.pl to verify new context file:#print "\nsleeping for 10 minutes to allow fixes of context

file...\n";sleep 600;### run adclone#print "\nRunning Rapid Clone with command:\n";my $syscmd="perl $ADCLONE java=$JAVA_TOP mode=apply

stage=$STAGE_DIR component=$COMPONENT method=CUSTOM $CTX_ARG $MERGE_APPL showProgress ";if ($Config{osname} ne 'MSWin32') { $syscmd =~ s#\\#\/#g;}

Page 33: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Rapid Clone Tips and TricksRapid Clone Tips and Tricks

• Rather than add new record in WF_SYSTEMS:UPDATE wf_systems

SET name =

(SELECT global_name FROM global_name),

display_name =

(SELECT global_name FROM global_name);

Page 34: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

Rapid Clone Tips and TricksRapid Clone Tips and Tricks

• To update WF_AGENTS

DECLAREv_gname global_name.global_name%TYPE;v_old_gname global_name.global_name%TYPE := '&1';

BEGINSELECT global_name INTO v_gname FROM global_name;UPDATE wf_agentsSET address =substr(address,1,instr(address,'@'))||v_gnameWHERE address LIKE '%@'||v_old_gname;

END;/

Page 35: Letting Go: A DBA's Guide to AutoConfig and Rapid Clone

July 18, 2004 Mark Morgan siMMian systems, inc.

By letting it go it all gets done. The world is won by those who let it go. But when you try and try. The world is beyond the winning.

-- Lao Tzu