Killing Sessions on Netezza
To kill all active sessions on Netezza, to restart a test.
You can use nzsession to list to session id’s, and nzsession abort to kill them manually, but I wanted a means to do it in one.
To Kill All session
for ses in `nzsession | grep ADMIN | awk ‘{print $1}’`
do
nzsession abort -id ${ses} -force
done
========================================================================
To Kill any single session
Nzsession -show
then
nzsession abort -id ""session"
========================================================================
Important Note:-
Don't not kill any session using Kill-9 "pid" ever, It may restart your your NPS.
If generate statistics running for 75 databases almost 10000 tables from shell script then how do we kill that.
ReplyDeleteIf we kill using nzsession abort then it will continue for next table. So if it is the case we need supply nzsession abort 10000 times so please advice how do we kill it permanently.