Wednesday, July 9, 2008

RENAME TEMPFILE ORACLE 10G

RENAME TEMPFILE ORACLE 10G
If the file is the default temporary tablespace then you need perform the below from step 1,
Else if you want to move a datafile of a normal temporary tablespace then perform the below from step 2.
1]. First of all you have to create another default temporary tablespace.
2]. Take the tablespace in offline position
3]. Use os command to move or copy the files.
4]. Then perform:

SQL> alter database rename file '\' to '\';
5]. Bring the tablespace online.
EXAMPLE:
STEP 1:
------
SQL> alter database default temporary tablespace pr_temp;
Database altered.

SQL> select PROPERTY_NAME,PROPERTY_VALUE from database_properties
where PROPERTY_NAME like '%DEFAULT%';
PROPERTY_NAME PROPERTY_VALUE
-----------------------------------------------
DEFAULT_TEMP_TABLESPACE PR_TEMP

STEP 2:
-----
SQL> alter database tempfile 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEMP1.DBF' offline;
Database altered.

STEP 3:
------
SQL> select file_name from dba_temp_files where tablespace_name='TEMP';
FILE_NAME
-------------------------------------------------
D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\TEMP01.DBF

+++ Use os command to move or copy the files.


STEP 4:
------
SQL> alter database rename file 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\TEMP01.dbf'
to 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEMP1.dbf';
Database altered.

Now we can check if the file is move and renamed as below,

SQL> select file_name from dba_temp_files where tablespace_name='TEMP';
FILE_NAME
------------------------------------------
D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEMP1.DBF

STEP 5:
------
SQL> alter database tempfile 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEMP1.DBF' online;
Database altered.

Tuesday, July 8, 2008

Monday, July 7, 2008

ADPATCH

ADPATCH GENERAL INFORMATION

1.What is a patch driver file?
2.What are the Oracle Applications patch types?
3.Patches can also be organized by purpose.



1.What is a patch driver file?
AutoPatch uses a driver file to direct the installation of a patch. This unified driver is named u.drv. It contains all the driver actions (copy, database, and generate) that the patch requires, and it performs these actions in the stated order. Typically, you run the driver on all APPL_TOPs and AutoPatch determines which actions are required for the current APPL_TOP and runs only those actions.

The driver actions are as follows:
1.1 Copy
1.2 Database
1.3 Generate

Copy: Contains commands to change Oracle Applications files. The commands include directives to copy and update files, libraries, and/or Java, and commands for generating JAR files and/or C executables. In a multi-node system, the copy portion runs on all application tier APPL_TOPs.

Database: Contains commands to change Oracle Applications database objects, such as PL/SQL and table definitions, or to update or migrate data. In a multi-node system, the database portion runs only on the application tier APPL_TOP that implements the administration server.

Generate: Contains commands to generate forms, reports, messages, and/or graphics files. In a multi-node system, the generate portion runs on all application tier APPL_TOPs, unless the APPL_TOP only implements the administration server.

2.What are the Oracle Applications patch types?

2.1 Standalone (one-off) Patch:
2.2 Rollup Patch (RUP)
2.3 Minipack
2.4 Family Pack
2.5 Maintenance Pack

All Applications patches are organized by aggregation level.

Standalone (one-off) Patch: Addresses a single fix or enhancement. Standalone patches are released only when there is an immediate need for a fix or enhancement that cannot wait until an aggregate bundling is available. Although standalone patches are intended to be as small as possible, they usually include any dependent files that have changed since the base release in order to form a complete patch that can be applied by any customer. The actual number of files changed will depend on the current code level on the system to which the patch is being applied.

Rollup Patch (RUP): An aggregation of patches that may be at the functional level, or at a specific product/family release level. For example, a Flexfields rollup patch contains all the latest patches related to Flexfields at the time the patch was created. A Marketing Family 11.5.10 rollup patch contains all the latest Marketing patches released since, and applicable to, 11.5.10.

