Automated deletion script with replication

LarsWeinreich

Newcomer
Joined
Jan 6, 2020
Messages
3
Reaction score
0
Points
0
PREDATAR Control23

Hi all

First of all, this is my first post here, so thanks for letting me part of this community :D

I am currently creating a script that will handle deletion of replicated nodes on a server and would like a sanity check.

I am using TSM scripting to achieve my goal and I send the following commands to the server:

DEFINE SCRIPT {uniquescriptname}
UPDATE SCRIPT {uniquescriptname} 'REMOVE REPLNODE {nodename} WAIT=YES' LINE=2
UPDATE SCRIPT {uniquescriptname} 'DELETE FILESPACE {nodename} * WAIT=YES' LINE=3
UPDATE SCRIPT {uniquescriptname} 'REMOVE NODE {nodename}' LINE=4
RUN {uniquescriptname}
DELETE SCRIPT {uniquescriptname}
{replicationservername}: DEFINE SCRIPT {uniquescriptname}
{replicationservername}: UPDATE SCRIPT {uniquescriptname} 'DELETE FILESPACE {nodename} * WAIT=YES' LINE=2
{replicationservername}: UPDATE SCRIPT {uniquescriptname} 'REMOVE NODE {nodename}' LINE=3
{replicationservername}: RUN {uniquescriptname}
{replicationservername}: DELETE SCRIPT {uniquescriptname}

The problem I am facing is that when running the script I get the following message:
ANR1633E REMOVE NODE: Node {nodename} is set up for replication and cannot be renamed or removed.

I find it strange that I get this message as I actually use the command REMOVE REPLNODE and await it.
I send each command to the server one after another and check the response from each command before advancing to the next.
Also; Should I put WAIT=YES when using the REMOVE NODE command?
I hope someone is able to shed some light on this problem.
 
PREDATAR Control23

The problem I am facing is that when running the script I get the following message:
ANR1633E REMOVE NODE: Node {nodename} is set up for replication and cannot be renamed or removed.
Welcome aboard.

Are you getting this error on the source or target?
 
PREDATAR Control23

Try to do update node {nodename} replmode=disabled before the remove. The remove replnode only impacts the source.
 
PREDATAR Control23

Thanks. I didn't realise that replication was also on the target node. Using REMOVE REPLNODE on the target server seems to have fixed the problem. Thanks so much for the help.
 
Top