Wednesday, 4 February 2015

Calling a Java Class from PLSQL


Step 1 - Compile your class
public class LongConvertor {

public static String toString(String i) {
return Long.toString(Long.parseLong(i), 36);
}

}

Step 2 : Load your class on to Oracle
loadjava -user scott -password tiger LongConverter.class;


Step 3: Create a wrapper function

CREATE OR REPLACE FUNCTION LONG_TO_STRING (input VARCHAR2) RETURN VARCHAR2 AS LANGUAGE JAVA NAME 'LongConverter.toString(java.lang.String) return java.lang.String';

Step 3: Use it this way :)
SELECT UPPER(LONG_TO_STRING(10106192)) FROM DUAL;  

Refer : http://docs.oracle.com...

Thursday, 8 January 2015

How to downgrade a OBI RPD Version ?


....\bifoundation\server\bin>nqgenoldverrpd.exe -P <repository-password> -I <source-rpd-location> -O <target-rpd-location> -V <target-version-number>

Example:

....\bifoundation\server\bin>nqgenoldverrpd.exe -P admin123 -I C;\MySource.rpd -O C:\MyTarget.rpd -V 318

Wednesday, 7 January 2015

How to start stop an Business Works Archive archive using AppManage (console) ?


To Start
./AppManage -stop -app <Archive-name> -user <usename> -pw <password> -domain <domain-name>

To Stop
./AppManage -start -app <Archive-name> -user <usename> -pw <password> -domain <domain-name>

Monday, 5 January 2015

How to find the space occupied by indexes of a table in oracle ?

 SELECT idx.index_name, (SUM(bytes)/(1024*1024)) SIZE_IN_MB
  FROM user_segments seg, user_indexes idx
 WHERE idx.table_name = <my_table_name>
   AND idx.index_name = seg.segment_name
 GROUP BY idx.index_name;

Thursday, 1 January 2015

How to install Tibco i-Process Palattes on Business Works?

You need to have the following installers with you

TIB_ipTechpi8402_11.2.0_w32.zip
TIB_ipTechpi9151_11.3.0_w32.zip

Step 1. 
Unzip TIB_ipTechpi8402_11.2.0_w32.zip
Go to : TIB_ipTechpi8402_11.2.0_w32\auxinstallers\windows32
you should find a installer named.,

TIB_bwpluginiprocess-simple_2.1.9_win_x86.exe

Install this.


Step 2. 
Unzip TIB_ipTechpi9151_11.3.0_w32.zip
Go to : TIB_ipTechpi9151_11.3.0_w32\2239 #9151 iProcess Technology Plug-ins 11.3.0 Win Sql RC2\auxinstallers\windows32

you should find a installer named.,

TIB_bwpluginiprocess-simple_2.1.10_win_x86.exe

Install this.



Step 3:

Open your designer, now you should be able to see your iProcess related palattes in your Designer.

Configuring IAP JMS

Summary of steps:
################################################################################ ################################
STEP 1   [Switch on IAP JMS on iProcess Server]
################################################################################ ################################
execute this command in iprocess engine:

%SWDIR%\util\swadm.exe set_attribute 0 ALL 0 IAPJMS_SYNCHRONOUS 1
%SWDIR%\util\swadm.exe set_attribute 0 ALL 0 WQDJMS_TOPICNAME WQDTOPIC
%SWDIR%\util\swadm.exe set_attribute 0 ALL 0 IAPJMS_PORTNO 9071
%SWDIR%\util\swadm.exe set_attribute 0 ALL 0 WQDJMS_PORTNO 9075
%SWDIR%\util\swadm.exe set_attribute 0 ALL 0 IAPJMS_SIMPLETOPIC 1
%SWDIR%\util\swadm.exe set_attribute 0 ALL 0 IAPJMS_TOPICNAME IAPTOPIC
%SWDIR%\util\swadm.exe set_attribute 0 ALL 0 WQDJMS_TOPICNAME WQDTOPIC
%SWDIR%\util\swadm.exe set_attribute 0 ALL 0 IAPJMS_ROLLBACK 1
%SWDIR%\util\swadm.exe set_attribute 0 ALL 0 JVMPROPS
%SWDIR%\util\swadm.exe set_attribute 0 ALL 0 IAPJMS_PUBLISH 1


################################################################################ ################################
STEP 2   [Configure your JMS Details in iProcess]
################################################################################ ###############################

if your TIBCO EMS installation is 5.1 is not necessary modify this properties files (This  was my error, described in the previous post): 

-%$SWDIR%\etc\iapjms_classpath.properties
-%$SWDIR%\etc\iapjms.properties


################################################################################ ################################
Step 3 [Create a Topic in your JMS]
################################################################################ ###############################
execute in console (CMD)--->C:\tibco\ems\6.0\bin>tibemsadmin.exe

TIBCO Enterprise Message Service Administration Tool.
Copyright 2003-2009 by TIBCO Software Inc.
All rights reserved.
Version 5.1.0 V10 2/4/2009

Type 'help' for commands help, 'exit' to exit:
> connect
Login name (admin): admin
Password:

tcp://localhost:7222> create topic IAPTOPIC
Topic 'IAPTOPIC' has been created

################################################################################ ################################
STEP 4 [Export your IAP JMS Configuration]
################################################################################ ################################

$SWDIR/bin/swutil/IMPMONITOR   #{Your-Mer-xmlFile}




Simple for / while loop in shell

#!/bin/sh a=0
while [ $a -lt 10 ]
do
echo $a
a=`expr $a + 1`
done

Tibco client Installation order

Tibco Suite
All default – Simple – Next-Next-Next Installation

1.      TRA
                                I.            TIB_tra_5.7.0_win_x86_64.zip
                              II.            TIB_tra_5.7.1_win_x86_64.zip

2.      Business Works
                                I.            TIB_bw_5.9.0_win_x86_64.zip
                              II.            TIB_ipTechpi8402_11.2.0_w32.zip
                            III.            TIB_ipTechpi9151_11.3.0_w32.zip

3.      iProcess Modeller
                                I.            TIB_ipWkspWin8994_11.1.3_w32.zip
                              II.            TIB_ipWksppi8413_11.2.0_w32.zip

                            III.            TIB_ipWksppi9154_11.3.0_w32.zip

How to execute a SQL in Shell Script

#!/bin/bash
echo "STARTED..."
echo "Connecting to SQLPLUS"
sqlplus -L -s alf_ar/alf_ar@intdev <<EOF
prompt Connected to alf_ar@intdev
set serveroutput on size 100000
set head off
set feedback off
prompt executing the sql statement: $1
$1
exit;
EOF
echo "END..."

Save the above content as "runsql.sh"

then execute the following command
nohup sh runsql.sh "select 1 from dual;" > out.txt &

How to search a file/folder in unix ?

 find . -name "bptm.jar" 2>/dev/null



2>/dev/null denotes standard errors not being shown in console