Search This Blog

Tuesday, May 30, 2006

iscsi and RAC install with openfiler

Download the openfiler from http://www.openfiler.com/After downloading this cut a CD.Install the software on a machine.Now open the putty asdtbde.idc.oracle.comexport http_proxy=http://www-proxy.us.oracle.com:80/Run the command ,"yum update"
Refer the
http://fedoranews.org/mediawiki/index.php/Going_Enterprise_-_setup_your_FC4_iSCSI_target_in_5_minutes
Download the iscsi Initiator
http://www.microsoft.com/windowsserver2003/technologies/storage/iscsi/msfiSCSI.mspx

http://guialivre.governoeletronico.gov.br/mediawiki/index.php/TestesOracle10gRacISCSI


/etc/init.d/iscsi-target start
Check the logfiles
/var/log/messages
Open the file /etc/ietd.conf and change the
domain , in the reverse order , for example com.oracle.com
And restart the iscsi again.

If this fails with the iscsi_module error , please change the grub.conf file
and make sure the default kernel is "not" SMP Kernel.

Start the kernel without the SMP mode ( Openfiler Release 2 (Beta1) (2.6.9-34.EL))

Change the grub.conf file with the correct entries.

Mounting the ocfs2 files systems on linux

On incq128ad
------------

/etc/init.d/o2cb status
/etc/init.d/o2cb load
/etc/init.d/o2cb online ocfs2

mount -t ocfs2 -o datavolume /dev/sdc /ocfs

to umount
----------
umount /ocfs
/etc/init.d/o2cb status
/etc/init.d/o2cb offline ocfs2
/etc/init.d/o2cb unload


On asdtbde machine
-------------------

/etc/init.d/o2cb status
/etc/init.d/o2cb load
/etc/init.d/o2cb online ocfs2
mount -t ocfs2 -o datavolume /dev/sdc /ocfs

to umount
----------
umount /ocfs
/etc/init.d/o2cb status
/etc/init.d/o2cb offline ocfs2
/etc/init.d/o2cb unload


Start RAC Instance
--------------------

/etc/init.d/o2cb status
/etc/init.d/o2cb load
/etc/init.d/o2cb online ocfs2

mount -t ocfs2 -o datavolume /dev/sdc /ocfs

Checck whether the proper volume is monuted or not by running the "ls" command

ls -l /ocfs

Start the RAC instance by running the command ,

/home/rac/crs/bin/crsctl start crs

For the latset openfiler 2.3  I need to do the following

Commented entry in /etc/initiators.deny in the openfiler machine.
service iscsi-target restart
iscsiadm -m discovery -t sendtargets -p openfiler 
iscsiadm -m discovery -t sendtargets -p iqn.2006-01.com.openfiler:tsn.ffe2ca0ed600  -p openfiler -l
service iscsi restart

Tuesday, May 23, 2006

LDAP Useful debugging

How to enable ldap debugging so that only the LDAP Operations can be
traced like ldapsearch , modify , add and delete etc

Check the LDAP debug log level by running the following command ,

ldapsearch -p -h -D "cn=orcladmin" -w -b "" -s base "objectclass=*" orcldebugflag

This ideally should give the result as "0" , if the debugging is not enabled.

for example ,
orcldebugflag=0

ldapsearch -p -h -D "cn=orcladmin" -w -b "" -s base "objectclass=*" orcldebugop

This ideally should give the result as "0" , if the debugging is not enabled.

for example ,
orcldebugflag=0



For 9.0.4 onwards


cat debug.ldif

--cut here---
dn:
changetype: modify
replace: orcldebugop
orcldebugop: 511

dn:
changetype: modify
replace: orcldebugflag
orcldebugflag: 8388609
----cut here-------

ldapmodify -p -h -D "cn=orcladmin" -w -f debug.ldif

1 Heavy trace debugging
128 Debug packet handling
256 Connection management, related to network activities
512 Search filter processing
1024 Entry parsing
2048 Configuration file processing
8192 Access control list processing
491520 Log of communication with the back end - that is with the database
524288 Schema related operations
4194304 Replication specific operations
8388608 Log of entries, operations and results for each connection
16777216 Trace function call arguments
67108863 All possible operations/data


The value 8388609 is dertmined using the formula

8388609 = 8388608 (Log of entries, operations and results for each connection)+ 1 (Heavy trace debugging)

