Search This Blog
Thursday, October 19, 2006
High CPU Usage Java
ias-instance id="j2ee2.asdtbde.idc.oracle.com"
environment
variable id="TMP" value="/tmp"
variable id="LD_ASSUME_KERNEL" value="2.4.1"
variable
Find out the java process using the command
opmnctl status
and not down the PID
opmnctl status
Processes in Instance: j2ee2.asdtbde.idc.oracle.com
-------------------+--------------------+---------+---------
ias-component | process-type | pid | status
-------------------+--------------------+---------+---------
DSA | DSA | N/A | Down
LogLoader | logloaderd | N/A | Down
dcm-daemon | dcm-daemon | N/A | Down
OC4J | home | 28370 | Alive
WebCache | WebCache | 28380 | Alive
WebCache | WebCacheAdmin | 28371 | Alive
HTTP_Server | HTTP_Server | 28373 | Alive
Use this command to find out the actual process ID , In this case the actual java process is ,
28377.
ps -ef | grep 28370
rac 28370 28354 0 11:23 ? 00:00:01 /home/rac/j2ee2/jdk/bin/java
rac 28377 28370 0 11:23 ? 00:00:00 /home/rac/j2ee2/jdk/bin/java
Run the command ,
watch "ps -eLo pid,ppid,tid,pcpu,comm | grep 28377"
Find out the therad ID which taking lot of CPU time ,
i.e it should be there in the first column
Now take the thread dump
kill -3 28370 (process-id-from-opmn-status-output)
Convert the Thread ID you got from the command ,
ps -eLo pid,ppid,tid,pcpu,comm | grep 28377
hexadecimal and then search for this value in the thread dump.
For the JDK 5.0 you do not need to the LD_ASSUME_KERNEL etc.
Please also check the Article
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_18339
Tuesday, October 10, 2006
SSH Tunneling for DB Connections
I want to connect to my db "infra2" running on machine asdtbde.idc.oracle.com
with the listner port as say 1521.
To use the connect string as my local machine and port 1621 I need to set the following ,
for example ,
SECURED_SERVER =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1621))
)
(CONNECT_DATA =
(SID = infra2)
)
)
From my local machine run the following from the root user ,
ssh -NfL 1621:localhost:1521 asdtbde.idc.oracle.com
--
output :
ssh -NfL 1621:localhost:1521 asdtbde.idc.oracle.com
The authenticity of host 'asdtbde.idc.oracle.com (152.69.168.61)' can't be established.
RSA key fingerprint is 7b:ee:40:82:f9:7e:1e:24:e9:00:cf:e9:e8:b5:c4:c4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'asdtbde.idc.oracle.com' (RSA) to the list of known hosts.
root@asdtbde.idc.oracle.com's password:
---
Now from the local machine connect using
sqlplus scott/tiger@SECURED_SERVER
Wednesday, September 27, 2006
Enabling sql trace in OC4J
data-source.xml file with the min-connections="1" and max-connections="1".
On the DB side create a login trigger ,
CREATE OR REPLACE TRIGGER test_user_trg_after_logon
AFTER LOGON ON DATABASE
BEGIN
IF (user = 'TEST') THEN
DBMS_SESSION.SET_SQL_TRACE(true);
END IF;
END;
The sql trace files will be generated in the USER_DUMP_DESTINATION for the
database.
To check the sql's run the command
tkprof
The above procedure will not give you the bind variables. To get the bind variable , please
perform the following steps.
cd $OH/rdbms/admin/
connect / AS SYSDBA
dbmssupp.sql
SQL> GRANT execute ON dbms_support TO
SQL> CREATE PUBLIC SYNONYM dbms_support FOR dbms_support;
Create the stored procedure ,
CREATE OR REPLACE TRIGGER test_user_trg_after_logon
AFTER LOGON ON DATABASE
BEGIN
IF (user = 'SCOTT') THEN
dbms_support.start_trace (binds=>true);
END IF;
END;
The above steps will have the bind variables in the trace files.
To disable the tracing , perform the step as ,
drop trigger test_user_trg_after_logon;
Set the event 942 to capture ORA-942 errors
alter system set events '942 trace name errorstack level 12';
Try to find the udump directory
show parameters user_dump
user_dump_dest string /home/ias/infra101202/admin/ias1012/udump
cd /home/ias/infra101202/admin/ias1012/udump and find out the latest file.
Use SYS.DBMS_SYSTEM.SET_EV() procedure. Here is the specification for this procedure:
PROCEDURE SET_EV
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
SI BINARY_INTEGER IN
SE BINARY_INTEGER IN
EV BINARY_INTEGER IN
LE BINARY_INTEGER IN
NM VARCHAR2 IN
SID: V$SESSION.SID
SE: V$SESSION.SERIAL#
EV: Event number. For example:
10046: SQL traces.
10053: Optimizer traces.
NNN : ORA-NNN errors.
65535: IMMEDIATE traces.
LE: Event level. For Event 10046 events:
0: Disable event.
1: PARSE, FETCH, EXEC, EXECUTION PLAN
4: Level 1 + BINDS
8: Level 1 + WAITS
12: Level 4 + Level 8
NM: Event name. For example:
ERRORSTACK.......: For error stack traces.
PROCESSSTATE...: For process states
SYSTEMSTATE.......: For System states.
''..................................: For CONTEXT FOREVER.
Sample:
Dumps PROCESSSTATE trace IMMEDIATELY in LEVEL 10:
SQL> exec dbms_system.set_ev(8,1056,65535,10,'PROCESSSTATE');
Dumps ERRORSTACK trace in LEVEL 3 on ORA-942 error:
SQL> exec dbms_system.set_ev(8,1060,942,3,'ERRORSTACK');
Dumps Event 10046 trace in LEVEL 8 for CONTEXT FOREVER:
SQL> exec dbms_system.set_ev(8,1060,10046,8,'');
Tuesday, September 12, 2006
How to Convert JDeveloper CMT Application to Sun Application Server
from Scott schema.
Change the following methods , so that they throw the CreateException
For example ,
public Long ejbCreate() throws CreateException {
return null;
}
public Long ejbCreate(Long empno) throws CreateException {
setEmpno(empno);
return empno;
}
Create the JAR file and open the Sun Deploy tool ,
File -> Open and select the jar file created by the previous method.
here select Emp Entity object , here click on the General TAB
And Click on Sun Specific Settings , select the View as CMP DataBase
Create DataBase Mappings , and select the DataSource Vendor as Oracle and select OK.
Now Click on the Table Generation Settings and unselect Create Table and Drop Table check boxes.
Change the JNDI name to jdbc/OracleDS.
Now Click on Tools -> Deploy menu option , and select the
option return Client Jar in some directory. After this deploy the application.
This creates the file empClient.jar in the directory you have specified in the above step.
Create the file EmpClient.java file ,
package project2;
import java.util.Collection;
import java.util.Iterator;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.rmi.PortableRemoteObject;
public class EmpClient {
public static void main(String [] args) {
try {
final Context context = getInitialContext();
final EmpHome empHome =
(EmpHome) PortableRemoteObject.narrow( context.lookup( "Emp" ), EmpHome.class );
Emp emp;
// Use one of the create() methods below to create a new instance
// emp = empHome.create( );
// emp = empHome.create( empno );
// Retrieve all instances using the findAll() method (CMP Entity beans only)
final Collection coll = empHome.findAll();
final Iterator iter = coll.iterator();
while ( iter.hasNext() ) {
emp = ( Emp ) iter.next();
System.out.println( "empno = " + emp.getEmpno() );
System.out.println( "ename = " + emp.getEname() );
System.out.println( "job = " + emp.getJob() );
System.out.println( "mgr = " + emp.getMgr() );
System.out.println( "hiredate = " + emp.getHiredate() );
System.out.println( "sal = " + emp.getSal() );
System.out.println( "comm = " + emp.getComm() );
System.out.println( "deptno = " + emp.getDeptno() );
System.out.println();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
private static Context getInitialContext() throws NamingException {
// Get InitialContext for Embedded OC4J
// The embedded server must be running for lookups to succeed.
return new InitialContext();
}
}
2. Create the file META-INF\application-client.xml
3. Create the file , META-INF\sun-application-client.xml
Compile the above file using the command ,
set classpath=c:\empClient.jar;.;c:\sun\AppServer14\lib\j2ee.jar;c:\sun\AppServer14\lib\appserv-rt.jar
javac -d *.java
Now run the file using the command ,
java project2.EmpClient
Creating the Connection using the Sun Application Server
Copy the files ojdbc14dms.jar and dms.jar file in to
C:\Sun\AppServer14\lib directory.
Create a connection pool with the following ,
oracle.jdbc.pool.OracleDataSource
resource type as javax.sql.DataSource
Enter the following fields
Password tiger
User scott
ServiceName ravi.idc.oracle.com
PortNumber 1522
ServerName incq128ad
URL jdbc:oracle:thin:@incq128ad:1522:ravi1
After this create JDBC Resources and name it as jdbc/OracleDS
and select the above connection pool.
Create a War file based on the test.jsp file with the following code ,
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ page import="java.sql.*,oracle.jdbc.driver.*,javax.naming.*,oracle.sql.*,javax.sql.*" %>
<% if (request.getParameter("empID") != null) {
String empID = request.getParameter("empID");
InitialContext testContext = null;
DataSource testOC4JDataSource = null;
Connection testDatabaseConnection = null;
Statement testDatabaseStatement = null;
ResultSet testDatabaseResultSet = null;
try {
testContext = new InitialContext();
testOC4JDataSource = (DataSource) testContext.lookup("jdbc/OracleDS");
testDatabaseConnection = testOC4JDataSource.getConnection();
testDatabaseStatement = testDatabaseConnection.createStatement();
String testQuery = "SELECT * FROM SCOTT.EMP where EMPNO =" + empID;
testDatabaseResultSet = testDatabaseStatement.executeQuery(testQuery);
while (testDatabaseResultSet.next()) {
out.println("
" + testDatabaseResultSet.getString("ENAME"));
}
} catch (Throwable e) {
String err = e.toString();
System.out.println(err);
} finally {
try {
testDatabaseStatement.close();
testDatabaseConnection.close();
} catch ( Throwable e) {
String err = e.toString();
System.out.println(err);
}
}
}
%>
Create the war file in Jdeveloper and deploy the file using the Sun Admin Console
Tuesday, August 22, 2006
Removing the trustcleaner Virus (Adware program)
Please refer to the URL ,
http://www.superantispyware.com/definition/wschtm35/
This uses the DLL , WSCHTM35.DLL. This is stored in the temporary directory (%TEMP%)
use the procexp to locate the substring.
I found that this process is owned by the explorer.
Uninstall the software first and then
Write a batch which first kills the explorer.exe and then delete the file WSCHTM35.DLL.
And delete the corresponding registry entries.
Monday, August 07, 2006
Create DVD Install media from RedHat 4 CD's
This article explains how to create the Redhat Installable DVD from the CD's.
1. Create a directory say
/tmp/RHAS4
cd /tmp/RHAS4
2. Insert the RHAS CD1 first
dd if=/dev/cdrom of=rhas2.iso
3. Insert CD2 , 3 and 4 etc
dd if=/dev/cdrom of=rhas2.iso
dd if=/dev/cdrom of=rhas2.iso
dd if=/dev/cdrom of=rhas2.iso
4. Copy the script below , with the name as "mkdvdiso.sh".
or get the script from the location
http://www.stams.strath.ac.uk/~sergei/files/mkdvdiso.sh
-------------------------Cut From Here ---------------------------------------------------------
#/bin/bash
# by Chris Kloiber <ckloiber@redhat.com>
# Slight adaptation for Mandrake by Sergei Zuyev <sergei@stams.strath.ac.uk>
# Requires package mediacheck
# A quick hack that will create a bootable DVD iso of a Mandrake Linux
# Distribution. Feed it either a directory containing the downloaded
# iso files of a distribution, or point it at a directory containing
# the "Mandrake", "isolinux", and "images" directories.
# Usage:
# mkdvdiso.sh /path/to/the/cd/isos /destination/dvd.iso
# Burning on oka:
# /usr/bin/growisofs -Z /dev/hdc=/destination/dvd.iso -use-the-force-luke=notray -use-the-force-luke=tty -speed=2
# This version only works with "isolinux" based Red Hat Linux versions.
# Lots of disk space required to work, 3X the distribution size at least.
# GPL version 2 applies. No warranties, yadda, yadda. Have fun.
if [ $# -lt 2 ]; then
echo "Usage: `basename $0` source /destination/DVD.iso"
echo ""
echo " The 'source' can be either a directory containing a single"
echo " set of isos, or an exploded tree like an ftp site."
exit 1
fi
cleanup() {
[ ${LOOP:=/tmp/loop} = "/" ] && echo "LOOP mount point = \/, dying!" && exit
[ -d $LOOP ] && rm -rf $LOOP
[ ${DVD:=`pwd`/mkmdkdvd} = "/" ] && echo "DVD data location is \/, dying!" && exit
[ -d $DVD ] && rm -rf $DVD
}
cleanup
mkdir -p $LOOP
mkdir -p $DVD
if [ !`ls $1/*.iso 2>&1>/dev/null ; echo $?` ]; then
echo "Found ISO CD images..."
CDS=`expr 0`
DISKS="1"
for f in `ls $1/*.iso`; do
mount -o loop $f $LOOP
cp -av $LOOP/* $DVD
if [ -f $LOOP/.discinfo ]; then
cp -av $LOOP/.discinfo $DVD
CDS=`expr $CDS + 1`
if [ $CDS != 1 ] ; then
DISKS=`echo ${DISKS},${CDS}`
fi
fi
umount $LOOP
done
if [ -e $DVD/.discinfo ]; then
awk '{ if ( NR == 4 ) { print disks } else { print ; } }' disks="$DISKS" $DVD/.discinfo > $DVD/.discinfo.new
mv $DVD/.discinfo.new $DVD/.discinfo
fi
else
echo "Found FTP-like tree..."
cp -av $1/* $DVD
[ -e $1/.discinfo ] && cp -av $1/.discinfo $DVD
fi
rm -rf $DVD/isolinux/boot.cat
find $DVD -name TRANS.TBL | xargs rm -f
DIR=`pwd`
cd $DVD
#mkisofs -J -R -v -T -o $2 -b isolinux/isolinux.bin -c Boot/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table .
mkisofs -J -R -v -T -o $2 -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table .
# /usr/bin/implantisomd5 $2
cd DIR
# cleanup
echo ""
echo "Process Complete!"
echo ""
-------------------------End of the File---------------------------------------------------------
5. Run the command as ,
mkdvdiso.sh /tmp/RHAS4 /tmp/RHAS4/rhas4dvd.iso
6. The above command should create the DVD ISO image
7. Transfer the DVD ISO Image to windows machine and create the DVD
Monday, June 05, 2006
HA RAC Testing
// You need to import the java.sql package to use JDBC
import java.sql.*;
class TestFailover
{
public static void main (String args [])
throws Exception
{
// Load the Oracle JDBC driver
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
// String url = "jdbc:oracle:thin:@DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=incq128ad.idc.oracle.com)(PORT = 1521))(ADDRESS=(PROTOCOL=TCP)(HOST=hatest-ias.idc.oracle.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=ravi.idc.oracle.com)))";
String url = "jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(FAILOVER=on)(ADDRESS=(PROTOCOL=tcp)(HOST=incq128ad)(PORT=1521))(ADDRESS=(PROTOCOL=tcp)(HOST=hatest-ias)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ravi.idc.oracle.com)(FAILOVER_MODE=(TYPE=session)(METHOD=basic)(RETRIES=20)(DELAY=15))))";
Connection conn = null;
Statement stmt = null;
ResultSet rset = null;
for (int i = 0 ; i < 100 ; i++) {
conn= DriverManager.getConnection (url, "scott", "tiger");
// Create a Statement
stmt = conn.createStatement ();
// Select the host name from the instance you are connected to
rset = stmt.executeQuery ("select INSTANCE_NAME from v$instance");
// Iterate through the result and print the host name of the DB instance
while (rset.next ())
System.out.println (rset.getString (1));
// Close the RseultSet
rset.close();
// Close the Statement
stmt.close();
// Close the connection
conn.close();
}
}
}
Select fail-over
----------------
testrac_s=
(DESCRIPTION=
(LOAD_BALANCE=on)
(FAILOVER=on)
(ADDRESS=(PROTOCOL=tcp)(HOST=incq128ad)(PORT=1521))
(ADDRESS=(PROTOCOL=tcp)(HOST=hatest-ias)(PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=ravi.idc.oracle.com)
(FAILOVER_MODE=
(TYPE=select)
(METHOD=basic)
(RETRIES=20)
(DELAY=5))))
Copy the tnsnames.ora file to the other machine also.
Open a sql*plus connection
sqlplus scott/tiger@testrac_s
select INSTANCE_NAME from v$instance;
Note down the instance name , for example say Ravi1
now run the query , select * from dba_extents;
While the query is running , shutdown the ravi1 instance ,
you will see a pause for few seconds and after this the select command will start running again.
Session fail-over
-----------------
testrac_b=
(DESCRIPTION=
(LOAD_BALANCE=on)
(FAILOVER=on)
(ADDRESS=(PROTOCOL=tcp)(HOST=incq128ad)(PORT=1521))
(ADDRESS=(PROTOCOL=tcp)(HOST=hatest-ias)(PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=ravi.idc.oracle.com)
(FAILOVER_MODE=
(TYPE=session)
(METHOD=basic)
(RETRIES=20)
(DELAY=15))))
Connect to
SQL> select INSTANCE_NAME from v$instance;
INSTANCE_NAME
----------------
ravi1
-- Now Shutdown Instance ravi1
SQL> /
select INSTANCE_NAME from v$instance
*
ERROR at line 1:
ORA-25408: can not safely replay call
SQL> /
INSTANCE_NAME
----------------
ravi2
testrac_b_p=
(DESCRIPTION=
(LOAD_BALANCE=on)
(FAILOVER=on)
(ADDRESS=(PROTOCOL=tcp)(HOST=incq128ad)(PORT=1521))
(ADDRESS=(PROTOCOL=tcp)(HOST=hatest-ias)(PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=ravi.idc.oracle.com)
(FAILOVER_MODE=
(TYPE=session)
(METHOD=preconnect)
(RETRIES=20)
(DELAY=15))))
When you say preconnect , it opens the connection to the other database.
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
traced like ldapsearch , modify , add and delete etc
Check the LDAP debug log level by running the following command ,
ldapsearch -p
This ideally should give the result as "0" , if the debugging is not enabled.
for example ,
orcldebugflag=0
ldapsearch -p
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
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
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
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
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
You can check the latest log files from the directory $ORACLE_HOME/ldap/log directory.
Tuesday, April 19, 2005
WebCache coreok settings
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
Saturday, March 19, 2005
RedHat cluter manager
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
info threads
thread apply all where
detatch
EOF
done
Monday, December 13, 2004
Tracing Methods in Java
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
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
Wednesday, November 24, 2004
How to use the DoNotReGenerateWrapperCode OC4J 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
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