Thursday, November 27, 2008

Cloning 11i

adcloning
Cloning is the act of creating an identical copy of an already existing Oracle
Applications system.The new system including component versions, operating
system, and platform type must be initially identical to the existing system.
Cloning Oracle Applications
Cloning an Oracle Applications Release 11i system involves the following
general steps:

  • Run Rapid Install.
  • Copy the existing database.
  • Copy the existing file system
  • Update the configuration information.
  • Install the AD cloning utility on the source system. Download and apply patch # 2115451 in pre-install mode to all APPL_TOPs on the source system. This patch contains the AD cloning utility.
  • Prepare the target system                                                                                                                  
      • Complete the following steps to prepare the target system for cloning.


  1. Run Rapid Install to install a new instance.Use the Rapid Install you originally used to create the source system.Choose the “Install Oracle Applications” option to install all Oracle Applications components. Identify the name of the target system database and choose to install a “fresh install database”. Create a new configuration file. This file will be used later during the cloning process.                                     The following options in the target system must match the source system:                                           Type of database (that is, if the source system database is a Vision database, the target system database must be a Vision database; if the source system database is a fresh install database, the target system database must be a fresh install database.)
    • Base language
    • Default territory
    • APPL_TOP character set
    • Server and node configuration (for example, if the source system has twonodes -one node for admin, concurrent processing, and database and the other for forms and web- the target system must be identically configured in two nodes.) 
    • Platform                                                                                                                                The following configuration options for the target system may differ from the

                     Source system:

    • Port numbers
    • Server hostname
    • Domain name
    • Disk mount points
    • Operating system installation account and/or group
    • Database name

2. Modify user configuration
Shutdown all services owned by the oracle user on the source system and the
target system:

    • $ cd /admin/scripts
    • $ adapcctl.sh stop
    • $ adcmctl.sh / stop
    • $ adfmcctl.sh stop
    • $ adfmsctl.sh stop
    • $ adfroctl.sh stop
    • $ adrepctl.sh stop
    • $ adalnctl.sh stop APPS_
Once the services have been shut down, perform the following as the oracle user
on both the source system and the target system:
    • $ cd 
    • $ chown -R ./util/apache
    • $ cd admin/scripts
    • $ chown adapcctl.sh adcmctl.sh adfmcctl.sh adfmsctl.sh adfroctl.sh adrepctl.sh adalnctl.sh
Note: Do not change ownership of all scripts in the directory, as some must
remain owned by the oracle user.


3. Install the AD cloning utility on the target system
Download and apply the latest AD cloning patch (2115451) in pre-install mode
to all APPL_TOPs on the target system.


4. Preserve Oracle Applications configuration files specific to the target system
To save the target system configuration, log in as the applmgr user on the target
system, do not run or execute the Applications environment setup file, and run
the AD cloning utility.
 The AD cloning utility is written in the Perl language. Perl is located in the
Apache directory of your Applications system (i.e. …/Apache/perl/bin/perl). Apache is located in the ORACLE_HOME.
Add the .../perl/bin directory used by Apache to the PATH variable before
running the adclone command. Validate this by ensuring the "which" command
returns the correct location.
UNIX:
$ PATH=/perl/bin:${PATH}
$ export PATH
$ which perl


5. Upgrade the database ORACLE_HOME (conditionally required) If you upgraded the database ORACLE_HOME of the source system to a different version than the one included with Rapid Install, upgrade the database ORACLE_HOME of the target system.
Once the database ORACLE_HOME upgrade is complete, update the DBS_ORA816 parameter of the Rapid Install configuration file with the new ORACLE_HOME path. If the new ORACLE_HOME was installed with the Oracle Universal Installer (OUI), and not Rapid Install, create an ORACLE_HOME/appsutil directory and copy the contents from the old ORACLE_HOME/appsutil directory to the newly created one. Then, update ORACLE_HOME/appsutil/install/adupdlib.sql to reflect the new target system ORACLE_HOME location (for releases before 11.5.3, update adupdprf.sql).
6. Remove the database files from the target system As you will be using copies of the database files from the source system, the database files created by Rapid Install for the target system can be removed.
Use the database server process control script (addbctl.sh) to shutdown the database of the target system.
Delete all of the database files (*.dbf files) from the target system.