For the ACL debugging you can use the loglevel as 8396801 (8192 (Access control list processing) +
8388608 (Log of entries, operations and results for each connection)+ 1 (Heavy trace debugging) )

debug.ldif

--cut here---
dn:
changetype: modify
replace: orcldebugop
orcldebugop: 0

dn:
changetype: modify
replace: orcldebugflag
orcldebugflag: 0
----cut here-------

ldapmodify -p -h -D "cn=orcladmin" -w -f debug.ldif

Please note that this operations may not require restart the OID , but to be
on the safer side , restart the OID after this.

You can check the latest log files from the directory $ORACLE_HOME/ldap/log directory.

For the version 9.0.2.3


Check the LDAP debug log level by running the following command ,

ldapsearch -p -h -D "cn=orcladmin" -w -b "" -s base "objectclass=*" orcldebugflag

This ideally should give the result as "0" , if the debugging is not enabled.

for example ,
orcldebugflag=0


To enable the debug trace so that only ldap operations can be traced ,

cat debug.ldif
--------------

---Cut Here ---
dn:
changetype: modify
replace: orcldebugflag
orcldebugflag: 260
---- End ----------


Then apply it to OID:
ldapmodify -p -h -D "cn=orcladmin" -w -f debug.ldif

The available DEBUG-LEVELS are:
1 = Trace function calls
2 = Debug packet handling
4 = Heavy trace debugging
8 = Connection Management
16 = Print out packets sent and received
32 = Search filter processing
64 = Configuration file processsing
128 = Access control list processing
256 = Stats log connections/operations/results
512 = Stats log entries sent
1024 = Print communication with the back-end
2048 = Print entry parsing debugging
4096 = Schema-related debugging
32768 = Replication Specific debugging
65535 = Enable all debugging

260 is calculated based on this formula

260 = 256 ( Stats log connections/operations/results) + 4 (Heavy trace debugging)

For the ACL debugging you can use the loglevel as 388 (128 (Access control list processing) +
256 ( Stats log connections/operations/results) + 4 (Heavy trace debugging) )

To revert back the tracing run the following commands

---Cut Here ---
dn:
changetype: modify
replace: orcldebugflag
orcldebugflag: 0
---- End ----------


Then apply it to OID:
ldapmodify -p -h -D "cn=orcladmin" -w -f debug.ldif

You can check the latest log files from the directory $ORACLE_HOME/ldap/log directory.

Tuesday, April 19, 2005

WebCache coreok settings

To test:
Using a "release" (optimized) build:
1. Start WC, using "webcachectl start", and send it a SIGSEGV. Verify
that a tracedump file is created
2. Start WC using "webcachectl start coreok", and send it a SIGSEGV.
Verify that a core dump is created in the directory from which you ran the
webcachectl command
3. Start WC using "opmnctl startproc ias-component=WebCache" and send it a
SIGSEGV. Verify that a tracedump is created
4. Start WC using "opmnctl startproc ias-component=WebCache WCCORE=true"
and send it a SIGSEGV. Verify that a core dump is created in $ORACLE_HOME
5. Edit opmn.xml, adding the following to the WebCache component:





Restart OPMN and Web Cache and send a SIGSEGV. Verify that a core dump
is created in $ORACLE_HOME
.
Using a debug build:
.
* Try all 4 scenarios for the optimized build. They should all create
core files
.
Note: These tests should be performed prior to every release to verify that
tracedumping and core dumping is working appropriately
On Some platforms like lunux you may need to run the script
Ensure the webcache executables have the stuid flag set.
- login as root
- run $ORACLE_HOME/webcache/bin/webcache_setuser.sh setroot

Tuesday, March 29, 2005

Important Notes

We recently had the same issue. This works fine when we give http://machine.com:port//, Please try with the following.Rather than giving a line like give a line like in $OH/j2ee/mywebapp/config/default-web-site.xml Please check after this.

Saturday, March 19, 2005

RedHat cluter manager

Steps

Attach the firewire disk

[root@indl224ad etc]# fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
64 heads, 32 sectors/track, 76319 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 9538 9766896 83 Linux
/dev/sda2 9539 19076 9766912 83 Linux
/dev/sda3 19077 28614 9766912 83 Linux
/dev/sda4 28615 76319 48849920 5 Extended
/dev/sda5 28615 28710 98288 83 Linux
/dev/sda6 28711 28806 98288 83 Linux
/dev/sda7 28807 29761 977904 83 Linux
/dev/sda8 29762 44067 14649328 83 Linux


