Archive

Archive for March, 2010

Application Server 10g R2 10.1.2.0.2 Installation Steps for OEL 5.4

March 4th, 2010 sam No comments

Follow Operating System Requirements for OEL 5.x or RHEL 5.x


1. The following packages (or later versions) must be installed on your Linux x86 or Linux x86-64 system:

binutils-2.16.91.0.5-23.4
gcc-4.1.0-28.4
gcc-c++-4.1.0-28.4
glibc-devel-2.4-31.2
libgcc-4.1.0-28.4
libstdc++-devel-4.1.0-28.4
libstdc++-4.1.0-28.4
make-3.80-202.2
compat-db 4.1.25-9


2. Ensure that libXp has been installed. The package libXp was not installed in RHEL 5/OEL 5 with default RPM packages, so it will need to be installed manually. In RHEL 4 this file was provided by the package xorg-x11-deprecated-libs which is installed with default package installation but this is not the case for RHEL5/OEL5 and is now provided with a different rpm, the libXp rpm. Install the package libXp by the command:

# rpm -ivh </path/to/>libXp.<version>.i386.rpm

Note: libXp.so.6 can be found by installing the package /Server/libXp-1.0.0-8.1.el5.i386.rpm under Disk3 of the OEL5 media.



3. The following are two requirements and their locations to obtain them from Oracle:

openmotif21-2.1.30-11.EL5.i386.rpm
[http://oss.oracle.com/projects/compat-oracle/dist/files/Enterprise_Linux/openmotif21-2.1.30-11.EL5.i386.rpm]

xorg-x11-libs-compat-6.8.2-1.EL.33.0.1.i386.rpm
[http://oss.oracle.com/projects/compat-oracle/dist/files/Enterprise_Linux/xorg-x11-libs-compat-6.8.2-1.EL.33.0.1.i386.rpm]


4. When installing Oracle Application Server 10g Release 2 (10.1.2.0.2) within the OEL 5.x or RHEL 5.x operating systems, you will need to create the following symbolic link as root prior to doing any installations:

# ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2


If an error occurs stating that libdb.so.2 already exists, it may be from a previous 10.1.3 installation. In this case, either move the file for backup and create the symbolic link or skip this step to see if the following problem occurs.

  • Without this symbolic link, httpd will give the following error:

    httpd: error while loading shared libraries: libdb.so.2:
    cannot open shared object file: No such file or directory

    With this link in place, httpd should start up successfully in OEL 5.0 or RHEL 5.0

    Note: On some OEL installs, libgdbm.so.2.0.0 may not exist. You can check the following way:

    # cat /etc/enterprise-release
    Enterprise Linux Enterprise Linux Server release 5.2 (Carthage)
    # ls /usr/lib/libgdbm.so.2.0.0

    If you are missing the 32-bit version, it can be installed using gdbm.i386 0:1.8.0-26.2.1. Alternatively, Patch 6078836 can be used instead, as it was uploaded to complete a 10.1.3 certification.


5. The installation of Oracle Application Server 10g Release 2 (10.1.2.0.2) requires the correct openmotif package to be installed on your OEL 5.x or RHEL 5.x box. Without the correct package, you will run into installation errors for those components that require openmotif (such as reports and forms). You may download the RPM package from the following location:

[http://oss.oracle.com/projects/compat-oracle/dist/files/Enterprise_Linux/openmotif21-2.1.30-11.EL5.i386.rpm]

As root, you can install this RPM package by issuing the following command:

# rpm -i openmotif21-2.1.30-11.EL5.i386.rpm


6. Any installation of Oracle Application Server 10g Release 2 (10.1.2.0.2) on OEL 5.x or RHEL 5.x in which Reports is getting installed will fail with reports relinking errors unless you apply the required RPM listed below.You may download the RPM package from the following location:

[http://oss.oracle.com/projects/compat-oracle/dist/files/Enterprise_Linux/xorg-x11-libs-compat-6.8.2-1.EL.33.0.1.i386.rpm]

As root, you can install this RPM package by issuing the following command

# rpm -i xorg-x11-libs-compat-6.8.2-1.EL.33.0.1.i386.rpm

After the RPM, is installed, you will also need to override the /usr/lib/libXtst.so.6 with the one from /usr/X11R6/lib/libXtst.so.6. As root, issue the commands:

# mv /usr/lib/libXtst.so.6 /usr/lib/libXtst.so.6.ORG

# ln -s /usr/X11R6/lib/libXtst.so.6 /usr/lib/libXtst.so.6

Categories: DBA Tags:

Enabling Xmanager in Red Hat 5 EL

March 4th, 2010 sam No comments
For XDMCP connection to Red Hat 5 EL
1. XDM Configuration
1. Change runlevel to 5
Open/etc/inittab and set the initial runlevel to 5 as following:
id:5:initdefault:
2. Enable XDMCP
For GDM:
Open /etc/gdm/custom.conf and set the Enable entry to 1 in the [xdmcp] section as following.
[xdmcp]
Enable=1
For KDM:
Open /usr/share/config/kdm/Xaccess and remove the initial “#” character for the following line:
#* #any host can get a login window ==>
* #any host can get a login window
Open /usr/share/config/kdm/kdmrc and set the Enable entry to true in the [xdmcp] section as following.
[xdmcp]
Enable=true
2. Firewall (TCP/UDP Ports) Configuration
Open UDP port 177 from the PC to the remote host direction.
Open incoming TCP ports 6000~6010 from the remote host to your PC.
3. Reboot the remote host and start Xmanager
# init 3; init 5
Categories: Linux Tags:

How to mount remote windows partition (windows share) under Linux

March 2nd, 2010 sam No comments

How to mount remote windows partition (windows share) under Linux

All files accessible in a Linux (and UNIX) system are arranged in one big tree, the file hierarchy, rooted at /. These files can be spread out over several devices. The mount command serves to attach the file system found on some device to the big file tree.

Use the mount command to mount remote windows partition or windows share under Linux as follows:

Procedure to mount remote windows partition (NAS share)

1) Make sure you have following information:
==> Windows username and password to access share name
==> Sharename (such as //server/share) or IP address
==> root level access on Linux

2) Login to Linux as a root user (or use su command)

3) Create the required mount point:
# mkdir -p /mnt/ntserver
4) Use the mount command as follows:
# mount -t cifs //ntserver/download -o username=vivek,password=myPassword /mnt/ntserver

Use following command if you are using Old version such as RHEL <=4 or Debian <= 3:
# mount -t smbfs -o username=vivek,password=D1W4x9sw //ntserver/download /mnt/ntserver

5) Access Windows 2003/2000/NT share using cd and ls command:
# cd /mnt/ntserver; ls -l
Where,

  • -t smbfs : File system type to be mount (outdated, use cifs)
  • -t cifs : File system type to be mount
  • -o : are options passed to mount command, in this example I had passed two options. First argument is password (vivek) and second argument is password to connect remote windows box
  • //ntserver/download : Windows 2000/NT share name
  • /mnt/ntserver Linux mount point (to access share after mounting)