7. Copy the source system database
To copy the source system database to the target system, perform the following steps.
a) On the source system database, create a list of datafiles and online redo log files of your source system database by issuing an "alter database backup controlfile to trace" command in the source system database.
Examine the resultant trace file located in the user_dump_dest directory.
b) Perform a normal shutdown of the source system database.
c) Perform a cold backup of the source system database.
d) Log on to the target system as the oracle user and set the database environment using the database environment file.
The environment file for the database server is located in the database server ORACLE_HOME, and is called .env (UNIX or Linux) or .cmd (Windows).
e) Copy the database files to the target system.
Identify the new mount points for the database files and copy the database files from the backup of the source system to the new target system.
f) Verify the target system init.ora parameters.
You may have updated the database initialization file in your source system. Verify that the parameter changes are reflected in the init.ora of your target system. Check all parameters, especially the location of your
control files and the names of your rollback segments.
g) Create a new control file.
 • Update the trace file from step a) with SID and mount point information pertinent for the target system and use it to create a control file creation script.
• Start up the target system instance, but do not mount or open the database.
• Create a new control file for the database using the control file creation script. Specify the RESETLOGS option if the database SID was renamed. Otherwise, use the NORESETLOGS option.
 h) Open the database.
If RESETLOGS was specified when creating the control file, use ALTER DATABASE OPEN RESETLOGS, else use ALTER DATABASE OPEN.
i) Reset the database identifier (required for Oracle Recovery Manager users)
If you use Oracle Recovery Manager (RMAN) with Oracle Applications, you must reset the database identifier (DBID) with a unique ID. RMAN requires that each database instance have a unique DBID. As the target system database files are copied directly from the source system, they retain the source system DBID.
The DBID is stored in the generic file header of the control file, datafiles, temp files and online log files. To reset the DBID in all of these locations perform the following steps:


• Cleanly shut down the database
• Start the instance and mount the database, but leave it closed


Attention: Do not perform the following step with the database open


• Delete the existing DBID. Perform this command in SQL*Plus as the SYS user:
 exec sys.dbms_backup_restore.zerodbid(0);
• A new DBID will be generated when you create a new control file by using the CREATE CONTROLFILE statement
j) Update the GLOBAL_NAME (conditionally required) If the database name was changed, perform this command in SQL*Plus as the SYSTEM user to change the GLOBAL_NAME in the database:

alter database rename global_name \   


k) Start the Net8 listener and verify that it allows remote connections to the database.


8. Copy the source system files
To copy the source APPL_TOP, OA_HTML, and JAVA_TOP directories to the target system, perform the following steps:
a) Verify that all users have logged off the source system and that all. Applications server processes have been shut down.
b) Log on as the applmgr user on the target system.
c) Copy the source APPL_TOP, OA_HTML, and JAVA_TOP.
Copy these directory trees from each node of the source system to each corresponding node of the new target system. If your target system is on the same machine as your source system or the disks are NFS mounted, you can copy an entire directory tree at once.
UNIX:
For example, if your source system APPL_TOP is /d01/apps115/PRODappl:
$ cp -r /d01/apps115/PRODappl /d02/apps115/TESTappl
The arguments for the copy command may differ depending upon the UNIX operating system type.
2. Run the AD cloning utility
Log on as the applmgr user, do not run or execute the Applications environment setup file, and run the AD cloning utility in postclone mode to configure the target system. The AD cloning utility is located in the AD_TOP/bin directory.
Note: The AD cloning utility will prompt you for the SYSTEM and APPS passwords when running in postclone mode.
For all users:
perl adclone.pl -mode=postclone -env_name=-node_name= -config_file=-ad_top=
The AD cloning utility in postclone mode will:
• Configure the database profiles
• Replace the configuration files associated with the APPL_TOP
• Replace the configuration files associated with the COMMON_TOP
• Generate the database security (DBC) file
• Update the interMedia shared library path
• Startup the services for this node
When cloning a multi-node system, repeat the steps in this section on each node in your system.
Perform finishing tasks
This section describes the tasks you may need to perform to complete the cloning process.
 1. Apply technology stack patches and configuration changes (conditionally required) If you have applied patches or tuned the parameter settings in the source system for any technology stack components not referred to in this paper, you will need to apply the patches and re-implement the settings in the target system. Common examples of technology stack updates include upgrading Oracle Developer (Forms, Reports, Graphics), upgrading JInitiator, adjusting parameters such as Oracle HTTP Server parameters in the httpd.conf file located in the iAS ORACLE_HOME/Apache/Apache/conf directory, and updating profile options such as the Applications Framework Agent.
2. Modify the web configuration file (conditionally required)
The web configuration file appsweb.cfg exists in two locations on the Applications file system: FND_TOP/resource and OA_HTML/bin. If appsweb.cfg was patched, updated or customized in the source system you must update this file in the target system:
a) Back up appsweb.cfg from FND_TOP/resource and OA_HTML/bin of the target system.
b) Copy appsweb.cfg from FND_TOP/resource and OA_HTML/bin of the source system to the target system.
c) Modify the values in the ENVIRONMENT SPECIFIC PARAMETERS section of the appsweb.cfg of the target system to reflect the values in the backup copy that you created in step a). These parameters should
reflect the values for your target system.
3. Update Self-Service parameters (conditionally required)
If you use Internet Explorer and changed the default SESSION_COOKIE_DOMAIN from null to some other value, update the Self-Service parameters directly using  SQL*Plus:
sqlplus /          update ICX_PARAMETERS
                     set SESSION_COOKIE_DOMAIN = '’;
4. Sign the Java archive files Applications R11i requires that all Java archive (JAR) files used in the client tier
be certified using a customer specific digital certificate. If you plan to use the same digital signature on both the source and target systems, copy the identitydb.obj from the source system to the target system.
This file is located in the home directory of the source system’s main Applications user. Copy it to the home directory of the target system’s application user. If a different digital certificate is to be used for the target
system, create a new one. Follow the instructions for creating a certificate in the Installing Oracle Applications manual.
Whether a new or existing digital certificate is used, run AD Administration (adadmin) to generate product JAR files. When prompted to force regeneration of all jar files, type yes. Perform this step on each node of the target system 5. Relink the f60webmx executable (conditionally required)
If the target system utilizes the HP platform, you need to relink the f60webmx executable. Run AD  administration and choose Relink Applications programs from the Maintain Applications Files menu. See the Maintaining Oracle Applications manual for instructions. After relinking successfully, run 'chatr +s enable f60webmx' to resolve issues with Shared Library path. The f60webmx executable is located in the FND_TOP/bin directory.
6. Relink Applications executables (recommended) Relinking all of your Applications executables is recommended. Use the relink Applications programs task of AD Administration to relink your Applications
executables. Perform this step on each node of the target system
7. Reconfigure Portal (conditionally required) If you use Oracle Portal, update the configuration by performing step 1.7 (Register Portal and Login Server URLs Using ssodatan) in OracleMetaLink Note 146469.1.

Installing Grid Control on RHEL

login as: root
root@194.81.224.45's password:
Last login: Sat Aug 30 13:16:10 2008 from 192.171.171.145
[root@qasim ~]# df -h
This command will show mount points and their usage and availability.
[root@qasim ~]# uname -a
Linux qasim 2.6.9-42.0.0.0.1.ELsmp #1 SMP Sun Oct 15 14:02:40 PDT 2006 i686 i686 i386 GNU/Linux
(This command showed the Operating System and Version)
[root@qasim home]# useradd -d /home/gridora -m -g dba gridora
(This user created the user gridora and created a home folder for it)

You need to create a folder on which you will install Grid Control.You should create this folder through root and then assign and give write permissions on this folder by following commands:
[root@qasim ~]#mkdir ORAGRID
[root@qasim ~]# chown –R gridora:dba ORAGRID
[root@qasim ~]#chmod 777 ORAGRID
You need to update the /etc/oraInst.loc with current Inventory and dba group.

Now you need to run VNC server by this command
[root@qasim ~]#vncserver


[gridora@qasim ~]$ vncserver

You will require a password to access your desktops.

Password:
Verify:
After VNC server is launched.You need to search vnc server port.You will find this port by following commands:
[gridora@qasim ~]$ ps -ef|grep vnc
gridora 8342 1 1 18:59 pts/2 00:00:00 Xvnc :2 -desktop qasim:2 (gridora) -httpd /usr/share/vnc/classes -auth /home/gridora/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /home/gridora/.vnc/passwd -rfbport 5902 -pn
gridora 8348 1 0 18:59 pts/2 00:00:00 vncconfig -iconic
gridora 8379 8307 0 19:00 pts/2 00:00:00 grep vnc


vnc server is running on port 2.So add this port to 580 and it will become 5802.
Now open the browser and in there write the server name which is qasim in our case and after the : write the port number which will be 5802 in this case.
It will ask the username and password which was created and it will be only for this session. In there go to the path and run the runInstaller which will launch installation.



Important
*** The log file is created at /u02/GRIDORA/oraInventory/logs/installActions2008-08-30_07-26-19PM.log
*** Before starting installation in VNC if you will switch user it will not work bcoz it has been started for only one user.