Here I mapped /dev/sda1 and /dev/sda2 as the quorum disks.

Enter the following in the file /etc/syconfig/rawdevices

/dev/raw/raw1 /dev/sda5
/dev/raw/raw2 /dev/sda6

And do

service rawdevices start

after this issue the command the

raw -qa

And install the redhat cluster software on both the nodes ,

Configure the redhat cluster , and run the command ,

service clumanger start

to stop the cluster ,

stop the cluster by giving the command ,

service clumanager stop
service rawdevices stop

and do the same on other machine.

Tuesday, December 14, 2004

Using the GDB

gdb $ORACLE_HOME/jdk/bin/java 15155
info threads
thread apply all where
detatch
EOF
done

Monday, December 13, 2004

Tracing Methods in Java

Install the Weblogic JRockit JVM in your PC.

after this set the path
PATH=d:\jrockit\bin;%PATH%

And make sure the correct JVM is loaded ,

java -version , This should display ,
BEA WebLogic JRockit(TM) 1.4.2_04 JVM

java -Xjvmpi:entryexit=on -Xverbose:codegen -Xverboselog:c :\jvm.txt -jar oc4j.jar

Make sure you delete the jvm.txt before running this.






Friday, December 10, 2004

Deploy OC4J Portal After the install

This is the procedure for deploying the portal ,

1. Run the script ,

/home/ias904/mid/assistants/opca/launch.sh

2. Then create a file , say dd.txt with the following

UltrasearchAdmin=UltrasearchAdmin,/home/test/mid1/ultrasearch/webapp/ultrasearch_admin.ear,OC4J_Portal,ultrasearch/lib/ultrasearch_query.jar,ultrasearch/webapp/config,jlib/repository.jar,jlib/uix2.jar,jlib/ohw.jar,jlib/regexp.jar,j2ee/home/jazn.jar,jdbc/lib/nls_charset12.zip,RemoveEarfile
UltrasearchQuery=UltrasearchQuery,/home/test/mid1/ultrasearch/sample.ear,OC4J_Portal,ultrasearch/lib/ultrasearch_query.jar,ultrasearch/webapp/config,RemoveEarfile
UltrasearchPortlet=UltrasearchPortlet,/home/test/mid1/ultrasearch/webapp/ultrasearch_portlet.ear,OC4J_Portal,ultrasearch/lib/ultrasearch_query.jar,portal/jlib/ptlshare.jar,portal/jlib/pdkjava.jar,jdbc/lib/nls_charset12.zip,RemoveEarfile
portal=portal,/home/test/mid1/portal/jlib/portal.ear,/home/test/mid1/j2ee/properties/oc4j_portal.properties,OC4J_Portal,portal/jlib/wwjni.jar,j2ee/home/jazn.jar,portal/jlib/ptlshare.jar,opmn/jlib/optic.jar,RemoveEarfile
portal=jpdk,/home/test/mid1/portal/jlib/jpdk.ear,OC4J_Portal,portal/jlib/pdkjava.jar,portal/jlib/portaltools.jar,portal/jlib/ptlshare.jar,portal/jlib/tidy.jar
portal=portalTools,/home/test/mid1/portal/jlib/portalTools.ear,OC4J_Portal,portal/jlib/portaltools.jar,portal/jlib/pdkjava.jar,portal/jlib/ptlshare.jar,portal/jlib/tidy.jar,jlib/uix2.jar,jlib/share.jar,jlib/ohw.jar,RemoveEarfile
portal=portalHelp,/home/test/mid1/portal/jlib/portalHelp.ear,OC4J_Portal,jlib/regexp.jar,jlib/ohw.jar,RemoveEarfile
syndserver=syndserver,/home/test/mid1/syndication/j2ee/syndserver.ear,OC4J_Portal,syndication/lib/jr_dav.jar,jlib/regexp.jar,jlib/repository.jar,jlib/ldapjclnt9.jar,jlib/uix2.jar,jlib/share.jar,jlib/ohw.jar,RemoveEarfile,JAZN=LDAP
syndserver=syndprovider,/home/test/mid1/syndication/j2ee/syndprovider.ear,OC4J_Portal,syndication/lib/jr_dav.jar,jlib/regexp.jar,portal/jlib/pdkjava.jar,portal/jlib/portaltools.jar,portal/jlib/ptlshare.jar,jlib/uix2.jar,jlib/share.jar,jlib/ohw.jar,RemoveEarfile,JAZN=LDAP
orauddi=orauddi,/home/test/mid1/uddi/j2ee/orauddi.ear,OC4J_Portal,jlib/uix2.jar,jlib/share.jar,jlib/ohw.jar,jlib/regexp.jar,jlib/repository.jar,jlib/ldapjclnt9.jar,RemoveEarfile,JAZN=LDAP
orauddi=oraudrepl,/home/test/mid1/uddi/j2ee/oraudrepl.ear,OC4J_Portal,jlib/repository.jar,jlib/ldapjclnt9.jar,RemoveEarfile,JAZN=LDAP

