When I cloned a R12.2 instance, "perl adcfgclone.pl appsTier dualfs" gave an error at the final stage:
... ...
AutoConfig has completed with errors for .patch
Do you want to startup the Application Services for EBSDEV? (y/n) [n] : n
Before fixing the error, I did not have problem in setting up the instance and starting all apps services in RUN file system. The website was available to the user while I did troubleshooting in the PATCH file system.
The log file for cloning RUN file system does not have any error. But log file $INST_TOP/admin/log/clone/patch/RCloneApplyAppstier_10281250.log from cloning PATCH file system has a lot of errors beginning with:
ERROR DESCRIPTION:
(*******FATAL ERROR*******
PROGRAM : ($FND_TOP/patch/115/bin/txkSetUnicodeEncodingSecFilter.pl)
TIME : Fri Oct 28 13:01:35 2022
FUNCTION: TXK::SQLPLUS::_doExecute [ Level 3 ]
MESSAGES:
Invalid Connect string - cannot connect to database
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
When I ran AutoConfig in PATCH environment, it failed and gave similar error in the log:
*******FATAL ERROR*******
PROGRAM : ($FND_TOP/patch/115/bin/txkUpdateEBSDomain.pl)
TIME : Wed Nov 2 11:44:02 2022
FUNCTION: TXK::SQLPLUS::_doExecute [ Level 3 ]
MESSAGES:
Invalid Connect string - cannot connect to database
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
I tried "sh adadminsrvctl.sh start forcepatchfs" in PATCH environment and it worked, which is required by ADOP later, even AutoConfig failed on PATCH.
I compared tnsnames.ora and listener.ora in both RUN and PATCH file systems and did not see any difference. After I read Doc ID 2378192.1 (12.2 Autoconfig Fails On PatchFS with error "ORA-12514: TNS:listener does not currently know of service requested"), I made a change to database parameter SERVICE_NAMES:
SQL> show user
USER is "SYSTEM"
SQL> show parameter service_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
service_names string EBSDEV
SQL> alter system set service_names='EBSDEV,EBSDEV_ebs_patch';
System altered.
SQL> show parameter service_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
service_names string EBSDEV,EBSDEV_ebs_patch
After that, I ran AutoConfig in PATCH file system again, and got the same error. So, that was not the fix.
Then, I found database parameter LOCAL_LISTENER might be incorrect. After I make below change (and maybe plus the change to service_names), AutoConfig worked successfully in PATCH file system !
SQL> show parameter local_listener
NAME TYPE VALUE
--------------------------------- ----------- ------------------------------
local_listener string
SQL> alter system set local_listener='EBSDEV_LOCAL';
System altered.
SQL> show parameter local_listener
NAME TYPE VALUE
------------------------------- ----------- ------------------------------
local_listener string EBSDEV_LOCAL
After AutoConfig worked in PATCH, I ran "adop phase=fs_clone" (successfully) in RUN file system to over-write the PATCH files. Then I added 2nd node to the instance without issue.