Tuesday, 22 January 2013

How To Calculate The Intransit Inventory Value Under Average Costing Method In OPM

Select * from gmf_xla_extract_lines where header_id in (Select header_id from gmf_xla_extract_headers where Transaction_date >'31-Mar-11' and Transaction_date<'01-May-11')
and Journal_line_type ='ITR'
Change the date range accordingly.

Monday, 21 January 2013

Supplier wise 5 Buckets Aging Query In AP

select yy.VENDOR_NAME,yy.LESS30,yy.GREATER30,yy.GREATER60,yy.GREATER90,yy.GREATER120,
(select count(1)
from ap_invoices_all aia
where aia.CANCELLED_DATE is null
and aia.VENDOR_ID=yy.vendor_id
and trunc(aia.INVOICE_DATE) between :p_from_date and  :p_to_date
and aia.AMOUNT_PAID <> aia.INVOICE_AMOUNT ) OUT_STND_BILL,
(select sum(nvl(apd.PREPAY_AMOUNT_REMAINING,0))
from ap_invoices_all aib,ap_invoice_distributions_all apd
where aib.CANCELLED_DATE is null
and aib.VENDOR_ID=yy.vendor_id
and aib.INVOICE_ID=apd.INVOICE_ID
and apd.REVERSAL_FLAG='N'
and trunc(aib.INVOICE_DATE) between :p_from_date and  :p_to_date
and aib.INVOICE_TYPE_LOOKUP_CODE='PREPAYMENT'
) ON_AC_AMOUNT
from
(select
xx.VENDOR_NAME,xx.VENDOR_ID,sum(nvl(xx.less_30,0)) LESS30,sum(nvl(xx.greater_30,0)) GREATER30,sum(nvl(xx.greater_60,0)) GREATER60,
sum(nvl(xx.greater_90,0)) GREATER90,sum(nvl(xx.greater_120,0)) GREATER120
from
(select c.VENDOR_NAME,c.VENDOR_ID,
(case when((sysdate) - trunc(a.DUE_DATE) <= 30) then nvl(a.AMOUNT_REMAINING,0)
else 0 end ) less_30,
(case when((sysdate) - trunc(a.DUE_DATE) between 31 and 60) then nvl(a.AMOUNT_REMAINING,0)
else 0 end ) greater_30,
(case when((sysdate) - trunc(a.DUE_DATE) between 61 and 90) then nvl(a.AMOUNT_REMAINING,0)
else 0 end ) greater_60,
(case when((sysdate) - trunc(a.DUE_DATE) between 91 and 120) then nvl(a.AMOUNT_REMAINING,0)
else 0 end ) greater_90,
(case when((sysdate) - trunc(a.DUE_DATE) > 120) then nvl(a.AMOUNT_REMAINING,0)
else 0 end ) greater_120
from ap_payment_schedules_all a,
ap_invoices_all b,
po_vendors c
where a.INVOICE_ID=b.INVOICE_ID
and b.VENDOR_ID=c.VENDOR_ID
and trunc(b.INVOICE_DATE) between :p_from_date and :p_to_date
and b.CANCELLED_DATE is null
order by c.VENDOR_NAME ) xx
group by xx.VENDOR_NAME,xx.VENDOR_ID) yy
order by yy.vendor_name ;

Friday, 18 January 2013

While Performing Receipt Traveller Concurrent program Error :- at the time of Receipt

While Performing Receipt Traveller Concurrent program Error:-
 "REP-0069: Internal error
REP-57054: In-process job terminated:Terminated with error:
REP-300: missing expression

Solution: If India Localization is used then it is mandatory set the profile option INV: Dynamic Precision Option for Quantity on Reports to provide any value from LOV at site level.

Wednesday, 9 January 2013

Auto Scheduling and Reservation without ATP in R12



Scheduling: Scheduling is an action performed on an order line or a group of lines. The action performs the following:
  • Determines the source (warehouse) for the order line. If the warehouse is entered on the line, either manually or using defaulting rules, the scheduling action uses the requested warehouse and the other scheduling results are based on it. If the warehouse is blank, the scheduling action determines the best warehouse based on the sourcing rules. This functionality includes ATO models.
  • Determines the schedule ship date, the schedule arrival date, the delivery lead time and the shipping method.
  • Makes the line visible to the planning applications and consumes supply for the item.