3. Run the following command to deploy the above applications in OC4J_Portal


/home/test/mid1/jdk/bin/java -Djava.io.tmpdir=/tmp -mx512M -classpath /home/test/mid1/dcm/lib/dcm.jar:/home/test/mid1/dcm/lib/oc4j_deploy_tools.jar -Doracle.ias.sysmgmt.logging.logdir=/home/test/mid1/j2ee/home/log oracle.j2ee.tools.deploy.Oc4jDeploy -oraclehome /home/ias904/mid -verbose -inifile /tmp/dd.txt

4. Create the DAD from EM for the /pls/portal ,

restart the OHS and OC4J_Portal ,

The above steps will configure the portal after the install , (when you choose not to install the Portal at the install time )

Tuesday, November 30, 2004

Useful Unix/Windows Commands

This summary is not available. Please click here to view the post.

Wednesday, November 24, 2004

How to use the DoNotReGenerateWrapperCode OC4J option

First run the OC4J with the option ,

java -DKeepWrapperCode=true -jar oc4j.jar

This generates the .java files in say c:\oc4j904\j2ee\home directory

Now edit the appropiarte file , and add your own code and some System.out.println codes etc ,after this just save the files.

Now start the OC4J container , with the following options

java -DDoNotReGenerateWrapperCode=true -DKeepWrapperCode=true -jar oc4j.jar

After this redeploy the application again , you will see messages like ,

04/11/24 18:00:47 Skip re-gen of EmpHome_EntityHomeWrapper19.java
04/11/24 18:00:47 Skip re-gen of Dept_EmpLocal_ORCollection11.java
04/11/24 18:00:47 Skip re-gen of DeptHome_EntityHomeWrapper29.java
04/11/24 18:00:47 Skip re-gen of DeptLocalHome_EntityHomeWrapper27.java

Now run your application.

Monday, November 08, 2004

Applying Opatch on linux for IAS 9.0.4.1

Download the patch from metalink or ARU

p2617419_10102_GENERIC.zip

extract this patch in a directory say $HOME
unzip -d . p2617419_10102_GENERIC.zip

Set the Environment variables
export PATH=$PATH:$HOME/OPatch
export LD_ASSUME_KERNEL=2.4.19

Set the environment variables for the home where you want to
apply the patch set for example ORACLE_HOME , PATH and LD_LIBRARY_PATH etc , and then run the command

opatch lsinventory

After thie copy the patch file for example say ,
p3985227_9041_GENERIC.zip

unzip -d . p3985227_9041_GENERIC.zip
cd 3985227

and then run the command
opatch apply

To check the one-off patches applied run the command ,

opatch lsinventory


Opatch on Windows ,

Download the patch from metalink or ARU
p2617419_10102_GENERIC.zip

and extract this in to a directory say ,
d:\ set PATH=d:\Opatch;%PATH%

set ORACLE_HOME=d:\ias9041

opatch lsinventory -detail
And then go to the directory say ,
cd f:\temp1\3952464
and run the command ,
opatch.bat apply
After this check the output of the command ,
opatch lsinventory -detail

To apply the patch on a Stand Alone OC4J use the following steps ,

set PERL5LIB=d:\ias9041\perl\5.6.1\lib
set ORACLE_HOME=c:\oc4j9041
cd f:\temp1\3952464
and run the command ,

d:\ias9041\perl\5.6.1\bin\MSWin32-x86\perl.exe d:\OPatch\opatch.pl apply -no_inventory -jdk d:\jdk14\bin -oh c:\oc4j9041 -verbose

Important Links

My Open BUGS

All Open BUGS

All Windows and Linux RDBMS Dumps

\\incq058ad