Minipack: An aggregation of patches at the product level. For example, Inventory Minipack G (11i.INV.G) contains all the latest patches for the Inventory product at the time the minipack was created. Minipacks are named in alphabetical sequence such as 11i.INV.E, 11i.INV.F, 11i.INV.G, and so on. Minipacks are cumulative. In other words, 11i.INV.G contains everything in 11i.INV.F, which contains everything in 11i.INV.E, and so on. The terms patchset and minipack are often used interchangeably.

Family Pack: An aggregation of patches at the product family level. For example, Financials Family Pack C (11i.FIN_PF.C) contains all the latest patches for products in the Financials family at the time the family pack was created. Family product codes always end in "_PF" and family packs are given alphabetical sequence such as 11i.HR_PF.B, 11i.HR_PF.C, and 11i.HR_PF.D. Family packs are cumulative. In other words, Discrete Manufacturing Family Pack G (11i.DMF_PF.G) contains everything in 11i.DMF_PF.F, which contains everything in 11i.DMF_PF.E, and so on.

Maintenance Pack: An aggregation of patches for all products in the E-Business Suite. For example, Release 11.5.10 Maintenance Pack contains all the latest code level for all products at the time 11.5.10 was created. Maintenance packs are numbered sequentially such as 11.5.8, 11.5.9, 11.5.10, and are cumulative. In other words, 11.5.10 contains everything in 11.5.9, which contains everything in 11.5.8, and so on.

In addition to the patches in a maintenance pack, Oracle also packages a new Rapid Install at each maintenance pack release level. So Applications Release 11.5.10CU2 Rapid Install contains the same applications code level that a customer would get if they applied the Release 11.5.10CU1 Maintenance Pack on an earlier 11i release level. Note that the technology stack could still be different because Rapid Install includes the latest certified technology stack. The maintenance pack includes only Applications code.

Maintenance packs can be downloaded from OracleMetaLink or ordered as a CD Pack from the Oracle Store.

3. Patches can also be organized by purpose.

3.1 Diagnostic Patch
3.2 Interoperability Patch
3.3 Translated Patch
3.4 Merged Translation Patch
3.5 Translation Fix
3.6 New Feature Patch
3.7 Consolidated Update (CU)
3.8 Family Consolidated Upgrade Patch
3.9 Documentation Patch

Diagnostic Patch: Used to gather additional information when a product failure cannot be reproduced by Oracle. The additional information assists Oracle Support Services and Oracle Development in resolving the failure.

Interoperability Patch: Allows Oracle Applications to function properly with a newer version of the technology stack. Interoperability patches are typically required with new versions of the database or Applications technology stack.

Translated Patch: A non-English version of a patch. Release 11i supports 30 non-English languages. Customers who are using languages other than English, need to apply the corresponding translated patch(es) for the languages they are using in addition to any base US patch(es).

Merged Translation Patch: Provided in real time (without requiring a translator) in the event a translated patch is not available when a customer needs it. A merged translation patch is applied just like a fully translated patch. The fully translated patch is escalated and is usually available within 24 hours. It can be applied safely on top of a merged translation patch.

Translation Fix: Provided in the event a translation word choice is inappropriate. A translation fix is applied just like a translated patch, except there is no corresponding base US patch.

New Feature Patch: Introduces new functionality and/or products. It is applied using standard patching utilities.

Consolidated Update (CU): Improves and streamlines the upgrade and maintenance processes by consolidating certain post-release patches. Most recommended patches and rollups for a particular maintenance release are consolidated into a single patch that is installed immediately following application of a maintenance pack or a new installation of Rapid Install. Updates in the CU are predominantly error corrections.

Family Consolidated Upgrade Patch: Consolidates all upgrade-related patches from all the products within a product family. Family consolidated upgrade patches are released as needed and are applicable only if you are upgrading to Release 11i from Release 10.7 or 11.0. The Oracle Applications Release Notes, Release 11i (11.5.10.2), Note 316803.1 lists the most recent patches.

