Wednesday 22 February 2017

ADPATCH using defaults file – Non Interactive Patching.

Reduce Patch timing in apps using Defaults file with adpatch

-> Creating a defaults files :

adpatch defaultsfile=$APPL_TOP/admin/$TWO_TASK/defaults.txt

Keep passing the values for all the prompts till adpatch asks for patch directory. When it prompts for patch directory do a ctrl+c and abort the adpatch run.

This will create defaults file for you.

-> First adpatch run after creating defaults file should be without using defaults file

-> Using defaults file :

time adpatch defaultsfile=$APPL_TOP/admin/$TWO_TASK/defaults.txt logfile=patch_name.log patchtop=patch_top driver=drv_file_name interactive=no workers=number_of_workers

Tuesday 21 February 2017

Adding USER and Responsibilityin EBS Instance from Backend

Adding USER in EBS Instance from Backend
++++++++++++++++++++++++++++++++++++++++++

set serveroutput on
DECLARE
  v_password   VARCHAR2(30):='Equifax@123';
  v_username   VARCHAR2(100);
  v_session_id INTEGER     := USERENV('sessionid');

CURSOR C1 IS
SELECT name from
(SELECT 'MURALI.M' NAME FROM DUAL UNION ALL
SELECT 'PAVI.S'                FROM DUAL UNION ALL
SELECT 'ROHAN.VYAS'        FROM DUAL UNION ALL
SELECT 'SAILIK.SEN'               FROM DUAL UNION ALL
SELECT 'SUDEEPTO.DAS'             FROM DUAL UNION ALL
SELECT 'TANMAYEE.HALDER'          FROM DUAL UNION ALL
SELECT 'TANVI.SINGH'              FROM DUAL UNION ALL
SELECT 'VIDHYA.KULANTHAIVELU'     FROM DUAL) where name NOT IN (SELECT user_name from FND_USER);

BEGIN

FOR r1 IN C1 LOOP

  fnd_user_pkg.createuser (
    x_user_name => r1.name,
    x_owner => NULL,
    x_unencrypted_password => v_password,
    x_session_number => v_session_id,
    x_start_date => SYSDATE,
    x_end_date => NULL
  );
  COMMIT;
  DBMS_OUTPUT.put_line ('User: '||r1.name||' Created Successfully');

END LOOP;

EXCEPTION
  WHEN OTHERS THEN
    DBMS_OUTPUT.put_line ('Unable to create User due to'||SQLCODE||' '||SUBSTR(SQLERRM, 1, 100));
    ROLLBACK;
END;

_________________________________________________________________________________


Adding Responsibility to USER in EBS Instance from Backend
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


set serveroutput on
DECLARE
v_count NUMBER;

CURSOR C1 IS
SELECT 'MURALI.M' NAME FROM DUAL UNION ALL
SELECT 'PAVI.S'                FROM DUAL UNION ALL
SELECT 'ROHAN.VYAS'        FROM DUAL UNION ALL
SELECT 'ROMIT.VERMA'              FROM DUAL UNION ALL
SELECT 'SAILIK.SEN'               FROM DUAL UNION ALL
SELECT 'SUDEEPTO.DAS'             FROM DUAL UNION ALL
SELECT 'TANMAYEE.HALDER'          FROM DUAL UNION ALL
SELECT 'TANVI.SINGH'              FROM DUAL UNION ALL
SELECT 'VIDHYA.KULANTHAIVELU'     FROM DUAL;

BEGIN
FOR r1 IN C1 LOOP

SELECT count(1)
  INTO v_count
  FROM fnd_user fu
     , fnd_user_resp_groups  fur
     , fnd_responsibility_vl fr
WHERE fu.user_id = fur.user_id
   AND fr.application_id = fur.responsibility_application_id
   AND fr.responsibility_id = fur.responsibility_id
   AND trunc(SYSDATE) BETWEEN trunc(fr.start_date) AND trunc(nvl( (fr.end_date - 1),SYSDATE) )
   AND trunc(SYSDATE) BETWEEN trunc(fur.start_date) AND trunc(nvl( (fur.end_date - 1),SYSDATE) )
   AND user_name = r1.name
   AND fr.responsibility_name = 'System Administrator';

