Monday, 7 May 2012


CUSTOM_TOP CREATION in R12: Creation of XVIJ_TOP Application

Details :
Application Name : XVIJ Application
Base Path : $XVIJ_TOP
Schema Name : TTS
Tablespace Name (Data) : XXVIJ_TS_TX_DATA
Tablespace Name (Index) : XXVIJ_TS_TX_IDX

è Login as database OS user to create TTS schema for XVIJ Application.

è Set the environment. (if not set in Bash Profile)
è Login into ‘sqlplus as sysdba



è Create Tablespace for data for TTS Schema as XXVIJ_TS_TX_DATA

create tablespace XXVIJ_TS_TX_DATA datafile '/d01/R12DEMO/oracle/db01/db/apps_st/data/xvij_data1.dbf ' size 500M autoextend on next 100m maxsize 1024m extent management local segment space management auto;

Note: Can give tablespace size based on our environment


è Create Tablespace for Index for TTS Schema as XXVIJ_TS_TX_IDX.


è Create Temporary tablespace for TTS Schema as XXVIJ_TS_TX_TEMP



è Now Create schema named as TTS with the below details:

Username: TTS
Password: tts
Default Tablespace: XXVIJ_TS_TX_DATA
Temporary Tablespace : XXVIJ_TS_TX_TEMP



è Login as OS application user.

è Set the environment if it has not been set in Bash profile.

è Change Directort to $APPL_TOP

è Make the directory structure like below under $APPL_TOP
mkdir xvij
mkdir -p xvij/12.0.0
mkdir -p xvij/12.0.0/ bin
mkdir -p xvij/12.0.0/ out
mkdir -p xvij/12.0.0/log
mkdir -p xvij/12.0.0/admin
mkdir -p xvij/12.0.0/html
mkdir -p xvij/12.0.0/patch
mkdir -p xvij/12.0.0/mds
mkdir -p xvij/12.0.0/reports/US
mkdir -p xvij/12.0.0/sql/ddl
mkdir -p xvij/12.0.0/media
mkdir -p xvij/12.0.0/java
mkdir -p xvij/12.0.0/forms/US
mkdir -p xvij/12.0.0/help
mkdir -p xvij/12.0.0/lib
mkdir -p xvij/12.0.0/mesg


è Change the Directory to $INST_TOP/appl/admin for .xml location and back up the .XML file.

è Edit the original XML file and add the XVIJ top entry as below along with the standard product list

<XVIJ_TOP oa_var="s_xvijtop" oa_type="PROD_TOP"
oa_enabled="FALSE">/d01/R12DEMO/oracle/app01/apps/apps_st/appl/xvij/12.0.0</XVIJ_TOP>


è Change Directory to $ADMIN_SCRIPTS_HOME and execute
adautocfg.sh apps/<apps_pwd>

è After completed autoconfig successfully start the applications.


è Login to applications as “sysadmin” user and select system administrator responsibility.




è Now register our custom application with below details:

Application Name : XVIJ Application
Short Name : XVIJ
Basepath : XVIJ_TOP
Description : XVIJ Application for custom requirement

Navigation: After login system administrator responsibility,

Application->Register (click on Register and enter above details in the form  and save it)


è Register the TTS Schema in the applications. Navigate to

 Security ORACLE Register

               

Add the Oracle Schema Details as below and save the information
Database User name : TTS
Password : tts
Privilege : Enabled
Install Group : 1
Description : XVIS Application for custom requirement.



è Now add the Created application in the Standard Datagroup
Navigate to Security ORACLE DataGroup


Now Query the Data group as Standard.


Add the application details as below in the data groups form
Application : XVIJ Application
Oracle ID : Apps
Description: XVIJ Application for custom requirement


è Create the Custom Menu
Navigate to  Application-> Menu ( To Create Custom Menu )

Create the Custom Menu with the following details as below
(Note : The Menu to be created is to provide the facility to run and View Requests only )


Enter the following details and save:

Menu Name : XXVIJ_CUSTOM_MENU
User Menu Name : XXVIJ Custom Menu
Description : XXVIJ Custom Menu For Custom Requirement
Seq = 100
Prompt = View Requests
Function = View All Concurrent Requests
Description = View Requests

Seq = 110
Prompt = Run Requests
Function = Requests: Submit
Description = Submit Requests


After saving we got window like below:


Ensure that the menu has been compiled or not by checking the request id has been completed normal.


è Create A Custom Request Group
Navigate to Security ->Responsibility-> Request
Note : Not required to add any reports to the request group. Based on the requirements the reports can be added to the request group only.

Create the new custom request group as “XXVIJ Request Group” with the
following details:

Group : XXVIJ Request Group
Application : XVIJ Application
Description : XXVIJ Request Group for Custom Requirement
---------Requests Tab can be left blank


è Create A Custom Responsibility for XVIJ Application

Navigate to Security-> Responsibility->Define

Create new custom responsibility as “XTTS Custom Responsibility” with the details as below:

Responsibility Name : XTTS Custom Responsibility
Application Name : XVIJ Application
Responsibility Key : XTTS_CUSTOM_RESP
Description : XTTS Custom Responsibility
Available from : Oracle Applications

Datagroup
Name : Standard
Application : XVIJ Application
Menu : XXVIJ Custom Menu
Request Group
Name : XXVIJ Request Group
Application : XVIJ Application



è Create one user and assign this responsibility to that particular user.

Navigate to Security->User->Define
























Version of Oracle Applications
You may never need this but in case you are looking at a new environment then the simplest way to figure out your application version is by navigating to
Help-> About Oracle Applications from any of the forms sessions.
Or
Connect as apps user
select release_name from apps.fnd_product_Groups;
Version of Applications Forms (fmb,fmx) or reports (rdf)
To find the version of any oracle applications files
strings -a ICQTYED.fmx | grep Header
Alternatively you can also use the adident command
adident Header ICQTYED.fmx

Version of a Java class File
To find the version of a java class file
$ strings | grep '$Header'

Version of JDBC
In your middle tier, edit the jserv.properties file located in the iAS_ ORACLE_HOME/Apache/Jserv/etc directory
Locate the wrapper.classpath that is pointing to the jdbc zip file
/u01/oracle/viscomn/java/jdbc14.zip
Or
http://.:port/OA_HTML/jsp/fnd/aoljtest.jsp
Look for String ” JDBC driver version” under Connection String
Version of Apache
Go to the $iAS/Apache/Apache/bin directory and enter the following command:
$ httpd -version

Version Of The OA Framework
To find out the version of your Oracle appplication Framework
Option 1
http://.:port/OA_HTML/OAInfo.jsp
Option 2
adident Header %FND_TOP%/html/OA.jsp
adident Header %OA_HTML%/OA.jsp
Note: OA.jsp should be of the same version in both the places
Version of Application Product or Patch Set Level.
One of the most common things you will asked by your support engineer is the version or commonly known as the patch set level of your Oracle Applications product, while or after raising your service request. You can query this by logging on to your application database as the apps user.
select patch_level from fnd_product_installations where patch_level like '%AD%';
Version of Discoverer
cd $APPL_TOP/admin
grep -I s_disco_ver_comma **xml
Version of OJSP
Log in to the application server as the applmgr user
cd $OA_HTML
edit the jtflogin.jsp file to add the following line
OJSP Version: <%= application.getAttribute("oracle.jsp.versionNumber") %>
clear your cache and bounce your apache server
soruce the jtflogin.jsp from your browser
http://vis.oneapps.com:8000/OA_HTML/jtflogin.jsp
OJSP Version: 1.1.3.5.2
Version of JSP

Log on to your HTTP Server node, and change to the OA_HTML directory.
Using a text editor, create a file called test.jsp with only the following line:
<%= application.getAttribute("oracle.jsp.versionNumber") %>

Access this JSP from a web browser, using the URL:
http://[your web server]:[your port]/OA_HTML/test.jsp

Version of Portal
select fnd_oracle_schema.getouvalue(’PORTAL’) from dual;
FND_ORACLE_SCHEMA.GETOUVALUE(’PORTAL’)
——————————————————————————–
PORTAL30 <= to retrieve the portal user
select version from PORTAL30.wwc_version$;
VERSION
——————————————————————————–
3.0.9.8.1
or
begin
execute immediate 'select fnd_oracle_schema.getouvalue(''PORTAL'') from
dual' into portal_user;
begin
execute immediate 'select user_name from fnd_user where user_name like
upper('''||portal_user||''')'
into portal_user_name;
if portal_user is not null then
execute immediate 'select version from '||portal_user||'.wwc_version$'
into portal_ver;
check_message := ' [PASS] Your Applications database contains
Portal version: '||portal_ver;
dbms_output.put_line(check_message);
end if;
exception
when no_data_found then
null;
end;
exception
when others then
null ;
end;
Version of XML Parser
You can find out the version of your XML Parser using the following query
SQL> select WF_EVENT_XML.XMLVersion() XML_VERSION
2 from sys.dual;
XML_VERSION
--------------------------------------------------------------------------------
Oracle XDK Java 9.0.4.0.0 Production

