Search This Blog

Monday, January 31, 2011

SOA Oracle Lite DB Tracing

SOA Uses 10.2 POLite.

Please refer to the link for more debuginfo.

Set OLITE_SQL_TRACE=TRUE in c:\windows\polite.ini file ,

The sql trace info is written to c:\windows\system32\oldb_trc.txt

OLITE_SQL_TRACE

Generates the SQL statement text, compilation time, execution plan, and the bind value.

For example:

OLITE_SQL_TRACE = TRUE


SQL trace output is dumped to a trace file named oldb_trc.txt in the current working directory of the database process. For a database service on Windows, Windows NT or the Oracle Database Lite daemon for a Linux platform, the current working directory is specified by the wdir parameter during the database startup service or daemon. Applications that use an embedded connection to connect to the database contain a working directory. This working directory is the application working directory. To implement the tracing feature, the database process must contain permissions to create the trace file in the current working directory. The trace output is always included in the trace file. If the trace file does not exist, it is created automatically.

Sunday, January 30, 2011

How to Install additional packages/upgrade OEL 5

  1. Download and Install Oracle Linux
  2. Download and copy the appropriate yum configuration file in place, by running the following commands as root:

    Oracle Linux 4, Update 6 or Newer
    # cd /etc/yum.repos.d
    # mv Oracle-Base.repo Oracle-Base.repo.disabled
    # wget http://public-yum.oracle.com/public-yum-el4.repo


    Oracle Linux 5


    # cd /etc/yum.repos.d
    # wget http://public-yum.oracle.com/public-yum-el5.repo


    Oracle VM 2


    # cd /etc/yum.repos.d
    # wget http://public-yum.oracle.com/public-yum-ovm2.repo




  3. Enable the appropriate repository by editing the yum configuration file




    • Open the yum configuration file in a text editor


    • Locate the section in the file for the repository you plan to update from, e.g. [el4_u6_base]


    • Change enabled=0 to enabled=1





  4. Begin using yum, for example:



    yum list ,  yum update  , yum install firefox





  5. You can also use  “system-config-packages” for this purpose.



Wednesday, January 26, 2011

How to setup iscsi target on OEL 5.5

http://fedoraproject.org/wiki/Scsi-target-utils_Quickstart_Guide

RedHat have included an iSCSI daemon which is also installable using yum:

yum install iscsi-initiator-utils

To connect to the target, edit /etc/iscsi/initiatorname.iscsi and change InitiatorName to something you prefer (Remember! it must be in the IQN format, iqn.yyyy-mm.{reversed domain name}:an_easy_to_remember_lablel. I usually use iqn.2009-02.com.hamzahkhan:hostname_of_box). Next start up iSCSId:

/etc/init.d/iscsid start

and use iSCSI target descovery to find the targets on the server:

iscsiadm -m discovery -t st -p $SERVERS_IP

If all is well, it should output the names of all the targets that the initiator is allowed to connect to!

Next, we need to create the disk nodes. To do this, RedHat have provided a nice start up script. This script will login to all the targets that the iSCSI daemon knows about. We have already used the iscsiadm command to tell the iSCSI daemon which targets exist on the server, so using the script is all that is left:

/etc/init.d/iscsi start

On Windows 7 use this note ,

http://www.windowsnetworking.com/articles_tutorials/Connecting-Windows-7-iSCSI-SAN.html

Monday, January 24, 2011

How to Find out which java thread takes the maximum cpu time in windows

On Error Resume Next
Const adVarChar = 200
Const MaxCharacters = 255
Set DataList = CreateObject("ADOR.Recordset")
DataList.Fields.Append "ProcessID", adVarChar, MaxCharacters
DataList.Fields.Append "ThreadID", adVarChar, MaxCharacters
DataList.Fields.Append "PercentUserTime", adVarChar, MaxCharacters
DataList.Fields.Append "PercentProcessorTime", adVarChar, MaxCharacters
DataList.Open
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_PerfFormattedData_PerfProc_Thread where IDProcess ="&WScript.Arguments.Item(0),,48)
For Each objItem in colItems
DataList.AddNew
DataList("ProcessID") = objItem.IDProcess
DataList("ThreadID") = objItem.IDThread
DataList("PercentUserTime") = objItem.PercentUserTime
DataList("PercentProcessorTime") = objItem.PercentProcessorTime
DataList.Update
Next
DataList.Sort = "PercentUserTime"
DataList.Reverse()
DataList.Reverse()
DataList.MoveFirst
Do Until DataList.EOF
Wscript.Echo DataList.Fields.Item("ProcessID") _
& vbTab & DataList.Fields.Item("ThreadID")_
& vbTab & Hex(DataList.Fields.Item("ThreadID"))_
& vbTab & DataList.Fields.Item("PercentUserTime")_
& vbTab & DataList.Fields.Item("PercentProcessorTime")
DataList.MoveNext
Loop
' Set WshShell = WScript.CreateObject("WScript.Shell")
'WshShell.Run "cmd /c C:\Oracle\Middleware\jdk160_18\bin\jstack.exe " &WScript.Arguments.Item(0)

