Monday, February 28, 2011

RMAN Terminology and How RMAN Works


RMAN backup and recovery operation for a target database are managed by RMAN client. RMAN uses the target database control file to gather metadata about the target database and to store information about its own operations.

The RMAN  client itself does not perform backup, restore, or recovery operations. When you connect the RMAN  client to a target database, RMAN  allocates server sessions on the target instance and directs them to perform the operations.

The work of backup and recovery is performed by server sessions running on the target database. A channel establishes a connection from the RMAN  client to a target or auxiliary database instance by starting a server session on the instance. The channel reads data into memory, processes it, and writes it to the output device.

When you take a database backup using RMAN , you need to connect to the target database using RMAN  Client. The RMAN  client can use Oracle Net to connect to a target database, so it can be located on any host that is connected to the target host through Oracle Net. For backup you need to allocate explicit or implicit channel to the target database.

 An RMAN  channel represents one stream of data to a device, and corresponds to one database server session. This session dynamically collect information of the files from the target database control file before taking the backup or while restoring.

RMAN Terminology 

A target database: An Oracle database to which RMAN  is connected with the TARGET keyword. A target database is a database on which RMAN is performing backup and recovery operations. RMAN always maintains metadata about its operations on a database in the control file of the database.

A recovery Catalog : A separate database schema used to record RMAN  activity against one or more target databases. A recovery catalog preserves RMAN repository metadata if the control file is lost, making it much easier to restore and recover following the loss of the control file. The database may overwrite older records in the control file, but RMAN maintains records forever in the catalog unless deletedbytheuser.

Backup Sets: RMAN  can store backup data in a logical structure called a backup set, which is the smallest unit of an RMAN  backup. One backup set contains one or more datafiles a section of datafile or archivelogs.

Backup Piece: A backup set contains one or more binary files in an RMAN -specific format. This file is known as a backup piece. Each backup piece is a single output file. The size of a backup piece can be restricted; if the size is not restricted, the backup set will comprise one backup piece. Backup piece size should be restricted to no larger than the maximum file size that your file system will support.

Image copies: An image copy is a copy of a single file (datafile, archivelog, or controlfile). It is very similar to an O/S copy of the file. It is not a backupset or a backup piece. No compression is performed.

Snapshot Control file: When RMAN needs to resynchronize from a read-consistent version of the control file, it creates a temporary snapshot control file. The default name for the snapshot control file is port-specific.

Database Incarnation: Whenever you perform incomplete recovery or perform recovery using a backup control file, you must reset the online redo logs when you open the database. The new version of the reset database is called a new incarnation. The reset database command directs RMAN to create a new database incarnation record in the recovery catalog. This new incarnation record indicates the current incarnation 

Recovery Manager - RMAN


RMAN is an Oracle Database client that performs backup and recovery tasks on your databases and automates administration of your backup strategies.

RMAN tool integrates with sessions running on an Oracle database to perform a range of backup and recovery activities, including maintaining an RMAN repository of historical data about backups

RMAN gives you access to several backup and recovery techniques and features not available with user-managed backup and recovery. The most noteworthy are the following:

Automatic specification of files to include in a backup:  Establishes the name and locations of all files to be backed up. 

Maintain backup repository:  Backups are recorded in the control file, which is the main repository of RMAN metadata.  Additionally, you can store this metadata in a recovery catalog,

Incremental backups Incremental backup stores only blocks changed since a previous backup. Thus, they provide more compact backups and faster recovery, thereby reducing the need to apply redo during datafile media recovery.

Unused block compression:  In unused block compression, RMAN can skip data blocks that have never been used

Block media recovery: You an repair a data file with only a small number of corrupt data blocks without taking it offline or restoring it from backup.

Binary compression A binary compression mechanism integrated into Oracle Database reduces the size of backups.

Encrypted backups: RMAN uses backup encryption capabilities integrated into Oracle Database to store backup sets in an encrypted format.

 Corrupt block detection:  RMAN checks for the block corruption before taking its backup