Version of XML Publisher
To check weather XML publisher is installed or not you can query the FND_PRODUCT_INSTALLATIONS table or you can lookup the
reports in Oracle Applications Manager. You can find out the version for your XML publisher from the output of your report or from MetaInfo.class file.
$OA_JAVA/oracle/apps/xdo/common/MetaInfo.class.

Version of WorkFlow
You can find out the version of your workflow using the following query
SQL> select TEXT Version from WF_RESOURCES
2 where TYPE = 'WFTKN' and NAME = 'WF_VERSION';
VERSION
--------------------------------------------------------------------------------
2.6.0
Version of Oracle Login Server
begin
execute immediate 'select fnd_oracle_schema.getouvalue(''LOGINSERVER'') from
dual' into sso_user;
begin
execute immediate 'select user_name from fnd_user where user_name like
upper('''||sso_user||''')' into
sso_user_name;
if sso_user is not null then
execute immediate 'select version from '||sso_user||'.wwc_version$' into
sso_ver;
check_message := ' [PASS] Your Applications database contains Login
Server version: '||sso_ver;
dbms_output.put_line(check_message);
end if;
exception
when no_data_found then
null;
end;
exception
when others then
null ;
end;

Scenario:

=========

While applying a big patch, suddenly it has been failed due to some prereq patch is missing.

Solution:

1. Shutdown the workers using "adctrl" utility.

a. adctrl 

-- It will ask some prompts and enter those


Select option "Tell worker to shutdown/quit"



2. Backup the FND_INSTALL_PROCESSES table which is owned by the APPLSYS schema



a. sqlplus applsys/

b. create table fnd_Install_processes_back as select * from fnd_Install_processes;

c. The 2 tables should have the same number of records. select count(*) from fnd_Install_processes_back; select count(*) from fnd_Install_processes;



3. Backup the AD_DEFERRED_JOBS table.



a. sqlplus applsys/

b. create table AD_DEFERRED_JOBS_back as select * from AD_DEFERRED_JOBS;

c. The 2 tables should have the same number of records. select count(*) from AD_DEFERRED_JOBS_back; select count(*) from AD_DEFERRED_JOBS;



4. Backup the .rf9 files located in $APPL_TOP/admin/restart directory.

At this point, the adpatch session should have ended and the cursor should be back at the Unix prompt.



a. cd $APPL_TOP/admin/

b. mv restart restart_orig

c. mkdir restart



5. Drop the FND_INSTALL_PROCESSES table and the AD_DEFERRED_JOBS table.



a. sqlplus applsys/

b. drop table FND_INSTALL_PROCESSES;

c. drop table AD_DEFERRED_JOBS;



6. Apply the new patch.



7. Restore the .rf9 files located in $APPL_TOP/admin//restart_back directory.



a. cd $APPL_TOP/admin/

b. mv restart restart_

c. mv restart_orig restart



8. Restore the FND_INSTALL_PROCESSES table which is owned by the APPLSYS schema.



a. sqlplus applsys/

b. create table fnd_Install_processes as select * from fnd_Install_processes_back;

c. The 2 tables should have the same number of records. select count(*) from fnd_Install_processes; select count(*) from fnd_Install_processes_back;



9. Restore the AD_DEFERRED_JOBS table.



a. sqlplus applsys/passwd

b. create table AD_DEFERRED_JOBS as select * from AD_DEFERRED_JOBS_back;

c. The 2 tables should have the same number of records. select count(*) from AD_DEFERRED_JOBS_back; select count(*) from AD_DEFERRED_JOBS;



10. Re-create synonyms



a. sqlplus apps/apps

b. create synonym AD_DEFERRED_JOBS for APPLSYS.AD_DEFERRED_JOBS;

c. create synonym FND_INSTALL_PROCESSES FOR APPLSYS.FND_INSTALL_PROCESSES;