Pages

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

Friday, March 7, 2014

Multiple Sets of Books is not compatible with MultiOrg

adadmin error
Error in addgbc():
Multiple Sets of Books is not compatible with MultiOrg



The issue is caused by the following setup:

Duplicate entries for BSDK Bestseller application in FND_PRODUCT_INSTALLATIONS table.

+++++++++++++++++++++++++++++++++++++++++++++++++++++

When the following queries are executed, two entries are found for the same application in FND_PRODUCT_INSTALLATIONS table with same application name and application id but different oracle id.

1 . SELECT APPLICATION_ID,COUNT(*)
FROM FND_PRODUCT_INSTALLATIONS
GROUP BY APPLICATION_ID
HAVING COUNT(*) > 1;
----------------------------------------------------------
Upon execution the result will be as follows:

APPLICATION_ID COUNT(*)
-------------- ----------
20023 2

----------------------------------------------------------

2. SELECT FPI.APPLICATION_ID, FPI.ORACLE_ID, FAL.APPLICATION_NAME
FROM FND_PRODUCT_INSTALLATIONS FPI, FND_APPLICATION_TL FAL
WHERE FPI.APPLICATION_ID= "<--this value will be obtained from the above query-->"
AND FPI.APPLICATION_ID = FAL.APPLICATION_ID;
----------------------------------------------------------
Upon execution the result will be as follows:-

APPLICATION_ID  ORACLE_ID APPLICATION_NAME
-------------- ---------- --------------------------------------------------
         20023        900 XXX Custom Application
         20023      20044 XXX Custom Application


Note: The data over here is customer specific, it may be different for case to case basis.
--------------------------------------------------------


Solution

SELECT LAST_UPDATE_DATE, APPLICATION_ID, STATUS, ORACLE_ID FROM
FND_PRODUCT_INSTALLATIONS WHERE APPLICATION_ID = <--this value is customer specific-->;

NOTE: There will be two duplicate entries in the FND_PRODUCT_INSTALLATIONS table.

SQL> /

LAST_UPDATE_DATE   APPLICATION_ID S  ORACLE_ID
------------------ -------------- - ----------
12-SEP-13                   20023 I        900
12-SEP-13                   20023 I      20044

3. In the FND_PRODUCT_INSTALLATIONS table, check for the STATUS = 'L' for each application which from the above query when executed.

4. Remove the application which has values for STATUS = 'L' and application_id same as the other one.

(STATUS =>, I means installed, L means custom, N means not installed, and S means installed as shared product in FND_PRODUCT_INSTALLATIONS table).

5. Take backup of FND_PRODUCT_INSTALLATIONS table (either with export or with create table)

6. SQL> delete from FND_PRODUCT_INSTALLATIONS where APPLICATION_ID= 20023 and ORACLE_ID=20044;

7. SQL> SELECT FPI.APPLICATION_ID, FPI.ORACLE_ID, FAL.APPLICATION_NAME FROM FND_PRODUCT_INSTALLATIONS FPI, FND_APPLICATION_TL FAL WHERE FPI.APPLICATION_ID=20023 AND FPI.APPLICATION_ID = FAL.APPLICATION_ID;

    APPLICATION_ID  ORACLE_ID APPLICATION_NAME
    -------------- ---------- --------------------------------------------------
             20023        900 XXX Custom Application
   
    SQL> SELECT APPLICATION_ID,COUNT(*)
    FROM FND_PRODUCT_INSTALLATIONS
    GROUP BY APPLICATION_ID
    HAVING COUNT(*) > 1;  2    3    4
   
    no rows selected

8. SQL> commit

Reference Note id: Error in addgbc(): Multiple Sets of Books is not compatible with MultiOrg (Doc ID 1163458.1)



Sunday, December 8, 2013

How to Clone Oracle Inventory if existing Oracle Inventory corrupted

 Cloning Oracle Inventory

perl <ORACLE_HOME>/clone/bin/clone.pl ORACLE_BASE=/sid/oracle/product ORACLE_HOME=/sid/oracle/product/112 ORACLE_HOME_NAME=<home name>