·         If the reservation time fence is set and the schedule ship date is within the reservation time fence, automatically reserves the line
Terminology: Understanding the following terms will help you understand how scheduling works in Oracle Order Management.
  • Actual Arrival Date: The date the order line arrives at the customer site.
  • Actual Ship Date: The date the order line is shipped. This date is recorded by the ship confirm action.
  • Arrival Set: A set of order lines which arrive at the same time at the destination.
  • Available to Promise (ATP): The quantity of current on-hand stock, outstanding receipts and planned production not already committed to sales orders or other sources of demand.
  • ATP Date: The date that a requested quantity will be available to promise.
  • Delivery Lead Time: Time, in days, for items to reach the customer once they are shipped.
  • Demand: Requests which consume inventory such as sales orders. Discrete manufacturing work orders and flow manufacturing schedules place demand for component items, and sales orders place demand for finished goods.
  • Line Set: A set of lines which can be grouped into a Ship Set or Arrival Set.
  • Override ATP: An action that allows authorized users to schedule the line even if there is no supply. Overriding ATP requires users to find supply manually.
  • Promise Date: The date on which you agree you can ship the products to your customer or that your customer will receive the products. This field is for tracking purposes only. It may be defaulted from the schedule ship date or the schedule arrival date.
  • Request Date: The date the customer requests that the products be either shipped or received.
  • Reservation: A guaranteed allotment of product to a specific sales order. Once reserved, the product cannot be allocated to any other source of demand. Also known as a hard reservation.
  • Reservation modes: Choose one of three reservation strategies when using Reserve Orders: Fair Share, Percentage, or Partial.
  • Reservation Time Fence: Time, in days, before the schedule date, within which a line should be automatically reserved.
  • Reservation Types: Using Reserve orders, you can choose whether the reservation run should simulate the reservation strategy, or commit the reservations.
  • Reserve Orders: A concurrent program that attempts to reserve all those order lines specified in the search criteria in a batch process.
  • Schedule Arrival Date: The date returned by the system on which your customer can receive the products.
  • Schedule Ship Date: The date returned by the system on which you can ship the products.
  • Scheduling Across Orders: The ability to perform scheduling actions on lines from multiple orders. With Scheduling Across Orders, users can schedule, unschedule, reserve, unreserve and perform ATP checks on lines across orders.
  • Scheduling parameters: Scheduling attributes are added to the OM System Parameters
  • Ship Set: A set of lines which will be shipped together from the same warehouse to the same location.
  • Sourcing: Selecting the warehouse for the order lines.
  • Supply: Incoming inventory. Some Oracle transactions that generate supply are purchase orders, discrete manufacturing work orders and flow manufacturing schedules.
NUMBER OF WAYS TO SCHEDULE:

Autoschedule - The line is scheduled when it is saved. A line can be saved manually by the user or will automatically be saved when the user leaves the line. If either the Autoschedule check box on the order transaction type is checked or the OM: Autoschedule profile option is Yes, the sales order will be opened in Autoschedule mode. You can turn Autoschedule on or off from
the sales order form by going to the Tools menu. Note that if autoschedule is turned on the availability window is automatically displayed when the sales order form is opened. The user can close the availability window, but the lines will still be autoscheduled unless the autoschedule check box on the tools menu is unchecked.

Manual - You can access the scheduling sub menu either by selecting schedule from the list of activities on the tools menu or by placing your cursor on a line and pressing the right mouse button. Selecting schedule from these menus will trigger the scheduling action. If the action is selected from the order header tab, all the lines on the order will be scheduled. If the action is selected
from the lines tab, it applies only to the line or group of lines selected.

Scheduling Concurrent Program - This program selects all lines which are eligible for scheduling and attempts to schedule them. The user can select orders based on the order number
Profiles: The following profile options affect scheduling functionality:
OM: Autoschedule: Possible values are yes or no. If set to yes, the availability window is displayed when the sales order window is opened and scheduling occurs automatically as each order line is saved. This profile applies only to standard items. It applies to lines entered through Order Import.
OM: Auto Push Group Date: Possible values are yes and no. If the value is yes and a line is added to a scheduled configuration, and the new line cannot be scheduled on the date that the rest of the configuration is scheduled, then the system will try to reschedule the complete configuration at a different time. If the value is no and the new line cannot be scheduled, then scheduling for the new line will fail and the rest of the configuration will not be affected.
OM: Scheduling Role: This pertains to Scheduling Across Orders. Possible values are CSR only, CSR and Scheduler, and Scheduler only. This can be set at either the Responsibility or User level. This profile option determines which tabs can be accessed on the Find window of the Order Organizer. If set to CSR only, there is access to the tabs pertaining to the sales order, but no access to the Scheduling tab. If set to CSR and Scheduler, there is access to all tabs, including the tabs for CSRs and the one for schedulers. If set to Scheduler only, there is access to only the Scheduling tab.
RESERVATIONS
Reservation Time Fence - This may be any positive integer numeric value. When a line is scheduled it is also automatically reserved whenever the schedule date is within the reservation time fence. This is one of the order management system parameter. For auto reserving this system parameter is required to be set.
Reservations are performed automatically whenever a line is scheduled and the schedule date is within the reservation time fence.
 For example, suppose the today’s date is November 25th. An order line is scheduled for December 1st, whichis 6 days away. If the reservation time fence is 10, the line will be reserved because 6 < 10. If the reservation time fence is 2, the line will not be reserved because 6 >2. If the reservation time fence is NULL, then lines will not be automatically reserved. The reservation time fence is set using the profile option OM: Reservation Time Fence.
