Thursday, 10 May 2012

single to single node cloning

Single Node to Single Node Cloning (Online)


Single Node to Single Node Cloning (Online)


Source = node 8
target = node 10


Note:
DB should be in archive log mode


1:

$ cd $ORACLE_HOME/dbs


dbs]$ vi initPROD



dbs]$ vi initPROD.ora

/ archive

log_archive_start=true

:wq



dbs]$ !sq



SQL> startup mount


SQL> alter database archivelog;



SQL> alter database open;



SQL> archive log list



step #2:


Run adpreclone.pl on source



PROD_node33]$ cd /u01/proddb/9.2.0/appsutil/scripts/PROD_node33


PROD_node33]$ perl adpreclone.pl dbTier




apps Tier:


$ cd $COMMON_TOP/admin/scripts/PROD_node33


PROD_node33]$ perl adpreclone.pl appsTier




Step 3:


copy the source node files & dir's to target node




dbTier:



=> db should be in backup mode.



SQL> select * from v$backup;


SQL> alter database begin backup;   // from 10g


In 9i


SQL> alter tablespace tablespacename begin backup;



SQL> alter tablespace tablespacename end backup;





Note:
As we have more no. of tablespaces, we have to take backup of each tablespace, so we use dynamic SQL.



SQL> spool endbkp.sql



SQL> select 'alter tablespace'||' '||tablespace_name||'begin backup;' from dba_tablespaces;


SQL> spool off


SQL> @endbkp.sql



SQL> exit



$ scp -r prod* 192.168.1.10:/u01


apps Tier:


$ scp -r prod* 192.168.1.10:/u02



Take the backup of control file


SQL> alter database backup controlfile to trace;


SQL> exit



$ cd $ORACLE_HOME/admin/PROD_node8/udump


udump]$ mv prod_ora20579.trc ctrl.sql



Copy this file to target


udump]$ scp ctrl.sql 192.168.1.10:/u01

password : oracle



udump]$ !sq


SQL> alter system switch logfile;



Copy the archives to destination


udump]$ cd $ORACLE_HOME/dbs


dbs]$ scp -r arch* 192.168.1.10:/u01/proddb/9.2.0/dbs


password : oracle




Step 4:


Configuration (Target Node)


dbTier:

$ cd proddb/9.2.0/appsutil/clone/bin/



bin]$ perl adcfgclone.pl dbTechStack



=> It generates .xml file using template file.
It generates .env file.
It configures the tech_stack & Starts the listener.





password: apps



Do you want to use a virtual hostname for the target node : n


RAC : n


Target system db name :


--- same steps & questions as offline cloning ---


Step 5:


$ cd proddb/9.2.0/



9.2.0]$ . PROD_node10.env


9.2.0]$ cd




$ vi ctrl.sql


Line # 1

create controlfile set database "prod"



$ !sq



SQL> startup nomount


SQL> exit


$ cd proddata/


proddata]$ rm -rvf ctrl10*


proddata]$ !sq


SQL> @ctrl.sql


SQL> @/u01/ctrl.sql




Recover the database:



SQL> recover database using backup controlfile until cancel;


SQL> alter database open resetlogs;




Step 6:

Add temp file to temporary tablespace



SQL> alter tablespace TEMP add tempfile '/u01/proddata/temp02.dbf' size 250m;



SQL> exit



Configure the db



Step 7:


proddata]$ cd /u01/proddb/9.2.0/appsutil/clone/bin


bin]$ perl adcfgclone.pl dbconfig /u01/proddb/9.2.0/appsutil/PROD_node10.xml


APPS password : apps




Step 8:


bin]$ cd



$ vi .bash_profile


. /u01/proddb/9.2.0/PROD_node10.env

$ . .bash_profile





Step 9:


apps Tier:

$ cd prodcomn/clone/bin



bin]$ perl adcfgclone.pl appsTier

APPS password : APPS





Note:

Complete port pool information available at


/u02/prodappl/admin/out/PROD_node10/portpool.lst


Step 10:


$ vi .bash_profile