If you get error like 'Oracle home already exist' first detach the home with the below syntax and try clone.pl script.

cd $ORACLE_HOME/oui/bin
./runInstaller -silent -detachHome -invPtrLoc /sid/oracle/product/112/oraInst.loc ORACLE_HOME="/sid/oracle/product/112" ORACLE_HOME_NAME="home name"

You can get the existing home name in inventory.xml (under /sid/oracle/oraInventory/ContentsXML)

Example

-bash-3.2$ ./runInstaller -silent -detachHome -invPtrLoc /sid/oracle/product/112/oraInst.loc ORACLE_HOME="/sid/oracle/product/112" ORACLE_HOME_NAME="home name"

Starting Oracle Universal Installer...


Checking swap space: must be greater than 500 MB.   Actual 283059 MB    Passed

The inventory pointer is located at /sid/oracle/product/112/oraInst.loc

The inventory is located at /sid/oracle/oraInventory
'DetachHome' was successful.
-bash-3.2$



-bash-3.2$ perl /sid/oracle/product/112/clone/bin/clone.pl ORACLE_BASE=/sid/oracle/product ORACLE_HOME=/sid/oracle/product/112 ORACLE_HOME_NAME=<home name>

./runInstaller -clone -waitForCompletion  "ORACLE_BASE=/sid/oracle/product"
"ORACLE_HOME=/sid/oracle/product/112" "ORACLE_HOME_NAME=home name"
-silent -noConfig -nowait
Starting Oracle Universal Installer...


Checking swap space: must be greater than 500 MB.   Actual 283058 MB    Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-12-07_01-40-37AM. Please
wait ...Oracle Universal Installer, Version 11.2.0.3.0 Production

Copyright (C) 1999, 2011, Oracle. All rights reserved.


You can find the log of this install session at:

 /sid/oracle/oraInventory/logs/cloneActions2013-12-07_01-40-37AM.log

....................................................................................................
 100% Done.



Installation in progress (Saturday, December 7, 2013 1:40:57 AM CST)

...............................................................................                   
                             79% Done.
Install successful


Linking in progress (Saturday, December 7, 2013 1:41:27 AM CST)

Link successful


Setup in progress (Saturday, December 7, 2013 1:44:02 AM CST)
Setup successful


End of install phases.(Saturday, December 7, 2013 1:44:32 AM CST)

WARNING:A new inventory has been created in this session. However, it has not yet been registered
as the central inventory of this system.

To register the new inventory please run the script '/sid/oracle/oraInventory/orainstRoot.sh'
with root privileges.

If you do not register the inventory, you may not be able to update or patch the products you
installed.
The following configuration scripts need to be executed as the "root" user.

/sid/oracle/oraInventory/orainstRoot.sh
/sid/oracle/product/112/root.sh

To execute the configuration scripts:
    1. Open a terminal window

    2. Log in as "root"
    3. Run the scripts


The cloning of OraDb11203_ was successful.

Please check '/sid/oracle/oraInventory/logs/cloneActions2013-12-07_01-40-37AM.log' for more details.

ORA-01031: insufficient privileges error when connecting as SYSDBA

SYSDBA OS Authentication

The OS authentication is the process of verifying the identity of the user connecting to the database with the information managed by the OS. An OS user is able to use this authentication method if the following conditions are met:

1. The  user is a member of a special group.
2. the OS authentication is allowed by the server settings(sqlnet.authentication_services is set correctly)

The OS user should belong to the OSDBA group in order to login as sysdba. On Unix the default name of these group is dba. On Windows the name of the group is ORA_DBA.  

On Unix Parameter sqlnet.authentication_services must be set to (ALL) or to (BEQ, <other values>) for this to work. On Windows this parameter must be set to (NTS).

3. Check the value of the SQLNET.AUTHENTICATION_SERVICES parameter in file $ORACLE_HOME/network/admin/SQLNET.ORA

On Unix

This parameter should not be set if no strong authentication method is used. If such a method is being used then set the parameter to one of the following values:

SQLNET.AUTHENTICATION_SERVICES = (ALL)
or
SQLNET.AUTHENTICATION_SERVICES = (BEQ,<the strong auth method>)
Where  <the strong auth method> can be any combination of the following values: TCPS, KERBEROS5, RADIUS

NOTE: If the definition of SQLNET.AUTHENTICATION_SERVICES is preceded by a leading blank space, an ORA-1031 error may occur

On Windows

This parameter should be set to NTS:
SQLNET.AUTHENTICATION_SERVICES = (NTS)

If needed you can add other strong authentication methods besides NTS:
SQLNET.AUTHENTICATION_SERVICES = (NTS,TCPS)


SYSDBA Password File Authentication


The credentials provided when connecting remotely as sysdba are compared to the contents of the passwordfile.
Password file authentication is enabled by setting the database parameter remote_login_password file to "shared" or "exclusive".

SQL> alter system set remote_login_passwordfile=exclusive scope=spfile;

1. Check whether the OS user is part of the OSDBA group.

A. See what are the groups of the user:

[oracle@seclin4 ~]$ id
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba) context=user_u:system_r:unconfined_t

B. See what is the OSDBA group defined in file $ORACLE_HOME/rdbms/lib/config.[cs]

$ id
$ cd $ORACLE_HOME/rdbms/lib
$ cat config.c or config.s (depending on platform)
 If they do not match output from id command then the solution is:

2) The 'dba' group in the file config.s is set to 'xxx' but your primary group is 'yyy', so to solve the problem, please do the following:
    a)  shutdown all databases running from this home

    b)  $ cd $ORACLE_HOME/rdbms/lib

    c)  $ vi config.c

Example for Linux:

[oracle@seclin4 ~]$ cat $ORACLE_HOME/rdbms/lib/config.c

/* SS_DBA_GRP defines the UNIX group ID for sqldba adminstrative access. */
/* Refer to the Installation and User's Guide for further information. */

/* IMPORTANT: this file needs to be in sync with
rdbms/src/server/osds/config.c, specifically regarding the
number of elements in the ss_dba_grp array.
*/

#define SS_DBA_GRP "dba"
#define SS_OPER_GRP "dba"
#define SS_ASM_GRP ""

char *ss_dba_grp[] = {SS_DBA_GRP, SS_OPER_GRP, SS_ASM_GRP};

Example for AIX:

[celcaix3]/grdbms/64bit/app/oracle/product/1120/rdbms/lib> cat config.s
# SS_DBA_GRP defines the UNIX group ID for sqldba adminstrative access.
# Refer to the Installation and User's Guide for further information.

.rename H.10.NO_SYMBOL{TC},""
.rename H.11.NO_SYMBOL{TC},""
.rename H.12.NO_SYMBOL{TC},""
.rename H.13.NO_SYMBOL{RO},""
.rename H.14.NO_SYMBOL{RO},""
.rename H.15.NO_SYMBOL{RO},""
.rename H.16.ss_dba_grp{TC},"ss_dba_grp"

.lglobl H.13.NO_SYMBOL{RO}
.lglobl H.14.NO_SYMBOL{RO}
.lglobl H.15.NO_SYMBOL{RO}
.globl ss_dba_grp{RW}

# .text section

# .data section

.toc
T.16.ss_dba_grp:
.tc H.16.ss_dba_grp{TC},ss_dba_grp{RW}
T.10.NO_SYMBOL:
.tc H.10.NO_SYMBOL{TC},H.13.NO_SYMBOL{RO}
T.11.NO_SYMBOL:
.tc H.11.NO_SYMBOL{TC},H.14.NO_SYMBOL{RO}
T.12.NO_SYMBOL:
.tc H.12.NO_SYMBOL{TC},H.15.NO_SYMBOL{RO}
.csect ss_dba_grp{RW}, 3
.llong H.13.NO_SYMBOL{RO}
.llong H.14.NO_SYMBOL{RO}
.llong H.15.NO_SYMBOL{RO}
# End csect ss_dba_grp{RW}
.csect H.13.NO_SYMBOL{RO}, 3
.string "dba"
# End csect H.13.NO_SYMBOL{RO}
.csect H.14.NO_SYMBOL{RO}, 3
.string "dba"
# End csect H.14.NO_SYMBOL{RO}
.csect H.15.NO_SYMBOL{RO}, 3
.string ""
# End csect H.15.NO_SYMBOL{RO}
.llong 0x00000000

