Friday, November 23, 2007
Wednesday, August 08, 2007
Global and Local inventory
The Global Inventory (oraInventory directory), contains pointers to each Local Inventory located under $ORACLE_HOME/inventory for every ORACLE_HOME.
The Local Inventories contain the local versions of the products installed on that $ORACLE_HOME.
On Unix/Linux platforms, the location of the Global Inventory is defined by the variable "inventory_loc" which is set on the file oraInst.loc.
ie:inventory_loc=/u01/oracle/oraInventory
This file, is located under /etc on Linux and AIX and under /var/opt/oracle on on Solaris, HP-UX and Tru64.
On Windows platforms, the location of the Global Inventory is defined by the Registry variable "inst_loc" located on HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE.
Note:
1. Unlike 9i and above, 8.0.6 ORACLE_HOMEs can't be registered since they don't use the Global Inventory.
2. Incase of Oracle Applications, RapidClone uses the OUI bundle to register Cloned ORACLE_HOMEs into the Global Inventory. Registration of an ORACLE_HOME allows OUI to be used to maintain or patch that ORACLE_HOME.
3. Whenever you are applying any patch for the OUI, in order to prevent permission problems, before applying this patch, make sure the Operating System users that own iAS and 8i or 9i have read/write access on the Global Inventory.
Tuesday, August 07, 2007
Send mail via Sendmail
Ok.. I have a quick example of sending a mail using sendmail utility of Linux / Unix. You get lots of examples when you do google ofcourse. Here's my example:
1. To check if sendmail is up and running:
$ ps -ef grep sendmail
2. If it not started, start the service using root user:
# service sendmail start
3. To send a mail, use this syntax:
$ sendmail < Enter_email_address >
< write the mail here i.e., body >
Press Control+D to run the save the mail and send.
Now the mail will go. If you need to send some HTML File or use cc or bcc, easiest way is to create a HTML file and send it. You can follow these steps:
1. Create a HTML file as follows:
$ vi a.html
To: Pavan.Pvj@gmail.com
Subject: Workflow Test from Sendmail
Mime-Version : 1.0
Content-Type: text/html;
charset=us-ascii
Content-Transfer-Encoding: 7bit
<html> <head> <title> Oracle Workflow Notification </title> </head>
<body>
<font color="red" size="7"> HELLOOO WORLD </font>
</body> </html>
-- Save this file.
2. Now, use sendmail to send this HTML File. The To, CC, Subject and other details are automatically parsed by the sendmail utility. So, use the following syntax to send the mail:
$sendmail -oi -t <a.html
Sunday, August 05, 2007
Oracle AIA - Application Integration Architecture
Hey c'mon, another new technology from Oracle ???. Dont worry !! man. Dont panic by listening to this. For some of us, the name itself looks very complicated and hard. Oracle always brings old concepts in a new and better ways to make the Administrator's life easy. AIA is yet another beautiful concept from Oracle Corp.
Imagine these existing scenarios:
1. You have a legacy application which tries to collect the data from the users and try to push into your ERP (Oracle Applications OR SAP OR Peoplesoft or anyother).
2. You have implemented an ERP application in your organization spending lots of rupees. Once you start your business, you ave suppliers, vendors, customers who has their ERP applications, legacy systems which send the data in different formats into your ERP.
(I can give many more examples like this ..)
Now, you have these questions in front of you:
1. How much man power do you need to maintain these systems and to enter the data manually coming from different sources.
2. What if your business grows enormously and you get lots of data ? Would you increase the man power or try to automate the system ?
3. Do you need to spend the amount again to automate this system (this feature may or may not be in your existing ERP system).
4. If the feature is not available, do you need to go for the 3rd party products ? If yes, then how much does it cost ? How many people are needed to support this new product ? etc etc ... and the questions continue ..
Ahhh !!! If this is a very big company like the Cisco or Sun Microsystems, its fine !! they can afford this price and time spent on this. Question now is what about the SOHO (Small Office Home Office) users ?
How can they automate this ? The answer is use the technology revolution - Use SOA Architecture.
Oracle has built the AIA based on purely SOA architecture. This architecture leverages the technology and helps integrating heterogenous systems into a single system and easily pass the data between them, make validations, analyze the data and the type of data and amount of data passed and many other features.
Oracle AIA offers pre-integrated packs integrations. Using these, we can try to integrate the existing systems with Oracle Applications ERP easily with small configurations. Ofcourse, they do cost a bit, but the amount of work needed by a company in investing on a 3rd party product reduces and the development on the same too reduces, thereby saving lots of rupees.
More on AIA coming shortly.... until then google yourself on the same ;)
Concurrent Manager - Lesson 2
Concurrent managers are the one way of running the background programs in a structured and a standard way. Any program that can be run in the background should take the help of concurrent managers to get completed i.e., in other words, concurrent managers are the environment or the containers that manage the life cycle of the background programs. If you well aware of the OOPS concept, understand concurrent managers is easy.
All the info in Oracle is stored in the database only. First we will the important tables, that the concurrent managers use to store the data.
FND_CONCURRENT_QUEUES - This is the table where all the concurrent manager definitions are stored. This table describers all about the concurrent managers. Managers in other words are called Queues. These are NOT AQs or any other persistent queues. They just take and run the programs one-by-one in a queue manner and so is the name.
FND_CONCURRENT_PROCESSES - This table stores the run-time information of the concurrent managers or the running instance of the concurrent managers. We can assume the records in this table as the object of the record in fnd_concurrent_queues.
One record in fnd_concurrent_queues can have multiple records in fnd_concurrent_processes.
In other words, FND_CONCURRENT_QUEUES is the design time table and FND_CONCURRENT_PROCESSES is the runtime table.
FND_ENV_CONTEXT - Each manager would use the environment settings in the Operating system to do run. For this, each concurrent process logs a record per environment variable in this table. When you want to check what value of the environment variable a concurrent manager aka process is using, you can check this table. This is also a runtime table.
FND_NODES - This is one of the most important tables when we talk about the concurrent managers. The concurrent managers start on the node by spawning an executable FNDLIBR where the adcmctl.sh script (this is the script which is used to start the concurrent managers). The node information like hostname, platform etc is taken from this table.
All the runtime information about the process would be stored in FND_CONCURRENT_PROCESSES table. This table is dynamic table meaning, if you stop the concurrent managers and truncate this table and restart the concurrent managers, they will again populate the records in this table. As I told you this is just the instances of the concurrent managers. They will be active only when you start the concurrent managers.
Thats enough now for the tables. Now, when the concurrent managers are started, each manager which is enabled in the fnd_concurrent_queues table would kick-off and spawn 'x' number of processes at the O/S level. This 'x' number of processes are also picked up from the same table. Each process of the manager would then take the requests in a queue (from fnd_concurrent_requests table) and then run the request in the background. You can view the output and the progress of the request in the SRS form in the Oracle Applications front-end.
Next, I would tell you whats the sequence in which the concurrent managers start.
Friday, August 03, 2007
Concurrent Manager - Lesson 1
I know this is a very very very old topic for the Apps DBAs. I am writing this topic for the newbies - for those who are new to the Oracle Applications. Oldies and Veterans in Apps can skip this topic and stop yelling at me after reading this :)
I will give the introduction to Concurrent Managers (CCM) in this topic so that it would be a smooth fly-off for the novices to start off. Just to mention, I would use Oracle Applications and Oracle E-Business Suite (EBS) interchangably in my topics.
Any application needs to have a way of running the programs at the background without the user intervention. Programs running in the program utilizes a CPU's resource and time correctly. Oracle Applications is no different from this. This is a huge product that comprises of around 200+ products each having its own jobs for specific needs.
For example, in a HR (Human Resources) module, if you need to generate a payroll, the HR analyst need not wait until all the payrolls are generated, he can just submit the payroll for the machine to run in the backend and he can continue with his other work.
Such a kind of programs which are run at the back-end without the user invention are termed as Concurrent programs in Oracle Applications.
Now, another small concept. To run an exe, we need something that needs to run this exe. An exe wont execute all by itself. Some entity should be existing which interprets and understands the instructions in this exe. That entity in Windows is the command prompt and in Linux is the shell. Another example is to run a Java class, we need an environment which is nothing but the JRE - Java runtime environment which understands the class file and runs the class file or in other words, manages the life cycle of the class - (Life cycle - a) loading the class into memory and b) running the class and c) removing incase the class file is not used)
Similarly for Oracle Applications, to run the concurrent programs, we need an environment or the interpretor which manages the life cycle of the concurrent program and that entity is named as Concurrent Managers which are the heart of the Oracle Applications.
Thats it !! Simply understand what these two are and we will see more in my next tutorial as to how are both of these used in Apps.
Thursday, August 02, 2007
How to find out the Oracle iAS version ?
From 9.0.4 version of iAS, Oracle uses a file called as ias.properties which exists in $ORACLE_HOME/config directory, where ORACLE_HOME is the location where the IAS (OR) Web Center (OR) SOA Suite are installed.
We can get the version of the IAS in this file under [InstallData] section as follows:
Version=10.1.2.0.2
Pretty simple isnt it ? :)
This file also lists
a) if infra database is used or not
b) name of the INFRA datbasename
c) Virtual Hostname
d) it would also contain if Infra is on RAC nodes
e) OID host and port numbers
f) SSL Enabled
g) and Finally, what all components did we install as a part of the installation (of IAS or SOA Suite or WebCenter).
This information is useful especially when we want find out what components are installed while patching or quickly find out the ports of OID etc. If any new DBA / iAS Administrator comes up, he can check this file to know the TYPE of installation that was done.
Tuesday, July 31, 2007
Configuration for JNDI while deploying a BPEL Process using Apps Adapter
Now, oc4j-ra.xml is runtime connection configuration file which binds connections details to JNDI names. Suppose while designing the BPEL Process, if you choose a connection to your apps database - For example:
Say, atgtest1.idc.oracle.com-1528-AIA is the connection, the JNDI name which would be created will be 'eis/Apps/atgtest1' - This can be changed at anytime.
At runtime this JNDI name would be looked up in oc4j-ra.xml to find out which database connection it points.
oc4j-ra.xml is present at $ORACLE_HOME\j2ee\home\application-deployments\default\AppsAdapter, where ORACLE_HOME is directory where 1013 SOA Suite is installed.
Sample entry in oc4j-ra.xml would be like this (click on enlarge):
Replace APPS_USER,APPS_PASSWORD,MACHINE,PORT_NUMBER and SID with those of Database you intend to use apps adapter on.
Restart BPEL Server after modifying oc4j-ra.xml to reflect the changes. Inorder to restart server :
a. Open command shell
b. cd $ORACLE_HOME/opmn/bin
c. $ opmnctl stopall
d. $ opmnctl startall
Monday, July 23, 2007
Uncover OC4J - Part II
OC4J History and Now
My computer faculty always used to say – ‘In the S/w industry - Only fools write the code from the scratch”, When Oracle has started its Web Components development, might had the same thought - so it did not write the Web Server from scratch instead it has borrowed the Open-source Apache Web Server code.
(Just a nut crack, Oracle's decision to opt for Apache is due to its flexible, modular and extensibile architecture, cost cutting in development and testing for Web Server code and other important implications - all of the above - code reusability ;) )
After Oracle has decided to go for Apache, it has fine-tuned Apache for performance and gave it a new name called OHS – Oracle Http Server. It has then introduced new modules like mod_plsql for accessing database via Web Server, mod_osso for facilitating Single Sign-on etc.
Now, regarding the Java part – if a client (or browser) requests for a JSP / Servlet, the first entity that picks up the request from client (or in other words, the first entity which the request goes to) is Web Server i.e., in our case, Apache Web Server. Now the Apache Web Server detects that it has to serve the client with a Java file, it redirects the request to the Java sub-system, which is mod_jserv. Mod_jserv is again a Apache based module which is again fine tuned by Oracle to serve its Java programs.
Oracle Applications contain many self-service applications, which use mod_jserv for executing / running the self-service pages.
Now mod_jserv is just a Java server and contains mini Servlet containers in which servlets and JSPs do get executed. But it does not contain / does not have a fully-feature servlet containers which have advanced features like load-balancing, connection pools etc and also neither it contains any J2EE compliant containers like EJB Containers, JMS, JMX, JAAS supportability etc.
Technology gets emerged and new components are getting added to J2EE. This is sensed by Oracle long before. To copeup with the competition and technology, Oracle has to create its own Java containers which supports the Java Enterprise Edition standards like JDBC Pools, EJB containers, JMS and JMX suppportability, Security features like JAAS, Mailing specs like Java Mail and others. With these requirements, Oracle has started creation of the OC4J containers.
All the OC4J containers are purely written in Java, which support all the specification and components listed in J2EE Specification. Some of them are fine tuned and customized to suit Oracle needs – for example – Oracle implemention of JAAS specification is called as JAZN.
In short, OC4J is a Java based container that fully supports all the specifications of J2EE. 10.1.3 OC4J supports J2EE 1.4 and part of 1.5 specifications. Also, OC4J itself contains Http Server – called as OHS (Web server with Apache code base) in itself, but this web-server is not for serving the client requests. Instead this webserver is used for management i.e., to:
a) Configure OC4J itself (remember OC4J is just a container and it does not have any interface to get managed unless like in WebLogic where we get a Java console).
b) Configure the applications (like Web beans, EJBs and others) deployed in the OC4J Container. Further going, Oracle replaces mod_jserv and market OC4J server.
c) Create and manage multiple instances of OC4J.
Once you connect to the Webserver of OC4J at 8888 port, the main index page would open up and we all are aware of this component page before – i.e., EM – Enterprise Manager. We will see about this EM application in coming parts.
(One thing to note here is – If Oracle iAS, we still get the Apache folder and all the apache configurations. I agree that this is a duplication of webservers but one thing we should not forget here is that all the requests are first taken by a Web server – here it is Apache Web server and not OC4J Webserver and if any request for J2EE component, would redirect it to mod_oc4j.
Apache Server (also called Oracle Http Server or OHS is for serving the client’s request and the webserver in OC4J is to manage OC4J server). Apache server in production systems generally run at 80 to which clients get connected and OC4J webserver default port is 8888. Apache Server is for clients and OC4J Webserver is for Administrators to configure OC4J and to deploy and manage the J2EE Applications).)
Going further Oracle will remove mod_jserv module and mod_plsql modules from its Applications and iAS versions and market OC4J for all Java and J2EE needs.
There is a reason for this –
mod_plsql is a security vulnerability that is prone to attacks by hackers. Although, I would not go in depth here to list all the techniques but to mention URL re-writing is one of the most used hacking techniques. One could directly call the plsql procedures from URL and thereby accessing the user / transaction data. After the OC4J is introduced and Web Server tightly integrated into the OC4J itself and high security features such as SSL and cipher algorithms incorporated in the Container, chances of attack were bought to a zero. Any access to the data will have to go through several layers of security and via thin drivers only.
As for mod-jserv goes, one reason I can jolt down here is OC4J is Oracle’s child – it can mould it the way it wishes. One more thing is that the properties in the mod_jserv is all in the ASCII text files which is hard to read. In OC4J, all the properties are in XML format and dynamic in nature, easy to program, easy to configure, modular and more-ever a Standard.
Uff, there goes my day off after briefing and boring with all the history that I know of the OC4J.
For me, OC4J still has a longgg way to go and is still in its primary level but ofcourse its still a robust, full-featured, highly integrated, extensible, scalable, easily manageable, one of the containers ever written with low memory footprint and on the above my favourite application server components.
Catch you more inside in the next part of OC4J – coming soon your way – OC4J Part III
Friday, July 20, 2007
Uncover OC4J - Part 1
In this topic, I will be discussing the very basics of OC4J containers from Oracle. Although there are plethora of Java containers outside in the market, I always prefer the OC4J due to its architecture and modularity and the amount of flexibility in the maintenance.
OC4J is a Oracle developed propreitary module into the Apache Web server. Apache Web server is a Open Source web server which is picked up by Oracle and fine tuned Apache into Oracle Http Server (aka OHS).
Those who are new to OHS, OHS is Apache at its core. As Apache, OHS is also a module-based Webserver. Oracle has developed Java containers and incorporated this module into the OHS and called it OC4J (aka Oracle Containers for Java).
OC4J containers are based on J2EE specifications supported all the J2EE components like Servlets, JSPs, JAAS, JMS, Java Mail, JSFs, EJBs.
OC4J has multiple incarnations :) (aka versions)
- 1.0.2.2.x
- 9.0.2.x
- 9.0.3.x
- 9.0.4.x
- 10.2.2
- 10.1.3 - Most Recent version
There are 3 types of Deployment types for OC4J
- Standalone
- Embedded
- AS Component
Standalone OC4J
- comes as a ZIP file as oc4j_extended.zip file. You need not install anything. Simply uninstall the zip file and launch the process. This is purely written in Java from scratch and some options like JAZN-LDAP and SSO are not avaliable in this type of deployment. Generally used for quick testing and development of components.
AS Component
- comes with iAS installation CDs. Can be installed via OUI as a part of iAS installation. Have all the features enabled. Used in Production instances.
Embedded OC4J
- comes as a part of JDeveloper. Have all the features in it and also available at API level. Can be started and accessed via JDeveloper only.
Be there for some more stuff in Part II ....... :)
Monday, July 16, 2007
OID - Oracle Internet Directory
Let us share our views about OID first as FAQs. We will then look into the configuration of 10g and then 9i (I dont give preference in configuring the older versions but dont worry we will have writing on that too - ;) )
1. What is OID ?
OID is a LDAP implementation by Oracle Corporation. It is more than a just mere LDAP server. It can store all the user details, organization details and object details in some cases. It can be used via standard LDAP commands like ldapsearch, ldapadd to search the entities within it.
Oracle always goes with the Standards as it did with OID. Oracle Internet Directory helps in better organization of data and the resources. It can be implemented in an organization as a single source of truth.
Other major competitors to OID are Microsoft's Active Directory, Sun's SunOne Directory and others.
When a company needs a database which holds all the user information and can act as a single source of truth, LDAP can be implemented. OID is the best choice as it is very easy to configure, manage and work.
3. Why only OID ?
i) OID is built as a hierarchical tree which is easy to understand and navigate.
ii) OID is created in Java from scratch. So, can run on any of the platforms with same look and feel. iii) OID data is stored in Oracle database and due to the fact of Oracle Database capabilities, it can handle enormous amounts of data,
iv) OID can retrieve data within seconds due to enterprise search inbuilt in the database.
v) OID can be integrated with any other LDAP implementations and also can be implemented with any of the Oracle Applications seemlessly.
vi) OID can be managed locally as well as remotely i.e., via both Web and also via a client software.
4. How can I install OID (or) from where do I start from ?
There is a catch here.
OID (both server and client software) by default comes with Oracle Database 9i Enterprise Software disks. We need to choose Enterprise option while installing OID or choose Custom select OID.
Oracle 10g (9.0.4 and above):
From Oracle 10g, OID server is no longer shipped with Database instead it is shipped with 10g iAS. Yes, when we install Oracle 10g database, we do get a directory called ldap but they are only supporting files for LDAP. I mean when the OID is installed, the data is stored in the database. So, to navigate this data and local client (Swing UI) is shipped with Oracle 10g database software disks.
We need to choose OracleAS Infrastructure 10g option and choose Identity Management inorder to install the OID server.
6. Which port does OID run at ?
OID runs at two ports by default : non-SSL : 389 and SSL : 636
Hang on, still some more of the questions .. coming on your way..