dbms_output.put_line('Username : '||r1.name);

   IF v_count = 0 THEN
      fnd_user_pkg.addresp (r1.name,'SYSADMIN','SYSTEM_ADMINISTRATOR','STANDARD','Add Responsibility to USER using pl/sql',SYSDATE,SYSDATE + 100);
      commit;
      dbms_output.put_line('Responsibility Added Successfully to '||r1.name);
   END IF;
 
   END LOOP;
EXCEPTION
        WHEN others THEN
                dbms_output.put_line(' Responsibility is not added due to ' || SQLCODE || substr(SQLERRM, 1, 100));
                ROLLBACK;
END;

Sunday 19 February 2017

ias-component/process-type/process-set: HTTP_Server/HTTP_Server/HTTP_Server/

Error:

--> Process (index=1,uid=541856664,pid=5192)
    failed to start a managed process after the maximum retry limit
    Log:
    /uatapp1/UAT/inst/apps/UAT_acopprka001/logs/ora/10.1.3/opmn/HTTP_Server~1.log

Workaround:

The workaround for this is simply to change the permissions on .apachectl, run AutoConfig, and then put them back:

1. As applmgr, stop the web tier services (adopmnctl.sh stop).
2. Switch to the root user (su root)
3. Run the following commands (assumes applmgr environment and that "applmgr" is your actual applmgr user name):
    a.  ls -l $ORA_CONFIG_HOME/10.1.3/Apache/Apache/bin/.apachectl
    b.  chown applmgr $ORA_CONFIG_HOME/10.1.3/Apache/Apache/bin/.apachectl
    c.  chmod 0700 $ORA_CONFIG_HOME/10.1.3/Apache/Apache/bin/.apachectl
    d.  ls -l $ORA_CONFIG_HOME/10.1.3/Apache/Apache/bin/.apachectl
4. Switch back to the applmgr user (exit)
5. Run AutoConfig
6. Reverse step 3 so that the result looks like step 3a:
    a. su root
    b. chown root .apachectl
    c. chmod 6750 .apachectl
    d. exit

it should look like,

-rwsr-s--- 1 root dba 1703780 Feb 17 09:33 /uatapp2/UAT/inst/apps/UAT_acopprka001/ora/10.1.3/Apache/Apache/bin/.apachectl

Solution:

How to Configure Apache In R12 (10.1.3) To Listen on a Restricted Port Such as 80 or 443 (Doc ID 578001.1)

Thursday 16 February 2017

RESPONSIBILITY LIST MISSING AFTER APPLY PATCH

ISSUE:

RESPONSIBILITY LIST MISSING AFTER APPLY PATCH 9656424 & PATCH 15880118 

Solution:

Apply patch: 20217845

RESPONSIBILITY LIST MISSING AFTER APPLY PATCH 9656424 & PATCH 15880118
 
Update
20217845
Product
Oracle Applications Framework
Release
R12
Platform
Generic Platform
Built
OCT-01-2015 04:13:38


Monday 13 February 2017

AutoPatch error: ORA-03114: not connected to ORACLE

Error :

AutoPatch error:
adptaskGetTaskStatusID: Error while selecting from table AD_TASK_STATUS

AutoPatch error:
ORA-03114: not connected to ORACLE


AutoPatch error:
adptaskPostpatchTiming: Error calling adptaskGetTaskStatusID()


AutoPatch error:
adpmrp: Error calling adptaskPostpatchTiming for task Relink executables.


You should check the file
/r12uat1app/PROJ4/apps/apps_st/appl/admin/PROJ4/log/adpatch.log

for errors.

Solution :

Check the Database and listener is up and running (or) passwords may be wrong for apps/system while applying patch

AutoConfig could not successfully execute the following scripts: txkWfClone.sh INSTALL_SETUP 1

AutoConfig could not successfully execute the following scripts: txkWfClone.sh  INSTALL_SETUP  1

Error :


[SETUP PHASE]

  AutoConfig could not successfully execute the following scripts:

    Directory: /r12uat1app/PROJ4/inst/apps/PROJ4_acod1rka001/admin/install

      txkWfClone.sh           INSTALL_SETUP      1



AutoConfig is exiting with status 1

RC-50014: Fatal: Execution of AutoConfig was failed

