Thursday, December 12, 2013

How to install and configure Webutil on Oracle Application Server 10g/Developer 10g both on Windows/Linux



How To Install Webutil on 10.1.2.x Oracle Application Server

WebUtill provides way of transferring files between the Client PC and the Application/Database Server via Oracle Web Forms.

The core features of WebUtil are :-
Text_IO
o Read and write text files on the client machine
Tool_Env
o Read client side variables
C API on the client
o Interface with client side C.
Host
o Run Host commands on the client machine
OLE2
o Integrate with client side OLE (e.g. Word and Excel)
Enhanced Host commands
o Host command can now call back into Forms!
Browser functions
o Integrate with the browser.
File transfer
o Move from between the client, application server and database.
File Manipulation
o Manipulate client side files.
Client machine information
o Read information from the client machine
READ/WRITE_IMAGE_FILE
o Read and write client side images
Get_File_Name
o Use a file selection dialog on the client machine
D2KWUtil features
o Client side interface into the D2KWUtil package.

The WebUtil version should match the version of Forms. For example, 10.1.2.2 should use WebUtil 10.1.2.2 which comes from the 10.1.2.2 patch. However, Oracle recommends you be on 10.1.2.3.
By Default Webutil is NOT delivered as a component of Oracle Application Server (Webutil is delivered as a component of Oracle Developer Suite only), hence you need to get the correct version of  the frmwebutil.jar from an Oracle Developer Suite installation that matches the same Application Server version.
NOTE:  The fundamental steps for setting up webutil on UNIX on the Application Server are not different from any other platform. The recommended webutil setup documentation is contained in the download at ->

http://www.oracle.com/technetwork/indexes/downloads/index.html#tools   (See the "Forms WebUtil" link under the Utilities and Plugins Section)

Starting from Oracle Forms 10.1.2.0.2, Webutil is delivered as a component of Oracle Developer Suite 10g (10.1.2.0.2). The file frmwebutil.jar is located under ORACLE_HOME/forms/java.
If you are using an earlier version of 10gR2 such as 10.1.2.0.2 or 10.1.2.2 you will use:
0. Linux and Oracle AS version 10.1.2.0.2 - 10.1.2.3
1. Create directory webutil in ORACLE_HOME/forms
2. Transfer in binary mode the following files in the directory $ORACLE_HOME/forms/webutil
d2kwut60.dll
jacob.dll
JNIsharedstubs.dll

3. The following alias was created in the file ORACLE_HOME/forms/server/forms.conf in Oracle Application Server:
AliasMatch ^/forms/webutil/(..*) "$ORACLE_HOME/forms/webutil/$1"

4. Copy from webutil_106\java to ORACLE_HOME/forms/java the following two javascript files:
forms_base_ie.js
forms_ie.js 


5. Copy/sign jar files in the following directory ORACLE_HOME/forms/java:
frmwebutil.jar/jacob.jar 


You need to sign both frmwebutil.jar and jacob.jar with the same digital certificate.
This is a one-time operation which allows your end-users to trust that the JACOB routines can access client side
resources.


This script is called sign_webutil.sh for UNIX and sign_webutil.bat for Windows.
Copy the Webutil JAR file frmwebutil.jar from %ORACLE_HOME%\forms\java of developer suite to %ORACLE_HOME%\forms\java of the application server.
Note:  For 10.1.2.0.2, frmwebutil.jar needed be signed.  From 10.1.2.2 and later, it is already signed.
 # $ORACLE_HOME/forms/webutil/sign_webutil.sh $ORACLE_HOME/forms/java/Jacob.jar
 # $ORACLE_HOME/forms/webutil/sign_webutil.sh $ORACLE_HOME/forms/java/frmwebutil.jar


for windows:
Sign Webutil JAR files by running these following commands Make sure Form Builder is Closed

C:\DevSuiteHome_1\forms\webutil>sign_webutil.bat c:\DevSuiteHome_1\forms\java\frmwebutil.jar
C:\DevSuiteHome_1\forms\webutil>sign_webutil.bat c:\DevSuiteHome_1\forms\java\jacob.jar