When you create reservations manually on the sales order form or automatically using the reservation time fence, the items are reserved at the warehouse level with no inventory details specified. You can specify inventory details for a reservation
by using inventory’s reservation details form. To access the form from the sales order form, go to the tools menu and select scheduling. From the list of options select Reservation Details. A form will appear which allows you to reserve by lot,
revision, subinventory and/or locator. You can only access the reservation details form for lines that are scheduled.

Saturday, 22 December 2012

How to check Versions of Apps, DB, Web server, Forms & Reports, Jinitiator, Java, pld, OA Framwork, Workflow, Discoverer etc.

Find component Version in Apps 11i/R12/12i
Q. How to find Apps Version (11i/R12/12i).
A.  Connect to database as user apps
SQL> select release_name from apps.fnd_product_groups;
Output like 12.0.4 or 11.5.10.2

Q. Web Server/Apache or Application Server in Apps 11i/R12
A. Log in as Application user, set environment variable and run below query $IAS_ORACLE_HOME/Apache/Apache/bin/httpd -version
Output for 11i should be like
Server version: Oracle HTTP Server Powered by Apache/1.3.19 (Unix)
Server built:   Jan 26 2005 11:06:44 (iAS 1.0.2.2.2 rollup 5)
Output for R12 should be like
Server version: Oracle-Application-Server-10g/10.1.3.0.0Oracle-HTTP-Server
Server built:   Dec  4 2006 14:44:38
Q. Forms & Report version (aka developer 6i) in 11i
A. Log in as Application user, set environment variable and run below query
$ORACLE_HOME/bin/f60run | grep Version | grep Forms
output like
Forms 6.0 (Forms Runtime) Version 6.0.8.25.2 (Production)
Check fourth character in version 25 which means Forms 6i patchset 16 (25-9)
.
Q. Forms & Report version in R12/12i
A. Log in as Application user, set environment variable and run below query
$ORACLE_HOME/bin/rwrun | grep Release
Output should be like
Report Builder: Release 10.1.2.2.0
You can safely ignore warnings
Q. Database Version in 11i/R12/12i
A. Go to database section below.
Q. Oracle Jinitiator in 11i/R12/12i
A.
Log in as Application user, set environment variable and run below query
grep jinit_ver_comma $CONTEXT_FILE

(
Default is Java Plug-In for R12/12i )
Q. Oracle Java Plug-in in 11i/R12/12i
A.
Log in as Application user, set environment variable and run below query
grep plugin $CONTEXT_FILE
Q. File Version on file system
adident Header <filename>
or
strings <file_name> | grep Header
Here adident is AD Utility (Oracle Apps) and strings is Unix utility
Q. Version of pld file
*.pld are source code of *.pll which are inturn source of *.plx.  *.pll is in $AU_TOP/resource and to find its version check
adident Header $AU_TOP/resource/<filename>.pll
IGSAU012.pll:
$Header IGSAU012.pld 115.1.115100.1 2004/04/01 05:40:18 appldev ship $
or
strings $AU_TOP/resource/<filename>.pll | grep -i header
FDRCSID(‘$Header: IGSAU012.pld 115.1.115100.1 2004/04/01 05:40:18 appldev ship $’);
Q. OA Framework Version
A.http:// hostname.domainName:port/OA_HTML/OAInfo.jsp (Only for 11i)
A.  Log in as Application user, set environment variable and run below query
adident Header $FND_TOP/html/OA.jsp
adident Header $OA_HTML/OA.jsp
output for both should look like
$Header OA.jsp 115.60 2006/03/31 00:47:28 atgops1 noship $
120.21 means OA Framework Version (coming soon..)
115.60 means OA Framework Version (coming soon..)
115.56 means OA Framework Version (coming soon..)
115.36 means OA Framework Version 5.7
115.27 means OA Framework Version 5.6E
115.26 means OA Framework Version 5.5.2E
Q. Discoverer Version for 11i (3i or 4i)
A. Log in as Application user, set environment variable and run below query
$ORACLE_HOME/bin/disc4ws | grep -i Version
Q. Discoverer Version for 11i or R12 (10g AS)
Check under Application Server Section as 10g AS Discoverer is on standalone
Q. Workflow Version with Apps
A.
Connect to Database as apps user
SQL> select TEXT Version from   WF_RESOURCES where  NAME = ‘WF_VERSION’;
Output like 2.6.0 means workflow version 2.6.0
.
Version for Fusion Middleware Component