. /u02/prodappl/APPSPROD_node10.env


$ . .bash_profile

Oracle apply optach example

OPatch is an Oracle utility that assists you to apply interim patches to Oracle’s rdbms software. You can find opatch utility in $ORACLE_HOME/Opatch directory. For example, let’s apply patch number 8943287  to our 10.2.0.5 database.
Applying Patch:
1- Backup Oracle Home directory.
$ tar -cf ora10g.tar ora10g
2- Download patch file p8943287_10205_Linux-x86-64.zip via metalink. And copy it to database server.
3- Unzip the patch file.
$ unzip p8943287_10205_Linux-x86-64.zip
4- Apply patch with opatch utility.
$ cd 8943287
$ ORACLE_HOME/OPatch/opatch apply
To see list of applied patches :
$ORACLE_HOME/OPatch/opatch lsinventory
For example:
$ORACLE_HOME/OPatch/opatch lsinventory
Invoking OPatch 10.2.0.4.9
Oracle Interim Patch Installer version 10.2.0.4.9
Copyright (c) 2009, Oracle Corporation. All rights reserved.
Oracle Home : /oracle/ora10g
Central Inventory : /oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.4.9
OUI version : 10.2.0.5.0
OUI location : /oracle/ora10g/oui
Log file location : /oracle/ora10g/cfgtoollogs/opatch/opatch2011-10-28_12-14-12PM.log
Patch history file: /oracle/ora10g/cfgtoollogs/opatch/opatch_history.txt
Lsinventory Output file location : /oracle/ora10g/cfgtoollogs/opatch/lsinv/lsinventory2011-10-28_12-14-12PM.txt
——————————————————————————–
Installed Top-level Products (3):
Oracle Database 10g 10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3 10.2.0.4.0
Oracle Database 10g Release 2 Patch Set 4 10.2.0.5.0
There are 3 products installed in this Oracle Home.
Interim patches (2) :
Patch 8943287 : applied on Fri Oct 21 20:39:46 EEST 2011
Unique Patch ID: 12722995
Created on 23 Aug 2010, 11:45:16 hrs PST8PDT
Bugs fixed:
8943287
——————————————————————————–
Rollback applied patch:
Sometimes a patch is applied to the system may need to take back because of its effect. In this case, rollback is performed as follows.
$ORACLE_HOME/OPatch/opatch rollback -id 8943287

Tuesday, 1 May 2012

How to check if a certain Patch was applied to Oracle Applications instance using 'adpatch'?

There are few methods to check this.

Method 1

Check Patches applied in Oracle Applications Manager (OAM).

a) Connect to OAM:

http://hostname.domain:PORT/servlets/weboam/oam/oamLogin

Go to Site Map-->Maintenance-->Applied Patches

Enter Patch ID and press 'Go'

See if Patch was returned.

Method 2


Use 'adphrept' utility
Patch History report usage:

adphrept query_depth \
bug_number or ALL \
bug_product or ALL \
end_date_from (mm/dd/rr or ALL) \
end_date_to (mm/dd/rr or ALL) \
patchname/ALL \
patchtype/ALL \
level/ALL \
language/ALL \
appltop/ALL \
limit to forms server? (Y/N) \
limit to web server? (Y/N) \
limit to node server? (Y/N) \
limit to admin server? (Y/N) \
only patches that change DB? (Y/N)

Specify 1 or 2 or 3 for query_depth

1-> Details of patches only
2-> Details of patches and their Bug Fixes only
3-> Details of patches their Bug Fixes and Bug Actions

Example: To get the complete patch details for patches applied in Dec 2000:

On UNIX:

$ cd $AD_TOP/patch/115/sql
$ sqlplus /
SQL> @adphrept.sql 3 ALL ALL 12/01/00 12/31/00 ALL ALL ALL ALL ALL N N N N N
Method 3
Use the following sql.
set serveroutput on
DECLARE
TYPE p_patch_array_type is varray(10) of varchar2(10);
--
p_patchlist p_patch_array_type;
p_appltop_name varchar2(50);
p_patch_status varchar2(15);
p_appl_top_id number;
--
CURSOR alist IS
select appl_top_id, name
from ad_appl_tops;
--
procedure println(msg in varchar2)
is
begin
dbms_output.put_line(msg);
end;
--
BEGIN
open alist;
--
p_patchlist:= p_patch_array_type('','');
--
LOOP
FETCH alist INTO p_appl_top_id,p_appltop_name;
EXIT WHEN alist%NOTFOUND;
--
IF p_appltop_name NOT IN ('GLOBAL','*PRESEEDED*')
THEN
println(p_appltop_name || ':');
for i in 1..p_patchlist.count
loop
p_patch_status := ad_patch.is_patch_applied('11i',p_appl_top_id,
p_patchlist(i));
println('..Patch ' || p_patchlist(i) || ' was ' || p_patch_status);
end loop;
END if;
println('.');
END LOOP;
--
close alist;
END;
/

Note: Please enter Patch number in place of and , e.g '3240000'
Example Output
when p_patchlist:= p_patch_array_type('3240000','3460000','4204335','4125550','3942483','4733943'):
..Patch 3240000 was NOT_APPLIED
..Patch 3460000 was EXPLICIT
..Patch 4204335 was NOT_APPLIED
..Patch 4125550 was EXPLICIT
..Patch 3942483 was EXPLICIT
..Patch 4733943 was EXPLICIT
.
dcollierpc8:
..Patch 3240000 was NOT_APPLIED
..Patch 3460000 was EXPLICIT
..Patch 4204335 was NOT_APPLIED
..Patch 4125550 was EXPLICIT
..Patch 3942483 was NOT_APPLIED
..Patch 4733943 was NOT_APPLIED
Method 4

You might also use the following query, however the most reliable methods are the described above.
SQL> SELECT DISTINCT RPAD(a.bug_number,
11)|| RPAD(e.patch_name,
11)|| RPAD(TRUNC(c.end_date),
12)|| RPAD(b.applied_flag, 4) BUG_APPLIED
FROM
ad_bugs a,
ad_patch_run_bugs b,
ad_patch_runs c,
ad_patch_drivers d ,
ad_applied_patches e
WHERE
a.bug_id = b.bug_id AND
b.patch_run_id = c.patch_run_id AND
c.patch_driver_id = d.patch_driver_id AND
d.applied_patch_id = e.applied_patch_id AND
a.bug_number in ('','');
ORDER BY 1 DESC;

Note: Please enter Patch number in place of and , e.g '3453499'

Wednesday, 18 April 2012

Oracle EBS: Repairing the "XXX is not a valid responsibility for the current user" error in Oracle

Content-type: text/html; charset=WINDOWS-1256 Location: /oracle.apps.fnd.sso.AppsLogin?errText=Please%20contact%20the%20Web%20Master%20or% 01403%3A%

After applying HRMS family pack K (11i.HR_PF.K and 11i.HR_PF.K.DELTA.5) HRMS functional consultant updated that he is not able to access Approvals Management Responsibility. There are certain changes with this family pack. To overcome this issue please follow below steps as described.

Error message while accessing responsibility:

Content-type: text/html; charset=WINDOWS-1256 Location: http://orasolerp.orasol.com:8011/oa_servlets/oracle.apps.fnd.sso.AppsLogin?requestUrl=APPSHOMEPAGE&cancelUrl=http%3A%2F%2Forasolerp.orasol.com%3A8011%2Foa_servlets%2Foracle.apps.fnd.sso.AppsLogin&errText=Please%20contact%20the%20Web%20Master%20or%20System%20Administrator.%20ORA-01403%3A%20no%20data%20found%0AORA-06512%3A%20at%20%22APPS.AME_UI%22%2C%20line%20496%0AORA-06512%3A%20at%20%22APPS.AME_RULES_UI%22%2C%20line%206055%0AORA-01403%3A%20no%20data%20found%0A

1) AME responsibility cannot be accessed.