# .bss section


Example for Solaris:

        .section        ".text",#alloc,#execinstr
/* 0x0000          7 */         .file   "x.c"
        .section        ".data",#alloc,#write
/* 0x0000          9 */         .global ss_dba_grp
/* 0x0000         10 */         .align  8
                       .global ss_dba_grp
                       ss_dba_grp:
/* 0x0000         17 */         .align  8
/* 0x0000         18 */         .xword  (.L12+0)
/* 0x0004         24 */         .align  8
/* 0x0004         25 */         .xword  (.L13+0)
/* 0x0008         26 */         .type   ss_dba_grp,#object
/* 0x0008         27 */         .size   ss_dba_grp,16
        .section        ".rodata1",#alloc
/* 0x0008         13 */         .align  8
                       .L12:
/* 0x0008         15 */         .ascii  "dba\0"
/* 0x0014         20 */         .align  8
                       .L13:
/* 0x0014         22 */         .ascii  "dba\0"


C) now remove the existing config.o:

                  mv config.o config.old

D)  Check if  updated config.c/config.s can be relinked successfully by running below command        

            $ make -f ins_rdbms.mk config.o
            $ ls -al config.o

E) relink oracle to rebuild config.o and store it inside the oracle executable:

           $ make -f ins_rdbms.mk ioracle

F) Try login '/ as sysdba' again.


On Windows

When using OS authentication on Windows the OS user must be a member of one of the following two groups:

ORA_DBA
ORA_<%ORACLE_SID%>_DBA
The membership to the second group allows the OS user to use OS authentication while connecting to the instance with the name %ORACLE_SID%> only.

Check whether the OS user is a member of any of these two local groups:

Get the name of the OS user:


D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN>echo %username%
dbadmin

Obtain the list of the members of the local group:


D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN>NET LOCALGROUP ORA_DBA
Alias name ORA_DBA
Comment Members can connect to the Oracle database as a DBA without a password
Members
-------------------------------------------------------------------------------
dbadmin
NT AUTHORITY\SYSTEM
The command completed successfully.

D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN>set oracle_sid=d1v10204

D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN>NET LOCALGROUP ORA_%ORACLE_SID%_DBA
Alias name ORA_d1v10204_DBA
Comment Members can connect to instance d1v10204 as a DBA without a password
Members
-------------------------------------------------------------------------------
dbadmin
The command completed successfully.

For more information please review the Nots Ids: 400459.1 , 730067.1

Monday, September 23, 2013

WFLOAD syntax for UPLOAD and DOWNLOAD

1. Navigate to the Submit Requests form in Oracle Applications to submit the Workflow Definitions Loader concurrent program. When you install and set up Oracle Applications and Oracle Workflow, your system administrator needs to add this concurrent program to a request security group for the responsibility that you want to run this program from.

2. Submit the Workflow Definitions Loader concurrent program as a request.

3. In the Parameters window, enter values for the following parameters:

Mode         Specify "Download" to download a process definition from the database to a flat file.
        Specify "Upgrade" to apply a seed data upgrade to a database from an input file. The Workflow Definitions Loader assumes the access level of the file's creator (seed data provider) and overwrites any objects protected at a level equal to or above the upgrade file's access level. The Loader program preserves any customizations made to customizable seed data in the database.
        Specify "Upload" to load a process definition from a flat file into the database. The upload mode is useful to someone who is developing a workflow process. It allows the developer to save definitions to the database without concern that accidental customizations to existing objects might prevent the upload of some process definition elements. The Workflow Definitions Loader uses the access level defined by the input file to upload the process definitions from the file and therefore will overwrite objects in the database that are protected at a level equal to or higher than that file's access level.
        Specify "Force" to force an upload of the process definitions from an input file to a database regardless of an object's protection level You should be certain that the process definition in the file is correct as it overwrites the entire process stored in the database. The Force mode is useful for fixing data integrity problems in a database with a known, reliable file backup.

