Thursday, 23 May 2013

Switchover from primary to standby

1. Check switchover status before switching database.

SQL>select switchover_status from v$database;
You must see “TO_STANDBY” as result.
Otherwise
2. SQL>alter system switch logfile;

3. Switch primary database to standby database.
SQL>alter database commit to switchover to physical standby with session shutdown;
 SQL>shutdown immediate;
 SQL>startup nomount;
 
4.SQL>alter database mount standby database;
 
Defer for archive log apply. Because I didn’t set my standby database as primary yet.
 
5. SQL>alter system set log_archive_dest_state_2=defer;
 
 
Switch standby database to primary. Check switchover status before switching database

Thursday, 2 May 2013

Upgrade of Oracle Applications Version R12.1.1 to R12.1.3 on AIX

Upgrade of Oracle Applications Version R12.1.1 to R12.1.3 on AIX

Required patches:
p9239089_R12.AD.B_R12_LINUX.zip
p10349415_R12.AD.B_R12_GENERIC.zip (Optional) (leave it)
·                    p9239090_R12_AIX64-5L_1of6.zip
·                    p9239090_R12_AIX64-5L_2of6.zip
·                    p9239090_R12_AIX64-5L_3of6.zip
·                    p9239090_R12_AIX64-5L_4of6.zip
·                    p9239090_R12_AIX64-5L_5of6.zip
·                    p9239090_R12_AIX64-5L_6of6.zip
p9239095_R12_GENERIC.zip

p9822544_R12.MSC.B_R12_GENERIC.zip (Optional) (leave it)
Post update patches are:
p9966055_R12.FND.B_R12_GENERIC.zip
p9817770_R12.ATG_PF.B_R12_AIX64-5L.zip
The following information will provide up gradation process for Ooracle Applications R12.1.1 to R12.1.3.

Step1: Run adadmin and put Maintenance Mode
Step2: Apply Prerequisite R12.AD.B.DELTA.3 Patch 9239089
Do the following Tasks before going to apply the Patch R12.AD.B.DELTA.3 Patch 9239089
Run the adgrants.sql script as a user that can connect as SYSDBA to grant privileges to selected SYS objects and create PL/SQL profiler objects.
Usage:
1.Create $ORACLE_HOME/appsutil/admin on the database server.
2. Copy adgrants.sql (UNIX) from this patch directory to $ORACLE_HOME/appsutil/admin.Or, copy adgrants_nt.sql (Windows) from this patch directory to %ORACLE_HOME%\appsutil\admin.

3. Set the environment to point to ORACLE_HOME on the database server.

4. Use SQL*Plus to run the script:
UNIX:
$ sqlplus /nolog
SQL> @$ORACLE_HOME/appsutil/admin/adgrants.sql <APPS schema name>
Step3: Apply R12.AD.B_R12_GENERIC.zip Patch 10349415(leave it)

Step4: Apply Oracle E-Business Suite Release 12.1.3 Patch 9239090

Step5:. Apply Oracle E-Business Suite Online Help for 12.1.3 Release Update Pack patch 9239095 (leave it)

Step6:.Apply Patch 9822544 for Advanced Supply Chain Planning. (Optional).This patch fixes the issue of collecting resource requirements of OPM batches WIP warehouse does not belong to resource warehouse. (Leave it)

Step7: Apply post Update Patches:
Apply mandatory Patch 9817770 (9817770:R12.ATG_PF.B [POST-R12.ATG_PF.B.DELTA.3 CONSOLIDATEDPATCH].)
–Apply mandatory Patch 9966055 (9966055:R12.FND.B [TRANSLATED VERSION OF FNDSCSGN NOT LAUNCHED].)

Notice
After you have upgraded to Oracle E-Business Suite Release 12.1.3, perform the following post-update steps to update all database tier nodes with the code level, provided by Oracle E-Business Suite Release 12.1.3
Step8: Run Application and Database Environment files.
@Application Tier:
·        Run AutoConfig on the APPL_TOP.
·        Run the admkappsutil.pl utility to create the file appsutil.zip in the <INST_TOP>/admin/out directory.


Perl <AD_TOP>/bin/admkappsutil.pl

If scripts directory is not exist in oracle_home/appsutil

Perl adbldxml.pl template=/d01/oracle/GREENTC/db/tech_st/11.1.0/appsutil/template/adxdbctx.tmp out=/d01/oracle/GREENTC/db/tech_st/11.1.0/appsutil/greentc_sfxd5.xml

adconfig.sh contextfile=/d01/oracle/GREENTC/db/tech_st/11.1.0/appsutil/greentc_sfxd5.xml appspass=greenapps

@Database Tier:
Copy or FTP the appsutil.zip file to the <RDBMS ORACLE_HOME>. Uncompress appsutil.zip under the <RDBMS ORACLE_HOME>.
·        cd <ORACLE_HOME>
·        unzip -o appsutil.zip
·        Run AutoConfig on the <RDBMS ORACLE_HOME>.
Step9:. Run adpreclone.pl on the database tier and the application tier
·        perl adpreclone.pl dbTier
·        perl adpreclone.pl appsTier
Step10: Disable Maintenance Mode using adadmin and check the version using following sql statement.
SQL> select release_name from fnd_product_groups;
RELEASE_NAME
--------------------------------------------------
12.1.3

After up gradation of R12.1.1 and open the form then below error is occurs--


APP-FND-01926:THE CUSTOM event WHEN-RESPONSIBILITY-CHANGED raised unhandled exception ORA-200000 ORA-01722 INVALID NUMBER

The above Error solve by following query
There is no need to run this query where multi org are setup, then direct run the 2nd query.

Query 1

declare
var boolean;
begin
var :=  fnd_profile.SAVE('ORG_ID','102','SITE',NULL,NULL,NULL);
--from dual;
--return var;
end;
if the error is not solve then apply following query
Query 2
declare
var boolean;
begin
var :=  fnd_profile.SAVE('FND_MO_INIT_CI_DEBUG','N','SITE',NULL,NULL,NULL);
--from dual;
--return var;
end;

or
DECLARE
stat boolean;
BEGIN
dbms_output.disable;
dbms_output.enable(100000);
stat := FND_PROFILE.SAVE('FND_MO_INIT_CI_DEBUG',' ','SITE');
IF stat THEN
dbms_output.put_line( 'Stat = TRUE - profile updated' );
ELSE
dbms_output.put_line( 'Stat = FALSE - profile NOT updated' );
END IF;
end;