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

Saturday, December 25, 2010

Monday, December 06, 2010

Soa Suite 11gR1 (11.1.1.3.0) installation guide for Windows

http://vtkrishn.wordpress.com/2010/09/25/soa-suite-11gr1-11-1-1-3-0-installation-guide-for-windows/

http://adfproject.googlecode.com/files/SOA_Installation_guide.doc

How to find the SOA Version

/home/ias/Oracle/Middleware/Oracle_SOA1/bin/soaversion.sh

*****************************************************************************
Oracle SOA Server version 11.1.1.3.0
          Build: 0
          Build time: Thu Apr 15 22:20:11 PDT 2010
          Build type: release
          Source tag: PCBPEL_11.1.1.3.0_GENERIC_100415.2045.2557

Oracle BAM Source Tag:ORABAM_11.1.1.3.0_GENERIC_100406.2108

Oracle BPM Source Tag: BPM_11.1.1.3.0_GENERIC_100415.1757.0684

Oracle Implementation-Version: Oracle Middleware 11.1.1 (ASKERNEL_11.1.1.3.0_
GENERIC_100411.1150, ADMINSERVER_11.1.1.3.0_GENERIC_100408.2100, J2EE
_11.1.1.3.0_GENERIC_100408.1504, JDEVADF_11.1.1.3.PS2_GENERIC_100408.
2356.5660, TOPLINK_11.1.1.3.0_GENERIC_100323.1800, ENTSEC_11.1.1.3.0_
GENERIC_100403.1733)

Thursday, November 11, 2010

Reducing the PDF Page Size when printing

Sometimes we need to print a pdf on a page that is lesser then A4 size. The main reason for this kind of printing is that size reduction. Carrying a A4 PAGE book is not that handy most of the times.

For this we need to reduce the size of the page while printing. Unfortunately in Acrobat PDF Reader this option is not present.

For this we can use the the PDF-XChange Viewer free edition.

Download the PDF-XChange Viewer from http://www.tracker-software.com/product/downloads/

Select File->Print option and Select the Page Scaling as => Custom Scale and Page Zoon as 75% and Select Auto-Center pages in sheets

Please refer to the screen below

image

After this you can cut the extra white space using a paper cutter.

Sunday, November 07, 2010

How to attach a pdf file to an email from a shell script

Write the following shell script ,

---
echo "Training Calendar on ` date +%d-%b-%Y` " > /tmp/mailmessage.txt
wget -O /tmp/blr.pdf http://xxx.xxxx.xxx.com/test.pdf
mutt -s "Training Calendar on ` date +%d-%b-%Y` " -a /tmp/trg_blr.pdf ravi.reddy@oracle.com < /tmp/mailmessage.txt
---

To change the from email address while using mutt
create a .muttrc in the users home directory if it doesnot exist, then enter the feild

set realname="ravi.reddy@oracle.com" this will change the name in the senders name .

Wednesday, September 15, 2010

How to Hide Username/Passwords in shell scripts

Please refer to this article for more details on this.

I have lot of shell scripts where I have to store my username and passwords for accessing the data. This is a big security rish as my passwords are exposed.

I need some executable which can convert my shell script to exe so that it will be difficult for the people to get my password.

Download the sources from http://www.datsi.fi.upm.es/%7Efrosal/sources/shc-3.8.6.tgz

Extract the tar file

tar xvfz shc-3.8.6.tgz

Make the executable

cd shc-3.8.6
make

cp shc to /usr/bin directory

I have a shell script which fetches some password protected pages , here
there is no other option for me other then embedding the password as the wget does
not support encrypted passwords

for example ,

cat getcookie.sh

#!/bin/ksh
/usr/bin/wget --keep-session-cookies --save-cookies=/home/ias/cookie.txt  -O /home/ias/dd.txt   --input-file=/home/ias/urls.txt --http-user=xx.xxx@test.com --http-password=xxxxxxx > /dev/null
cat /home/ias/cookie.txt  | grep test  | cut --fields=7 > /home/ias/cookie.txt

with the shc script I can convert the shell script as executable so that the passwords are hidden
from the people who has access to my unix system.

Run the shc command

shc -f getcookie.sh

This creates the getcookie.sh.c and getcookie.sh.x where .c is the c source file and .x is the executable.

Now run the getcookie.sh.x executable and change the password from the original getcookie.sh script.

Please refer to the http://blogs.koolwal.net/2009/01/20/howto-encrypting-a-shell-script-on-a-linux-or-unix-based-system/
for more details on this.

Saturday, September 11, 2010

