cliernt-side loadbalance测试中用到的脚本
脚本test.sh
#!/bin/bash
i=1
while [ $i -le $2 ]; do
i=$((i+1))
sqlplus -s system/oracle@$1 @test.sql
done
脚本test.sh
#!/bin/sh
count=0
while [ $count -lt 1000 ] # Set up a loop control
do # Begin the loop
count=`expr $count + 1` # Increment the counter
sqlplus -s system/oracle@rac @test.sql
done
备注:两个test.sh脚本任选其一即可.
脚本test.sql
select instance_name from v$instance
/
exit;
客户端tnsname.ora
rac =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rac)
)
)
脚本test.sh
#!/bin/bash
i=1
while [ $i -le $2 ]; do
i=$((i+1))
sqlplus -s system/oracle@$1 @test.sql
done
脚本test.sh
#!/bin/sh
count=0
while [ $count -lt 1000 ] # Set up a loop control
do # Begin the loop
count=`expr $count + 1` # Increment the counter
sqlplus -s system/oracle@rac @test.sql
done
备注:两个test.sh脚本任选其一即可.
脚本test.sql
select instance_name from v$instance
/
exit;
客户端tnsname.ora
rac =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rac)
)
)
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25373498/viewspace-1062554/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/25373498/viewspace-1062554/