Monday, July 20, 2009

10gAS Backup and Recovery Tool

10gAS provides its backup and recovery tool that can be used for performing complete 10gAS backup.

First of all we should be aware of types of files consisting 10gAS.

Types of Files for Oracle Application Server Backup and Recovery:

(1) Oracle Software Files: These are static files such as oracle binaries and libraries. Files in $ORACLE_HOME(excluding config files)

(2) Configuration Files:
These files contain configuration information and deployed applications. These files are placed at $ORACLE_HOME/config
They are created at installation or runtime and are updated during the normal operation of your application server. There are 2 types of config file,
(i) Distributed Configuration Management (DCM) files: - contain configuration information for OHS, OC4J, OPMN, Logloader, and JAZN
(ii) Non-DCM files: - Portal and wireless etc
Backup and Recovery tool creates archives for each group separately.

(3) Metadata Repository Files: DBF and control files making the infra db.
(4) Oracle System Files: These files includes: files in /etc or /var/opt/oracle and OraInventory file.


Note: Your Oracle Application Server environment contains additional files to those mentioned in this section, such as log files; database configuration files, including orapwd, and spfile/pfile; and additional files you may deploy in the Oracle home, such as staticHTML files and CGI scripts. You can add any of these files to the backup list.

Types of Backups:

(1) Image Backup: Image backup include backup of whole 10gAS. Image backup is generally used for node restore. An image backup of an Oracle Application Server instance includes the Oracle Home directory of that instance, the OraInventory directory, the oratab file, and Windows registries on that node and finally a cold instance backup of that Oracle Application Server instance

(2) Instance Backup: Following files can be backed up using this backup strategy: Configuration files(both DCM managed or Non-DCM managed) , Oracle metadata repository(hot or cold backup),

Note: You cannot take backup of Oracle Software files (oracle home excluding config files) and Oracle system files(like oraInventory, files in /var/opt/oracle etc) under instance backup strategy. Frankly, config and metadata repository files are the only important files that can easily bring back your 10gAS instance in stable state in case of any problem.

Oracle Application Server backup input file:
Oracle application server keeps track of its configuration files with the help of .inp files placed at $ORACLE_HOME/backup_restore/config directory. During the backup and restore process, backup and restore tool checks these inp files for backup/restoring files included in it.

Recommended Backup Strategy:
(i) Perform complete Image backup:-
(a) This should be done as soon as you install the 10gAS.
(b) After making any major changes: - it includes changes at software level (i.e. software system upgrade), Operating system upgrade, patch application.
(ii) Perform Instance Backup: - Instance backup should be taken on regular basis. This enables you to restore your environment to consistent state in case of any corruption.

Using Backup and Recovery Tool:
Backup and recovery related files are placed at $ORACLE_HOME/backup_restore

Configuring Backup and Recovery tool manually:
Prior to running backup_restore.sh for taking backup you need to specify following parameters in config.inp file placed at $ORACLE_HOME/backup_restore/config
Log File Directory(log_path)
Config file backup directory(config_backup_path)
Database backup directory(database_backup_path)

Configure the tool by running below mentioned command:
./bkp_restore.sh -m configure
That’s it, your backup and recovery tool is configured and you are good to start using your tool for back up or recovery activity

Usage Examples of Backup and Restore tool:

(1) Configure Tool: ./bkp_restore.sh -m configure

(2) Backup – Instance backup

(i) Perform full configuration file backup:
bkp_restore.sh -v -m backup_config

(ii) Perform an incremental configuration file backup:
bkp_restore.sh -v -m backup_config_incr

(iii) Perform a full cold backup of the Metadata Repository:
bkp_restore.sh -m backup_cold

(iv) Perform a level 2 incremental cold backup of Metadata Repos:
bkp_restore.sh -m backup_cold_incr -l 2

(v) Perform a full online backup of Metadata Repos:
bkp_restore.sh –m backup_online

(vi) Perform a level 2 incremental online backup of Metadata Repos:
bkp_restore.sh –m backup_online_incr –l 2

(vii) Perform a cold backup of an Oracle Application Server instance: This will take care of both configuration file and metadata repos.
bkp_restore.sh –m backup_instance_cold

(viii) Perform an online backup of an Oracle Application Server instance:
This will take care of both configuration file and metadata repos.
bkp_restore.sh –m backup_instance_online

(ix) Perform a incremental cold backup of an Oracle Application Server instance:
bkp_restore.sh –m backup_ instance_cold_incr -l level

(x) Perform an incremental online backup of an Oracle Application Server instance:
bkp_restore.sh –m backup_ instance_online_incr –l level