How to Upgrade samsung galaxy firmware

Actually many firmware are available for each area (Europe, Asia and America). Last firmware version are:


Europe: I5800XWJH2
Asia: I5801DDJG6
America: I5800LVIJG8

You can download the ODIN Multi Downloader from

http://download968.mediafire.com/skeyfniqhphg/gnzzbkix0nd/Odin4_03-Spica_ops.zip

Flashing with ODIN it's very simple (sorry for picture):

screenshot.32

Before running this utility you need to set the samsung phone in the download firmware mode , for this press

Home+VolDown+Power and hold this for about 30 seconds to 1 minute

In the ODIN screen ,

1) Select "One Package"
2) Select OPS file for I5801 (apollo.ops)

Create apollo.ops file with the following contents ,

0,boot
1,Sbl
2,logo
3,efs
4,zImage
5,factoryfs
6,datafs
7,cache
8,
9,modem


3) In one package select the firmware that you want to flash. (I5801DDJG6.tar) Download the firmware from http://uploading.com/files/1314471a/I5801DDJG6.rar/


4) Start


In about five minutes your mobile will be upgrades.

Tuesday, September 07, 2010

Setup XMail Server on Windows

Please refer to the link http://www.halfdone.com/Articles/XMailInstall/ for more details on this.

Here are the simplified steps to configure the XMail Server’s on Windows Machine

1. Download the XMail Server from http://www.xmailserver.org     

2. Extract this to a directory say C:\xmail-1.27

3. Copy the exe’s and dll’s to C:\xmail-1.27\MailRoot\bin directory

4. Create the HKEY_LOCAL_MACHINE\SOFTWARE\GNU\XMAIL. Create the Sting (REG_SZ) values called MAIL_ROOT and MAIL_CMD_LINE. For the value of MAIL_ROOT put in the "MailRoot folder" location like C:\xmail-1.27\MailRoot. For MAIL_CMD_LINE you can leave it blank or put in "-Pl -Sl -Ql -Fl -Cl -Ll"

screenshot.28

5. Here we are using the default domain , that is xmailserver.test , so no need to modify the configuration files.

6. Run xmcrypt.exe to create an encoded password. It's used in the format of XMCRYPT.EXE <password>.

xmcrypt.exe welcome1

1100161115041616120a1701

7. Open the file C:\xmail-1.27\MailRoot\ctrlaccounts.tab and enter the following values "admin" <tab>   "120009060a080054"

8.  User and alias creation

Check the domain

ctrlclnt -s localhost -u admin -p welcome1 domainlist "xmailserver.test"

Create two domain users

ctrlclnt -s localhost -u admin -p welcome1 useradd "xmailserver.test" test1 welcome1 U
ctrlclnt -s localhost -u admin -p welcome1 useradd "xmailserver.test" test2 welcome1 U

Check the users

ctrlclnt -s localhost -u admin -p welcome1 userlist "xmailserver.test"

Create aliases for these two users

ctrlclnt -s localhost -u admin -p welcome1  aliasadd  "xmailserver.test" test1 ravi1
ctrlclnt -s localhost -u admin -p welcome1  aliasadd  "xmailserver.test" test2 ravi2

Check the aliases for these users

ctrlclnt -s localhost -u admin -p welcome1 aliaslist

9. Set up the POP3 email server and SMTP Outgoing server from Thunderbird. For the POP3 accounts set the SMTP Server as the localhost:25

screenshot.30

Monday, August 16, 2010

How to find the Patch Set Version that has been applied on your Oracle_Home

For the OAS 10g release you can run the following.

cd $ORACLE_HOME/j2ee/home

$ORACLE_HOME/jdk/bin/java -jar  oc4j.jar -version
Oracle Containers for J2EE 10g (10.1.3.4.0)  (build RELEASE.26167)

or you can also do

cd $ORACLE_HOME/inventory/ContentsXML

cat comps.xml | grep patchset

This shows the o/p as

cat comps.xml | grep patchset
<PATCHSET NAME="oracle.as.j2ee.patchset" VER="10.1.3.4.0" BUILD_NUMBER="0" RELEASE="Production" INV_LOC="PatchSets/oracle.as.j2ee.patchset/10.1.3.4.0/3/" XML_INV_LOC="PatchSets21/oracle.as.j2ee.patchset/10.1.3.4.0/" ACT_INST_VER="10.1.0.6.0" DEINST_VER="10.1.0.2.0" INSTALL_TIME="2009.Mar.17 09:21:56 IST">
      <INFO NAME="helpDir" VAL="PatchSets/oracle/as/j2ee/patchset/v10_1_3_4_0/help/"/>
      <INFO NAME="resourceClass" VAL="PatchSets.oracle.as.j2ee.patchset.v10_1_3_4_0.resources.CompRes"/>
      <REF NAME="oracle.as.j2ee.patchset" VER="10.1.3.4.0" HOME_IDX="5"/>