Documentation Patch: Updates online help.



AD PATCH Reducing Downtime

AD PATCH Reducing Downtime
Following the suggestions in this section can substantially reduce your system downtime during the application of patches.

1.Consolidate Patches
2.Apply Patches in Non-interactive Mode
3.Defer Database Tasks
4.Defer Upload of Patch Information
5.Apply on a Test System First
6.Use a Shared Application Tier File System
7.Use Distributed AD
8.Reduce Resource Related Issues
9.Manage Patching During an Upgrade
10.Evaluate Patch Drivers
11.Use AutoPatch Efficiently
12.Merge NLS (Translation) Patches and Apply Them During Uptime


1.Consolidate Patches
Using AD Merge Patch to merge multiple patches into a single patch eliminates the time it takes to start a new AutoPatch session. It also eliminates generic processes that are common to all patch applications.

2.Apply Patches in Non-interactive Mode

You can automate much of the patching process by applying patches in non-interactive mode. This process allows you to store the responses to the patching prompts in a defaults file, and then specify the name of this file when you run AutoPatch. See Oracle Applications Maintenance Procedures (11i) and Oracle Applications Patching Procedures (R12) for more information.

3.Defer Database Tasks
Use AutoPatch options=nocompiledb,nomaintainmrc to defer system-wide tasks such as "Compile APPS schema" and "Maintain MRC" until all patches have been applied. AutoPatch automatically compiles the APPS schema and maintains the MRC schema during the application of standard patches. Try deferring the compilation of database objects so users can log back in sooner. You should do this with this understanding:

Applying a patch in a test system shows data objects that are invalid because they cannot be compiled (as opposed to being invalid because the definition has changed and the object has not yet been compiled). Problems must be resolved on the production system using workarounds that are similar to those used on the test system.
The database server automatically compiles any uncompiled database objects that are present when the objects are accessed for the first time. This may affect performance as the first user waits for all invalid objects in the dependency chain to be compiled. You can minimize this effect by running "Compile APPS schema" in AD Administration immediately after you return your system to the user community.

4.Defer Upload of Patch Information
AutoPatch uploads patch history information to the database automatically each time it successfully applies a patch. The time required for the upload may be substantial depending on the size of the patch. You can defer this task during the AutoPatch session and upload the patch history information later, after you have made the system available to users. Use options=phtofile during the downtime patching session to defer the information upload. Then, after your system is up and users have returned, run AutoPatch again with the argument uploadph=y to upload the patch history information from the patch history files to your database. AutoPatch performs the upload and then exits.

5.Apply on a Test System First
To perform an analysis of the effects of applying a patch, apply it first to a test system. Note the following advantages:

Look for long-running jobs and phases which take the longest time in the timing statistics report ($APPL_TOP/admin//out/adt.lst).
If your test system is a reasonable copy of your production system, you can expect to return the production system to normal use before you compile invalid objects IF the patch application causes no errors (or has known workarounds).
Use the number of workers employed to apply the patch on the test system to extrapolate the number required for your production system.
Relink and regenerate all executables, forms, reports, libraries and Java archives on the test system, and then copy this file system to your production system.
Consider using a staged Applications system. See Using a Staged Applications System to Reduce Patching Downtime (OracleMetaLink Note 242480.1) for details. See also Using a Staged Applications System in Oracle Applications Maintenance Procedures (11i) and Oracle Applications Patching Procedures (R12).
6.Use a Shared Application Tier File System
Creating a multi-node system with a shared application tier file system saves patching time because you apply patches only once, on the primary node. See Sharing the Application Tier File System in Oracle Applications 11i (OracleMetaLink Note 233428.1) for details on creating a shared application tier file system.

7.Use Distributed AD
Distributed AD is a parallel processing feature that can reduce downtime by efficiently utilizing all the available resources on a shared application file system. AD Administration and AutoPatch run on the primary node and direct workers running on that node and other nodes in the system. The AD Controller utility controls and monitors the actions of the workers that you specify. For complete information, see Distributing Processing Tasks in Oracle Applications Maintenance Procedures (11i and R12) and Oracle Applications Patching Procedures (R12).

8.Reduce Resource Related Issues
Modify rollback segment sizing and temporary segment space to optimize resources during patch application.

Match batch commit size with your rollback segment sizing. Many scripts which process potentially large quantities of data accept a parameter that specifies the batch commit size. This parameter is automatically passed by AutoUpgrade to the script based upon the response the user gave when starting the upgrade. A larger batch commit size processes data more quickly, but requires larger rollback segments. Some customers with very large rollback/undo use 1,000,000. Test updates will help you tune the value.

Use as much temporary segment space as practical. Temporary tablespace (usually TEMP) should be created as a locally managed tablespace using the temporary file option with a uniform allocation size. Some scripts can run up to an order of magnitude faster by having sufficient temporary segment space (for example, 20 GB) to allow hash-join operations to be performed within the data server.

9.Manage Patching During an Upgrade
You need to apply the database upgrade driver and specific functional patches during an upgrade to Release 11i or 12. Here are some tips to reduce downtime:

Upgrade to Release 11.i.x or Release 12.0.x plus patches by running the copy, database and generate actions in a test environment. Then, copy this file system to your production system, where you need to run only the database actions to complete the upgrade.
Use a copy of the test system's APPL_TOP with all file system patches pre-applied. This way, only the consolidated database driver created by AD Merge Patch needs to be run during the Production upgrade. In addition, generation of files such as forms, reports and message files is not required as this has been performed already when the original patch was applied.
See Reduce Downtime by Using a Test APPL_TOP for a Production Upgrade to Release 11i (OracleMetaLink Note 217370.1) for details.

10.Evaluate Patch Drivers
You can perform an impact analysis on a patch, without affecting your system, by running AutoPatch with the command line option apply=no.
Some patches include only file system changes. Roughly 60% of Applications patches do not include database changes. Most UNIX systems allow an executable to be linked or generated while in use, and then the new version is used by new user access and prior processes continue to access the cached version. Windows will, however, fail with an exception when attempting to overwrite a file that is in use.
Some database changes require no downtime, for example, loading Help text and updating translations. See Merge NLS (Translation) Patches and Apply Them During Uptime in this note.
Aggregate patches that do not require downtime vs. those that do.

11.Use AutoPatch Efficiently
Using certain AutoPatch command line options and managing the number of workers can minimize patch application time.

The following AutoPatch command line options could reduce downtime during patch application:
The norevcache option can save 5 to 10 minutes. Use this option when zero or only a few PL/SQL packages and views become uncompiled.
The nolink option can save several minutes to hours. Use it when you apply several patches or when you plan to relink or regenerate the affected Applications (using AD Administration) after you apply a patch. Note: Be sure to always link AD and FND.
The nogenform and nogenrep options can save several minutes to hours. Use them in the same way that you use nolink.
AutoPatch can use parallel workers for all database tasks and for specific file system tasks such as forms generation.
Choose the number of workers appropriate for the machine, load and type of tasks.
You can also distribute the processing load to other nodes in your system by using Distributed AD. See the Distributed AD section of this note for additional information.
If you find that a certain phase could benefit from fewer workers, then use the AD Controller option "Tell worker to shut down/quit". When it is appropriate to increase the number of workers, restart the worker using the "Tell manager to start a worker that has shut down".

12.Merge NLS (Translation) Patches and Apply Them During Uptime
If you have multiple patches for multiple languages, merge all US patches into a single patch. Then, merge the NLS translation patches for each active language in your system into a single patch for each language. Apply the US patches first during downtime. Then, you can apply the merged NLS translation patches during uptime.

Friday, July 4, 2008

Oracle Apps R12 New Layout

Oracle Applications R12 New Layout