Raised by oracle.apps.ad.clone.ApplyApplTop

ERROR: AutoConfig completed with errors. Check logfile at /r12uat1app/PROJ4/inst/apps/PROJ4_acod1rka001/admin/log/ApplyAppsTier_02130640.log for details.

ApplyApplTop Completed Successfully.


# Checking the status of AutoConfig run of ApplyApplTop

Warning : AutoConfig has completed with  errors .

Please review the AutoConfig section in the logfile. If required, you can re-run AutoConfig from command line  after fixing the problem


Cause:

This error means one of the following:
(a) WF_CLONE pkg and/or pkg body doesn't exist in the db or is invalid
or
(b) The DETERMINECLONE method/procedure doesn't exist within WF_CLONE pkg/pkg body.
(c) Some time Permission issue

(d) Bounce the listner (or) check status of listener


Solution:


1.    Please check the of the file txkWfClone.sh

    /r12uat1app/PROJ4/inst/apps/PROJ4_acod1rka001/admin/install

2    Give 755 txkWfClone.sh and then rerun AutoConfig, it will be executed succesfully.

        [OR]

1. Please verify if WF_CLONE is valid in the database. If it is not, please recompile it.

2. If the actions in #1 do not resolve the issue, then do the following:

     a. Run the following SQL query:


        SQL> select text

        2 from all_source

        3 where name = 'WF_CLONE' and line < 7;


     b. Go to the $FND_TOP/patch/115/sql directory and obtain the version of wfclones.pls

        and wfcloneb.pls.

     c. Compare the two versions. If they are different, then go to the

        $FND_TOP/patch/115/sql directory and recreate the spec/body by running:


- sqlplus apps/<passwd> @WFCLONES.pls

- sqlplus apps/<passwd> @WFCLONEB.pls


3. Rerun AutoConfig.

RMAN duplicate database restore scripts for EBSR12

Creating script for RMAN duplicate database restore for EBS R12