6. The file webutil.cfg was created in the ORACLE_HOME/forms/server and he is looking like:

logging.file=
logging.enabled=FALSE
logging.errorsonly=FALSE
logging.connections=FALSE
install.syslib.location=/webutil
install.syslib.0.7.1=jacob.dll|94208|1.0|true
install.syslib.0.9.1=JNIsharedstubs.dll|65582|1.0|true
install.syslib.0.9.2=d2kwut60.dll|192512|1.0|true

In the webutil.cfg file ensure you have the lines
transfer.appsrv.workAreaRoot=d:\temp
transfer.appsrv.accessControl=FALSE
transfer.database.enabled=TRUE
transfer.appsrv.enabled=TRUE

We are only really interested in getting the File Transfer working to start with, and this requires the above change to webutil.cfg (stored under forms/server)

The following variable must be defined in %ORACLE_HOME%\forms\server\default.env:
WEBUTIL_CONFIG=\forms\server\webutil.cfg


7. The following jars must be included in the CLASSPATH in forms/server/default.env:
%ORACLE_HOME%\forms\java\frmall.jar;%ORACLE_HOME%\forms\java\frmwebutil.jar;%ORACLE_HOME%\forms\java\jacob.jar;%ORACLE_HOME%\jdk\jre\lib\rt.jar

7.1. Add frmwebutil.jar and Jacob.jar path entries into Windows Registry (Start > Run > type regedit and press enter) goto HKEY_LOCAL_MACHINE > SOFTWARE > ORACLE > DEVSUITE_HOME > FORMS_BUILDER_CLASSPATH Variable.
Note: if you are using Linux then instead of this setup the environment variable.

8. In formsweb.cfg create the following config section
[webutil]
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
baseHTMLjinitiator=webutiljini.htm
baseHTMLjpi=webutiljpi.htm
baseHTML=webutilbase.htm
archive_jini=frmall_jinit.jar
archive=frmall.jar
lookAndFeel=generic

9. Create a database user "Webutil".
Now open the SQL Session connecting with SYS user, and create a user named WEBUTIL and Password is ORACLE.
SQL> CREATE USER WEBUTIL IDENTIFIED BY ORACLE
2 DEFAULT TABLESPACE USERS
3 TEMPORARY TABLESPACE TEMP;

User created.

SQL> GRANT CONNECT, CREATE PROCEDURE, CREATE PUBLIC SYNONYM TO WEBUTIL;

Grant succeeded.

SQL> CONN WEBUTIL/ORACLE
Connected.
USER is "WEBUTIL"
linesize 100
pagesize 100
long 80
SQL> @D:\Webutil_Final\create_webutil_db.sql

Package created.


Package body created.
SQL> CREATE PUBLIC SYNONYM WEBUTIL_DB FOR WEBUTIL.WEBUTIL_DB;

Synonym created.
SQL> CONN SYS/ORACLE AS SYSDBA
Connected.

SQL> GRANT EXECUTE ON WEBUTIL_DB TO PUBLIC;

10. Transfer in binary mode the following files :
webutil.olb
webutil.pll
WU_TEST_106.fmb
in the ORACLE_HOME/forms directory

11. Transfer the following files :
webutilbase.htm
webutiljini.htm
webutiljpi.htm
in the directory ORACLE_HOME/forms/server



12. Compile the webutil.pll library:
frmcmp.sh MODULE=$ORACLE_HOME/forms/webutil.pll USERID=webutil/webutil@orcl MODULE_TYPE=LIBRARY
OUTPUT_FILE=$ORACLE_HOME/forms/webutil.plx
- no compilation errors 



12.1.  Give rights on all files/folders:
# chown -R 700 $ORACLE_HOME/


13. Bounce the OC4J_BI_Forms container on the application server middle tier

14. Compile WU_TEST_106.fmb file
frmcmp.sh MODULE=$ORACLE_HOME/forms/WU_TEST_106.fmb USERID=webutil/webutil@orcl MODULE_TYPE=FORM
OUTPUT_FILE=$ORACLE_HOME/forms/WU_TEST_106.fmx
- no compilation errors