Problem:
This issue is described in Metalink Note 336901.1 Ext/Pub Oracle Approvals Management
Implementation Guide (Minipack B)
The note also explains that the issue is caused by a setup similar to what you have.
Chapter 2 Implementing Oracle Approvals Management , section : AME Roles and Responsibilities

Action Plan:

From the Note:
This section gives a step-by-step illustration of adding the two AME responsibilities to the user.
1. Login as SYSADMIN user.
2. Create a New user account and give an appropriate effective date. Do NOT add any responsibility.
3. Save the record.
4. Switch the responsibility to User Management and Navigate to the Users function.
5. Query for the newly created user.
6. Click on the update action from the result table.
7. In the Update User page, click on the Assign Roles button
8. In the search window, query for Approval%
9. Following five roles will be displayed.
10. Select all five roles.
11. After selecting the Roles, provide the Justification for the role and the effective date.
12. After completing the action, you can query back the same user and can verify the list of roles
being attached to the user.
13. Now switch the responsibility to Functional Administrator.
14. Click on create grants under the grants sub-tab.
15. Enter a Grant Name and provide an effective date.
16. Navigate to the Security Context region and select the Grantee Type as `Specific User¿
17. In the Grantee field select the newly created User
18. In the Data Security region select `AME Transaction Types¿ as the Object
19. Clicking Next will take you to the `Select Object Data Context¿ page.
20. You have a default value of `All Rows¿ in the Data Context Type, leave it as it is, and
navigate further.
21. In the `Define Object Parameter
and Select Set¿ page, enter `AME Calling Applications¿
as the value in the Set field.
22. Clicking Next will take you to the Review page.
23. Verify the information and submit the transaction.
24. Now switch the responsibility to System Administrator and navigate to System Profiles.
25. Query for the profile AME:Installed at the required level and set the value to Yes.
26. Save the data.
27. Now you can login as the newly created user.
28. You should be able to see the following responsibilities:
a. Approvals Management Administrator
b. Approvals Management Business Analyst


Solution:

First Run report "Approvals management post upgrade process". This report exists in HR user group. Run this report from SYSADMIN responsibility, as this report doesn't belongs to SYSADMIN group hence we need to attach this report to Sysadmin request group.

- Attach report to sysadmin responsibility
- Run with specified paramaters



- Create AME User



- Switch to user management responsibility





- Search for created user



- click update action on resulted value



- click on assign roles





- search for term Approval



- select for term Approval and select all roles



- Specify effective date and write justification for users



- search again for AME user you can roles attached to it



- Now switch the responsibility to Functional Administrator







- click on create grants tab





- In Security Context Select specific user from drop down list and add grantee name as AME and in Data Security context – select AME transaction Type




- selection screens





- Click next on object Data context page:
- Keep default value as “All Rows”



- Select AME calling application in "Set"







- click Next will take you to review page




- click finish



- Now navigate to System administrator responsibility and and set profile AME:Installed Value to Yes at Application level for Application "Approvals Management"






- Now login to AME user, it will list two responsibilities.

Wednesday, 11 April 2012

Oracle Export hangs with: "exporting cluster definitions"

1. Stop the database and the listener.

2. Set LD_LIBRARY_PATH so the first directory referenced is $ORACLE_HOME/lib
Example (replace $ORACLE_HOME with the full path of the Oracle home directory):

csh:

> setenv LD_LIBRARY_PATH=$ORACLE_HOME/lib
> setenv LIBPATH=$ORACLE_HOME/lib

ksh:

> export LD_LIBRARY_PATH=$ORACLE_HOME/lib
> export LIBPATH=$ORACLE_HOME/lib

For Oracle9i and higher on AIX: set environment variable LIBPATH and afterwards, run /usr/sbin/slibclean as root

For Oracle9i and higher on HP-UX, Linux, Solaris, and Tru64: set environment variable LD_LIBRARY_PATH

3. Re-start the database and the listener.

4. Re-run the export.

Tuesday, 10 April 2012

How Do I Find the Version Of HRMS in oracle APPS