echo  " Recovery_start_time";
echo "date '+%Y/%m/%d @ %H:%M:%S'";
export ORACLE_SID=${ORACLE_SID};
rman log ="/bu/PRD_BKP/${ORACLE_SID}_Recovery_$(date '+%y%m%d@%H%M%S').log" <<EOF
CONNECT AUXILIARY /
run {
allocate auxiliary channel ch1 device type disk;
allocate auxiliary channel ch2 device type disk;
allocate auxiliary channel ch3 device type disk;
allocate auxiliary channel ch4 device type disk;
allocate auxiliary channel ch5 device type disk;
allocate auxiliary channel ch6 device type disk;
allocate auxiliary channel ch7 device type disk;
SET NEWNAME FOR DATAFILE 1 TO '/tdxdbd1/PROJ4/data/system01.dbf';
SET NEWNAME FOR DATAFILE 2 TO '/tdxdbd1/PROJ4/data/system02.dbf';
SET NEWNAME FOR DATAFILE 3 TO '/tdxdbd1/PROJ4/data/system03.dbf';
SET NEWNAME FOR DATAFILE 4 TO '/tdxdbd1/PROJ4/data/system04.dbf';
SET NEWNAME FOR DATAFILE 5 TO '/tdxdbd1/PROJ4/data/system05.dbf';
SET NEWNAME FOR DATAFILE 6 TO '/tdxdbd1/PROJ4/data/system06.dbf';
SET NEWNAME FOR DATAFILE 7 TO '/tdxdbd1/PROJ4/data/system07.dbf';
SET NEWNAME FOR DATAFILE 8 TO '/tdxdbd1/PROJ4/data/system08.dbf';
SET NEWNAME FOR DATAFILE 9 TO '/tdxdbd1/PROJ4/data/system09.dbf';
SET NEWNAME FOR DATAFILE 10 TO '/tdxdbd1/PROJ4/data/system10.dbf';
SET NEWNAME FOR DATAFILE 11 TO '/tdxdbd1/PROJ4/data/system11.dbf';
SET NEWNAME FOR DATAFILE 12 TO '/tdxdbd1/PROJ4/data/sysaux_01.dbf';
SET NEWNAME FOR DATAFILE 13 TO '/tdxdbd1/PROJ4/data/sysaux_02.dbf';
SET NEWNAME FOR DATAFILE 14 TO '/tdxdbd1/PROJ4/data/undo01.dbf';
SET NEWNAME FOR DATAFILE 15 TO '/tdxdbd1/PROJ4/data/undo02.dbf';
....
....
....
....
SET NEWNAME FOR DATAFILE 113 TO '/tdxdbd1/PROJ4/data/a_txn_data14.dbf';
SET NEWNAME FOR DATAFILE 114 TO '/tdxdbd1/PROJ4/data/a_txn_data13.dbf';
SET NEWNAME FOR DATAFILE 115 TO '/tdxdbd1/PROJ4/data/a_txn_data12.dbf';
SET NEWNAME FOR DATAFILE 116 TO '/tdxdbd1/PROJ4/data/a_txn_data11.dbf';
SET NEWNAME FOR DATAFILE 117 TO '/tdxdbd1/PROJ4/data/a_txn_data10.dbf';
SET NEWNAME FOR DATAFILE 118 TO '/tdxdbd1/PROJ4/data/a_txn_data09.dbf';
SET NEWNAME FOR DATAFILE 119 TO '/tdxdbd1/PROJ4/data/a_txn_data08.dbf';
SET NEWNAME FOR DATAFILE 120 TO '/tdxdbd1/PROJ4/data/a_txn_data07.dbf';
SET NEWNAME FOR DATAFILE 121 TO '/tdxdbd1/PROJ4/data/a_txn_data06.dbf';
SET NEWNAME FOR DATAFILE 122 TO '/tdxdbd1/PROJ4/data/a_txn_data05.dbf';
SET NEWNAME FOR DATAFILE 123 TO '/tdxdbd1/PROJ4/data/a_txn_data04.dbf';
SET NEWNAME FOR DATAFILE 124 TO '/tdxdbd1/PROJ4/data/a_txn_data03.dbf';
SET NEWNAME FOR DATAFILE 125 TO '/tdxdbd1/PROJ4/data/a_txn_data02.dbf';
SET NEWNAME FOR DATAFILE 126 TO '/tdxdbd1/PROJ4/data/a_txn_data01.dbf';
SET NEWNAME FOR DATAFILE 127 TO '/tdxdbd1/PROJ4/data/a_txn_ind23.dbf';
SET NEWNAME FOR DATAFILE 128 TO '/tdxdbd1/PROJ4/data/a_txn_ind22.dbf';
SET NEWNAME FOR DATAFILE 130 TO '/tdxdbd1/PROJ4/data/a_txn_ind20.dbf';
SET NEWNAME FOR DATAFILE 131 TO '/tdxdbd1/PROJ4/data/a_txn_ind19.dbf';
SET NEWNAME FOR DATAFILE 132 TO '/tdxdbd1/PROJ4/data/a_txn_ind18.dbf';
SET NEWNAME FOR DATAFILE 133 TO '/tdxdbd1/PROJ4/data/a_txn_ind17.dbf';
SET NEWNAME FOR DATAFILE 134 TO '/tdxdbd1/PROJ4/data/a_txn_ind16.dbf';
SET NEWNAME FOR DATAFILE 135 TO '/tdxdbd1/PROJ4/data/a_txn_ind15.dbf';
SET NEWNAME FOR DATAFILE 136 TO '/tdxdbd1/PROJ4/data/a_txn_ind13.dbf';
SET NEWNAME FOR DATAFILE 137 TO '/tdxdbd1/PROJ4/data/a_txn_ind12.dbf';
SET NEWNAME FOR DATAFILE 138 TO '/tdxdbd1/PROJ4/data/a_txn_ind11.dbf';
SET NEWNAME FOR DATAFILE 139 TO '/tdxdbd1/PROJ4/data/a_txn_ind10.dbf';
SET NEWNAME FOR DATAFILE 140 TO '/tdxdbd1/PROJ4/data/a_txn_ind09.dbf';
....
....
....

SET NEWNAME FOR TEMPFILE '/prddbd/PRD/data/temp01.dbf' TO '/bu/PROJ4/data/temp01.dbf';
SET NEWNAME FOR TEMPFILE '/prddbd/PRD/data/temp02.dbf' TO '/bu/PROJ4/data/temp02.dbf';
SET NEWNAME FOR TEMPFILE '/prddbd/PRD/data/temp03.dbf' TO '/bu/PROJ4/data/temp03.dbf';
DUPLICATE DATABASE TO PROJ4 BACKUP LOCATION '/bu/PRD_BKP'
LOGFILE
  GROUP 1 (
    '/sanddata/PROJ4/data/log1a.dbf',
    '/sanddata/PROJ4/data/log1b.dbf'
  ) SIZE 125M,
  GROUP 2 (
    '/sanddata/PROJ4/data/log2a.dbf',
    '/sanddata/PROJ4/data/log2b.dbf'
  ) SIZE 125M,
  GROUP 3 (
    '/sanddata/PROJ4/data/log3a.dbf',
    '/sanddata/PROJ4/data/log3b.dbf'
  ) SIZE 125M,
  GROUP 4 (
    '/sanddata/PROJ4/data/log4a.dbf',
    '/sanddata/PROJ4/data/log4b.dbf'
  ) SIZE 125M,
  GROUP 5 (
    '/sanddata/PROJ4/data/log5a.dbf',
    '/sanddata/PROJ4/data/log5b.dbf'
  ) SIZE 125M
;
release channel ch1;
release channel ch2;
release channel ch3;
release channel ch4;
release channel ch5;
release channel ch6;
release channel ch7;
}
host "echo  Recovery_endttime";
host "date '+%Y/%m/%d @ %H:%M:%S'";
EOF