Extra Note:
Copy the breadcrumb.jar (any jar file) in your /forms/java/ folder     .  Add it to the archive and archive_jini tags of the /forms/server/formsweb.cfg file
        e.g.: archive_jini=frmall_jinit.jar,breadcrumb.jar
                archive=frmall.jar,breadcrumb.jar
     . Open the breadcrumb.fmb module (Oracle Forms 10.1.2.0.2)
     . Compile all and run the module




Wednesday, November 20, 2013

Cloud Computing – What does it mean to IT Professionals


What the hell is cloud computing?…I don’t know what we would do differently in the light of
cloud computing…other than change our ads.
—Larry Ellison

At a high level, cloud computing is the delivery of computing as a service. Cloud computing is an umbrella term for a set of methods for delivering computing resources over networks. Cloud computing applications rely on a network (typically the Internet) to provide users with shared resources, software, and data. With  cloud computing, computer systems and applications are supposed to function like a utility provider (such as the electricity grid). The term cloud is used as a metaphor for the Internet. It is based on the tendency to draw network access as an abstract “cloud” in infrastructure diagrams.
From a DBMS perspective, cloud computing moves the data and its management away from your local computing environment and delivers it as a service over the Internet.

Most of us already know that Cloud Computing is a new Buzz word in the industry and it is very true that  everyone want to learn about it as much as possible.

Cloud Computing

Let me tell you a small story  before we go to discuss about the Cloud Computing.
My cousin and his family is living in a small town.  In the town,  the power failures are so common and it is like 1 or 2 hours of power outage with a frequency of 2 or 3 times per day.  My cousin and his neighbors were so upset because these continuous power outages disturbing the kid’s studies and also making life difficult during the evenings. They know that there is an alternative to solve the problem by having  power generator as  a backup power source but most of the neighbor  families are not in a position to afford for it and also they are worried about the regular  maintenance cost of these devices.
One fine day, a group of smart minds came up with a solution to purchase a high capacity power generator ,  place it in some common place and to provide backup power connections to every home who ever ready to pay for the usage charges as per the the actual usage calculated by the electric meter plugged in at every home.  Interestingly, the  idea worked very well, and most of the people in the town were adapted the backup power source with the minimum capital investment and  zero maintenance cost.
I believe, by this time,  you might have understood the purpose of  cloud computing in IT industry. If it is still unclear, lets go forward to look at it in more detailed terms
The Current definition of Cloud Computing is ” A Comprehensive solution which delivers the IT as a Service. Here the term IT can be expanded as Infrastructure, Platform, Storage and Software”.  . At present the IT industry classified  into two groups in terms of cloud computing , first one is Cloud Computing Service Providers and the other one is Cloud Computing Service Consumers ( Client).
Cloud Computing in its Basic Form


Quick refresh on Cloud Computing Benefits to a Client/Consumer

1. Reduced Capital Cost to setup IT Infrastructure
Scenario 1:
If any organisation want to start a new business function that needs IT infrastructure, the organisation need not go through the all the complex process of establishing IT infrastructure starting from the Data center planning. Instead the company simply can go for a Cloud Computing service provider who is providing the kind of service, in his service catalogue, that meets the organisation’s IT requirement for the new business function. The requested service could be anything  like  Server/Storage/Network Infrastructure, Platform Environment or already built software application which can be customized to your requirement.  And the organisation will pay,  to the service provider, only for the resources that has been utilized. No Capital investment, no running maintenance cost.

Scenerio 2:
If any organisation want to migrate it’s existing IT infrastructure ( or part of it ) related to less critical business function, it can again approach the Cloud Computing Service provider for a solution that works for their actuation requirement.