Sunday, February 27, 2011

How to Add the Loopback Network Adapter in Windows 7 Versions


1. Open the cmd Prompt and Run the hdwwiz


2. It will display one prompt ‘welcome to the add Hardware Wizard’ and click Next.

3. Select the Radio button search for and install the hardware automatically and click Next

4. Select Network adapters and Click Next

5. Select the Manufacturer Microsoft and Network adapter Microsoft Loopback Adapter

6. Click next and it starts the processing of installing new hardware

Sunday, February 20, 2011

APPS DBA - ADADMIN OPTIONS

AD Administration Main Menu

--------------------------------------------------
1. Generate Applications Files menu

2. Maintain Applications Files menu

3. Compile/Reload Applications Database Entities menu

4. Maintain Applications Database Entities menu

5. Change Maintenance Mode

6. Exit AD Administration

Generate Applications Files
------------------------------------
1. Generate message files

2. Generate form files

3. Generate report files

4. Generate graphics files

5. Generate product JAR files

6. Return to Main Menu

Maintain Applications Files
----------------------------------
1. Relink Applications programs

2. Create Applications environment file

3. Copy files to destinations

4. Convert character set

5. Maintain snapshot information

6. Check for missing files

7. Return to Main Menu

Compile/Reload Applications Database Entities
----------------------------------------------------------------
1. Compile APPS schema

2. Compile menu information

3. Compile flexfields

4. Reload JAR files to database

5. Return to Main Menu

Maintain Applications Database Entities
------------------------------------------------------
1. Validate APPS schema

2. Re-create grants and synonyms for APPS schema

3. Maintain multi-lingual tables

4. Check DUAL table

5. Maintain Multiple Reporting Currencies schema

6. Return to Main Menu

Change Maintenance Mode
------------------------------------
Maintenance Mode is currently: [Disabled].

Please select an option:

1. Enable Maintenance Mode

2. Disable Maintenance Mode

3. Return to Main Menu

Related Information:

APPS DBA - AD Administration


AD Administration manages most of the maintenance tasks required for your Oracle Applications system. Currently, these maintenance tasks are grouped by the following types: generating Applications files, maintaining Applications files, compiling and reloading Applications database entities, maintaining Applications database entities, and enabling maintenance mode.

When you start AD Administration from the command line, it prompts you for the basic system-specific information it needs.

For Running the Ad Administration,.

Step 1 Set the environment
Login to the apps user and source the environment file.

Step 2 Start AD Administration & Respond to prompts
From any directory, u can start AD Administration with this command, adadmin. This utility prompts some information and responds it. Once it s completed it appears ad administration window.



Step 3 Choose maintenance tasks
We can select the maintenance tasks in ad administration Main Menu


Step 4 Exit AD Administration
Exit the ad administration once the maintenance task is completed with the command ‘exit’

All maintenance tasks are initiated from the AD Administration Main Menu and Each Main Maintance tasks are having their submenus.For More

ORACLE DBA - ADDM Report


The Automatic Database Diagnostic Monitor (hereafter called ADDM) is an  integral part of the Oracle RDBMS capable of gathering performance  statistics and advising on changes to solve any existing performance issues   measured. 
Automatic database diagnostic monitoring is enabled by default and is controlled by the STATISTICS_LEVEL initialization parameter. The STATISTICS_LEVEL parameter should be set to the TYPICAL or ALL to enable the automatic database diagnostic monitoring. By default =all
The
types of problems that ADDM considers include the following:
  • CPU bottlenecks - Is the system CPU bound by Oracle or some other application?
  • Undersized Memory Structures - Are the Oracle memory structures, such as the SGA,PGA, and Buffer cache,  adequately sized?
  •  I/O capacity issues - Is the I/O subsystem performing as expected?
  •  High load SQL statements - Are there any SQL statements which are consuming excessive system resources?
  • High load PL/SQL execution and compilation, as well as high load Java usage
  • RAC specific issues - What are the global cache hot blocks and objects; are there any Interconnect latency issues?
  • Sub-optimal use of Oracle by the application - Are there problems with poor connection management, excessive parsing, or application level lock contention?
  • Database configuration issues - Is there evidence of incorrect sizing of log files,archiving issues, Excessive checkpoints or sub-optimal parameter settings?
  • Concurrency issues - Are there buffer busy problems?
  • At the SQL prompt, enter: 
           @$ORACLE_HOME/rdbms/admin/addmrpt.sql