Identity Management component Version/Release Number
A. Oracle Single Sign On
Connect to database which holds SSO repository
SQL>select version from orasso.wwc_version$;
B. Oracle Internet Directory
There are two component in OID (Software/binaries & Schema/database)
>>> To find software/binary version
$ORACLE_HOME/bin/oidldapd -version
output should look like
oidldapd: Release 10.1.4.0.1 – Production on mon jul 14 14:14:21 2008
Copyright (c) 1982, 2006 Oracle.  All rights reserved.
>>> To find Schema Version/ database use
ldapsearch -h <hostname> -p <port> -D “cn=orcladmin” -w “<password>” -b “” \
-s base “objectclass=*” orcldirectoryversion
and output should be like
version: 1
dn:
orcldirectoryversion: OID 10.1.4.0.1
or run following query in database
SQL> select attrval from ods.ds_attrstore where entryid = 1 and attrname = ‘orcldirectoryversion’;
Output should be like OID 10.1.4.0.1
C. Application Server
1. Oracle Application Server 10g Rel 3 (10.1.3.X)
cat $ORACLE_HOME/config/ias.properties | grep Version

Version=10.1.3.0.0
2. For Oracle Application Server 10.1.2 (Prior to Oracle WebLogic Server)
If application server is registered in database (Portal, Discoverer) check from database
SQL> select * from ias_versions;
or
SQL>select * from INTERNET_APPSERVER_REGISTRY.SCHEMA_VERSIONS;
.
D. AOC4J (Oracle Container for J2EE)
Set ORACLE_HOME
cd $ORACLE_HOME/j2ee/home
java -jar oc4j.jar -version
.
E. Oracle Portal
SQL> select version from portal.wwc_version$;
.

Database Component
I) Oracle Database
To find database version
SQL> select * from v$version;
or
All component version in database
$ORACLE_HOME/OPatch/opatch lsinventory -detail
.
Oracle Enterprise Manager
Metalink Note 605398.1 
How to to find the version of the main EM components
.
Unix Operating System
Solaris -> cat /etc/release
Red Hat Linux -> cat /etc/redhat-release
 .

Friday, 7 December 2012

Login to any user in R12. It is not showing any error on the screen, after login screen.




http://www.conacent.com


Problem -

Check the application.log is $LOG_HOME/ora/10.1.3/j2ee/oacore/oacore_default_group_1
javax.servlet.ServletException: Application: FND, Message Name: FND_NO_DATABASE_CONNECTION


Solution :- 

Login Fails Intermittently With: Application: Fnd, Message Name: oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_NO_DATABASE_CONNECTION [ID 1298103.1]

12.1.3 CustomersApply and test patch 11832737


12.1.2 and 12.1.1 Customers
Apply and test patch 9908921

Wednesday, 31 October 2012

Flashbacks Time Base Recovery


http://www.conacent.com

Accidentally, the user executes a wrong query, probably with & without a WHERE clause, and COMMITS the data. Finally, when he queries the table to check the record count, he notices that all or some of the rows from the table are deleted. The Administrator uses the Flashback Query feature to restore the data to prior point of time, the data as existed some time minutes back.


1.  Suppose we have created one table named test
    SQL> create table test (name varchar2(10));
 



2. Insert few records into the table
    SQL> insert into test (name) values ('aa');



3. Check the date and time of the system
    SQL> select to_char(sysdate,'dd-mm-yyyy hh24:mi:ss') from dual;

4. Delete all records or some of it.
    SQL> delete from test;
or
    SQL> delete from test where name='cc';






5. Commit after you have deleted the record
    SQL> commit;

6. Check the date and time of the system
    SQL> select to_char(sysdate,'dd-mm-yyyy hh24:mi:ss') from dual;

7. Place the value  of <Date & Time> taken from step 3.
    If all the records are deleted then use the below query
    SQL> insert into test select * from test as of timestamp to_timestamp('<Date & Time>','dd-mm-yyyy hh24:mi:ss');

   If specific record is deleted then use the below query
   SQL> insert into test select * from test as of timestamp to_timestamp('<Date & Time>','dd-mm-yyyy hh24:mi:ss') where name='cc' ;