Categories: Linux Tags:

How to check if an rpm package is installed on a Red Hat Linux server

March 2nd, 2010 sam No comments
How to check if an rpm package is installed on a Red Hat Linux server
rpm check, check if package is installed, red hat linux

Maintaining a server up-to-date requires regular rpm checks.

Each time Red Hat releases a newer version of, for example, samba rpm (and requisites) with fixes for known vulnerabilities one needs to check if your server already has that rpm installed and which version, to compare it with the new released one (in the case when you have under administration more servers).

How to check if an rpm package is installed on a Red Hat Linux server

$ rpm -qa | grep samba
samba-common-3.0.9-1.3E.14.1
samba-3.0.9-1.3E.14.1
samba-client-3.0.9-1.3E.14.1

Taking a look at man rpm we’ll se that -q queries and -a queries all packages:

$ man rpm
SYNOPSIS
QUERYING AND VERIFYING PACKAGES:
rpm {-q|–query} [select-options] [query-options]

rpm {-V|–verify} [select-options] [verify-options]

rpm –import PUBKEY …

rpm {-K|–checksig} [--nosignature] [--nodigest]
PACKAGE_FILE …
……………………………………………………..
select-options
[PACKAGE_NAME] [-a,--all] [-f,--file FILE]
[-g,--group GROUP] {-p,–package PACKAGE_FILE]
[--fileid MD5] [--hdrid SHA1] [--pkgid MD5] [--tid TID]
[--querybynumber HDRNUM] [--triggeredby PACKAGE_NAME]
[--whatprovides CAPABILITY] [--whatrequires CAPABILITY]
query-options
[--changelog] [-c,--configfiles] [-d,--docfiles] [--dump]
[--filesbypkg] [-i,--info] [--last] [-l,--list]
[--obsoletes] [--provides] [--qf,--queryformat QUERYFMT]
[-R,--requires] [--scripts] [-s,--state]
[--triggers,--triggerscripts]