Wednesday 8 February 2017

Script to Change FND_USER password with default password after Cloning

** Default Password set to ChangeMe@123

[mxm510@acopprka001 autoclone]$ cat Change_password_DEVE.sh
function Change_fnd_user_password
{
cat /dev/null > password_failure.txt
sqlplus -s apps/appsdeve << EOF
set lines 300 pages 0 feedback off
spool fnd_user.lst
select 'FNDCPASS apps/appsdeve 0 Y system/systemdeve USER "'||USER_NAME||'" ChangeMe@123 || echo "Err while changing password for user - ' || user_name || '" >> password_failure.txt' from fnd_user where user_name not in ('APPSMGR','ASADMIN','INDUSTRY DATA','GUEST','SYSADMIN') and (user_name not like 'ORACLE%') and user_name not like 'APP%';
spool off;
EOF
#sed -e 1,+1d fnd_user.lst > fnd_user_2.lst
sh fnd_user.lst
if [ `wc -l password_failure.txt | awk '{print $1}'` -gt 0 ]
then
echo 'Following errors occured while changing Application User Passwords'
cat password_failure.txt
rm L*.log
else
echo "All the passwords of Application users got changed successfully to 'ChangeMe@123' "
rm L*.log
rm password_failure.txt
fi
}

Change_fnd_user_password

Script to download patch directly to linux server

Below is the generic script to download patch from metalink....

[mxm510@acop1 DBA]$ cat patch_download.sh

clear
export http_proxy='http://172.18.100.15:18717'
export https_proxy='http://172.18.100.15:18717'

for var in "$@" ; do eval "export p_${var}"; done

if [ -z ${p_patch_loc} ]
then
echo -e "Patch Files will be downloaded to ${HOME} ...\n\n"
p_patch_loc=$HOME
fi

if [ -z ${p_patch} ]
then
echo -e "Patches not specified. Please enter list of comma seperated patches ... \n\n"
read -p "Patch List : " p_patch
fi


if [ -z ${p_patch} ]
then
exit
fi



save_wget="--secure-protocol=TLSv1 --save-cookies=$HOME/cookie.txt --keep-session-cookies --no-check-certificate"
load_wget="--secure-protocol=TLSv1 --no-check-certificate --load-cookies=$HOME/cookie.txt"

echo -e "\n\nEnter Patch Type. For E-biz Type => appl , For Database Type => db ... \n\n"
read -p "Patch Type : " patch_type
echo -e "\n\n"

if [ $(echo ${patch_type} | tr '[:lower:]' '[:upper:]') = 'APPL' ]
then
v_r12_b_patch='.*B_R12.*'
fi

patch_url=$HOME/patch_url.lst
patch_url_tmp=$HOME/patch_url_temp.lst

