Could be a bug with Plesk 9.5 version. But Plesk 9.5 is giving issues once in a while in deleting the domains which are “partially” created. Let us see how Plesk remove domain manually can be done.
ISSUE
DNS zones are never created, and the DBs are not properly updated. Even after reconfiguring the domains using websrvmng.exe –reconfigure-vhost –vhost-name =”domain.com” it couldn’t be deleted. Shows the message “Information: Domains are now removed”, but in real, the domain will be still shown under the domains list.
And the domain will be in suspended state. Unsuspension of the domain will result in an error message “DNSZone::Table::select() failed: no such row in the table”
Solution for the above issue is explained at https://www.supportsages.com/2009/08/plesk-account-unsuspension-tableselect-failed-no-such-row-in-the-table/
However even after fixing the DNS like this, the issue cycles.
Removal of domain results in suspension of domain -> Unsuspension of domains results in above error -> Fixing the error allows to unsuspend and Removal of domain results in suspension of domain ð
SOLUTION
So solution I used to solve was to manually remove the domain related entries from plesk database, from the file system and also from the email services. Get into MySQL or whichever DB plesk is using. For finding the current DB, use Plesk Reconfigurator and then follow the parallels KB found at http://kb.parallels.com/en/3472
The instructions below assumes that you are using Mailenable and Plesk vhosts directory is at “C:\Inetpub\Vhosts” . This location can be at D:\ or E:\ even. Also, I hereby assume that there are no two domains which can match the mysql LIKE query I used below i.e There are no domains like 1domain.com , 2domain.com along with actual domain.com. If there is one, please use your “brain” to find the right domain and the IDs associated with it. When in doubt, please comment.
Disclaimer : If you mess up the database neither me or SS will be responsible for it ð
Let’s first gather all the ‘id”s first, like dom_id, sys_user_id, id etc which will be helpful in the deletion of database entries relating to the domain name which you want to removed.
1. Getting the IDs.
Domain ID – dom_id or id
mysql> SELECT id FROM domains where name=âdomain.comâ
We are assuming that dom_id you got as a result of above command is 8880
Database ID – db_id
mysql> select id FROM data_bases where dom_id=(SELECT id FROM domains where name=âdomain.comâ);
We are assuming that db_id you got as a result of above query is 1433. Please note that you could get more than one result. Please save all the db_id and re-execute the sql query for each db_id.
System User ID – sys_user_id
mysql> select id FROM sys_users where home like '%domain.com%';
We are assuming that sys_user_id you got as a result of above command is 8843
Let’s start the actual deletion process
Shall we backup ? Better be safe!
C:\Program Files (x86)\Parallels\Plesk\Databases\MySQL\bin>mysqldump -P8306 -uadmin -p<plesk DB admin pass> psa > c:\psa.sql
You are now ready to delete. Please execute the follow sql commands in mysql prompt
delete from db_users where db_id='1433'; delete from data_bases where dom_id='8880'; delete from mail where id='8880'; delete from subdomains where id='8880'; delete from dns_recs where id='8880'; delete from domains where id='8880'; delete from domain_aliases where dom_id='8880'; delete from hosting where sys_user_id='8843'; delete FROM sys_users where id='8843'; delete from dns_zone where displayName=âdomain.comâ;
Database entries are deleted. Now it’s time to remove the users and files from the filesystems, IIS, Server, Mail server, DNS server etc.
- Remove the domain from inetpub -> vhosts
- Remove from Mail Enable Administrator. If it is SmarterMail, follow other steps.
- Start => run => mailenable.msc => Post Offices and remove it.
- Remove Sites “domain.com” and “Application Pool” from Internet Information Services manager. If IIS7, use command line option => %systemroot%\system32\inetsrv\APPCMD.EXE delete site “domain.com” .
- Remove from Computer management Console –Â System Tools > Local Users and Groups > Users. You must remove references to the domain for Plesk Domain User and Plesk IIS User as well.
- Remove DNS entry – depending on the DNS server.
Finally,
cd %plesk_bin% domain.exe -r domain.com
These steps should help remove the domain manually from the plesk. Please note that this article is based on the second attempt and could be buggy. I assume some “common sense” when running these commands. Understand the commands and each step before you actually execute it. Good luck. Don’t MESS up!!