7 Replies Latest reply on Mar 25, 2020 2:19 PM by yoonas

    Issue generating tnsnames.ora file from DB postclone

    PaleRider75

      Using Document ID 406982.1 for Cloning Oracle Applications R12 with Rapid Clone, we are able to complete cloning steps until Section 4 where we use Option 6 for Cloning the Database separately. Once the database is restored via RMAN, and the library update has been run against the DB, and confirming that the database is up and running, we run:

       

      $ cd [RDBMS ORACLE_HOME]/appsutil/clone/bin

      $ perl adcfgclone.pl dbconfig [Database target context file]

      Where Database target context file is: [RDBMS ORACLE_HOME]/appsutil/[Target CONTEXT_NAME].xml.

      Following this step the FND_DATABASE_INSTANCES table within the database is empty.

       

      Next we run:

      $ cd [COMMON_TOP]/clone/bin

      $ perl adcfgclone.pl appsTier [APPL_TOP target context file]

      Where APPL_TOP target context file is [INST_TOP]/appl/admin/[Target CONTEXT_NAME].xml

      Following this step the FND_NODES table is fully populated, but we do not start the application.

       

      After this we run autoconfig on the database nodes and it fails with the following entry in the logfile:

       

      Loading ORACLE_HOME environment from /u01/OracleHomes/121020/db

      Logfile: /u01/OracleHomes/121020/db/appsutil/log/WMSTST_x07tst01/03241057/NetServiceHandler.log

      AC-50480: Internal error occurred: java.lang.NullPointerException

      Error generating tnsnames.ora from the database, temperory tnsnames.ora will be generated using templates

      Instantiating templates

      tnsnames.ora instantiated

       

      Our process has worked for years now, but this time we are experiencing this issue for the very first time. 

       

      *** RAC is NOT configured. Generating listener.ora from the template ad8ilsnr.ora ***

      listener.ora instantiated

       

      adgentns.pl exiting with status 2

       

      Running adgentns.pl separately results in the same error: AC-50480: Internal error occurred: java.lang.NullPointerException

       

      I am attaching the NetServiceHandler.log file which detailed the adgentns.pl process.

       

      Upon researching this particular error, most suggestions are to run the exec fnd_conc_clone.setup_clean, which does not solve the issue.

        • 1. Re: Issue generating tnsnames.ora file from DB postclone
          yoonas

          Hi,

           

          any recent patches on source ?

           

          I am attaching the NetServiceHandler.log file which detailed the adgentns.pl process.

          You missed the attachment or i am unable to see?

           

          Regards,

          Yoonas

          • 2. Re: Issue generating tnsnames.ora file from DB postclone
            PaleRider75

            None.  We're even behind on the latest CPU...

             

            This is a cloning process that has been running smoothly for years, and I'm stumped on what is going wrong now.

             

            One thing I noticed is that the FND_DATABASE_INSTANCES and FND_NODES tables are populated after RMAN restore, but are empty post the "dbconfig" step.  Running adcfgclone.pl on the Apps tier populates FND_NODES, but only with AppTier info, where in the PRD instance it contains the DB node as well.

             

            Sorry....the attachment is now there!!!

            • 3. Re: Issue generating tnsnames.ora file from DB postclone
              yoonas
              One thing I noticed is that the FND_DATABASE_INSTANCES and FND_NODES tables are populated after RMAN restore

              After restore you will have these details from source.

               

              Log file shows listener creation is succesful.

               

              is the listener up can you post listener status.

               

              What happens if you run autoconfig with manually created tnsnames entry(pointing to newly created db)

              • 4. Re: Issue generating tnsnames.ora file from DB postclone
                PaleRider75

                Right.  After restore, those details are populated, but they are populated with the details from the source system.  From what I understand, the adcfgclone scripts are supposed to populate those fields from the new database. 

                 

                The listener is showing that the database instance is "READY, has 1 handler(s) for this service..."

                 

                When I run autoconfig I receive the usual AC-50480: Internal error occurred: java.lang.NullPointerException error which points to the adgentns.pl script, which provides the output I attached initially. 

                 

                I'm looking for more solutions....thanks!

                • 5. Re: Issue generating tnsnames.ora file from DB postclone
                  lmu

                  1. Check that you followed all the steps 4 Option 6.  Cloning the database separately  doc 406982.1

                  I know you said you did, but it won't hurt to do them again.  Shut the database down before doing this.

                     a.  cd /u01/app/oracle/12.1.0/appsutil/clone/bin

                          perl adcfgclone.pl dbTechStack

                   

                  Start up the database

                      c. sqlplus "/ as sysdba" @$ORACLE_HOME/appsutil/install/$CONTEXT_NAME/adupdlib.sql so

                      d. cd /u01/app/oracle/12.1.0/appsutil/clone/bin

                            perl $ORACLE_HOME/appsutil/clone/bin/adcfgclone.pl dbconfig <contextfile>

                   

                   

                   

                  2. If that doesn't work, I would run preclone on the source, copy the ORACLE_HOME files again and then reclone the database ORACLE_HOME. You can do this without affecting the database that you just cloned.

                  You don't have to reclone the database, just the home. You will have to follow steps 1-6 from the note again.

                  • 6. Re: Issue generating tnsnames.ora file from DB postclone
                    PaleRider75

                    Not sure if this will help anyone in the future but it was discovered that the DataModelHandler.class was of a higher version in the application than in the database.  This led to the following error message in the NetServiceHandler logfile:

                     

                     

                    StackTrace:

                    java.lang.NullPointerExceptionat

                    oracle.apps.ad.tools.configuration.DataModelHandler.getDBName(DataModelHandler.java:912)

                     

                     

                    We utilized admkappsutil.pl utility to create the file appsutil.zip and uploaded that to the database machine. 

                     

                     

                    adautocfg.sh was then able to run successfully on the database tier. 

                    • 7. Re: Issue generating tnsnames.ora file from DB postclone
                      yoonas

                      Version difference normally happens due to patch application.

                      I have had issues following same procedure after applying patches on source or target. in that case full clone is done

                       

                      In case patch is applied on source version problem occurs on with target apps tier

                      if patch is applied on target version problem with happens with db having old patch info.