echo -e "Enter Oracle Support Credentials\n\n"
read -p "Enter Oracle Support Userid: " support_user
read -sp "Enter Oracle Support Password: " support_password
echo "user=${support_user}" > $HOME/.wgetrc
echo "password=${support_password}" >> $HOME/.wgetrc
chmod 600 $HOME/.wgetrc

wget ${save_wget} "https://updates.oracle.com/Orion/SimpleSearch/switch_to_saved_searches" -O $HOME/outfile.txt -o $HOME/logfile.txt --no-verbose

wget_result=$?

if [ ${wget_result} -ne 0 ]
then
cat $HOME/logfile.txt
exit
fi

echo -e "\n\nGetting List of Platform and Languages ..."
wget ${load_wget} "https://updates.oracle.com/Orion/SavedSearches/switch_to_simple" -O $HOME/outfile.txt -q

clear

grep -A999 "<select name=plat_lang" $HOME/outfile.txt | grep "^<option" | grep -v "\-\-\-" | awk -F "[\">]" '{print $2" - "$4}'
#grep -A999 "<select name=plat_lang" $HOME/outfile.txt | grep "^<option" | awk -F "[\">]" '{print $2" - "$4}'

echo -e "\n\n"

read -p "Enter Comma seperated list of Platform and Languages: " plat_lang_code

clear

echo "Downloading patches to - ${p_patch_loc} ..."

for patch_number in $(echo $p_patch | sed "s/,/ /g" | xargs -n 1 echo )
do

> $patch_url_tmp

for v_plat_land_code in $(echo $plat_lang_code | sed "s/,/ /g" | xargs -n 1 echo )
do
#echo ${v_plat_land_code}
echo -e "\n\n"
wget ${load_wget}  "https://updates.oracle.com/Orion/SimpleSearch/process_form?search_type=patch&patch_number=${patch_number}&plat_lang=${v_plat_land_code}" -O ${patch_url_tmp} -q
grep "Download/process_form" ${patch_url_tmp} | egrep "${v_r12_b_patch}" | sed 's/ //g' | sed "s/.*href=\"//g" | sed "s/\".*//g" > ${patch_url}
#cat $patch_url
cat ${patch_url} | while read line
do
file_name=`echo ${line} | awk -F= '{print $NF}' | sed "s/[?&]//g"`
#echo ${file_name}
echo "Downloading Patch File - ${file_name} ..."
wget ${load_wget} "${line}" -O "${p_patch_loc}/${file_name}" -q
echo "Checking integrity of Compressed Files - ${file_name} ..."
unzip -qt ${p_patch_loc}/${file_name}
done
done
done

rm ${patch_url}
rm ${patch_url_tmp}
rm $HOME/outfile.txt $HOME/cookie.txt $HOME/logfile.txt
echo -e "\n\n"

echo -e "All Patch Files Downloaded to location - ${p_patch_loc} ...\n\n"
ls -l ${p_patch_loc}
echo -e "\n\n"
> $HOME/.wgetrc

AutoConfig could not successfully execute the following scripts: afdbprf.sh

While doing Oracle application cloning, I got the following error while running autconfig ..... Make sure db listener is up and running while running autoconfig 

Error:

AutoConfig could not successfully execute the following scripts: afdbprf.sh

[AutoConfig Error Report]
The following report lists errors AutoConfig encountered during each
phase of its execution.  Errors are grouped by directory and phase.
The report format is:
      <filename>  <phase>  <return code where appropriate>

  [PROFILE PHASE]
  AutoConfig could not successfully execute the following scripts:
    Directory: /mnt/DEVapps/oracle/trcdevdb/11.2.0/dbhome_1/appsutil/install/TRCDEV_gddevdb1
      afdbprf.sh              INSTE8_PRF       

In log file I see this error:-
Enter value for 1: Enter value for 2: Enter value for 3: ERROR:
ORA-12541: TNS:no listener

But listener is up and running,

gddevdb1.tireco.com:/mnt/DEVapps/oracle/trcdevdb/11.2.0/dbhome_1/appsutil/scripts/TRCDEV_gddevdb1>ps -ef | grep tns
root        21     2  0 Aug12 ?        00:00:00 [netns]
oraDEV    4098     1  0 20:15 ?        00:00:00 /mnt/DEVapps/oracle/trcdevdb/11.2.0/dbhome_1/bin/tnslsnr TRCDEV -inherit