File         Specify the full path and name of the file that you want to download a process definition to, or upgrade or upload a process definition from.

Item Type     If you set Mode to "Download", use the List button to choose the item type for the process definition you want to download.

4. Choose OK to close the Parameters window.

5. When you finish modifying the print and run options for this request, choose Submit to submit the request.

6. Rather than use the Submit Requests form, you can also run the Workflow Definitions Loader concurrent program from the command line by entering the following commands:

    To upgrade-- WFLOAD apps/pwd 0 Y UPGRADE file.wft

    To upload-- WFLOAD apps/pwd 0 Y UPLOAD file.wft

    To force-- WFLOAD apps/pwd 0 Y FORCE file.wft

    To download-- WFLOAD apps/pwd 0 Y DOWNLOAD file.wft ITEMTYPE1 [ITEMTYPE2 ...ITEMTYPEN]

    Replace apps/pwd with username and password to the APPS schema, replace file.wft with the file specification of a workflow process definition file, and replace ITEMTYPE1, ITEMTYPE2, ... ITEMTYPEN with the one or more item type(s) you want to download. You can also download all item types simultaneously by replacing ITEMTYPE1 with '*' (make sure you enclose the asterisk in single quotes).

Sunday, September 8, 2013

Responsibilities missing in Oracle Applications

Some Tested hints

1. Make sure that the latest ATG_RUP patch has been applied.
2. Run Concurrent Program System: Administrator Responsibility->Request->'Synchronize WF LOCAL tables'
3. Run Concurrent Program: 'Workflow Directory Services User/Role Validation'. (with the parameters 10000,Y,N,N and 10000,N,Y,N)
4. Restart the Workflow Agent Listeners: WF_DEFERRED and WF_JAVA_DEFERRED

Check the responsibilities for the user, if the issue still exist do the following steps

1). Run the following script to check if there is a discrepancy between the tables:

select ura.user_name, ura.role_name
from wf_local_user_roles ur, wf_user_role_assignments ura
where ur.user_name = ura.user_name
and ur.role_name = ura.role_name
and ura.relationship_id = -1
and ((ur.effective_start_date is null or ur.effective_start_date <>
ura.effective_start_date)
or (ur.effective_end_date is null or ur.effective_end_date <> ura.effective_end_date));

If the above script returns any rows, proceed to the next step.

2) One must take a backup of the two tables :

WF_LOCAL_USER_ROLES
and
WF_USER_ROLE_ASSIGNMENTS

3) Run the following update script to correct the discrepancy :

UPDATE WF_USER_ROLE_ASSIGNMENTS set effective_end_date = to_date(null)
where rowid in (select ura.rowid
                from wf_local_user_roles ur, wf_user_role_assignments ura
                where ur.user_name = ura.user_name
                  and ur.role_name = ura.role_name
                  and ura.relationship_id = -1
                  and ((ur.effective_start_date is null or ur.effective_start_date <>ura.effective_start_date)
                  or (ur.effective_end_date is null or ur.effective_end_date <>ura.effective_end_date)));


4) Run the "Workflow Directory Services User/Role Validation" concurrent program to resolve the issue.

5. Re-test the issue.

Monday, May 20, 2013

Forms Servlet or Socket Mode

Many products within the Oracle E-Business Suite have screens that are built with Oracle Forms.  Oracle Forms can be run in either servlet mode or socket mode.  Apps 11i is based on Forms 6i and is configured to run in socket mode by default.  Apps 12 is based on Forms 10g and is configured to run in servlet mode by default.

Forms Servlet Mode

The Forms Listener Servlet is a Java servlet that delivers the ability to run Oracle Forms applications over HTTP and HTTPS connections. It manages the creation of a Forms Server Runtime process for each client, as well as network communications between the client and its associated Forms Server Runtime process.

The desktop client sends HTTP requests and receives HTTP responses from the web server. The HTTP Listener on the web server acts as the network endpoint for the client, keeping other servers and ports from being exposed at the firewall.

Forms Socket Mode