How Do I Find the Version Of Human Resources (HR) On My System? [ID 269286.1]

  Modified 06-JAN-2012     Type HOWTO     Status ARCHIVED  

In this Document
  Goal
  Solution
  References





Applies to:

Oracle Human Resources - Version: 11.5.5 to 11.5.10.2
Information in this document applies to any platform.

Goal

How do I determine the patch level of HRMS application code on our system?

Solution

1. You can run one of the general HRMS diagnostic scripts such as:
Note:462555.1 "Collecting Data Using The SSHR11i.sql Script as Requested by Support"
Note:211747.1 "HRMS11i.sql"
Note:208964.1 "PAY11i.sql"

2. Or you can run the following script from the SQL prompt:

SELECT substr(fpi.application_id,1,6) APP_ID
,substr(fat.application_name,1,40) APPLICATION
,substr(l.meaning,1,9) STATUS
,substr(decode(fpi.patch_level,null,'11i.'||
fa.application_short_name||'.?',fpi.patch_level),1,12) PATCH
FROM fnd_product_installations fpi
,fnd_application_tl fat
,fnd_application fa
,fnd_lookups l
WHERE (fpi.application_id between 800 and 850
OR fpi.application_id in (178,275,712,777))
AND fpi.application_id = fat.application_id
AND fpi.application_id = fa.application_id
and l.lookup_type = 'FND_PRODUCT_STATUS'
and l.lookup_code = fpi.status
ORDER BY fat.application_id;

3. Either of these methods requires and 11.5 instance and that AD MiniPack "G" (2344175) or greater has been applied.

Sunday, 8 April 2012

How to compile Oracle Apps Forms 11i/R12

How to compile Oracle Apps 11i Forms

============================

Check whether the forms that you want to generate are not in use at the time you are generating them.

 If they are in use when you generate the fmx files, the forms client session terminates.

1) Login to the Forms server node as applmgr and run .env file to set the applications environment.

2) Change directory to $AU_TOP/forms/US.

3) Use the “f60gen” command to generate the fmx files for the fmb files.

4) Issue the following command

$ f60gen module=.fmb userid=apps/ output_file=/forms/US/.fmx

How to compile Oracle Apps R12 Forms

=============================

1) Log into the forms tier.

2) Set the applications environment

3) Ensure that the $FORMS_PATH includes $AU_TOP/resource and $AU_TOP/resource/stub, for example

echo $FORMS_PATH

/u01/oracle/DEV/apps/apps_st/appl/au/12.0.0/resource:

/u01/oracle/DEV/apps/apps_st/appl/au/12.0.0/resource/stub

4) Compile the form

a)- If you are using forms customizations (CUily: verdana,geneva;">1) Log into the forms tier.

2) Set the applications environment

3) Ensure that the $FORMS_PATH includes $AU_TOP/resource and $AU_TOP/resource/stub, for example

echo $FORMS_PATH

/u01/oracle/DEV/apps/apps_st/appl/au/12.0.0/resource:

/u01/oracle/DEV/apps/apps_st/appl/au/12.0.0/resource/stub

4) Compile the form

a)- If you are using forms customizations (CUSTOM.pll) then run the command below to compile the form.

frmcmp_batch.sh module= userid=APPS/APPS output_file=

module_type=form compile_all=special

For eg:-

frmcmp_batch.sh module=/u01/oracle/TEST/apps/apps_st/appl/au/12.0.0/forms/US/

XXX.fmb userid=APPS/APPS output_file=/u01/oracle/TEST/apps/apps_st/appl/inv/

12.0.0/forms/US/XXX.fmx module_type=form compile_all=special

b) If you are NOT using forms customizations, then run the command below to compile the form.

frmcmp_batch.sh module= userid=APPS/APPS output_file=

module_type=form

For example..

frmcmp_batch.sh module=/u01/oracle/TEST/apps/apps_st/appl/au/12.0.0/forms/US/

XXX.fmb userid=APPS/APPS  output_file=/u01/oracle/TEST/apps/apps_st/appl/inv/

12.0.0/forms/US/XXX.fmx module_type=form

Number of Visitors