Sunday, April 29, 2012

adpreclone 0% completed Error

adpreclone 0% completed Error

Below error is started after upgrading to 11.2.0.3 database

perl adpreclone.pl dbTier
Running Rapid Clone with command...
perl /u01/app/oracle/PROD/db/tech_st/11.2.0/appsutil/bin/adclone.pl java=/u01/app/oracle/PROD/db/tech_st/11.2.0/jdk mode=stage stage=/u01/app/oracle/PROD/db/tech_st/11.2.0/appsutil/clone component=dbTier method=CUSTOM dbctx=/u01/app/oracle/PROD/db/tech_st/11.2.0/appsutil/PROD_bhmanapp09r12.xml showProgress
Beginning database tier Stage - Mon Apr 23 10:20:23 2012
APPS Password : apps
Log file located at /u01/app/oracle/PROD/db/tech_st/11.2.0/appsutil/log/PROD_bhmanapp09r12/StageDBTier_04231020.log
- 0% completed
ERROR while running Stage...
ERROR while running perl /u01/app/oracle/PROD/db/tech_st/11.2.0/appsutil/bin/adclone.pl java=/u01/app/oracle/PROD/db/tech_st/11.2.0/jdk mode=stage stage=/u01/app/oracle/PROD/db/tech_st/11.2.0/appsutil/clone component=dbTier method=CUSTOM dbctx=/u01/app/oracle/PROD/db/tech_st/11.2.0/appsutil/PROD_bhmanapp09r12.xml showProgress ...

There was no error meessage in log file.

Solution:

Set the following debug parameters  (Linux environment)
TIMEDPROCESS_DEBUG=YES
export TIMEDPROCESS_DEBUG

Re-run the adpreclone. now you can view the error message in log file.

Zip 3.0 is used (delivered with 11g) instead of the 2.3 which has been delivered with 10g.

modify the PATH and so that zip2.3 was in the first.

to make this chnage permenant , edit the $ORACLE_HOME/.env file PATH
Re-run perl adpreclone dbTier.





Friday, April 20, 2012

Linux Network bonding

Linux Network bonding



Linux network Bonding is creation of a single bonded interface by combining 2 or more Ethernet interfaces. This helps in high availability of your network interface and offers performance improvement. Bonding is same as port trunking or teaming.

Steps for bonding in Redhat Enterprise Linux are as follows.. 


Step 1.

Create the file ifcfg-bond0 with the IP address, netmask and gateway. Shown below is my test bonding config file.

$ cat /etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0
IPADDR=10.183.90.86
GATEWAY=10.183.90.1
NETMASK=255.255.255.0
NETWROK=10.183.90.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes




Step 2.

Modify eth0 and eth1  configuration as shown below. Comment out, or remove the ip address, netmask, gateway and hardware address from each one of these files, since settings should only come from the ifcfg-bond0 file above. Make sure you add the MASTER and SLAVE configuration in these files.

$ cat /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none
HWADDR=00:1C:C4:96:21:60
ONBOOT=yes
# setting for Bond
MASTER=bond0
SLAVE=yes


$ cat /etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth1
BOOTPROTO=none
HWADDR=00:1C:C4:96:21:62
ONBOOT=yes
MASTER=bond0
SLAVE=yes



Step 3.

Set the parameters for bond0 bonding kernel module. Select the network bonding mode based on you need, documented at
http://unixfoo.blogspot.com/2008/02/network-bonding-part-ii-modes-of.html. The modes are
·       mode=0 (Balance Round Robin)
·       mode=1 (Active backup)
·       mode=2 (Balance XOR)
·       mode=3 (Broadcast)
·       mode=4 (802.3ad)
·       mode=5 (Balance TLB)
·       mode=6 (Balance ALB)
Add the following lines to /etc/modprobe.conf
# bonding commands
alias bond0 bonding
options bond0 mode=1 miimon=100 



Step 4.

Load the bond driver module from the command prompt.

$ modprobe bonding


Step 5.

Restart the network, or restart the computer.

$ service network restart # Or restart computer

When the machine boots up check the proc settings.

$ cat /proc/net/bonding/bond0 

Look at ifconfig -a and check that your bond0 interface is active. 


To verify whether the failover bonding works.. 
  •   Do an ifdown eth0 and check /proc/net/bonding/bond0 and check the “Current Active slave”. 
  •    Do a continuous ping to the bond0 ipaddress from a different machine and do a ifdown the active interface. The ping should not break.


 

Number of files in a folder

Number of files in a folder

find . -type  f| wc -l

Number of Subfolders in a folder
find . -type d | wc -l

Number of folders in current folder then

find . -maxdepth 1 -type d | wc -l

Rename a linux mount point


Unmount the existing mount point (that you want to rename) :
#umount /prodapp




Change the label on the filesystem to the new mount point name:
#tune2fs -L /u01 /dev/sdb2

add the entries to /etc/fstab:
replace the entries of /prodapp with new mount point

Create the mount point named /u01
mkdir /u01

mount the new folder /u01:
mount  /u01

remove the folder /prodapp:
rmdir -rf /prodapp

Update etc_fstab file while linux started with repair mode

Use following command to mount the filesystem with writable permission:

Repair filesystem # mount -w -o remount /

After this you can go and change /etc/fstab file. Restart your computer and that’s it.

Wednesday, April 4, 2012

The Macro Cannot be Found or Has Been Disabled (BI Publsiher)

The Macro Cannot be Found or Has Been Disabled (BI Publsiher)

 Error BI Publisher macros in Word : "The macro cannot be found or has been disabled because of your macro security settings"


Solution:
Close word application
Find out the file named MSComctlLib.exd
Backup the existing MSComctlLib.exd file
This file can be regenerated when you re-open the word.

Tuesday, April 3, 2012

Mount Remote Windows Folder with RHEL 5 Linux

Login into linux using root user

Create the required mount point in linux
#mkdir -p /mnt/win_folder   
mount the remote folder
#mount -t cifs //windows_machine_ip_or_name//shared_folder -o username=test,password=test123 /mnt/win_folder

-t cifs - file system type to be mount
-o : are options passed to mount command, here i have passed 2 options username and password
//windows_machine_ip_or_name//shared_folder - windows/shared folder
 /mnt/win_folder - linux mount point

Configure the system to automount while starting

add entry into /etc/fstab
Open file /etc/fstab using vi text editor:# vi /etc/fstabAppend line
//windows_machine_ip_or_name//shared_folder /mnt/win_folder cifs username=test,password=test123 0 0

How to Create Oracle Worflow Business Events

How to Create Oracle Worflow Business Events

Purpose: Below I am going to show you how we can use a business event to execute custom plsql function.

Go to system Administrator Responsiblity => Worflow Administrator
Select Business Events Tab

Click Create Event Button



    Enter the required values.
    Click Apply
Create Event Subscription by clicking Event Subscription
       
Click on Create Subscription button



System will be the name of your enviroment instance , selection available
Action type custom
Click Next

Create a PL/SQL function  that will be execute when the event is raised

Function ts_cancel_event(p_subscription_guid In RAW
,p_event In Out NoCopy Wf_Event_t
)
Return Varchar2
Is
l_doc_id Number;
Begin
l_doc_id := p_event.getValueForParameter('XXPM_DOC_ID');
-- your own logic example like inserting data to table or some action
----
----
 RETURN 'SUCCESS';
End ts_cancel_event;

getValueForParameter is used to retrieve parameter value from event.
Attach the procedure to Event Action window



Enter all required values and Click Apply

Next step is how to raise the event:

Sample code is below
Procedure raise_approval_cancel_event(p_doc_id In Number)

Is
l_event_param_list wf_parameter_list_t;
l_param_table wf_parameter_t;
l_index Number;
Begin
l_event_param_list := wf_parameter_list_t();
-- lets add the value to event parameters
l_param_table := wf_parameter_t(Null,Null);
l_event_param_list.Extend;
l_param_table .setName('XXPM_DOC_ID');
l_param_table .setValue(p_doc_id);
l_index := coalesce(l_index ,0) + 1;
l_event_param_list (l_index ) := l_param_table ;
wf_event.RAISE(p_event_name => 'sat.oracle.apps.xxpm.ts.cancelApprovalProcess'
,p_event_key => 'XXPMSTS'||to_char(p_doc_id)
,p_parameters => l_event_param_list
 );
ENd raise_approval_cancel_event;