Initial releases of the Oracle Forms Server product used a simple method for connecting the client to the server. The connection from the desktop client to the Forms Listener process was accomplished using a direct socket connection.  The direct socket connection mode was suitable for companies providing thin client access to Forms applications within their corporate local area networks. For the direct socket connection mode, the client had to be able to see the server and had to have permission to establish a direct network connection.

Although the direct socket connection mode is perfectly suited for deployments within a company’s internal network, it's not the best choice for application deployment via unsecured network paths via the Internet. A company connected to the Internet typically employs a strict policy defining the types of network connections that can be made by Internet clients to secure corporate networks. Permitting a direct socket connection from an external client exposes the company to potential risk because the true identity of the client can be hard to determine.

Servlet Mode Advantages

    HTTP and HTTPS traffic is easily recognizable by routers, while socket mode communications is generally considered suspect and treated on an exception basis.
    Existing networking hardware can be used to support basic functions such as load-balancing and packet encryption for network transit.
    More resilient to network and firewall reconfigurations.
    More robust: servlet connections can be reestablished if network connections drop unexpectedly for Forms, Framework, and JSP-based pages.
    Is the only supported method for generic Oracle Forms customers, and therefore is more thoroughly tested by the Forms and E-Business Suite product groups.
    Performance traffic can be monitored via tools like Oracle Real User Experience Insight (RUEI).
    Socket mode is not supported on Windows-based server platforms.

Socket Mode Advantages


    Uses up to 40% less bandwidth than Forms servlet mode.  This may be perceived by Wide Area Network (WAN) users as causing slower responsiveness, depending upon network latency.
    Uses fewer application-tier JVM resources than servlet mode, due to fewer TCP turns and lack of overhead associated with HTTP POST handling.

Switching Apps Deployments Between Modes

Due to its numerous advantages, Forms servlet mode is the preferred and recommended deployment model for Forms on the web.

There may be circumstances where you need to switch between the default Forms modes.  You might wish to switch your Oracle E-Business Suite Release 12 environment to socket mode to improve performance or reduce network load.  You might wish to switch your Apps 11i environment to servlet mode as part of your rollout to external web-based end-users outside of your organization.

If you're running Apps 11i and would like to switch to servlet mode, see:

    Using Forms Listener Servlet with Oracle Applications 11i (Note 201340.1)

If you're running Apps 12 and would like to switch to socket mode, see:

    Using Forms Socket Mode in Oracle Applications Release 12 (Note 384241.1)

Wednesday, February 27, 2013

AutoConfig Customization


Autoconfig is a very effective configuration management tool, but there are times when it falls short of meeting all our requirements and it becomes necessary to customize it. Following are some of the examples where you would need to customize autoconfig. You need to add another zone to the Jserv.  In this case you would have to customize oracle supplied autoconfig template which corresponds to jserv.properties configuration file, to add entries for another zone, you would also have to create a custom template for the properties file for this new custom zone. You may also need to add some custom context variables to the context file for this new custom template. You have some custom product tops. You would have to add these custom product top environment variables to the formservlet.ini file to access the custom forms. In this case you will have to customize the formservlet.ini’s autoconfig template to add your custom product top variables. You can construct these product tops based on the $APPL_TOP's context variable i.e.%s_at%/<custom_product_top> or you can create new context variable for each custom producttop. In that case you will have to add these to the context file as custom context variables. You have developed a custom application and you want autoconfig to maintain all the configuration files of this custom application. In this case you will have to create custom driver files, custom templates and probably some custom context variables. All the above examples show that there are three types of customizations that should satisfy most of the custom requirements:
Adding custom context variables to the context file
Customizing an AutoConfig template file delivered by Oracle.
Creating custom Autoconfig templates and custom Autoconfig driver.
Adding Custom Context Variables:
Adding a context variable to the context file means, adding a node in the context file with mandatory attribute oa_var and optional attributes oa_type, oa_enabled and scope. This node will have only one child node that will be a text node holding the value of the context variable. Autoconfig doesn’t care where or at what level this node is put in the file. So to make this work you can use any xml parser and add the node to the context file at any position you like and it will serve the purpose. But there are two drawbacks to this method. One this would cause maintenance problem since it will be difficult to differentiate between custom and seeded context variables and secondly oracle's software is not aware of this customization, which means whenever we run adbldxml.pl oradclonectx.pl to clone the context file, we will loose our custom entries. The first problem can be easily overcome by adding all custom context variables under a top level xml node oa_customized and starting all the custom node oa_var values from "c_". Now we can easily distinguish between custom and seeded context variables and it’s easy to maintain since we know where all the customizations lie in the context file. In the context file section, I mentioned that the context file is created by plugging in instance specific values into the context file template $AD_TOP/admin/adxmlctx.tmp. So adding xml node oa_customized and all our custom variables under oa_customized to this template would take care of the second problem too. Now let's look at different ways of adding custom context variables.