Monday, 29 October 2012

Direct Delivery Receipts (Lot enabled items) using Interface tables

Steps to upload Direct Delivery Receipts (Lot enabled items) using Interface tables:

1. Set the Profile option "RCV: Processing Mode" to "Batch" using System Administrator responsibility:
    System Administrator -> Profile ->RCV: Processing Mode.

2. Populate the given fields of the two interface tables i.e. RCV_HEADERS_INTERFACE and   RCV_TRANSACTIONS_INTERFACE .

3. In order to insert Lot Numbers the MTL_TRANSACTION_LOTS_INTERFACE table needs to be populated.
 For multiple lot insertion the above table needs to be populated with different lot numbers.

4. Run the Receiving Transaction Processor request from the front end Apps Screen.

/************************* Interface Tables Population ******************************/

/********** Population of RCV_HEADERS_INTERFACE table**********/
INSERT INTO RCV_HEADERS_INTERFACE
(HEADER_INTERFACE_ID,
GROUP_ID,
PROCESSING_STATUS_CODE,
RECEIPT_SOURCE_CODE,
TRANSACTION_TYPE,
AUTO_TRANSACT_CODE,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_LOGIN,
CREATION_DATE,
CREATED_BY,
VENDOR_ID,
SHIP_TO_ORGANIZATION_ID,
EXPECTED_RECEIPT_DATE,
VALIDATION_FLAG
)
VALUES
(rcv_headers_interface_s.nextval , --Header_Interface_Id
rcv_interface_groups_s.nextval, --Group_Id
'PENDING', --Processing_Status_Code
'VENDOR', --Receipt_Source_Code
'NEW', --Transaction_Type
'DELIVER', --Auto_Transact_Code
SYSDATE, --Last_Update_Date
0, --Last_Updated_By
0, --Last_Update_Login
SYSDATE, --Creation_Date
0, --Created_By
341, --Vendor_Id
87, --Ship_To_Organization_Id,
SYSDATE, --Expected_Receipt_Date
'Y' --Validation_Flag
);

/*********Population of RCV_TRANSACTIONS_INTERFACE table**********/
 INSERT INTO RCV_TRANSACTIONS_INTERFACE
(INTERFACE_TRANSACTION_ID,
GROUP_ID,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_LOGIN,
TRANSACTION_TYPE,
TRANSACTION_DATE,
PROCESSING_STATUS_CODE,
PROCESSING_MODE_CODE,
TRANSACTION_STATUS_CODE,
QUANTITY,
UNIT_OF_MEASURE,
ITEM_ID,
EMPLOYEE_ID,
AUTO_TRANSACT_CODE,
SHIP_TO_LOCATION_ID,
RECEIPT_SOURCE_CODE,
VENDOR_ID,
SOURCE_DOCUMENT_CODE,
PO_HEADER_ID,
PO_LINE_ID,
PO_LINE_LOCATION_ID,
DESTINATION_TYPE_CODE,
-- DELIVER_TO_PERSON_ID,
LOCATION_ID,
DELIVER_TO_LOCATION_ID,
SUBINVENTORY,
HEADER_INTERFACE_ID,
DOCUMENT_NUM,
TO_ORGANIZATION_ID,
VALIDATION_FLAG
)
SELECT
rcv_transactions_interface_s.nextval, --Interface_Transaction_id
rcv_interface_groups_s.currval, --Group_id
SYSDATE, --Last_update_date
0, --Last_updated_by
SYSDATE, --Creation_date
0, --Created_by
0, --Last_update_login
'RECEIVE', --TRANSACTION_TYPE
SYSDATE, --TRANSACTION_DATE
'PENDING', --PROCESSING_STATUS_CODE
'BATCH', --PROCESSING_MODE_CODE
'PENDING', --TRANSACTION_STATUS_CODE
2, --QUANTITY
'Kilogram', --UNIT_OF_MEASURE
9142 , --ITEM_ID
61, --EMPLOYEE_ID
'DELIVER', --AUTO_TRANSACT_CODE
147, --SHIP_TO_LOCATION_ID
'VENDOR', --RECEIPT_SOURCE_CODE
341, --VENDOR_ID
'PO', --SOURCE_DOCUMENT_CODE
7439, --PO_HEADER_ID
8054, --PO_LINE_ID
9200, --PO_LINE_LOCATION_ID
'INVENTORY', --DESTINATION_TYPE_CODE
-- 13706, --DELIVER_TO_PERSON_ID
147, --LOCATION_ID
147, --DELIVER_TO_LOCATION_ID
'EEBFGWIP', --SUBINVENTORY
rcv_headers_interface_s.currval, --Header_interface_id
'40031000160', --PO NUMBER
87, --TO_ORGANIZATION_ID
'Y' --VALIDATION_FLAG
FROM DUAL;
 