(3) Backup – Image Backup

(i) Node Backup Preparation:
Run the following command to prepare a node for backup:
bkp_restore.sh -m node_backup -o prepare

(ii) Creating an Image Backup of the Instance:
This task creates an archive of an instance that includes the Oracle home, oratab, central inventory, Windows registries and so forth. On UNIX, the command must be run from root. Run the following command to create an image backup of the instance:
bkp_restore.sh -m node_backup -o image_backup -P archive path


Restore – Instance Backup
(i) Restore configuration File:
bkp_restore.sh -m restore_config -t 2004-09-21_06-12-45
(ii) Restore Metadata Repository to most recent state:
bkp_restore.sh -m restore_repos
(iii) Restore Metadata Repository to a particular time:
bkp_restore.sh -m restore_repos -u 07/26/2003_13:45:06
(iv) Flashback Metadata Repository to particular point in time:
bkp_restore.sh -m flashback_repos -u 07/26/2003_13:45:06
(v) Restore an Oracle Application Server instance to its state at a particular time and include the control file in the restore:
bkp_restore.sh -m restore_instance -t 2004-09-21_06-12-45 –c

Remove partner application name after de-registration

After de-registering an application from OID, "Oracle Application Single Sign On" page (http://my10gAS:7777/pls/orasso) still shows de-registered application name as its partner application. It gives wrong picture.

How to remove de-registered application from "Oracle Application Single Sign On" page (http://my10gAS:7777/pls/orasso)?

(i) Enter http://my10gAS:7777/pls/orasso using orcladmin user.
(ii) Go to the SSO administration page
(iii) Go to server administration > Administer Partner Application
(iv) You can see delete icon against de-registered application. Click it and that’s all.
Next time accessing SSO page will not show de-registered applications.

10gAS Environment File (for Solaris only)

Installer doesn’t create environment file after 10gAS installations. Environment file needs to be created manually.

Create an environment file and put below mentioned entries to it.
10gAS environment file should contain following entries:
(i) LD_LIBRARY_PATH => $ORACLE_HOME/lib32
(ii) LD_LIBRARY_PATH_64 => $ORACLE_HOME/lib
(iii) ORACLE_HOME => Set to the full path of the installation’s Oracle home
(iv) ORACLE_SID => Set to Metadata Repository name (db sid) specified during installation.
(v) PATH => Following path should be assigned to this parameter:
$ORACLE_HOME/bin
$ORACLE_HOME/dcm/bin
$ORACLE_HOME/opmn/bin

OIM(10.1.4.0) or 10gAS kernel parameter bug for solaris 10

Issue: The objective is to install Oracle Application Server 10g Rel 2 or Identity Management 10.1.4.0.1 on Sun Solaris 10.During the system validation phase the Oracle Universal Installer (OUI) throws a 'FileNotFoundException' when checking for the system kernel parameters.

Resolution: Add follwowing entries in/etc/system file

set semsys:seminfo_semmni=100
set semsys:seminfo_semmns=256
set semsys:seminfo_semmsl=256
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10

Bounce the Solaris box.

How to log on as orcladmin in WNA integrated environment?

How to log on as orcladmin in WNA integrated environment?

Workaround I have found so far is to disable WNA for the time being.In IE, it is located in the Advanced Options (Enable Integrated Windows Authentication, under Security)

OID Crashed (Non-Recoverable) Case Study

OID Crashed (Non-Recoverable) Case Study

Scenario: OID server got crashed and there is no way to recover it in near time (i.e. media got crashed)
Impact: In case OID server got crashed, none of the E-BIZ user will be able to use it. It can cause serious business impact
Recovery plan: Best way to come-over this problem in lesser amount of time is below:
Step 1) De-register SSO from E-BIZ.
(i) Go to $FND_TOP/bin
(ii) Run txkrun.pl -script=SetSSOReg -deregister=Yes -removereferences=Yes--- (this script will prompt you for some info regarding password of different schemas and utility, imp thing is it will ask you for orasso schema password, orasso schema password is not written in any log file or base table it need to be retrieved using some script and that need to be run on OID server, as in our case OID server is completely lost, but luckily we remember ORASSO password, so it is useful to save such password).
Above script will first remove references of OID from E-BIZ, then it will try connecting OID and removing E-BIZ references from there, last step is to revert SSO related profiles option at site level to non-sso values.
In our scenario as OID server is not there so running de-register will do E-BIZ part only since it will not be able to connect OID server and hence step 2 and 3 is not possible.

Step 2) After running de-register script if you try connecting E-BIZ front-end, it will throw some SSO error for AppsLocalLogin page. Cause behind this is SSO related profile options at SITE level has not been changed and apache is still diverting authentication activity to SSO.
To come over this: Login into application using sysadmin local login page, sysadmin credentials and change following profile options at site level.
Applications SSO Login Typesà Local
Applications SSO Typeà SSWA
Applications SSO Auto Link Userà Disabled
Changing above profile option will not call SSO server for user authentication.

