Showing posts with label Oracle. Show all posts
Showing posts with label Oracle. Show all posts

Wednesday, September 9, 2009

How to Check the Environment Variables for an Oracle Process

1. Determine the pid of the process at OS level, eg for the smon process:
ps -ef grep smon
2. Get the environment of the process:
SOLARIS:
pargs -e grep ORACLE
LINUX:
cat /proc//environ
AIX:
ps eauwww
HP-UX:
On this Unix flavor there is no command to grasp the process environment directly. This can only be
extracted using a debugger from the _environ structure. This procedure can be used on the other
Unix flavors, as follows:
gdb smon
This attaches gdb to the pid mentioned above. The smon name is just an indication that the process
we attach to is smon, but the only parameter that matters is the pid.
After attaching to the process, the following command extracts the information from the _environ
list:
p ((char**)_environ)[0]@30
which would list the first 30 environment variables. If more are defined, just increase the parameter after @.
As well, the list can be extracted one item from the list at a time, using an iterator like:p ((char**)_environ)[i]
which would extract element #i+1.Windows:
To get the information on Windows, 2 things are needed:
1. check the registry for the ORACLE_* keys used to start the Oracle process. These keys are in:
HKEY_LOCAL_MACHINE/Software/Oracle/HOME
(before 10g)
HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/KEY_
from 10g on.
2. check the environment variables that were used by the oracle process at startup.
For this, one would need the process explorer utility from sysinternals, which can be found at:
www.sysinternals.com
(http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx)
After starting the procexp utility, find the oracle process you want to check in the process list, right
click on it, then select Properties. The Environment tab should indicate all the environment variables
used when the process was started (even if dynamically in command line).
The utility also displays the key values from registry, but being so many it's difficult to look for them.

Tuesday, May 26, 2009

How To Compile and Run Forms with a User Different from Oracle?

Starting with Forms version 9.0.4 and 10.1.2 when trying to compile forms with a user different from Oracle result in errors like:"Permission denied", "error while loading shared libraries: libig.so.0", FRM-91500, FRM-91108
This is the expected behavior and it is caused by a change in security rights:In previous versions the default permission was 755 but starting in these new versions „the default permission is 700 for the majority of binaries in the technology stack). This was also implemented by CPU patches.”.
To work around this issue, perform the following steps:


You can use 2 different solutions

A.)
Change permissions only for a small set of files1. Connect with the "oracle" user and execute the following script (specify a correct path for the ORACLE_HOME):ORACLE_HOME=/specify-the-path-to-the-ORACLE_HOMEexport ORACLE_HOMEchmod +rx $ORACLE_HOMEchmod +rx $ORACLE_HOME/binchmod +rx $ORACLE_HOME/bin/frm*chmod -R +rx $ORACLE_HOME/libchmod +rx $ORACLE_HOME/formschmod -R +rx $ORACLE_HOME/forms/mesgchmod -R +rx $ORACLE_HOME/forms/adminchmod -R +rx $ORACLE_HOME/oracorechmod +rx $ORACLE_HOME/nlschmod -R +rx $ORACLE_HOME/nls/datachmod +rx $ORACLE_HOME/rdbmschmod -R +rx $ORACLE_HOME/rdbms/mesgchmod +rx $ORACLE_HOME/ldapchmod -R +rx $ORACLE_HOME/ldap/mesgchmod -R +rx $ORACLE_HOME/ldap/adminchmod +rx $ORACLE_HOME/networkchmod -R +rx $ORACLE_HOME/network/admin

2. In order to avoid FRM-91500 one may have to add the following lines in the frmcmp_batch.sh:TERM=vt220export TERM

B.)

Change permissions for all files in ORACLE_HOME
1. Login into Server as Oracle or user who installed the Oracle Software

2. cd ORACLE_HOME
3. run this command: chmod -R +rx *Reason: This is required to be executed from ORACLE_HOME because there are several filesthroughout the Oracle Home that have the setuid bit set.
4. Logout and login as non-oracle user and execute the forms executable.

Tuesday, April 14, 2009

How to Get the Forms,PLL,LDT,Reports,Database Object Versions from the backend

How to get the version of below objects from backend

a) Forms
b) Reports
c) Library files
d) LDT
e) SQL files
f) Packages



a) Form

When considering forms one needs to get the version from $JA_TOP and $AU_TOP as well.

Navigate to cd $JA_TOP/forms/US
Execute command --- > strings -a | grep '$Header'

Example
strings -a JAINPORE.fmx | grep '$Header'

Navigate to cd $AU_TOP/forms/US
Execute command --- > strings -a | grep '$Header'

Example
strings -a JAINPORE.fmb | grep '$Header'


b) Reports

Navigate to cd $JA_TOP/reports/US
Execute command --- > strings -a | grep '$Header'

Example
strings -a JAINARDR.rdf | grep '$Header'

c) Library files

Navigate to cd $AU_TOP/resource
Execute command --- > strings -a | grep '$Header'

Example
strings -a CUSTOM.pll | grep '$Header'