/*********** For Lot Insertion *************/
INSERT INTO mtl_transaction_lots_interface
(
TRANSACTION_interface_ID      
,LAST_UPDATE_DATE          
,LAST_UPDATED_BY          
,CREATION_DATE            
,CREATED_BY                
,LAST_UPDATE_LOGIN        
,TRANSACTION_QUANTITY      
,PRIMARY_QUANTITY          
,LOT_NUMBER                
,LOT_EXPIRATION_DATE      
,SERIAL_TRANSACTION_TEMP_ID
,PRODUCT_CODE              
,PRODUCT_TRANSACTION_ID    
)
values
(
MTL_MATERIAL_TRANSACTIONS_S.NEXTVAL --TRANSACTION_interface_ID      
,SYSDATE --LAST_UPDATE_DATE          
,1 --LAST_UPDATED_BY          
,SYSDATE --CREATION_DATE            
,1 --CREATED_BY                
,1 --LAST_UPDATE_LOGIN        
,60 --TRANSACTION_QUANTITY      
,60 --PRIMARY_QUANTITY          
,'B/L100' --LOT_NUMBER                
,NULL --LOT_EXPIRATION_DATE      
,NULL --SERIAL_TRANSACTION_TEMP_ID
,'RCV' --PRODUCT_CODE              
,RCV_TRANSACTIONS_INTERFACE_S.CURRVAL --PRODUCT_TRANSACTION_ID    
);

Thursday, 4 October 2012

RMAN Restoration on different Server as well as same Mount Point for Oracle APPS

Please Visit http://www.conacent.com/?page_id=218

RMAN Restoration on different Server as well as same Mount Point for Oracle APPS

1. if mount point is not same in target server change the /etc/fstab and restart the server.

2. Copy db backup file system from source server to target server as well as rman backup files.

2. Clone the database technology Stack.
    $su - oracln
    $cd $ORACLE_HOME/appsutil/clone/bin
    $perl adcfgclone.pl dbTechStack

3. Connect to RMAN utility.
    $RMAN target /

4. Startup Database to nomount state.
    RMAN>startup nomount;

5. Restore controlfile from the rman backup file system
    RMAN> restore controlfile from '/data2/rman_archive/autobackup_control_files';  [Latest control file]

6. Database need to be startup to mount state.
    RMAN> alter database mount;

7. Restore database from rman backup file.
    RMAN> restore database;  /  restore database until time "to_date('01-OCT-2012 23:45:00','dd-mon-rrrr hh24:mi:ss')";
    RMAN> recover database;  /  recover database until time "to_date('01-OCT-2012 23:45:00','dd-mon-rrrr hh24:mi:ss')";
    RMAN> alter database open resetlogs;



Please give your feedback if any thing is not correct. Your feedback is valuable.

RMAN Restore on another machine with different file system - same database name In Oracle Apps



Please Visit http://www.conacent.com/?page_id=218

RMAN Restoration on different Server as well as different Mount Point for Oracle APPS

1. Copy db backup file system from source server to target server as well as rman backup files.

2. Clone the database technology Stack.
    $su - oracln
    $cd $ORACLE_HOME/appsutil/clone/bin
    $perl adcfgclone.pl dbTechStack

3. Connect to RMAN utility.
    $RMAN target /


     Recovery Manager: Release 11.1.0.7.0 - Production on Fri Oct 5 14:03:49 2012
     Copyright (c) 1982, 2007, Oracle.  All rights reserved.
     connected to target database (not started)


4. Startup Database to nomount state.
    RMAN>startup nomount;


    Oracle instance started
    Total System Global Area    1068937216 bytes
    Fixed Size                                 2166536 bytes
    Variable Size                         427819256 bytes
    Database Buffers                   624951296 bytes
    Redo Buffers                           14000128 bytes


5. Restore controlfile from the rman backup file system. Before changing the path of the RMAN backup change the owner of the directory.

    RMAN> restore controlfile from '/data2/rman_archive/autobackup_control_filec-147839628-20120930-00';  [Latest control file]


                  Starting restore at 05-OCT-12
                  using channel ORA_DISK_1
                  channel ORA_DISK_1: restoring control file
                  channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
                  output file name=/d01/CLONE/db/apps_st/data/cntrl01.dbf
                  output file name=/d01/CLONE/db/apps_st/data/cntrl02.dbf
                  output file name=/d01/CLONE/db/apps_st/data/cntrl03.dbf
                  Finished restore at 05-OCT-12


