Search This Blog

Total Pageviews

Wednesday 27 July 2016

Is Oracle Load balancing working ?


 Is Oracle Load balancing working ?

Check Load balancing
Oracle rac load balancing

change username password and service name 

vi loadbal.sh

#!/bin/bash
source /home/oracle/.bash_profile
for ((i=1; i <= 50 ; i++))
do
nohup sqlplus anuj/oracle1@RAC @sleep.sql &
done

**********

cat sleep.sql
begin
dbms_lock.sleep(20);
end;
/

**********

To run loadbal.sh
sh loadbal.sh



check load balacing is working !!!

 select inst_id, count(*) from gv$session where username is not null group by inst_id ;                                                                                                                                         

   INST_ID   COUNT(*)
---------- ----------
         1         31
         2         27

SQL> /

   INST_ID   COUNT(*)
---------- ----------
         1         31
         2         27

/

   INST_ID   COUNT(*)
---------- ----------
         1          6

         2          2




Oracle DBA

anuj blog Archive