2. Rapid scalability with the help of dynamic infrastructure
Current Challenge:
In any business, it is very common that, the initial design of IT infrastructure happens  considering the current potential of business and expected growth of business in near future. And these expectations / predictions about the future growth may or may not be correct, in current day high fluctuating business markets.  Any large Investment in IT infra setup will be wasted if the related business not doing well , as expected. And at the same time insufficient IT infra resources could block the business growth if the business was progressing better than expected.
It is always a real challenge to any organisation to predict the actual requirement of IT infrastructure , and this challenge can easily addressable if the organisation considering the cloud computing solution.
Using Cloud Computing, organisations can easily scale it’s resources to the level it matches the business requirement  which is very dynamic in nature.
3.  Utility Pricing Model
This point is self explanatory, organisations will pay for the only resources that they have used. No Initial investment to setup infra.
4. Self Service by using Automated Provisioning
I believe, this is one key point where cloud computing affecting the existing IT infrastructure  job roles.
By using automated provisioning feature of Cloud Computing , organisations can request the services mentioned in Service Catalogue and could receive the services  instantly and dynamically with minimum or no technology skills.
5. Resource availability  from anywhere of the world
Public clouds can be accessed from anywhere of the world using the internet, and this feature makes cloud computing as beautiful solution for many startup companies which are running using virtual teams located in different parts of world.



Cloud Computing Layers

IaaS  -  Infrastructure as a Service
Iaas   is basically a paradigm shift from “Infrastructure as an asset” to “Infrastructure as a Service”. If you have ever wished you could borrow someone’s enterprise-class server and storage for a few days,
run anything you want on it, and then give it back (and pay almost nothing), IAAS is a model you will
appreciate. IAAS providers allow instant provisioning of virtual servers, storage, and other resources.
Key Characteristics of Iaas:
  • Infrastructure is Platform independent
  • Infrastructure costs are shared by multiple clients/users
  • Utility Pricing – Clients will pay only for the resources they have consumed
Advantages:
  • Minimal or No Capital investment on Infrastructure Hardware
  • No Maintenance costs for Hardware
  • Reduced ROI risk
  • Avoid the wastage of Computing resources
  • Dynamic in nature
  • Rapid Scalability of Infrastructure to meet sudden peak in business requirements
Drawbacks:
  • Performance of Infrastructure purely depends on Vendor capability to manage resources
  • Consistent  high usage of resources for a long term could lead to higher costs
  • Companies have to introduce new layer of Enterprise security to deal with the cloud computing related to security issues
Note: It is better not to adapt Iaas Solution, if the oraganisation capital budget is greater than the Operating budget


PaaS – Platform as a Service
Paas is a Paradigm shift from ” purchasing platform environment tools as a licensing product ”  to “purchasing as a service”.
Key Characteristics:
  • Deployment purely based on cloud infrastructure
  • caters to agile project management methods
Advantages:
  • It is possible capture the complex testing & development platform  requirement and automate the tasks for provisioning of consistent environment.
Drawback:
  • Enterprises have to introduce new layer of security to deal with the security in cloud computing environment.

SaaS – Software as a Service
SaaS is basically paradigm shift from treating “treating software as an asset of  business/consumer” to “using software as a service achieve the business goals”. Web mail sites are the most common
example of SAAS. Instead of running your own mail program on your personal computer, Google or
Hotmail runs one for you and lets you access it via a web browser.
Advantages:
  • reduce Capital expenses required for the development and testing resources
  • Reduced ROI risk
  • Streamlines and Iterative updates of the software
Drawbacks:
  • Enterprises have to introduce new layer of security to deal with the security in cloud computing environment.
Layers of Cloud Computing

Cloud Computing Solutions for Enterprise

Public Cloud Solution for Enterprise
Public Cloud solution allows enterprise to adapt Iass, Pass and Saas services from a cloud computing service provide on the internet, and actual computing resources are available under control of Vendor.
Private Cloud Solution for Enterprise
Private Cloud Solution for Enterprise nothing but constructing cloud solution within the enterprise datacenter, to provide more security on physical resources. And the internal departments of the enterprise within the organisation can utilise and pay for cloud computing resources as if they are using public cloud resources.
Hybrid Cloud Solution for Enterprise
Hybrid cloud solution enables enterprise use both public cloud and private cloud resources same time depending on the criticality and importance of the business function.
Virtual Private Cloud Solution
Using Virtual Private Cloud Solution Companies can create their own private cloud environment with in the public cloud by using different network/firewall rules. And the purpose is to avoid external access to the enterprise resources.
Possible Cloud Computing Solutions for Enterprise