Thursday, October 28, 2004

VNC Setup on linux

cat cd ~/.vnc/xstartup

#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
#startkde &
exec gnome-session &

Start the vncserver with the following ,

vncserver -depth 16 -geometry 800x600

Create an alias in $HOME/.bash_profile

alias startvnc='vncserver -depth 16 -geometry 800x600'


Wednesday, September 29, 2004

How to take the Windows Process Thread Dump

1. Download the Debugging Tools for Windows 32-bit Version from the URL

http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx

Install the 32-bit Debugging Tools for Windows.
The 32-bit version is the best choice unless you are debugging an application
on an Intel IA-64 processor. In this case you should use the 64-bit package.

2. After installing the above tool , download the pslist.exe from

http://www.sysinternals.com/ntw2k/freeware/pslist.shtml

3. Download the usedump.exe utility from the microsoft site ,

http://download.microsoft.com/download/win2000srv/Utility/3.0/NT45/EN-US/Oem3sr2.zip

Extract this to a directory say

c:\windebug

Now you have all the tools to take the dumps ,

Please follow the procedure below for taking the dumps ,

1. if you want to take take the Apache process dump ,

pslist -d Apache

PsList 1.23 - Process Information Lister
Copyright (C) 1999-2002 Mark Russinovich
Sysinternals - www.sysinternals.com

Thread detail for INDL224AD:


Apache 2000:
Tid Pri Cswtch State User Time Kernel Time Elapsed Time
2056 8 6755 Wait:UserReq 0:00:01.572 0:00:01.492 0:45:34.562
2060 8 3 Wait:UserReq 0:00:00.000 0:00:00.000 0:45:34.221

Apache 2528:
Tid Pri Cswtch State User Time Kernel Time Elapsed Time
2412 9 4218 Ready 0:00:00.600 0:00:00.090 0:28:55.535
2084 8 4 Wait:UserReq 0:00:00.000 0:00:00.000 0:28:55.505
2096 8 467 Wait:UserReq 0:00:00.000 0:00:00.000 0:28:54.914
2440 9 263 Wait:UserReq 0:00:00.000 0:00:00.000 0:28:54.814
1756 8 7 Wait:UserReq 0:00:00.000 0:00:00.000 0:28:54.804
2092 8 30 Wait:DelayExec 0:00:00.000 0:00:00.000 0:28:54.794
2112 8 10 Wait:UserReq 0:00:00.000 0:00:00.000 0:28:54.794
..........
....
..

In this case the first process is a parent process , we are not interested in this , we are more
bothered about the second process.

For the oracle.exe you can use the command ,

pslist -d oracle

2. Now go to the directory
c:\windebug\userdump and run the setup.exe ,

3. This will install the userdump.exe in C:\WINNT\system32
4. Now issue the command ,

userdump 2528 f:\temp1\apache.dmp

5. Now open the windbg tool , from

Start -> Program Files -> Debuuging Tool For Windows -> WinDbg

6. Now choose the option ,

File -> Open Crash Dump

And select the file f:\temp1\apache.dmp

6. After this select the menu option ,
View -> Call Stack and

View -> process and threads and select the each thread it will show what the thread was doing.


Sunday, September 26, 2004

How the DCM and OPMN gets the database users and passwords from OID

The RepAPI reads the file
$OH/config/ias.properties

It gets the values like ,

OIDhost=incq128ad.idc.oracle.com
OIDport=3060
OIDsslport=3131
SSLOnly=false

This try to connect to the OID using the above and looks for the database defined in ,

InfrastructureDBCommonName=ORCL

For example , cn=ORCL,cn=OracleContext

From the above it gets the connect string from the attribute , "orclnetdescstring"

After this REP Api issues the SSL ldap queryto find out ,

orclReferenceName=,cn=IAS Infrastructure Databases,cn=IAS,cn=Products,cn=OracleContext

for example ,

orclReferenceName=ORCL,cn=IAS Infrastructure Databases,cn=IAS,cn=Products,cn=OracleContext

From the above it gets the value for the DCM and portal password etc ,

OrclResourceName=DCM,orclReferenceName=ORCL,cn=IAS Infrastructure Databases,cn=IAS,cn=Products,cn=OracleContext here it looks
for the attribute ,

"orclpasswordattribute" , usin this info the DCM connects to the database using the thin JDBC driver ,

Similiary the opmn will also connect to the database when the depandancies against the database are used.