6. Database need to be startup to mount state.
    RMAN> alter database mount;

                using target database control file instead of recovery catalog
               database mounted

7. if mount point is different then start with catalog command
    RMAN> catalog start with '/d01/CLONE/db';

                   File Name: /d01/CLONE/db/tech_st/11.1.0/opmn/conf/ons.config
                   File Name: /d01/CLONE/db/tech_st/11.1.0/opmn/conf/ons.config.ouibak.2
                   File Name: /d01/CLONE/db/tech_st/11.1.0/opmn/conf/ons.config.ouibak.3
                   File Name: /d01/CLONE/db/tech_st/11.1.0/opmn/conf/ons.config.ouibak.5
                   File Name: /d01/CLONE/db/tech_st/11.1.0/opmn/lib/ons.jar
                   File Name: /d01/CLONE/db/tech_st/11.1.0/opmn/lib/onc.jar
                   File Name: /d01/CLONE/db/tech_st/11.1.0/root.sh.old.1
                   File Name: /d01/CLONE/db/tech_st/11.1.0/root.sh.old

                   Do you really want to catalog the above files (enter YES or NO)? YES
                   cataloging files...


8. if redo logfile is in different mount point
    $ sqlplus '/as sysdba'
    SQL> alter database rename file '/oracle/OBA/obaora/db/apps_st/data/log03a.dbf' to '/d01/CLONE/db/apps_st/data/log03a.dbf';
    SQL> alter database rename file '/oracle/OBA/obaora/db/apps_st/data/log03b.dbf' to '/d01/CLONE/db/apps_st/data/log03b.dbf';
    SQL> alter database rename file '/oracle/OBA/obaora/db/apps_st/data/log04a.dbf' to '/d01/CLONE/db/apps_st/data/log04a.dbf';
    SQL> alter database rename file '/oracle/OBA/obaora/db/apps_st/data/log04b.dbf' to '/d01/CLONE/db/apps_st/data/log04b.dbf';
    SQL> alter database rename file '/oracle/OBA/obaora/db/apps_st/data/log05a.dbf' to '/d01/CLONE/db/apps_st/data/log05a.dbf';
    SQL> alter database rename file '/oracle/OBA/obaora/db/apps_st/data/log05b.dbf' to '/d01/CLONE/db/apps_st/data/log05b.dbf';
    SQL> alter database rename file '/oracle/OBA/obaora/db/apps_st/data/log06a.dbf' to '/d01/CLONE/db/apps_st/data/log06a.dbf';
    SQL> alter database rename file '/oracle/OBA/obaora/db/apps_st/data/log06b.dbf' to '/d01/CLONE/db/apps_st/data/log06b.dbf';


9. if tempfile is in different mount point
    RMAN> run {
    2> set newname for tempfile '/oracle/OBA/obaora/db/apps_st/data/temp01.dbf' to '/d01/CLONE /db/apps_st/data/temp01.dbf';
     3> set newname for tempfile '/oracle/OBA/obaora/db/apps_st/data/temp02.dbf' to '/d01/CLONE/db/apps_st/data/temp02.dbf';
     4> switch tempfile all;
     5> }

      executing command: SET NEWNAME
      using target database control file instead of recovery catalog

       executing command: SET NEWNAME

        renamed tempfile 1 to /d01/CLONE/db/apps_st/data/temp01.dbf in control file
        renamed tempfile 2 to /d01/CLONE/db/apps_st/data/temp02.dbf in control file

  