Wednesday, February 16, 2011

ORACLE DBA - AWR Report

Automatic workload repository (AWR)is a collection of persistent system performance statistics owned by SYS.

AWR generates snapshots of key performance data, such as system and session  statistics , segment-usage statistics, time-model statistics, high-load   Statistics   resides in SYSAUX tablespace. By default snapshot are generated once every 60min and aintain   for 7 days by default.

We can generate AWR reports by running SQL scripts

The awrrpt.sql SQL script generates an HTML or text report that displays statistics for a range Of snapshot Ids.

The awrrpti.sql SQL script generates an HTML or text report that displays statistics for a range  of snapshot Ids  on a specified database and instance

  • At the SQL prompt, enter:

      @$ORACLE_HOME/rdbms/admin/awrrpt.sql

      @$ORACLE_HOME/rdbms/admin/awrrpti.sql



Tuesday, February 15, 2011

Gather Schema Statistics

ü  The Gather Table Statistics program gathers the table statistics for the specified table. This program can optionally backup the existing statistics in the FND_STATTAB table before gathering new statistics

ü  The Gather Schema Statistics process should be run on a regular basis (weekly at a minimum) and anytime large changes to the data or database take place (application of patch, conversion, etc.)

ü  This process gathers information about the tables and the data in the tables so that it can determine the best approach for querying the data in the tables

ü  If you are experiencing poor performance then try runs this process as it will usually help significantly improve performance.


To run concurrent program Gather Schema Statistics:
1. Log on to Oracle Applications with
    Responsibility = System Administrator

2. Submit Request Window
    Navigate to: List > Request > Run
.



3. Query for the Gather Schema Statistics


4. Enter the appropriate parameters. This can be run for specific schemas by specifying the schema name or entering 'ALL' to gather statistics for every schema in the database.Have a look the  parameters information which is mentioned after screen shot bellow.


5. Submit the gather schema statistics program




Parameters

Schema Name   :  Schema for which statistics are to be gathered. Specify ALL for all Oracle Applications schemas

Percent: The sampling percentage. If left blank, the default value of10 is used. The valid range is from 0 to 100

Degree: The degree of parallelism to be used for gathering statistics. If a Degree is not provided, it defaults to the minimum ofparallel_max_servers and cpu_count.


Backup Flag: NOBACKUP isused, then the GATHER_SCHEMA_STATS procedure will not backup the current statistics. This way the GATHER_SCHEMA_STATS procedure will run faster.

Restart Request ID: In the case where the Gather Schema Statistics run fails due to whatever reasons, the concurrent request can be re-submitted and it will pick up where the failed run left off, if you provide the concurrent request_id of the failed run.

History Mode: Last Run - History records for each object are maintained only for the last gather statistics run. Each subsequent run will overwrite the previous history record for the object. This is the default behavior

Gather Options: GATHER: All tables and indexes of the schema schema name are selected for stats gathering. This is the default

Modifications Threshold: Applicable only to GATHER AUTO and LIST AUTO Options

Invalidate Dependent Cursors: This flag indicates whether cursors dependent on the table being analyzed should be invalidated or not. By default, dependent cursors are invalidated

Monday, February 14, 2011

APPS DBA- AD Utilities


 AD Utilities (Applications DBA Utilities) are set of Oracle supplied utilities that are used to administer Oracle Applications. These AD utilities have similar interfaces, operation, input and report format. Let us discuss these Utilities are