Work Around / Fix -

When I did nslookup gddevdb1(hostname)  and it returned a different ip address then what was defined in /etc/hosts file ... which was causing it to fail to connect to listener


After running autoconfig again, it completed successfully.

Updating rdbms version in Context file to db112
Updating rdbms type in Context file to 64 bits
Configuring templates from ORACLE_HOME ...
vi /mnt/DEVapps/oracle/trcdevdb/11.2.0/dbhome_1/appsutil/log/TRCDEV_gddevdb1/08222201/adconfig.log

AutoConfig completed successfully.

EBS APPS user locked

Error:

ORA-28000: the account is locked --adcfgclone.pl appsTier  else some other cases
++++++++++++++++++++++++++++++++++

Solution:

Check the APPSUSR account status.
Login as SYSDBA
SQL> conn /as sysdba
Check the APPSUSR account status
SQL> alter profile AD_PATCH_MONITOR_PROFILE limit failed_login_attempts unlimited;
SQL >alter profile default limit failed_login_attempts 3 password_lock_time 1/1440; -->Limited
SQL> alter profile default limit failed_login_attempts unlimited password_lock_time 1/1440; --> unLimited

SQL> alter user apps account unlock;

Thursday 2 February 2017

Rman restore script to split with different mount points



To Generate rman scripts Manually and to split with different mount points 

select 'SET NEWNAME FOR DATAFILE '||FILE#|| ' TO '''||NAME|| ''';' from v$datafile  where FILE#  not in (select FILE# from v$datafile where bytes/1024/1024/1024 > 10) order by FILE#;

select 'SET NEWNAME FOR DATAFILE '||FILE#|| ' TO '''||NAME|| ''';' from v$datafile  where FILE#  in (select FILE# from v$datafile where bytes/1024/1024/1024 > 10) order by FILE#;


SQL> select sum(bytes)/1024/1024/1024  from v$datafile  where FILE#  in (select FILE# from v$datafile where bytes/1024/1024/1024 > 10) order by FILE#;

SUM(BYTES)/1024/1024/1024
-------------------------
                218.71875

SQL> select sum(bytes)/1024/1024/1024  from v$datafile  where FILE#  not in (select FILE# from v$datafile where bytes/1024/1024/1024 > 10) order by FILE#;

SUM(BYTES)/1024/1024/1024
-------------------------
               1015.71863