Oracle Application Manager:
Oracle Application Manager from version 2.1 onwards provides us with extensive ways to manipulate the context files. Updating the context variables is one of them, which we looked at earlier. It also provides us with the option of adding custom context variables. Adding custom context variables in OAM results in following sequence of events:
OAM saves the custom context variable details like name, attribute oa_var value, attribute oa_type value, title and description into table fnd_oam_context_custom.
OAM updates the existing row's status to 'H' (History) for adxmlctx.tmp infnd_oam_context_files.
OAM inserts a new row for adxmlctx.tmp with status 'S'. This new adxmlctx.tmp has ourcustom context variable added under node oa_customized.
OAM Requests FNDFS listener of the destination node to update the adxmlctx.tmp on thefile system.
OAM Repeats the process for all the context files with status='S' and context_type=’A’
Using perl module TXK::XML:
Oracle Application Manager is indeed a neat way to add custom context variables but there are a few problems. We have to add one variable at a time, so in our report server configuration file example, for replacing maxconnect, cachesize, maxidle, initengine and englife we will have to repeat the process 5 times. This can be quite cumbersome as the number of variables to be added increase. Secondly we need access to Oracle Applications but there are times (like configuring a clone) when we want to add custom context variables but OAM is unavailable. This calls for a programmatic method to add custom context variables.Using perl module TXK::XML we can write a small perl program to add many context variables atone shot without needing any access to Oracle Application Manager. For doing this we have to first load the context file and the context template file as TXK::XML object and then use add Node method of TXK::XML package(class for OOP enthusiasts) to add the custom nodes. The only thing to note is that add Node expects a reference to a hash containing all the information about the node to be added. I am going to show you a piece of code for adding custom variables. It will add the custom variables mentioned in the above example of reports server configuration file. Following table details the information about the context variables we are adding.
The only question that remains is, how do we know REP60_server.ora is the template for reportsserver configuration file. In this case I found out by “grepping” for the configuration file name in the driver files (mostly adtmpl.drv and fndtmpl.drv since they manage most of the configuration files).The third field in the template’s file entry in the product driver gives us the template name. Before ADX.F this was the only way to find template files for configuration files. With ADX.F, since oracle has decided to completely support autoconfig customizations, they have provided a script $AD_TOP/bin/adtmplreport.sh to find out the template names. This script in turn runs the javaclass oracle.apps.ad.tools.configuration.ATTemplateReport. This script is a generic script to generate report on all the autoconfig templates and corresponding configuration files. But it also provides a way to find out the template file from the given configuration file and vice versa. It alsoreports if there is a custom template for the given configuration file.

adtmplreport.sh contextfile=/u01/home/applHOPP/admin/HOPP_jinzo.xml \ target=/u01/app/oracle/product/config/HOPP_jinzo/8.0.6/reports60/server/REP60_HOPP.ora verbose#########################################################################Generating Report .....#########################################################################APPL_TOP Context[AD_TOP]TEMPLATE FILE : /u01/home/applHOPP/ad/11.5.0/admin/template/REP60_server.oraTARGET FILE : /u01/app/oracle/product/config/HOPP_jinzo/8.0.6/reports60/server/REP60_HOPP.ora

Tuesday, November 13, 2012

Forms Servlet mode to Socket mode changing