Set objShell = WScript.CreateObject("WScript.Shell")
Set objExecObject = objShell.Exec("cmd /c C:\Oracle\Middleware\jdk160_18\bin\jstack.exe " &WScript.Arguments.Item(0))
Do While Not objExecObject.StdOut.AtEndOfStream
    strText = objExecObject.StdOut.ReadLine()
    Wscript.Echo strText
Loop

Find out the java process , but running the command , jps and run the vbscript using the command “cscript test1.vbs”

Thursday, January 13, 2011

How to create Bootable Image in USB Drive

Download MultiBootISOs-2.1.4.7.exe

  1. Run MultiBootISOs-2.1.4.7.exe following the onscreen instructions
  2. Select the ISO you want to Boot from the Menu and enjoy!
  3. The best thing about this tool is that you can select multiple images in one USB drive

Please also refer to this URL for more details on this ,

http://www.pendrivelinux.com/boot-multiple-iso-from-usb-multiboot-usb/

Friday, January 07, 2011

How to create RAW Partions on linux (to be used for ASM and RAC)

First create the HDD Partitions , ensure that you have 3 partions
say /dev/sdb1 , /dev/sdc1 and /dev/sdd1

run the command fdisk -l and verifiy them

1. Edit the /etc/sysconfig/rawdevices file, and add the following lines.

/dev/raw/raw1 /dev/sdb1
/dev/raw/raw2 /dev/sdc1
/dev/raw/raw3 /dev/sdd1

2. service rawdevices restart

3. raw -qa

4. Create the softlinks for the files

ln -s /dev/raw/raw1 /u01/oradata/ocr
ln -s /dev/raw/raw2 /u01/oradata/votingdisk
ln -s /dev/raw/raw3 /u01/oradata/asm1

5. Add the following lines in the "/etc/rc.local" file.

chown oracle:oinstall /dev/raw/raw1
chown oracle:oinstall /dev/raw/raw2
chown oracle:oinstall /dev/raw/raw3
chmod 600 /dev/raw/raw1
chmod 600 /dev/raw/raw2
chmod 600 /dev/raw/raw3

How to Clean up failed RAC Install on linux

rm -rf /etc/oracle/*
rm -f /etc/init.d/init.cssd
rm -f /etc/init.d/init.crs
rm -f /etc/init.d/init.crsd
rm -f /etc/init.d/init.evmd
rm -f /etc/rc2.d/K96init.crs
rm -f /etc/rc2.d/S96init.crs
rm -f /etc/rc3.d/K96init.crs
rm -f /etc/rc3.d/S96init.crs
rm -f /etc/rc5.d/K96init.crs
rm -f /etc/rc5.d/S96init.crs
rm -Rf /etc/oracle/scls_scr
rm -f /etc/inittab.crs
cp -f --reply=yes /etc/inittab.orig /etc/inittab
rm -rf /u01/crs
rm -rf /u01/app/oracle
rm -f /etc/oraInst.loc
dd if=/dev/zero of=/dev/raw/raw1 bs=1M count=256000
dd if=/dev/zero of=/dev/raw/raw2 bs=1M count=256000

Migrate from VMWare Server to VirtualBox

1.Important: From VMWare Server, start your virtual machines and uninstall VMWare toolbox!

2.Locate the main VMDK file you want converted. It's usually a XML file, or a binary
file with a XML header.

3.From the command line, CD to the location of that file. Say the VMWare disk image to convert is Root_Disk.vmdk.

4.Run the following command to convert to VDI:

C:\Program Files\Oracle\VirtualBox\VBoxManage clonehd --format vdi "c:\Virtual Machines\XP\Windows XP Professional.vmdk" "c:\Virtual Machines\XP\WinXP.vdi"

5.That's it! If you're in Linux, the VDI file will be created under ~/.VirtualBox/Harddisks/.

6.Add that to your media manager and create the virtual machine as you normally would.

Saturday, January 01, 2011

How to use Wifi Tethering on Samsung Galaxy i5801

1. First download the z4root apk file from z4root.1.3.0.apk

2. Download the file fw_bcm4329.bin from
http://dl.dropbox.com/u/1496809/fw_bcm4329.bin
3) Mount your sdcard
4) Create a directory named "android.tether" (without quotes)
5) Open this directory and copy fw_bcm4329.bin into it. (downloaded file)
6) Uninstall old versions of "wireless tether"
7) Install the latest 2.0.5 release of WiFi Tether from: http://code.google.com/p/android-wifi-tether/downloads/list