d) LDT

Navigate to cd $JA_TOP/patch/115/import/US
Execute command --- > strings -a | grep '$Header'

Example
strings -a jai115cp_F.ldt | grep '$Header'

e) SQL files

Navigate to cd $JA_TOP/patch/115/sql
Execute command --- > strings -a | grep '$Header'

Example
strings -a ja_in_mass_tax_changes_p.sql | grep '$Header'

f) Packages

Navigate to cd $JA_TOP/patch/115/sql
Execute command --- > strings -a | grep '$Header' (Package Specification)
Execute command --- > strings -a | grep '$Header' (Package Body)

Example
strings -a jai_encum_prc.pls | grep '$Header'
strings -a jai_encum_prc.plb | grep '$Header'

Monday, March 2, 2009

Is it Safe To End Date Some Applications Users like GUEST ?

The following 10 users are generated by the Oracle applications

GUEST
IBEGUEST
IBE_ADMIN
IEXADMIN
IRC_EMP_GUEST
IRC_EXT_GUEST
OP_CUST_CARE_ADMIN
OP_SYSADMIN
ASGADM
MOBILEADMIN

Is it safe to assign end dates to these users (if you are under a condition as not to remove them)?
In particular many are concerned with ASGADM and MOBILEADMIN as these have access to the responsibility System Administrator.

You may end date somes users and must not do it for some others like GUEST.

To get an in depth understanding, you can the review the chapter AUTHENTICATION ( page 23 ) of the white paper "Best Practices for Securing Oracle E-Business Suite" from Metalink Note 189367.1 .
It shows the users which can be end dated and the users which must not be , depending on the Applications you are using.

Monday, February 16, 2009

Error while running adbldxml.pl after upgrading database to 11.1.0.7 from 10.2.0.2

The following error was encountered while running adbldxml.pl on the database tier to create the context file.


====================================================================
Could not Connect to the Database : ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory

Connecting to the VISN11 database instance...

Connection paramaters values:
Database server hostname ==> NGLINUX05.NEWGEN.COM
Database listener port ==> 1542
Database SID ==> VISN11
Database schema name ==> apps

Could not Connect to the Database : ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory


AC-40000: Error: Exception - java.sql.SQLException: ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
====================================================================


The problem was that the database was not registered with the listener.




SQL> show parameter local_listener;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string




The value for LOCAL_LISTENER is missing, so automatic instance registration is not taking place
We can correct this by setting the LOCAL_LISTENER parameter:


SQL> alter system set local_listener='(ADDRESS =(PROTOCOL=TCP)(HOST=host.domain.com)(PORT=port_number)(SID=sid_name)';

System altered.

SQL> alter system register;

System altered.


SQL> exit

Now adbldxml runs successfully.

Friday, January 9, 2009

Identifying if OS and Oracle installation is 64 bit or 32 bit


Use the following steps to check if Operating system and Oracle software is 32 bit or 64 bit

Determining whether OS is 64 bit or 32 bit:

- On Solaris,

$ /usr/bin/isainfo -kv
64-bit amd64 kernel modules

$ /usr/bin/isainfo -v
64-bit amd64 applications
cx16 mon sse3 pause sse2 sse fxsr mmx cmov amd_sysc cx8 tsc fpu
32-bit i386 applications
cx16 mon sse3 pause sse2 sse fxsr mmx cmov sep cx8 tsc fpu

This output tells us that solaris operating systems allow co-existence of 32-bit and 64-bit files.

- On AIX,
$ getconf -a | grep KERN
$ file /usr/lib/boot/unix*

- On HP-UX,
$ /usr/bin/ getconf KERNEL_BITS
$ /usr/bin/file /stand/vmunix

- On linux,

$uname -a
Linux debian 2.6.18-4-686 #1 SMP Wed May 9 23:03:12 UTC 2007 i686 GNU/Linux

If the output is x86_64 then 64-bit and i686 or similar for 32-bit.

- On windows,

Start>All Programs>accessories> System Tools>System Information>look for under System summary.

Or start>run>dixdiag>Then check for WHQL digital signature.



Determining whether Oracle Software is 32 bit or 64 bit:


Method 1:
--------------
Go to $ORACLE_HOME/bin and check,

# cd $ORACLE_HOME/bin
# file oracle
oracle: ELF 64-bit LSB executable AMD64 Version 1, dynamically linked, not stripped

Here it comes 64 bit and hence oracle software is 64 bit. If the output of the "file oracle" command does not say 64-bit explicitly then you are running 32-bit Oracle.

If you had 32 bit oracle software installed then output will be like,

oracle@sol:/db/oracle/bin$ file oracle
oracle: setuid setgid ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), not stripped



Method 2: Check for lib, lib32 folders
--------------------------------------

1) $ORACLE_HOME/lib32
2) $ORACLE_HOME/lib

If the two directories $ORACLE_HOME/lib32 and $ORACLE_HOME/lib are existing then it is 64 bit.

If only ORACLE_HOME/lib directory exists, then it is 32 bit.