[FIX] Cannot remove a database from a domain

Article ID: 1419 
Last Review: Oct,6 2008
Author: Oleg Beznosov APPLIES TO:
  • Plesk 7.5.x for Windows
  • Plesk 7.6.x for Windows

Symptoms

The checkbox next to the database name is qrayed out and the database name contains (This resource is used by the installed site application).

Cause

The database is used by an installed site application. It can be removed only along with the respective site application.

Resolution

To remove the database the parent application needs to be removed from Plesk as well: Plesk, Domains, domain.tld, Application Vault / ASP.NET Web Applications.

If no applications that may be using the database are displayed, the database needs to be marked as non-belonging to any application, using the provided steps below. This problem could have happened during errors when deleting an site application.

1. Find the database ID in the Plesk database:

set @db_id = (select id from data_bases where name=’db_name’);

2. Delete the connection between application and the database.

set @app_id = (select app_id from siteappresources where type='database' and res_id=@db_id);
delete from siteappresources where app_id=@app_id;

3. Remove the database using Plesk, domains, domain.tld, Databases.


Subscription for this article changesSubscription for this article changes

Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
* - required fields