10. if datafile is in different mount point

    RMAN> run {
          set newname for datafile 1 to '/d01/CLONE/db/apps_st/data/system01.dbf';
          set newname for datafile 2 to '/d01/CLONE/db/apps_st/data/system02.dbf';
          set newname for datafile 3 to '/d01/CLONE/db/apps_st/data/system03.dbf';
          set newname for datafile 4 to '/d01/CLONE/db/apps_st/data/system04.dbf';
          set newname for datafile 5 to '/d01/CLONE/db/apps_st/data/system05.dbf';
          set newname for datafile 6 to '/d01/CLONE/db/apps_st/data/ctxd01.dbf';
          set newname for datafile 7 to '/d01/CLONE/db/apps_st/data/owad01.dbf';
          set newname for datafile 8 to '/d01/CLONE/db/apps_st/data/a_queue02.dbf';
          set newname for datafile 9 to '/d01/CLONE/db/apps_st/data/odm.dbf';
          set newname for datafile 10 to '/d01/CLONE/db/apps_st/data/olap.dbf';
          set newname for datafile 11 to '/d01/CLONE/db/apps_st/data/sysaux01.dbf';
          set newname for datafile 12 to '/d01/CLONE/db/apps_st/data/apps_ts_tools01.dbf';
          set newname for datafile 13 to '/d01/CLONE/db/apps_st/data/system12.dbf';
          set newname for datafile 14 to '/d01/CLONE/db/apps_st/data/a_txn_data04.dbf';
          set newname for datafile 15 to '/d01/CLONE/db/apps_st/data/a_txn_ind06.dbf';
          set newname for datafile 16 to '/d01/CLONE/db/apps_st/data/a_ref03.dbf';
          set newname for datafile 17 to '/d01/CLONE/db/apps_st/data/a_int02.dbf';
          set newname for datafile 18 to '/d01/CLONE/db/apps_st/data/sysaux02.dbf';
          set newname for datafile 19 to '/d01/CLONE/db/apps_st/data/sysaux03.dbf';
          set newname for datafile 20 to '/d01/CLONE/db/apps_st/data/a_txn_data05.dbf';
          set newname for datafile 21 to '/d01/CLONE/db/apps_st/data/a_txn_data06.dbf';
          set newname for datafile 22 to '/d01/CLONE/db/apps_st/data/a_txn_ind07.dbf';
          set newname for datafile 23 to '/d01/CLONE/db/apps_st/data/XXILL01.dbf';
          set newname for datafile 288 to '/d01/CLONE/db/apps_st/data/system10.dbf';
          set newname for datafile 295 to '/d01/CLONE/db/apps_st/data/system06.dbf';
          set newname for datafile 314 to '/d01/CLONE/db/apps_st/data/portal01.dbf';
          set newname for datafile 351 to '/d01/CLONE/db/apps_st/data/system07.dbf';
          set newname for datafile 352 to '/d01/CLONE/db/apps_st/data/system09.dbf';
          set newname for datafile 353 to '/d01/CLONE/db/apps_st/data/system08.dbf';
          set newname for datafile 354 to '/d01/CLONE/db/apps_st/data/system11.dbf';
          set newname for datafile 379 to '/d01/CLONE/db/apps_st/data/undo01.dbf';
          set newname for datafile 392 to '/d01/CLONE/db/apps_st/data/a_txn_data01.dbf';
          set newname for datafile 393 to '/d01/CLONE/db/apps_st/data/a_txn_ind01.dbf';
          set newname for datafile 394 to '/d01/CLONE/db/apps_st/data/a_ref01.dbf';
          set newname for datafile 395 to '/d01/CLONE/db/apps_st/data/a_int01.dbf';
          set newname for datafile 396 to '/d01/CLONE/db/apps_st/data/a_summ01.dbf';
          set newname for datafile 397 to '/d01/CLONE/db/apps_st/data/a_nolog01.dbf';
          set newname for datafile 398 to '/d01/CLONE/db/apps_st/data/a_archive01.dbf';
          set newname for datafile 399 to '/d01/CLONE/db/apps_st/data/a_queue01.dbf';
          set newname for datafile 400 to '/d01/CLONE/db/apps_st/data/a_media01.dbf';
          set newname for datafile 401 to '/d01/CLONE/db/apps_st/data/a_txn_data02.dbf';
          set newname for datafile 402 to '/d01/CLONE/db/apps_st/data/a_txn_data03.dbf';
          set newname for datafile 403 to '/d01/CLONE/db/apps_st/data/a_txn_ind02.dbf';
          set newname for datafile 404 to '/d01/CLONE/db/apps_st/data/a_txn_ind03.dbf';
          set newname for datafile 405 to '/d01/CLONE/db/apps_st/data/a_txn_ind04.dbf';
          set newname for datafile 406 to '/d01/CLONE/db/apps_st/data/a_txn_ind05.dbf';
          set newname for datafile 407 to '/d01/CLONE/db/apps_st/data/a_ref02.dbf';
          switch datafile all;
}

RMAN> catalog start with '/s01/rman_archive';


RMAN>run {
          restore database  /  restore database until time "to_date('01-OCT-2012 23:45:00','dd-mon-rrrr hh24:mi:ss')";
           recover database  /  recover database until time "to_date('01-OCT-2012 23:45:00','dd-mon-rrrr hh24:mi:ss')";
          }

RMAN> alter database open resetlogs;



Please give your feedback if any thing is not correct. Your feedback is valuable.