AD Utility Name: AD Administration
Executable: adadmin
Description: Performs maintenance tasks for Oracle Applications 

AD Utility Name: AD Check Digest
Executable: adchkdig
Description: Checks the integrity of Oracle Applications patches downloaded from Oracle MetaLink

AD Utility Name: AD Configuration
Executable: adutconf.sql
Description: Reports standard information about the installed

AD Utility Name: AD Controller
Executable: adctrl
Description: parallel workers in AD Administration and Auto Patch.

AD Utility Name: AD File Identification
Executable: adident
Description: Reports the version and translation level of an Oracle Applications file

AD Utility Name: AD File Character Set Converter
Executable: adncnv
Description: Converts a file from one character set to another.

AD Utility Name: AD Merge Patch
Executable: admrgpch
Description: Merges multiple patches into a single merged patch

AD Utility Name: AD Relink
Executable: adrelink.sh
Description: Relinks Oracle Applications executable programs with the Oracle server product libraries. 

AD Utility Name: AD Splicer
Executable: adsplice
Description: Adds off-cycle products

AD Utility Name: AD Job Timing Report
Executable: adtimrpt.sql
Description: Reports a summary of the timing for jobs run by parallel workers. 

AD Utility Name: AutoPatch
Executable: adpatch
Description: Applies patches and other system updates.

AD Utility Name: Rapid Install
Executable: rapidwiz
Description:  Provides a wizard for entering parameters that are specific to a new installation or an upgrade of an Oracle Applications system

AD Utility Name: License Manager
Interface: Oracle Applications Manager
Description: Registers additional Oracle Applications products, country-specific functionalities, or languages. You can also use License Manager to change the base language for your system. 

AD Utility Name: Patch Wizard
Interface: Oracle Applications Manager
Description: Patch Wizard** Determines patches that have not been applied, but that should be applied to keep the system current. Downloads and merges patches from Oracle Metalink.


Wednesday, February 9, 2011

APPS DBA - Adpatch Options


There are a few different modes in which adpatch can be run and few options we can provide while we are applying the patches.

 If you are applying a large number of patches, use the options nocompilejsp, nocompiledb, noprereq, and novalidate to speed up the application of the patches.

Recompiling Java Server Pages (JSP) pages and database objects can be performed at the end of the patching process.

The following Modes and options will give clear idea about the advanced patching.

Test Mode:

Test mode will display all the files adpatch will replace and the actions it will take, but does not actually apply the patch. The syntax for using this mode is:

$ adpatch apply=no
.
 Pre-AutoInstall Mode

There are times when Oracle may require the install of a patch before running AutoInstall to install or upgrade Oracle Applications. The patch usually updates AutoInstall itself or one of the utilities it calls during the installation. The syntax for this mode is:

$ adpatch preinstall=y

Non Interactive Mode

For running adpacth in this mode we need to be create an AutoPatch defaults file, which contains information for running adpatch against the different drivers.

Options parameter

The options parameter can be used to enable or disable certain functions during application of the patch. For example, you may want to prevent forms and libraries from being generated during the application of a patch. The syntax for this would be:

$ adpatch options=nogenrep,nogenrpll (option1,option2..)

Most of the cases we follow the bellow Options to reducing downtime for the Application patch in oracle applications.

Novalidate : Prevents adpatch from validating all schema connections

Noprereq  :  Prevents adpatch from checking the existence of prerequisite patches

Nocompiledb   Prevents adpatch from compiling database objects

Nocompilejsp  Prevents adpatch from compiling JSP objects

Noautoconfig:Prevents adpatch from running autoconfig

Nogenerateportion Prevents adpatch from compiling forms, menus, and plls

Hidepw : Prevents passwords from being displayed in log files

Hotpatch  : Allows adpatch to be run when the instance is not in maintenance mode

Referring  Links: