Symptoms
- Service Plan cannot be removed with the following error:
PLESK_ERROR: Error: Some of the selected service plans were not removed. Plan is used
- It is displayed that Service Plan is used by some subscription, however, when checking Service Plans > <name of required service plan> Subscriptions, it is showing that there are no Subscriptions assigned.
Cause
Database inconsistency.
Resolution
- Log in to the server over RDP or SSH;
- Back up psa database;
- Define domain’s and subscription’s id, which is assigned to the required service plan:
MYSQL_LIN: mysql > SELECT @Plan_ID:=id FROM Templates WHERE name=”<service plan name>“;
+—-+
| id |
+—-+
| 6 |
+—-+MYSQL_LIN: mysql> SELECT @obj_id:=Subscriptions.object_id, @subs_id:=Subscriptions.id FROM PlansSubscriptions, Subscriptions WHERE PlansSubscriptions.subscription_id=Subscriptions.id AND Subscriptions.object_type=”domain” AND
[email protected]_ID;
+———–+—-+
| object_id | id |
+———–+—-+
| 19 | 20 |
+———–+—-+ -
Check if this domain exists:
MYSQL_LIN: mysql> select name from domains where [email protected]_id;
Empty set (0.00 sec) -
If it is not, delete unnecessary subscription and service plan from the database:
MYSQL_LIN: mysql> DELETE FROM Subscriptions WHERE [email protected]_id;
MYSQL_LIN: mysql> DELETE FROM Templates WHERE [email protected]_ID;