3 Replies Latest reply on Nov 1, 2016 6:15 PM by Srini Chavali-Oracle

    Issues during EBS cloning automation with expect

    2738168

      Hi,

       

      I'm in the middle of automating our EBS 12.1.3 cloning process using Linux expect. I have generated a script for expect to run adcfgclone.pl. Now since every time adcfgclone.pl is run, there is a different logfile and other output files with different names from my generated script, expect won't continue because the comparison result is false. How do I get around this?

       

      Here's part of my expect script:

       

      expect -exact "perl adcfgclone.pl dbTier\r

      \r

                           Copyright (c) 2002 Oracle Corporation\r

                              Redwood Shores, California, USA\r

      \r

                              Oracle Applications Rapid Clone\r

      \r

                                       Version 12.0.0\r

      \r

                            adcfgclone Version 120.31.12010000.12\r

      \r

      Enter the APPS password : "

      send -- "xxxxxxxxxxx\r"

      expect -exact "\r

      \r

      Running:\r

      /U01/daily/db/tech_st/12.1.0/dbhome_1/appsutil/clone/bin/../jre/bin/java -Xmx600M -cp /U01/daily/db/tech_st/12.1.0/dbhome_1/appsutil/clone/jlib/java:/U01/daily/db/tech_st/12.1.0/dbhome_1/appsutil/clone/jlib/xmlparserv2.jar:/U01/daily/db/tech_st/12.1.0/dbhome_1/appsutil/clone/jlib/ojdbc6.jar oracle.apps.ad.context.CloneContext -e /U01/daily/db/tech_st/12.1.0/dbhome_1/appsutil/clone/bin/../context/db/CTXORIG.xml -validate -pairsfile /tmp/adpairsfile_26882.lst -stage /U01/daily/db/tech_st/12.1.0/dbhome_1/appsutil/clone  2> /tmp/adcfgclone_26882.err; echo \$? > /tmp/adcfgclone_26882.res\r

      \r

      Log file located at /U01/daily/db/tech_st/12.1.0/dbhome_1/appsutil/clone/bin/CloneContext_1031140949.log\r

      \r

      Provide the values required for creation of the new Database Context file.\r

      \r

      Target System Hostname (virtual or normal) \[tatooine\] : "

      send -- "\r"

      expect -exact "\r

       

      Above script will stuck at above entry point since it's looking for exact match of string but every time adcfgclone.pl is run, there will be a new log file created, so it'll never match the string, so expect won't move on. Has anyone run into this issue when using expect with cloning? Please help!

       

      Thank you!

       

      Jessie