Step 3) Now you will be able to see user login screen but will not be able to login, this is because user password has been set to External in fnd_user table in 11i db. Reason behind password being set to external in fnd_user, is at time when you enable SSO for external authentication, fnd_user user_guid gets populated and password field gets populated with text "External" , it means that this user will not be authenticated with 11i db but authorized.
To come over this
(i) Go to $FND_TOP/patch/115/sql and run fndssouu.sql user_name for all users…other way is to update user_guid field of all users to null in fnd_user table
(ii) Now Next step is to change password of all users using FNDCPASS utility.
Now your users will be able to login fine.

*************************************************************************************************************
References:
What happens when you run "txkrun.pl -script=SetSSOReg -deregister=Yes"?
Above script is to deregister SSO & OID from Apps & 10g AS Infrastructure Tier. Here are steps in background
SSO validation phase - Above script
i) Checks if ssosdk schema existsii) Checks if script can connect to orasso schema in SSO databaseiii) Checks if script can connect to apps schema in apps database
OID Validation Phase - Above script
iv) Checks if script can bind to LDAP (OID) server using SSL OID portv) Validates orcladmin password in OID using ldapbindvi) Checks if orcladmin account can delete entry in OID (not actually deleting any entry)vii) Validates Apps Name, Service Name, Instance Password and ACCOUNTS from OID
SSO deregistration Phase - Above scriptviii) Extract ssosdk_902.zipinto $APPLRGF/sso/sso/902sdkix) Checks if any partner application (Apps Framework Agent) already registeredx) Removes entry (partner application related to apps) from SSO (SSOSDK in 11i & ORASSO in SSO Server) using "java oracle.security.sso.enabler.SSORegistrar -mode REMOVE…".OID Deregistration Phase - Above scriptxi) Checks provisioning profile which are candidate for deregistration and create LDIF file of type $APPLRGF/ sso/ RemoveGUID_$GUID_$Day$dd_$timestamp.ldif using template file $FND_TOP/admin/template/ProvDeRegistration.tmpxii) Runs ldapdelete using above ldif file to delete any provisioning profile from OIDxiii) Creates ldif file of format DeRegistration_$Day$dd_$timestamp.ldif to list application to deregister from OID and then run ldapdelete to delete application (11i/r12) from OID
Log file location for registering/deregistering: $COMMON_TOP/rgf/$CONTEXT_NAME/sso

OID

Cloning Oracle E-BIZ Suite integrated with 10gAs (OID)

Purpose: This is outline document for cloning E-BIZ Suite that is integrated with OID (10gAS)
Process:
Step 1: Before cleaning up the file-system on target(say TEST), You should de-register the OID server that current system is using
Below command will be able to achieve same:
txkrun.pl -script=SetSSOReg -deregisteroid=Yes (at $FND_TOP/bin)

Step 2: Cleanup File-system, restore backup and follow normal cloning process( i.e. cloning process for standalone E-BIZ suite)

Step 3: Remove Source system(ACCT) references from various tables/config files on newly cloned environment
Below command will be able to achieve same:
txkrun.pl -script=SetSSOReg -removereferences=yes (at $FND_TOP/bin)

Step 4: Update fnd_user table and make user_guid for all user to null. It can be achieved in two ways:
(i) Create a script that should be capable of running $FND_TOP/patch/115/sql/fndssouu.sql by passing username for all users defined in fnd_user as parameter. fndssouu.sql will solve two purposes, one is making user_guid column of user null in fnd_user, secondly clearing workflow related cache for that user from the system.
(ii) This approach is simple but above one is best( update user_guid column of fnd_user table to null)

Step 5: Now cloning is done, next thing is to register newly cloned environment with existing development OID server. Below mentioned script will help you in achieving same:
txkrun.pl -script=SetSSOReg -registeroid=Yes -provtmp=$FND_TOP/admin/template/ProvBiDirection.tmp
This script will ask you for different parameter.

Note: ORASSO password can be recovered by running following command on OID server:
$ORACLE_HOME/bin/ldapsearch -h \-p \-D "cn=orcladmin" \-w \-b "cn=IAS,cn=Products,cn=OracleContext" \-s sub \-v "OrclresourceName=orasso" grep orclpasswordattribute

