Disassociate a primary VIP from an existing HADR database of an instance
You can disassociate a virtual IP address (VIP) from a database in an HADR Db2 instance by using the Db2 Cluster Manager (db2cm) utility.
About this task
The following placeholders are used in the command statements throughout this procedure. These represent values that you can change to suit your organization:
- <host1> is the host name that is to be assigned a VIP within the HADR Db2® instance.
- <database_name> is the name of the Db2 database.
- <instance_name> is the name of the Db2 instance on the cluster.
- <partition_number> is the number assigned to the partition associated with the VIP.
Procedure
Examples
The following example shows the command syntax and output from disassociating a VIP for the
primary host,
ignited1
, from a the Db2 instance db2inst1
(see step
1):[root@ignited1 ~]# sqllib/bin/db2cm -delete -primaryVIP -db SAMPLE -instance db2inst1
Primary VIP resource deleted successfully.
The following example shows the command syntax and output from verifying that the VIP resource is
removed from the Db2 instance,
db2inst1
(see step 2):[root@ignited1 ~]# crm status
Stack: corosync
Current DC: ignited1 (version 2.0.2-1.el8-744a30d655) - partition with quorum
Last updated: Tue Mar 10 14:17:56 2020
Last change: Tue Mar 10 14:17:56 2020 by db2inst2 via cibadmin on cuisses1
2 nodes configured
6 resources configured
Online: [ cuisses1 ignited1 ]
Full list of resources:
db2_cuisses1_eth0 (ocf::heartbeat:db2ethmon): Started cuisses1
db2_ignited1_eth0 (ocf::heartbeat:db2ethmon): Started ignited1
db2_cuisses1_db2inst1_0 (ocf::heartbeat:db2inst): Started cuisses1
db2_ignited1_db2inst2_0 (ocf::heartbeat:db2inst): Started ignited1
Clone Set: db2_db2inst1_db2inst2_SAMPLE-clone [db2_db2inst1_db2inst2_SAMPLE] (promotable)
Masters: [ cuisses1 ]
Slaves: [ ignited1 ]