The result of the commands shows us that samba rpm and requisites are installed on our server.

You can replace samba with the rpm package you need and play a little with grep and regular expressions to limit the results of the command depending on the desired rpm name.

Categories: DBA Tags:

Oracle Apps Patch info Scripts

March 1st, 2010 sam No comments

/* Query to find out if any patch except localisation patch is applied or not, if applied, that what all drivers it contain and time of it’s application*/
select A.APPLIED_PATCH_ID, A.PATCH_NAME, A.PATCH_TYPE, B.PATCH_DRVIER_ID, B.DRIVER_FILE_NAME, B.ORIG_PATCH_NAME, B.CREATION_DATE, B.PLATFORM, B.SOURCE_CODE, B.CREATIONG_DATE, B.FILE_SIZE, B.MERGED_DRIVER_FLAG, B.MERGE_DATE from AD_APPLIED_PATCHES A, AD_PATCH_DRIVERS B where A.APPLIED_PATCH_ID = B.APPLIED_PATCH_ID and A.PATCH_NAME = ‘<patch number>’

/* To know that if the patch is applied successfully, applied on both node or not, start time of patch application and end time of patch application, patch top location , session id … patch run id */
select D.PATCH_NAME, B.APPLICATIONS_SYSTEM_NAME, B.INSTANCE_NAME, B.NAME, C.DRIVER_FILE_NAME, A.PATCH_DRIVER_ID, A.PATCH_RUN_ID, A.SESSION_ID, A.PATCH_TOP, A.START_DATE, A.END_DATE, A.SUCCESS_FLAG, A.FAILURE_COMMENTS from AD_PATCH_RUNS A, AD_APPL_TOPS B, AD_PATCH_DRVIERS C, AD_APPLIED_PATCHES D where A.APPL_TOP_ID = B.APPL_TOP_ID AND A.PATCH_DRIVER_ID = C.PATCH_DRIVER_ID and C.APPLIED_PATCH_ID = D.APPLIED_PATCH_ID and A.PATCH_DRIVER_ID in (select PATCH_DRIVER_ID from AD_PATCH_DRIVERS where APPLIED_PATCH_ID in (select APPLIED_PATCH_ID from AD_APPLIED_PATCHES where PATCH_NAME = ‘<patch number>’)) ORDER BY 3;

/* To find the latest application version */
select ARU_RELEASE_NAME||’.'||MINOR_VERSION||’.'||TAPE_VERSION version, START_DATE_ACTIVE updated,ROW_SOURCE_COMMENTS “how it is done”, BASE_RELEASE_FLAG “Base version” FROM AD_RELEASES where END_DATE_ACTIVE IS NULL

/* to find the base application version */
select ARU_RELEASE_NAME||’.'||MINOR_VERSION||’.'||TAPE_VERSION version, START_DATE_ACTIVE when updated, ROW_SOURCE_COMMENTS “how it is done” from AD_RELEASES where BASE_RELEASE_FLAG = ‘Y’

/* To find all available application version */
select ARU_RELEASE_NAME||’.'||MINOR_VERSION||’.'||TAPE_VERSION version, START_DATE_ACTIVE when updated, END_DATE_ACTIVE “when lasted”, CASE WHEN BASE_RELEASE_FLAG = ‘Y’ Then ‘BASE VERSION’ ELSE ‘Upgrade’ END “BASE/UPGRADE”, ROW_SOURCE_COMMENTS “how it is done” from AD_RELEASES

/* To get file version of any application file which is changed through patch application */
select A.FILE_ID, A.APP_SHORT_NAME, A.SUBDIR, A.FILENAME, max(B.VERSION) from AD_FILES A, AD_FILE_VERSIONS B where A.FILE_ID = B.FILE_ID and B.FILE_ID = 86291 group by A.FILE_ID, A.APP_SHORT_NAME, A.SUBDIR, A.FILENAME