Encounter with Oracle ADI
Oracle ADI and its integration with E-Business Suite


Oracle ADI is a spreadsheet-based extension to Oracle Applications that offers full
cycle accounting and asset management within the comfort and familiarity of a
spreadsheet. Oracle ADI combines a spreadsheet’s ease of use with the power of
Oracle Applications, to provide true desktop integration during every phase of
your accounting cycle. You can create budgets, record transactions, add assets,
reconcile inventory, and run financial statements and inventory reports all without
leaving your spreadsheet.
You can run Oracle ADI as a stand-alone application, without installing the full
client version of Oracle General Ledger (GL) or Oracle Assets on your PC. This
gives you the ability to confirm and reconcile inventory, revise budgets, create
journal entries, and define financial and asset reports from any location, without
being connected to your server. You only need to connect when you want to
transfer data to or from Oracle Applications.

DBA perspective: - From DBA point of view, fundamentals are quite simple, For publishing report, ADI will take value of profile option "RRA: Service Prefix" from e-biz and connect it with node name from fnd_concurrent_request table for that particular request. Say, I have my CP tier on svaasun27-dc (hostname) and RRA:prefix profile option set to FNDFS_ then ADI will search for FNDFS_svaasun27-dc in its tnsnames.ora( i.e c:/orant/network/admin or c:/orant/net80/admin) and produce the output file.
Your tnsnames.ora and sqlnet.ora on client and server side should exactly match for instance and FNDFS_hostname entry.
Install ADI: - ADI can be installed on users machine using patch from metalink. Oracle ADI 7.2 base release patch is 3966101. Current version of ADI is 7.2.11.07.29(patch 7286213). Installation is straight forward. Just go through the patch readme and that’s all.
Integrate ADI with Oracle Application E-Business Suite: -
Changes to be done as part of Oracle ADI.
Edit tnsnames.ora file at c:/orant/network/admin and put tns entries of your ebusiness suite server.
Basically two entries are required(per instance), one for resolving instance name while connecting to E-Business Suite(initial sign on) and other for publishing report, viewing out and log file. This entry should be like FNDFS_hostname.

Sample tnsnames.ora:
#for initial sign-on
EBUSP = (DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=svaasun27-dc)(PORT=1531))
(CONNECT_DATA=(SID=EBUSP))
)
#for publishing report, viewing out and log files.
FNDFS_svaasun27-dc = (DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=svaasun27-dc)(PORT=1636))
(CONNECT_DATA=(SID=FNDFS))
)

Edit sqlnet.ora file at c:/orant/network/admin. Sample file
AUTOMATIC_IPC = OFF
TRACE_LEVEL_CLIENT = OFF
names.directory_path = (TNSNAMES)
names.default_domain = uk.vtg
name.default_zone = uk.vtg
names.default_domain=uk.vtg
Copy tnsnames.ora and sqlnet.ora from c:/orant/network/admin to c:/orant/net80/admin
Changes to be done as part of E-BIZ: - Change "RRA: Service Prefix" profile option at site level to FNDFS_
Using ADI: - You will get following icons on your machine once ADI has been installed.
Click on Application Desktop integrator button and below screen will be presented to you.

Click on "hand" icon
If this is fresh installation then you need to define database connect string in ADI
Click on Cylinder button and database details screen will be presented to you:
NAME: Any name as per your convenience
Description: As per convenience
GWYUID: applsyspub/pub in most of the cases.
FNDNAM: apps
Connect String: E-BIZ database connect string
NCA Connection: - Not Required
Server ID: - Not required in most of the case but if required take this value from dbc file located on e-biz server at $FND_TOP/secure

Click on tick button and signon details screen will be presented to you.
Username: E-BIZ application user name
Passowrd: Password of username used for connecting ADI
Database: Select your E-BIZ instance name from drop down
After providing details you will get below screen:
If above screen continue to appear for more then couple of minutes then you are hitting bug and need to upgrade ADI. Check metalink for more.
Click on "Submit Report" green button i.e. first button from upper-left
click at Report area
select report
click on "tick" button at upper-right corner
Click ok
on pending tab you can view your request running normal
for publishing report click yes


Useful Metalink Note ID’s for troubleshooting:
Note.117012.1 - Troubleshooting the "Error Occurred While Attempting to Establish an Applications File Server Connection"
Note.469724.1 Ext/Mod Cannot View Published Report In Request Center Gen
Note.311349.1 Ext/Pub Not able to to publish reports when connecting to other Application Instances on the same Application Server
Note.201492.1 Ext/Pub ADI RRA Prefix When Connecting to Server with Multiple Apps Instances