How Cloud Computing affects the Job roles in the Infrastructure Support Team

Depending on the Clod computing Solution that enterprise adapted, there will be direct and indirect effect on the various job roles with in the infrastructure support teams.
If you look at the Sysadmin role in general , the actual job role involves three major responsibilities:
  • Hardware administration
  • Operating System Builds
  • Operating System Administration
  • Network Services Administration
Once the organisation adapted the Cloud Computing solution ( IaaS / PaaS / SaaS ) , it no longer required to maintain the skillful technical people to deal with hardware related issues and OS Build operations but they still need resources to perform OS / Network administration and to customize cloud resources to meet the organisation requirements. And the same effect is true for the Network Support roles.
Cloud Computing solutions cannot replace every system administrator in the company but it will expect new level  cloud computing related expertise instead of ” to be isolated hardware maintenance skills”. For sure, it’s a call for learning. And more importantly the sysadmin job roles specifically dealing with the “Hardware & OS builds” has to go away, in near future.
For any organisation, the current  recruitment strategy for the SysAdmin Team  is “No. of Sysadmins are directly proportional to the physical server foot print in the data center “.  With IaaS adaption organisation’s server footprint will reduce drastically, and hence the no. of sysadmin positions.
As of now the Clouds were deployed to replace the Server infrastructure with windows / linux on X86 model, but not yet having solutions for Vendor Specific Server OS like Solaris on Sparc, IBM AIX and HP UX …etc.  Considering the speed of evolution in cloud computing technologies, it may not take long time to provide solutions for all kinds of server infrastructure. From the other side, if the Organisation choose to migrate their applications to X86 model servers to receive the benefits of economic cloud computing  then the change is more rapid.
Below pictures will give you an understanding how the roles are moving out of Infra Teams depending on the Cloud solution adapted by the organisation.
Job Role movement with IAAS Cloud Computing Solution
Job Role movement with PAAS Cloud Computing Solution
Job Role movement with PAAS Cloud Computing Solution

Final and one more story, i want to tell you,  before closing this post.

As most of you already aware, Pakistan is an agricultural based society where people treat their land  like “mother that feeds you everyday ” and cows like “part of family wealth”.  A decade before, most of the families used to follow the traditional way of cultivation that requires more number people and long working hours . And this requirement for the human labor is the main source for the jobs , in villages,  for longtime
With technology innovations in Pakistan, there were many new tools/machines  had been introduced to the  Pakistani agricultural industry which in turn reduced the requirement for the human labor. During  this technology change,  many people back at villages worried about their  livelihood for sometime. But, the worry didn’t last longtime because most of them quickly adapted the skills related to these new technologies like “regular maintenance of these new tools” , “using the tools for better productivity” and “finding new lands to cultivate using these new machines with low cost” etc., and started living better than earlier.

And I believe, same story applies for any other industry including IT.  And whenever we notice an inevitable change in our way, it is always wise to understand and get ready to accept it,  instead of worrying about and trying to resist it.   

Wednesday, November 13, 2013

View Hardware details of Linux machine:

CPU:
more /proc/cpuinfo

To count processor (including cores), enter:
grep -c processor /proc/cpuinfo


HDD:

df -h
fdisk -l
parted -l

RAM:

more /proc/meminfo
cat /proc/meminfo
free -k
free -m
free -g
dmidecode -t 16 --maximum limit
dmidecode -t 17




linux kernel version info:
--------------------------
# uname -a

whether 64-bit or not:
# uname -mrs

pae - pae kernel type indicate that I'm accssing more than 4GB ram using 32 bit kernel.
SMP - Kernel that supports multi core and multiple cpus.

Distribution Version:
# cat /etc/*release
# cat /etc/*-release
# lsb_release -a
# cat /proc/version