Weblogic Command to Bounce Pool

Weblogic Server has database connection pools, at times the connection pool need to reinitialized because of database outage or hostname changes etc. This can be done via Admin console as well as via cmd line using the Weblogic.Admin tool as shown below.

echo off
@rem set environment variable for WebLogic Home
set WL_HOME=f:beaweblogic81
@rem set the environment
call %WL_HOME%serverbinsetWLSEnv.cmd

@rem Run the Administration Command
echo off

java weblogic.Admin -url t3://localhost:7001 -username %1 -password %2 SUSPEND_POOL -poolName %3
java weblogic.Admin -url t3://localhost:7001 -username %1 -password %2 RESUME_POOL -poolName %3