/* To get information related to how many time driver file is applied for bugs */
select * from AD_PATCH_RUN_BUGS where BUG_ID in (select BUG_ID from AD_BUGS where BUG_NUMBER = ‘<BUG NUMBER>’

/* To find latest patchset level for module installed */
select APP_SHORT_NAME, max(PATCH_LEVEL) from AD_PATCH_DRIVER_MINIPKS GROUP BY APP_SHORT_NAME

/* To find what is being done by the patch */
select A.BUG_NUMBER “Patch Number”, B. PATCh_RUN_BUG_ID “Run Id”,D.APP_SHORT_NAME appl_top, D.SUBDIR, D.FILENAME, max(F.VERSION) latest, E.ACTION_CODE action from AD_BUGS A, AD_PATCH_RUN_BUGS B, AD_PATCH_RUN_BUG_ACTIONS C, AD_FILES D, AD_PATCH_COMMON_ACTIONS E, AD_FILE_VERSIONS F where A.BUG_ID = B.BUG_ID and B.PATCH_RUN_BUG_ID = C.PATCH_RUN_BUG_ID and C.FILE_ID = D.FILE_ID and E.COMMON_ACTION_ID = C.COMMON_ACTION_ID and D.FILE_ID = F.FILE_ID and A.BUG_NUMBER = ‘<patch number>’ and B.PATCH_RUN_BUG_ID = ‘ < > ‘ and C.EXECUTED_FLAG = ‘Y’ GROUP BY A.BUG_NUMBER, B.PATCH_RUN_BUG_ID, D. APP_SHORT_NAME, D>SUBDIR, D.FILENAME, E.ACTION_CODE

/* To find Merged patch Information from database in Oracle Applications */
select bug_number from ad_bugs where bug_id in ( select bug_id from ad_comprising_patches where patch_driver_id =(select patch_driver_id from ad_patch_drivers where applied_patch_id =&n) );

/* Second Query to know, what all has been done during application of PATCH */
Select J.PATCh_NAME, H.APPLICATIONS_SYSTEM_NAME Instance_Name, H.NAME, I.DRIVER_FILE_NAME, D.APP_SHORT_NAME appl_top, D.SUBDIR, D.FILENAME, max(F.VERSION) latest, E.ACTION_CODE action from AD_BUGS A, AD_PATCH_RUN_BUGS B, AD_PATCH_RUN_BUG_ACTIONS C, AD_FILES D, AD_PATCH_COMMON_ACTIONS E, AD_FILE_VERSIONS F, AD_PATCH_RUNS G, AD_APPL_TOPS H, AD_PATCH_DRIVERS I, AD_APPLIED_PATCHES J where A.BUG_ID = B.BUG_ID and B.PATCH_RUN_BUG_ID = C.PATCH_RUN_BUG_ID and C.FILE_ID = D.FILE_ID and E.COMMON_ACION_ID = C.COMMON_ACTION_ID and D.FILE_ID = F.FILE_ID and G.APPL_TOP_ID = H.APPL_TOP_ID and G.PATCH_DRIVER_ID = I.PATCH_DRIVER_ID and I.APPLIED_PATCH_ID = J.APPLIED_PATCH_ID and B.PATCH_RUN_ID = G.PATCH_RUN_ID and C.EXECUTED_FLAG = ‘Y’ and G.PATCH_DRIVER_ID in (select PATCH_DRIVER_ID from AD_PATCH_DRIVERS where APPLIED_PATCH_ID in (select APPLIED_PATCH_ID from AD_APPLIED_PATCHES where PATCH_NAME = ‘<Patch Number>’)) GROUP BY J.PATCH_NAME, H.APPLICATINS_SYSTEM_NAME, H.NAME, I.DRIVER_FILE_BNAME, D.APP_SHORT_NAME, D.SUBDIR, D.FILENAME, E.ACTION_CODE

/* Script to find out Patch level of mini Pack */
select product_version,patch_level from FND_PROUDCT_INSTALLATIONS where patch_level like ‘%&shortname%’;

Replace short name by name of Oracle Apps Minipack for which you want to find out Patch level . ex.
AD – for Applications DBA
GL – for General Ledger
PO – Purchase Order

Categories: Apps DBA Tags: