Showing posts with label R12. Show all posts
Showing posts with label R12. Show all posts

Monday

R12 - Cloning from an RMAN backup using duplicate database

Since most DBA's are using rman for their backup strategy I thought I would put together the steps to clone from an rman backup. The steps you follow are pretty much the same as described in Appendix A: Recreating the database control files manually in Rapid Clone in Note 406982.1 - Cloning Oracle Applications Release 12 with Rapid Clone.

Here are the steps:
  1. Execute preclone on all tiers of the source system. This includes both the database and application tiers. (For this example, TEST is my source system.)

    For the database execute: $ORACLE_HOME/appsutil/scripts/<context>/adpreclone.pl dbTier
    Where context name is of the format <sid>_<hostname>

    For the application tier: $ADMIN_SCRIPTS_HOME/adpreclone.pl appsTier

  2. Prepare the files needed for the clone and copy them to the target server.
    • Take a FULL rman backup and copy the files to the target server and place them in the identical path. ie. if your rman backups go to /u01/backup on the source server, place them in /u01/backup on the destination server. To be safe, you may want to copy some of the archive files generated while the database was being backed up. Place them in an identical path on the target server as well.
    • Application Tier: tar up the application files and copy them to the destination server. The cloning document referenced above ask you to take a copy of the $APPL_TOP, $COMMON_TOP, $IAS_ORACLE_HOME and $ORACLE_HOME. Normally I just tar up the System Base Directory, which is the root directory for your application files.
    • Database Tier: tar up the database $ORACLE_HOME.

      ex. from a single tier system. The first tar file contains the application files and the second is the database $ORACLE_HOME

      [oratest@myserver TEST]$ pwd
      /u01/TEST
      [oratest@myserver TEST]$ ls
      apps db inst
      [oratest@myserver TEST]$ tar cvfzp TEST_apps_inst_myserver.tar.gz apps inst
      .
      .
      [oratest@myserver TEST]$ tar cvfzp TEST_dbhome_myserver.tar.gz db/tech_st

      Notice for the database $ORACLE_HOME I only added the db/tech_st directory to the archive. The reason is that the database files are under db/apps_st and we don't need those.
    • Copy the tar files to the destination server, create a directory for your new environment, for example /u01/DEV. (For the purpose of this article I will be using /u01/DEV as the system base for the target envrionment we are building and myserver is the server name.)
    • Extract each of the tar files with the command tar xvfzp

      Ex. tar xvfzp TEST_apps_inst_myserver.tar.gz

  3. Configure the target system.
    • On the database tier execute adcfgclone.pl with the dbTechStack parameter.

      For example. /u01/DEV/db/tech_st/10.2.0/appsutil/clone/bin/adcfgclone.pl dbTechStack

      By passing the dbTechStack parameter we are tell the script to configure only the necessary $ORACLE_HOME files such as the init file for the new environment, listener.ora, database environment settings file, etc. It will also start the listener.

      You will be prompted the standard post cloning questions such as the SID of the new environment, number of DATA_TOPS, Oracle Home location, port settings, etc.

      Once this is complete goto /u01/DEV/db/tech_st/10.2.0 and execute the environment settings file to make sure your environment is set correctly.

      [oradev@myserver 10.2.0] . ./DEV_myserver.env

  4. Duplicate the source database to the target.
    • In order to duplicate the source database you'll need to know the scn value to recover to. There are two wasy to do this. The first is to login to your rman catalog, find the Chk SCN of the files in the last backupset of your rman backup and add 1 to it.

      Ex. Output from a rman> List backups
      .
      .
      List of Datafiles in backup set 55729
      File LV Type Ckp SCN Ckp Time Name
      ---- -- ---- ---------- --------- ----
      7 1 Incr 5965309363843 15-JUN-09 /u02/TEST/db/apps_st/data/owad01.dbf
      .

      .
      So in this case the SCN we would be recovery to is 5965309363843 + 1 = 5965309363844.

      The other method is to login to the rman catalog via sqlplus and execute the following query:

      select max(absolute_fuzzy_change#)+1,
      max(checkpoint_change#)+1
      from rc_backup_datafile;


      Use which ever value is greater.
    • Modify the db_file_name_convert and log_file_name convert parameters in the target init file. Example:

      db_file_name_convert=('/u02/PROD/db/apps_st/data/', '/u02/DEV/db/apps_st/data/',
      '/u01/PROD/db/apps_st/data/', '/u02/DEV/db/apps_st/data/')

      log_file_name_convert=(/u02/PROD/db/apps_st/data/', '/u02/DEV/db/apps_st/data/',
      '/u01/PROD/db/apps_st/data/', '/u02/DEV/db/apps_st/data/')

    • Verify you can connect to source system from the target as sysdba. You will need to add a tns entry to the $TNS_ADMIN/tnsnames.ora file for the source system.
    • Duplicate the database. Before we use rman to duplicate the source database we need to start the target database in nomount mode.

      Start rman:

      rman target sys/<syspass>@TEST catalog rman/rman@RMAN auxiliary /

      If there are no connection errors duplicate the database with the following script:

      run {
      set until scn 5965309363844;
      allocate auxiliary channel ch1 type disk;
      allocate auxiliary channel ch2 type disk;
      duplicate target database to DEV }


      The most common errors at this point are connection errors to the source database and rman catalog. As well, if the log_file_name_convert and db_file_name_convert parameters are not set properly you will see errors. Fix the problems, login with rman again and re-execute the script.

      When the rman duplicate has finished the database will be open and ready to proceed with the next steps.

    • Execute the library update script:

      cd $ORACLE_HOME/appsutil/install/DEV_myserver where DEV_myserver is the <context_name> of the new environment.

      sqlplus "/ as sysdba"@adupdlib.sql

      If your on linux replace with so, HPUX with sl and for windows servers leave blank.

    • Configure the target database

      cd $ORACLE_HOME/appsutil/clone/bin/adcfgclone.pl dbconfig

      Where is $ORACLE_HOME/appsutil/DEV_myserver.xml

  5. Configure the application tier.

    cd /u01/DEV/apps/apps_st/comn/clone/bin
    perl adcfgclone.pl appsTier

    You will be prompted the standard cloning questions consisting of the system base directories, which services you want enabled, port pool, etc. Make sure you choose the same port pool as you did when configuring the database tier in step 3.

    Once that is finished, initialize your environment by executing

    . /u01/DEV/apps/apps_st/appl/APPSDEV_myserver.env


  6. Shutdown the application tier.

    cd $ADMIN_SCRIPTS_HOME
    ./adstpall.sh apps/<source apps pass>

  7. Login as apps to the database and execute:

    exec fnd_conc_clone.setup_clean;

    I don't believe this step is necessary but if you don't do this you will see references to your source environment in the FND_% tables. Every time you execute this procedure you need to run autoconfig on each of the tiers (db and application). We will get to that in a second.

  8. Change the apps password. Chances are you don't want to have the same apps password as the source database, so its best to change it now while the environment is down.

    With the apps tier environment initialized:

    FNDCPASS apps/<source apps pass> 0 Y system/<source system pass>> SYSTEM APPLSYS <new apps pass>

  9. Run autoconfig on both the db tier and application tier.

    db tier:
    cd $ORACLE_HOME/appsutil/scripts/DEV_myserver
    ./adautocfg.sh

    Application Tier
    cd $ADMIN_SCRIPTS_HOME
    ./adautocfg.sh

  10. If there are no errors with autoconfig start the application. Your already in the $ADMIN_SCRIPTS_HOME so just execute:

    ./adstrtal.sh apps/<new apps pass>

  11. Login to the application and perform any post cloning activities. You may want to override the work flow email address so that notifications goto a test/dev mailbox instead of users. We always change the colors and site_name profile options, etc. More details can be found in Section 3: Finishing tasks of the R12 cloning document referenced earlier.


Thats it, hopefully now you have successfully cloning an EBS environment using rman duplicate.

Wednesday

R12 Bug: Compiling forms manually

Today I received a request to recompile a form. In R12 the method has changes slightly... In 11.5.x I used f60gen but in R12 you now have to use the executable frmcmp_batch.sh. For details see Note: 130686.1.

However, when I executed frmcmp_batch.sh I received an error:


[applmgr@myserver VIS]$ frmcmp_batch.sh module=./apps/apps_st/appl/au/12.0.0/forms/US/QPXPRLST.fmb
userid=apps/apps@VIS output_file=./apps/apps_st/appl/qp/12.0.0/forms/US/QPXPRLST.fmx
module_type=form compile_all=special

Forms 10.1 (Form Compiler) Version 10.1.2.0.2 (Production)

Forms 10.1 (Form Compiler): Release - Production

Copyright (c) 1982, 2005, Oracle. All rights reserved.

PL/SQL Version 10.1.0.5.0 (Production)
Oracle Procedure Builder V10.1.2.0.2 - Production
Oracle Virtual Graphics System Version 10.1.2.0.0 (Production)
Oracle Multimedia Version 10.1.2.0.2 (Production)
Oracle Tools Integration Version 10.1.2.0.2 (Production)
Oracle Tools Common Area Version 10.1.2.0.2
Oracle CORE 10.1.0.5.0 Production
ORA-12154: TNS:could not resolve the connect identifier specified

Form not created



I checked my environment and everything seemed ok. Sqlplus worked fine, etc. A Metalink search turned up Note: 431324.1 Manual forms compilation In R12 fails. Even tho the error isn't the same, it shows that frmcmp_batch.sh is also affected.

I haven't applied the patch yet because I could still use adadmin to recompile the form. But if I start receiving alot of requests then I will put it in.

Monday

R12: Changing apps password

In 11i there were a few steps in order to change the apps password.

1. Shutdown the environment.
2. execute FNDCPASS to change the apps password.
Ex. FNDCPASS apps/[oldpassword] 0 Y system/[system password] SYSTEM APPLSYS [new apps password]

3. Manually modify files such as appsweb.cfg and wdbsvr.app
4. Startup the environment.


In R12:

1. Shutdown the environment.
2. Execute FNDCPASS as above.
3. Run Autoconfig
4. Startup the environment.

I realized the process had changed when I looked at the wdbsvr.app file and noticed the following:


;
; $Header: wdbsvr.app 120.0.12000000.2 2007/06/29 11:43:45 sbandla ship $
;
; $AutoConfig$
;
; Not required in R12. Stubbing the file from %s_fndtop%/admin/template

Report Access in R12

As I mentioned in an earlier post, I am now working on an R12 implementation project. A user called me today with a report issue. I asked for the concurrent request id so that I could troubleshoot the issue on my end to make sure it wasn't an environment issue.

I noticed the "View Output" button was grayed out in the Concurrent -> Requests screen. In 11i there is a profile option Concurrent: Request Access Level, which allows you to set access privileges for report output files.

However, in R12 this profile option is now obsolete and has been replaced by RBAC (Role Based Access Control). Details can be found in Note: 563946.1, Note: 555524.1 or Chapter 6 of the Oracle Applications System Administrator's Guide - Configuration

For now i'll just go to the users desk because I don't have access to configure this at the moment. It seems like an awful amount of work tho for something that was handled by a profile option before.

Tuesday

Walk through – Installing R12

The following article describes at a medium-high level how to install an R12 Vision Demo environment. Each OS has different pre and post requirements so be sure to read the metalink notes specific for your environment.

The article has two sections, the first lists relevant documentation and Metalink notes. The second section provides installation steps with screenshots of each screen that you will see during the installation process. However, I didn’t detail every pre or post requirement performed because there are differences for various OSes and it could get confusing. I’ll mention the following a few times throughout this article: Make sure you follow the Metalink note for your OS.

Documentation Notes and Links:

Rapid Install Guide


Metalink Notes:

Linux x86 402310.1

Linux x86-64 (64-bit) 416305.1

HP-UX Itanium 402307.1

HP-UX PA-RISC 402308.1

IBM AIX 402306.1

Microsoft Windows 402311.1

Sun Solaris SPARC 402312.1

405565.1 – R12 Installation Guidelines. Contains upto date information which may not be included in the Rapid Install Guide.


549389.1 - Oracle Applications Release Notes, Release 12.0.4 – Contains information on latest Rapid Install patch.

Installation Steps:

  1. Create a user account. I will be using the account oravis which will be a member of the dba group. Some installations use two accounts, applmgr or appl<sid> for the E-Business Suite files and ora<sid> for the database account.

  2. Review your operating system specific metalink note and verify all OS requirements are met. This document can seem overwhelming if you are new to Oracle/E-Business Suite so take your time and read through it. In most cases, you’ll just need to summarize this note for your system administrator. Some of the key areas are:
    1. Confirm your operation system is supported.
    2. Confirm required patches/packages are applied.
    3. Confirm kernel settings.
    4. Modifying various configuration files depending on platform. (/etc/hosts, limits.conf, etc..)

      Each type of OS has different requirements, so make sure you review the appropriate metalink note (above) If you don’t have a system administrator, feel free to ask me questions. I’ll gladly help as best I can.

  3. Download R12 from Oracles eDelivery site, http://edelivery.oracle.com. Unzip the files to create your stage directory. You will need about 75GB of space.
    Note: You don’t have to download every archive listed. You only need to download upto the documentation files, which for version 12.0.4 is around 26 archives (Solaris version).

  4. Download the latest Rapid Install patch as described in Note 549389.1. At the time this article was written the latest patch is 6919017. Uncompress this file within your stage directory. Ie.
    1. $ cd Stage
      $ unzip –o p6919017_R12_GENERIC.zip

  5. Welcome Screen

    cd <Stage DIR>/startCD/Disk1/rapidwiz and launch the program rapidwiz:

    clip_image002
    Click on Next.

    NOTE: The Rapid Install Wizard for the unix or linux platform needs access to an X server. If your not executing rapidwiz from a local xterm on the server then you must export your display to a server in which you have X access. I use Hummingbird Exceed so I can view the GUI on my laptop but there are many other options available.

    For Exceed there are two ways to do this. The easiest way would be to use Exceeds Client Wizard to create a connection. This will automatically set your DISPLAY properties.
    The other option would be to launch Exceed manually, login to your server and set the DISPLAY variable to that of your PC’s IP address.

  6. Wizard Operation Screen

    clip_image004

    Select “Use Express Install” and click on Next. When Express Install is selected you will not be prompted for additional information which will allow you to customize the installation. Since this will be used for self training, it’s a perfect start.

  7. Oracle Configuration Manager

    clip_image006

    Select Decline followed by the Next button.

  8. Express Configuration Information

    Some of the fields below will be pre-populated. For those that aren’t fill them in.

    image

    Once you click on Next , Rapid Install Wizard will perform a system check.

  9. System Check Status

    clip_image010

  10. Pre-Install Checks

    Once the system check is complete you will be presented with a summary window. If any of the checks failed you can click on the red X and it will show you why. If all the checks are successful you will see the following screen:

    clip_image012

    When you click on Next the application will begin to install:

    clip_image014

  11. Post-Install Checks

    Once the install is complete the following window will appear. If you see any red X’s, click on them to get more information on the error. If everything was successful you will see the following window:

    clip_image016

    If everything was successful click Next

  12. Finish

    clip_image018

    The install is complete. Click on the Finish button to exit the Rapid Install Wizard.

  13. Verify

    You can either click on “Connect to Oracle Applications Release 12” button in step 12 or launch a web browser manually. For the URL enter:
    http://<servername>.<domain_name>:<Port number>/OA_HTML/AppsLogin
    <Port Number> is derived from the Port Pool we choose in Step 8 prefixed by the value 80. Since we choose 50 for the port pool, the port number above would be 8050. The following screenshot is of the login page:

    clip_image020

  14. Post-Install Tasks

    Each OS may have different post-installation tasks. For instance, if you installed the Vision Demo environment such as we have above, then you need to submit a concurrent request to build DQM indexes. In the case of Linux (OEL5 REL5), you will have to upgrade the 10.1.3 application server to 10.1.3.3

If you have gotten this far, then you have successfully installed an R12 Vision demo environment. If you have any questions, feel free to ask.