1. Shutdown the middle tiers.
2. Change to servlet mode as follows:
i. Change to servlet mode
Login to the concurrent manager middle tier as ap<sid> user and do the following:
Replace the below command with the "Apps password"
$FND_TOP/bin/txkrun.pl -script=ChangeFormsMode \
-contextfile=$CONTEXT_FILE \
-mode=servlet \
-runautoconfig=No \
-appspass=<APPS password>

ii. Run autoconfig for servlet mode to take effect
Login to the concurrent manager middle tier as ap<sid> user and do the following:
$ cd $AD_TOP/bin
$ ./adconfig.sh contextfile=$CONTEXT_FILE appspass=<apps pwd>
Make sure the log file has no errors.
3. Change oc4jadmin password
Login to the concurrent manager middle tier as ap<sid> user and do the following:
a. Back up the original system-jazn-data.xml file
$ cp -pr $INST_TOP/ora/10.1.3/j2ee/forms/config/system-jazn-data.xml
$INST_TOP/ora/10.1.3/j2ee/forms/config/system-jazn-data.xml.ori
b. Change oc4jadmin password
$ vi $INST_TOP/ora/10.1.3/j2ee/forms/config/system-jazn-data.xml
Change the below line alone as follows in the file so that it looks like below after change:
<credentials>!welcome</credentials>
========= with change ============================
                        <user>
                                <name>oc4jadmin</name>
                                <display-name>OC4J Administrator</display-name>
                                <description>OC4J Administrator</description>
                                <credentials>!welcome</credentials>
                        </user>
                       <user>
===================================================
4. Startup the opmnctl servers alone
Login to the concurrent manager middle tier as ap<sid> user and do the following:
$ cd $SCRIPT_TOP
$ ./adopmnctl startall
5. Deploying a New Forms EAR File
a. Run the following command to make sure your password is correct :
$AF_JRE_TOP/bin/java -jar $ORACLE_HOME/../1013/j2ee/home/admin_client.jar deployer:oc4j:opmn://iehibu08.iehibdom.com:6510/forms oc4jadmin welcome -validateURI
b. If the above script in Step 5.a. succeeded then Run deployment script as follows:
$ $FND_TOP/bin/txkrun.pl -script=CfgOC4JApp
Enter the following when prompted:
Enter Application name for re-deployment ? forms
Enter Oc4j Instance password for re-deployment ? welcome
Run Autoconfig <Yes/No> ? No
Check the logfile for any errors
c. Shutdown the opmnctl servers
Login to the concurrent manager middle tier as ap<sid> user and do the following:
$ cd $SCRIPT_TOP
$ ./adopmnctl stopall
Make sure all the processes running as ap<sid> are down.
d. Carry out post-deployment tasks (Carry this out if Step 5.b. above had no errors)
i. Restore backed up file
$ cp -pr $INST_TOP/ora/10.1.3/j2ee/forms/config/system-jazn-data.xml
$INST_TOP/ora/10.1.3/j2ee/forms/config/system-jazn-data.xml.passwdchg
$ mv $INST_TOP/ora/10.1.3/j2ee/forms/config/system-jazn-data.xml.ori
$INST_TOP/ora/10.1.3/j2ee/forms/config/system-jazn-data.xml
6. Startup middle tiers services.

Sunday, November 11, 2012

Getting login Page but not able to access the em console page


Errors in Thread Dump (opmn/logs/OC4J~home~default_group~1
Oracle Containers for J2EE 10g (10.1.3.5.0)  initialized Full thread dump Java HotSpot(TM) Server VM (1.5.0_18-b02 mixed mode)
Error in error.log
[Tue Nov  6 08:56:58 2012] [error] [client 140.83.229.193] [ecid: 352213818:144.23.206.76:17074:0:1,0] mod_oc4j: Failed to find a failover oc4j process for session request for destination: aplication://ascontrol (no island or jgroup).

Solution
========
Issue because of Less/Null Heap size settings in opmn.xml file
1. Bring dowm opmn services
2. Increase the Heap size for all opmn components
ex:  <data id="java-options" value="-server -Djava.security.policy=$ORACLE_HOME/j2ee/home/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false  -Xms512M -Xmx1024M -XX:MaxPermSize=128M -XX:AppendRatio=3"/>
 3. Bring up opmn services