For the FMW 11g release perform the following

cd $ORACLE_HOME/inventory/ContentsXML

cat comps.xml | grep patchset

This shows the o/p as

<PATCHSET NAME="oracle.as.soa.top.patchset" VER="11.1.1.3.0" BUILD_NUMBER="0" RELEASE="Production" INV_LOC="PatchSets/oracle.as.soa.top.patchset/11.1.1.3.0/1/" XML_INV_LOC="PatchSets21/oracle.as.soa.top.patchset/11.1.1.3.0/" ACT_INST_VER="11.1.0.8.0" DEINST_VER="11.1.0.0.0" INSTALL_TIME="2010.Aug.06 21:53:00 IST">
      <INFO NAME="helpDir" VAL="PatchSets/oracle/as/soa/top/patchset/v11_1_1_3_0/help/"/>
      <INFO NAME="resourceClass" VAL="PatchSets.oracle.as.soa.top.patchset.v11_1_1_3_0.resources.CompRes"/>
      <REF NAME="oracle.as.soa.top.patchset" VER="11.1.1.3.0" HOME_IDX="5"/>

For the DB you can issue the command ,

$ORACLE_HOME/bin/sqlplus and note down the version details for example ,

SQL*Plus: Release 10.2.0.4.0 - Production on Mon Aug 16 14:24:29 2010

or you can connect to the DB and find out the version details.

Tuesday, August 03, 2010

How to Install WebLogic Standalone Server

1. Download the WebLogic stand alone zip file from the location ,

http://download.oracle.com/otn/nt/middleware/11g/wls1033_dev.zip

2. Extract this zip to a directory say C:\wlsdev

3. Set the following env variables

set JAVA_HOME=C:\jdk16
set MW_HOME=c:\wlsdev

4. Run the installation configuration script in the MW_HOME directory
(This step is required to be run only once. If you move the installation to
another location/machine, you need to rerun this step)  configure.cmd
5. Create the domain using the script by running the utility

c:\wlsdev\wlserver\common\bin\config.cmd

6. Create a domain say testdomain in the directory
C:\wlsdev\user_projects\domains\testdomain

7. Start the WLS server by running the command

C:\wlsdev\user_projects\domains\testdomain\startWebLogic.cmd

Friday, July 02, 2010

How to find a file is 32bit or 64 bit on Windows

Download the utility file.exe from
http://www.vowles-home.demon.co.uk/utils/file.zip

Now run the command

file pidgin-2.6.6.exe

pidgin-2.6.6.exe, DOS/Win, i386 32bit executable, GUI, PE format

file c:\wordpad.exe

c:\wordpad.exe, DOS/Win, x86-64 64bit executable, GUI, PE format

file c:\TeraCopyExt64.dll

c:\TeraCopyExt64.dll, DOS/Win, x86-64 64bit executable, dll, GUI, PE format

file c:\TeraCopyExt.dll

c:\TeraCopyExt.dll, DOS/Win, i386 32bit executable, GUI, PE Modifed

Thursday, June 03, 2010

How to Configure Exchange Connector

1. Try to get hold of a system where exchange and active directory are installed.

2. Install AD Connector on the OIM Server and provision a user (For testing purpose)

3. Install Microsoft Exchange connector on the OIM Server. Please note that you need the Remote Manager only when you are using the exchange server 2007. Otherwise you do not need to any thing on the OIM Server.

4. Create a IT Resource for Exchange and leave all the attributes as blank.

5. Run the “Exchange Mail Store Lookup Reconciliation” task , before running this task scheduler change the “AD IT resource” attribute to the AD Connector that you created in the step no:2.

6. This schedule task populates the “Lookup.ExchangeReconciliation.MailStore” lookup values. For example in my case it populated my mail box name as “celvpint0309-ADInstance~CN=Mailbox Store (MSBOX),CN=First Storage Group,CN=InformationStore,CN=MSBOX,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=MSExchange2003Org,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=vm,DC=oracle,DC=com”

7. Now provision the AD User to the Exchange System. Only mandatory fields are Email Alias Name and the mail store name.

8. Now log in to the AD Server machine and check the AD User. For the exchange user you will see more attributes in the AD User TAB.