Google ads Horizontal

Saturday, June 24, 2017

db2 backup and drop database

db2 connect to xydb
--the next command forces off the users asynchronously
db2 quiesce database immediate force connections
--but you need to unquiesce to drop
db2 unquiesce database
db2 connect reset
-- hope you don't have a connection in between
-- also make sure the database isn't activated....
db2 deactivate db xydb
-- do this as a safeguard cause there is no going back once you drop it.....
db2 backup db xydb to '<path you provide>' compress
db2 drop db xydb

Thursday, June 8, 2017

kill tomcat linux

* process_name="prmbodev"
* ps -eaf | grep $process_name
* export pid=` ps -eaf | grep  $process_name | grep -v "grep"| awk 'NR==1{print $2}' | cut -d' ' -f1`;kill -9 $pid
* ps -eaf | grep $process_name

Wednesday, June 7, 2017

linux tomcat port open

* logged in as root user
* iptables -L -n -t nat
* iptables -I INPUT -p tcp -m tcp --dport 9020 -j ACCEPT
* service iptables save