run
{
allocate channel c1 device type disk;
allocate channel c2 device type disk;
allocate channel c3 device type disk;
allocate channel c4 device type disk;
allocate channel c5 device type disk;
allocate channel c6 device type disk;
allocate channel c7 device type disk;
allocate channel c8 device type disk;
SET NEWNAME FOR DATAFILE 1 TO '/tdxdbd2/SOLTESTDB/data/system01.dbf';
SET NEWNAME FOR DATAFILE 2 TO '/tdxdbd2/SOLTESTDB/data/system02.dbf';
SET NEWNAME FOR DATAFILE 3 TO '/tdxdbd2/SOLTESTDB/data/system03.dbf';
SET NEWNAME FOR DATAFILE 4 TO '/tdxdbd2/SOLTESTDB/data/system04.dbf';
SET NEWNAME FOR DATAFILE 5 TO '/tdxdbd2/SOLTESTDB/data/system05.dbf';
SET NEWNAME FOR DATAFILE 6 TO '/tdxdbd2/SOLTESTDB/data/system06.dbf';
SET NEWNAME FOR DATAFILE 7 TO '/tdxdbd2/SOLTESTDB/data/system07.dbf';
SET NEWNAME FOR DATAFILE 8 TO '/tdxdbd2/SOLTESTDB/data/system08.dbf';
SET NEWNAME FOR DATAFILE 9 TO '/tdxdbd2/SOLTESTDB/data/system09.dbf';
SET NEWNAME FOR DATAFILE 10 TO '/tdxdbd2/SOLTESTDB/data/system10.dbf';
SET NEWNAME FOR DATAFILE 11 TO '/tdxdbd2/SOLTESTDB/data/system11.dbf';
SET NEWNAME FOR DATAFILE 12 TO '/tdxdbd2/SOLTESTDB/data/sysaux_01.dbf';
……
....
....
SET NEWNAME FOR DATAFILE 18 TO '/tdxdbd3/SOLTESTDB/data/undo05.dbf';
SET NEWNAME FOR DATAFILE 107 TO '/tdxdbd3/SOLTESTDB/data/a_txn_data20.dbf';
SET NEWNAME FOR DATAFILE 129 TO '/tdxdbd3/SOLTESTDB/data/a_txn_ind21.dbf';
SET NEWNAME FOR DATAFILE 142 TO '/tdxdbd3/SOLTESTDB/data/a_txn_ind07.dbf';
SET NEWNAME FOR DATAFILE 146 TO '/tdxdbd3/SOLTESTDB/data/a_txn_ind02.dbf';
SET NEWNAME FOR DATAFILE 200 TO '/tdxdbd3/SOLTESTDB/data/a_txn_data40.dbf';
SET NEWNAME FOR DATAFILE 201 TO '/tdxdbd3/SOLTESTDB/data/a_txn_data41.dbf';
SET NEWNAME FOR DATAFILE 202 TO '/tdxdbd3/SOLTESTDB/data/a_txn_ind24.dbf';
SET NEWNAME FOR DATAFILE 208 TO '/tdxdbd3/SOLTESTDB/data/a_txn_ind25.dbf';
SET NEWNAME FOR DATAFILE 209 TO '/tdxdbd3/SOLTESTDB/data/a_txn_ind26.dbf';
SET NEWNAME FOR DATAFILE 217 TO '/tdxdbd3/SOLTESTDB/data/a_txn_data42.dbf';
SET NEWNAME FOR DATAFILE 219 TO '/tdxdbd3/SOLTESTDB/data/a_txn_ind27.dbf';
SET NEWNAME FOR DATAFILE 220 TO '/tdxdbd3/SOLTESTDB/data/a_txn_data43.dbf';
SET NEWNAME FOR DATAFILE 221 TO '/tdxdbd3/SOLTESTDB/data/a_media39.dbf';
restore database;
switch datafile all;
recover database;
}


Wednesday 1 February 2017

adstrtal.sh: Database connection could not be established. Either the database is down or the APPS credentials supplied are wrong.


Database connection could not be established. Either the database is down or the APPS credentials supplied are wrong.

 

Error:

 

[ebsptr1app@ogslab2 scripts]$ ./adstrtal.sh apps/apps
You are running adstrtal.sh version 120.24.12020000.6
Enter the WebLogic Server password:
adstrtal.sh: Database connection could not be established. Either the database is down or the APPS credentials supplied are wrong.
USAGE:  adstrtal.sh <appsusername/appspassword> [-nothreading]
       adstrtal.sh <applications_username/applications_password> -secureapps
       adstrtal.sh -nodbchk
adstrtal.sh: exiting with status 1

 

Cause:

 

Issue caused due to root mount point full

 

Solution:

 

Check root mount it might be full clear the stuffs inside root mount point

ORA-01031: insufficient privileges while doing sqlplus / as sysdba


I copied one oracle home to some other server/mount and did the clone of binaries. After completion when I was trying to log in to SQL as sysdba to create database here.
There I found following message.

Error

$sqlplus '/ as sysdba'

SQL*Plus: Release 11.2.0.3.0 Production on Fri Feb 7 05:12:22 2014


Copyright (c) 1982, 2011, Oracle.  All rights reserved.


ERROR:

ORA-01031: insufficient privileges

Enter user-name:


Looking like some permission issue. Checked the user and OS permission of files, which were looking OK.
SQLNET.ORA too looked ok, then found following.

Reason

Running clone on binaries has overwritten $ORACLE_HOME/rdbms/lib/config.c, and it was missing group values.

#define SS_DBA_GRP ""
#define SS_OPER_GRP ""

Solution
Changed it to

#define SS_DBA_GRP "oinstall"
#define SS_OPER_GRP "oinstall"


Then run $ORACLE_HOME/bin/relink.
On completion, 
$sqlplus '/ as sysdba'

SQL*Plus: Release 11.2.0.3.0 Production on Fri Feb 7 07:02:55 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to an idle instance.

SQL>