Wednesday 29 August 2012

Installation of Oracle Apps Stage11i

Installation of Oracle Apps Stage11i

Install Stage 11i in RHEL 6
Pre-Require RPM packages:
libXp-1.0.0-8.1.el5.i386.rpm
xorg-x11-deprecated-libs-6.8.2-1.EL.13.36.i386.rpm
 higher of Red Hat Enterprise Linux (RHEL) 6 is required
The following packages (or versions of packages) are not part of the OS distribution media and must be downloaded separately (from http://oss.oracle.com/projects/compat-oracle/files/Enterprise_Linux/) for both Oracle Linux 6 and RHEL 6 and installed manually on the application tier:
  • openmotif21-2.1.30-11.EL6.i686 (32-bit)1
  • xorg-x11-libs-compat-6.8.2-1.EL.33.0.1.i386 (32-bit)
The following packages must be installed from the Oracle Linux 6 or RHEL 6 distribution media on both the application and database tiers:
  • binutils-2.20.51.0.2-5.11
  • compat-db43-4.3.29-15.el6.i686
  • gcc-4.4.4-13.el16.x86_64
  • gcc-c++-4.4.4-13.el16.x86_64
  • glibc-2.12-1.7.el6.i686 (32-bit)
  • glibc-2.12-1.7.el6.x86_64
  • glibc-common-2.12-1.7.el6.x86_64
  • glibc-devel-2.12-1.7.el6.i686 (32-bit)
  • glibc-devel-2.12-1.7.el6.x86_64
  • libgcc-4.4.4-13.el6.i686
  • libgcc-4.4.4-13.el6.x86_64
  • libstdc++-devel-4.4.4-13.el6.i686
  • libstdc++-devel-4.4.4-13.el6.x86_64
  • libstdc++-4.4.4-13.el6.i686
  • libstdc++-4.4.4-13.el6.x86_64
  • libXi-1.3-3.el6.i686
  • libXp-1.0.0-15.1.el6.i686
  • libXp-1.0.0-15.1.el6.x86_64
  • libaio-0.3.107-10.el6.i686
  • libaio-0.3.107-10.el6.x86_64
  • libgomp-4.4.4-13.el6.x86_64
  • make-3.81-19.el6.x86_64
  • gdbm-1.8.0-36.el6.i686
  • gdbm-1.8.0-36.el6.x86_64
  • sysstat-9.0.4-11.el6.x86_64
  • util-linux-ng-2.17.2-6.el6.x86_64
  • unzip-5.52-3.0.1.el5.x86_642
  • compat-libstdc++-296-2.96-144.el6.i686
  • compat-libstdc++-33-3.2.3-69.el6.i686
Additionally, the following RPMs are required for the database tier running 11gR2 (users must upgrade the bundled 11gR1 DB to 11gR2 either before or after installing 12.1) on the database tier:
  • compat-libcap1-1.10-1.x86_64
  • compat-libstdc++-33-3.2.3-69.el6.x86_64
  • elfutils-libelf-devel-0.148.1-el6.x86_64
  • kernel-headers-2.6.32-71, kernel-uek-headers-2.6.32-100.28.5.el6.x86_64
  • libaio-devel-0.3.107-10.el6.x86_64
  • unixODBC-2.2.14-11.el6.i686
  • unixODBC-devel-2.2.14-11.el6.i686
  • unixODBC-2.2.14-11.el6.x86_64
  • unixODBC-devel-2.2.14-11.el6.x86_64
  • xorg-x11-utils-7.4-8
Note:
1: The openmotif package version must be 2.1.30 (for example, openmotif-2.3.3-1 is not supported).
2: This unzip package (available from EL 5 distribution) is only required for purposes of running Rapid Install to unzip the required EBS files as part of the installation and should be reverted after the install of EBS. Alternatively, users can backup the existing unzip 6.0 in /usr/bin, copy the unzip 5.5 from the EBS staging directory to /usr/bin for purposes of installing EBS, and then restore the unzip 6.0 when done.


**********************************************************


Errors & Solutions:
Error:-
RC-20200: Fatal: Could not find Unzip. At this time only Native UnZip 5.X is supported.
Please make sure you have UnZip 5.X in your path and try again...
Cannot execute Install for database ORACLE_HOME
RW-50010: Error: - script has returned an error:   1
RW-50004: Error code received when running external process.  Check log file for details.
Solution:
In a seperate login session as root rename /usr/bin/unzip (version 6) to a temporary filename and then rename it back after your installation is complete.
# mv /usr/bin/unzip /usr/bin/unzip-ver6

Error:

Cause: Invalid C++ and/or gcc compiler.
Solution:

Error:- System Utility Check Failed
Unable to find PD KSH version
Unable to find in user PATH
Solution:- export following parameter before running rapidwiz,

export KSH_VERSION='@(#)PD KSH v5.2.14 99/07/13.2'


Error:

While Installing Oracle Applications 12.1.1 in Linux 5 update 7

We encountered with an issue:

adapcctl.sh exiting with status 204


Solution:
1. Shut down all Oracle Application Services
2. As the unix root user, create a soft link as follows:

ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2
3. Start up all Oracle Application Services

Wednesday 22 August 2012

Difference between two versions

Difference between 9i and 10g:


9i and 10g:-
Differences:
Ø  Major changes to SQL optimizer internals.
Ø  ‘DataPump’ replaces ‘imp’ utility with ‘impdp’.
Ø  Oracle grid computing.
Ø  AWR (Automatic Workload Repository) and ASH(Automatic Storage Management) tables incorporated into oracle performance pack and Diagnostic pack options.
Ø  Automatic Database Diagnostic Monitor (ADDM).
Ø  SQL tuning Advisor.
Ø  SQL Access Advisor.
Ø  Rolling Database upgrades (using oracle 10g RAC)
Ø  Dbms_scheduler package replaces dbms_job for scheduling.
Ø  Automated Session History (ASH) materializes the oracle wait interface over time.
Features:
·         Web Server Load Balancing:  The web cache component includes Apache extension to load-balance transactions to the least-highly-loaded Oracle HTTP server (OHS).
·         Automated Storage Load Balancing: Oracle’s Automatic Storage Management (ASM) now enables a single storage pool to be shared by multiple databases for optimal load balancing.  Shared disk storage resources can alternatively be assigned to individual databases and easily moved from one database to another as processing requirements change.
·        Data Guard Load Balancing: Oracle Dataguard allows for load balancing between standby databases.
·        Listener Load Balancing: If advanced features such as load balancing and automatic failover are desired, there are optional sections of the listener.ora file that must be present.  Automatic Storage Management (ASM) includes multiple disk operations and a non-ASM database migration utility
·        Enhancements to data provisioning and Oracle Streams designed to make it easier to archive, move, and copy large data sets
·        New Fast-Start Failover for automatic fail over to standby databases
·        Integrated data encryption and key management in the database
·        Automated statistics collection directly from memory designed to eliminate the need to execute SQL queries
·        New administrative reports include automatic database workload repository comparison
·        Extended use of Standard Chunk sizes - In 10gR2, the server has been enhanced to further leverage standard chunk allocation sizes. This additional improvement reduces the number of problems arising from memory fragmentation.
·        Mutexes - To improve cursor execution and also hard parsing, a new memory serialization mechanism has been created in 10gR2. For certain shared-cursor related operations, mutexes are used as a replacement for library cache latches and librarycache pins. Using mutexes is faster, uses less CPU and also allows significantly improved concurrency over the existing latch mechanism. The use of mutexes for cursor pins can be enabled by setting the init.ora parameter _use_kks_mutex to TRUE.

Views:-
§  V$SGASTAT - V$SGASTAT has been enhanced to display a finer granularity of memory to component allocation within the shared pool. This allows faster diagnosis of memory usage (in prior releases many smaller allocations were grouped under the ‘miscellaneous’ heading).
§  V$SQLSTAT - A new view, V$SQLSTAT has been introduced which contains SQL related statistics (such as CPU time, elapsed time, sharable memory). This view is very cheap to query even on high-concurrency systems, as it does not require librarycache latch use. It contains the most frequently used SQL statistics in the V$SQL family of views.
§  V$OPEN_CURSOR - This implementation of this view has also been enhanced to be latchless, making it inexpensive to query.
§  V$SQLAREA - The V$SQLAREA view has been improved in 10gR2; the view optimizes the aggregation of the SQL statements while generating the view data.

Miscellaneous Oracle10g enhancements:
·         Introduced RECYCLEBIN command for storing objects before they are dropped. Required new PURGE command for maintenance.
·         sqlplus / as sysdba accessibility without quote marks
·         SYSAUX tablespace
·         Multiple Temporary Tablespaces supported to reduce stress on sorting in TEMP
·         RMAN introduces compression for backups
·         New drop database syntax
·         New alter database begin backup syntax
·         Oracle10g Data Guard Broker introduced
·         Oracle10g RAC supports secure Redo Log transport
·         Flashback enhancements for flashback database and flashback table syntax
·         VPD (FGAC, RLS) supports both row-level and column-level VPD
Simply Telling:

Ø  Transparent Data Encryption 
Ø  Async commits 
Ø  CONNECT ROLE can not only connect 
Ø  Passwords for DB Links are encrypted 
Ø  New asmcmd utility for managing ASM storage 
Ø  Grid computing - an extension of the clustering feature (RealApplication Clusters) 
Ø  Manageability improvements (self-tuning features) 
Ø  Performance and scalability improvements 
Ø  Automated Storage Management (ASM) 
Ø  Automatic Workload Repository (AWR) 
Ø  Automatic Database Diagnostic Monitor (ADDM) 
Ø  Flashback operations available on row, transaction, table or database level 
Ø  Ability to UNDROP a table from a recycle bin 
Ø  Ability to rename tablespaces 
Ø  Ability to transport tablespaces across machine types (E.g Windows to Unix)
New 'drop database' statement
New database scheduler - DBMS_SCHEDULER
Ø  DBMS_FILE_TRANSFER Package 
Ø  Support for bigfile tablespaces that is up to 8 Exabytes in size 
Data Pump - faster data movement with expdp and impdp

Friday 17 August 2012

Creating and Removing the Catalog

 

Creating the catalog:


RMAN can be used either with or without a recovery catalog. A recovery catalog is a schema stored in a database that tracks backups and stores scripts for use in RMAN backup and recovery situations. The RMAN schema generally only requires 15 megabyte per year per database backed up.


The recovery catalog can be define in two ways. They are
1.       Base Recovery Catalog:- is a database schema that contains RMAN metadata for a set of target databases.
2.       Virtual Private Catalog:- is a set of synonyms and views that enable user access to a subset of a base recovery catalog.

Syntax:

CREATE CATALOG;
CREATE VIRTUAL CALTALOG;


Prerequisites:
1.      Execute this command only at the RMAN prompt.
2.      RMAN must be connected to the recovery catalog database and the catalog database must be open.
example:
$rman catalog rmancat/rmancat
RMAN> CONNECT CALTALOG rmancat/rmnacat@ravi11
3.      A connection to a target database is not required.
4.      The recovery catalog owner, whether the catalog is a base recovery catalog or a virtual private catalog, must be granted the RECOVERY_CATALOG_OWNER role. This user must also be granted space privileges in the tablespace where the recovery catalog tables will reside. The recovery catalog is created in the default tablespace of the recovery catalog owner.
5.      If you are creating a virtual private catalog, then the base recovery catalog owner must have used the RMAN GRANT command to grant either the CATALOG or REGISTER privilege.
example:
RMAN> CONNECT CATALOG catowner@catdb
recovery catalog database Password: password
connected to recovery catalog database
RMAN> GRANT CATALOG FOR DATABASE prod1 TO vpc1;
RMAN> EXIT;
    For virtual
RMAN> CONNECT CATALOG vpc1@catdb
recovery catalog database Password: password
connected to recovery catalog database
RMAN> CREATE VIRTUAL CATALOG;
RMAN> EXIT;
Note: if you grant the permissions to the virtual Recovery catalog must be executed the following PL/SQL procedure.

base_catalog_owner.DBMS_RCVCAT.CREATE_VIRTUAL_CATALOG


SQL> CONNECT vpc1@catdb
Enter password: password
Connected.
SQL> BEGIN
  2  catowner.DBMS_RCVCAT.CREATE_VIRTUAL_CATALOG;
  3  END;
  4  /




Steps to creating Catalog:-



Step1: To create a tablespace to hold RMAN dataconnect with SYSDBA privileges to the database containing the recovery catalog

$ sqlplus "sys/change_on_install as sysdba"

 SQL> select name,ts# from v$tempfile;

             NAME                                        TS#
/prod/pra10/oradata/temp01.dbf          3

SQL> select name from v$datafile;

          NAME
/prod/pra10/oradata/system01.dbf
/prod/pra10/oradata/undtbs01.dbf
/prod/pra10/oradata/sysaux01.dbf
/prod/pra10/oradata/userdata01.dbf

SQL> CREATE TABLESPACE rman_data DATAFILE '/prod/pra10/admin/rman_data01.dbf'
  2  SIZE 100M
  3  AUTOEXTEND ON NEXT 100M
  4  MAXSIZE 2G
  5  SEGMENT SPACE MANAGEMENT AUTO;

Tablespace created.

Step2: create user for RMAN catalog.

 SQL> CREATE USER rmancat IDENTIFIED BY rmancat
  2  DEFAULT TABLESPACE rman_data
  3  QUOTA UNLIMITED ON rman_data;

User created.

SQL> ALTER USER rmancat TEMPORARY TABLESPACE temp;

User altered.

(or)

SQL> CREATE USER rmancat IDENTIFIED BY rmancat
  2  DEFAULT TABLESPACE rman_data
  3  QUOTA UNLIMITED ON rman_data
  4  TEMPORARY TABLESPACE TEMP;

User created.

Step3: Grant the recovery_catalog_owner role to the user. This role provides all of the privileges required to maintain and query the recovery catalog.

SQL> GRANT connect,resource TO rmancat;

Grant succeeded.

SQL> GRANT recovery_catalog_owner TO rmancat;

Grant succeeded.

Step4: Once the owner user is created, the RMAN recovery catalog schema can be added. Connect to the RMAN using created catalog user as follows.

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production with the Partitioning, OLAP and Data Mining options

[oracle@srvr77 pra10]$ rman catalog rmancat/rmancat

Recovery Manager: Release 10.2.0.1.0 – Production on Fri Aug 17 00:16:13 2012 Copyright (c) 1982, 2005, Oracle.  All rights reserved.

connected to recovery catalog database

RMAN> create catalog;

recovery catalog created

RMAN> exit

Recovery Manager complete.


Step5: Each database that the catalog will track must be registered.
Registering a Database with RMAN
The following process can be used to register a database with RMAN:
·        Make sure the recovery catalog database is open.
·        Connect RMAN to both the target database and recovery catalog database. 


[oracle@srvr77 pra10]$ rman catalog rmancat/rmancat target /

Recovery Manager: Release 10.2.0.1.0 – Production on Fri Aug 17 00:16:13 2012 Copyright (c) 1982, 2005, Oracle.  All rights reserved.

connected to target Database: PRA10(2822383112)
connected to recovery catalog database

RMAN> REGISTER DATABASE;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete



*****************************************************
Note: In this temporary file is must assign to the catalog tablespace
All of the mechanisms for virtual private catalogs are in the recovery catalog schema itself. The security is provided by the catalog database, not by the RMAN client.
***************************************************************************

[oracle@srvr77 pra10]$ rman catalog rmancat/rmancat target /@ravi11

Recovery Manager: Release 10.2.0.1.0 - Production on Fri Aug 17 00:22:06 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-12154: TNS: could not resolve the connect identifier specified



Removing Catalog:-

Syntax:-
SQL> execute dbms_rcvcat.unregisterdatabase(db_key, db_id)


To unregister a database, do the following:
NOTE: If the target database does not exists anymore, the only steps to execute are (1) and (3). Because the backupsets cannot be deleted from the catalog (requires to connect to the target database) they are not be deleted from disk or tape either. So you have to remove these backupsets manually. A list of the related backupsets are:
SQL> select handle from rc_backup_piece where db_id = <see step (1)>;


  1. Identify the database that you want to unregister. Run the following query from the recovery catalog using Server Manager or SQL*Plus (connected as the RMAN user):
    SQL> select * from rc_database;
    
        DB_KEY  DBINC_KEY       DBID NAME     RESETLOGS_CHANGE# RESETLOGS
    ---------- ---------- ---------- -------- ----------------- ---------
             1          2 2498101982 TARGDB                   1 15-JAN-04
           105        106 2457750772 OIDDB                    1 14-DEC-03
           128        129 2351019032 OMSDB                    1 15-JAN-04
           301        302 2498937635 TARGDB              140831 25-JAN-04
    For this example, I want to unregister all databases with this catalog.
  2. Remove the backupsets that belong to the database that you want to unregister.
    • Find the backupsets of the database that you want to unregister.
      RMAN> list backupset of database;
    • Remove the backupsets that belongs only to the database you want to unregister.
      RMAN> allocate channel for delete type disk;
      RMAN> change backupset XXX delete;
      NOTE: You need to allocate a channel for the delete. In this example a disk drive is being used and not a tape. The procedure for a backup done to tape is the same except you have to allocate a different channel for tape. Example:
      RMAN> allocate channel for delete type 'sbt_tape';
      The XXX value is the 'list of key' value from the 'list backupset of database' command
  3. Unregister the database by executing the following procedure from the recovery catalog:
    SQL> execute dbms_rcvcat.unregisterdatabase(db_key, db_id)
    The "db_key" and "db_id" values you will get by running the following query from the recovery catalog:
    SQL> select * from rc_database;
        DB_KEY  DBINC_KEY       DBID NAME     RESETLOGS_CHANGE# RESETLOGS
    ---------- ---------- ---------- -------- ----------------- ---------
             1          2 2498101982 TARGDB                   1 15-JAN-04
           105        106 2457750772 OIDDB                    1 14-DEC-03
           128        129 2351019032 OMSDB                    1 15-JAN-04
           301        302 2498937635 TARGDB              140831 25-JAN-04
    Make sure you are using the correct values by looking at the 'NAME' column of the "rc_database" table. Here is an example of how to unregister all databases within this catalog:
    SQL> execute dbms_rcvcat.unregisterdatabase(1, 2498101982)
    
    PL/SQL procedure successfully completed.
    
    SQL> execute dbms_rcvcat.unregisterdatabase(105, 2457750772)
    
    PL/SQL procedure successfully completed.
    
    SQL> execute dbms_rcvcat.unregisterdatabase(128, 2351019032)
    
    PL/SQL procedure successfully completed.
    
    SQL> execute dbms_rcvcat.unregisterdatabase(301, 2498937635)
    
    PL/SQL procedure successfully completed.

Thursday 16 August 2012

Set the Time and Date in Linux

Set the Time and Date in Linux

if you change the date and time must be log in to the "root" user.

To change the date and time.


[root@srvr77 ~]# date -s '16 Aug 2012 18:48:30'
Thu Aug 16 18:48:30 IST 2012
or 

[root@srvr77 ~]# date --set="16 Aug 2012 18:43:00"
Thu Aug 16 18:43:00 IST 2012



To check the date and time

[root@srvr77 ~]# date
Thu Aug 16 18:43:06 IST 2012



To set only the Time

[root@srvr77 ~]# date +%T -s '02:02:02'
02:02:02


[root@srvr77 ~]# date +%T%p -s '02:02:02am'
02:02:02AM

[root@srvr77 ~]# date +T%p  -s '19:00:00PM'
19:00:00PM