You can use the nsqmqsc to issue UNMANAGE and MANAGE commands from the Linux command line.
Commands can be executed manually or automated in scripts.
This approach supports integration into platform migration or batch processes without relying on the Navigator UI.
1. Basic Command Syntax
Run the following command from the $Nastel/bin directory:
./nsqmqsc -m <WGS_NAME> -U <UserName> -P <Password>
Once inside the nsqmqsc command shell, you can enter:
UNMANAGE <NodeName> MANAGE <NodeName>
To view all available commands:
Help
2. Automating with a Script
You can automate the unmanage process using a shell script.
Example script: node_automation.sh
#!/bin/bash WGS=$1 NODE=$2 USER=$3 PASS=$4 # Create temporary command file CMD_FILE=/tmp/node_cmds.txt echo "UNMANAGE $NODE" > $CMD_FILE echo "exit" >> $CMD_FILE # Execute nsqmqsc $NASTEL_HOME/bin/nsqmqsc -m$WGS -U$USER -P$PASS < $CMD_FILE # Clean up rm -f $CMD_FILE
Usage:
./node_automation.sh <WGS_NAME> <NodeName> <UserName> <Password>
You can extend this script to:
Include both
UNMANAGEandMANAGEcommands.Split into two separate scripts depending on your workflow.
Note
Ensure
$NASTEL_HOME/binis in yourPATH, or specify the full path tonsqmqsc.For improved security, credentials can be:
Passed as script arguments (as shown), or
Configured using environment variables.