Search for:

Available article translations:

Plesk Database Inconsistency Checker (Beta)

Article ID: 114791, created on Sep 18, 2012, last review on Sep 23, 2015

  • Plesk 11.0 for Linux
  • Plesk 11.0 for Windows

Important: This script is developed for Plesk 11.0.9 and below. Do not use this script in higher versions.

Plesk 12.5

Starting from Plesk 12.5 you can use self-repair tool to find database inconsistencies. More information can be found in
Plesk Release Notes for Linux
Plesk Release Notes for Windows


The Plesk Database Inconsistency Checker script is designed to detect inconsistencies in the PSA and APSC databases of Plesk.
The script is intended to be run on a server with Plesk 9.5.4/10.4.4/11.0.9 for Linux or Windows with a MySQL database engine.

The script is currently in the Beta stage and may produce a number of false positives, especially on older Plesk versions. If the script detects a problem, it does not necessarily indicate that the inconsistency affects anything or needs to be fixed.
At the moment, the script does not offer methods for solving detected problems, and does not sort them by how critical they are.

Note that we also have a Plesk Database Schema Checker for checking the integrity of the Plesk system database.



# /usr/local/psa/bin/sw-engine-pleskrun check_db_integrity-beta.php


"%plesk_bin%\php.exe" -dauto_prepend_file="" check_db_integrity-beta.php

Output description

  1. List of records in [] that miss a matching record in []
    11, 33

This means that the hosting table has records with sys_user_id that do not have corresponding records in the sys_users table with = hosting.sys_user_id:

# mysql -uadmin -p`cat /etc/psa/.psa.shadow ` -e 'select from psa.sys_users where in (11,33)'

# mysql -uadmin -p`cat /etc/psa/.psa.shadow ` -e 'select from where in (11,33)'
| sys_user_id |
|          11 |
|          33 |

It should be as follows:

# mysql -uadmin -p`cat /etc/psa/.psa.shadow ` -e 'select from psa.sys_users where in (11,33)'
| id |
| 11 |
| 33 |

# mysql -uadmin -p`cat /etc/psa/.psa.shadow ` -e 'select from where in (11,33)'
| sys_user_id |
|          11 |
|          33 |

2. List of records in [ WHERE htype='vrt_hst'] that miss a matching record in []

This means the same as the first item discussed, but with an additional filter:

# mysql -uadmin -p`cat /etc/psa/.psa.shadow ` -e 'select from where in (41) and htype="vrt_hst"'
| id |
| 41 |

3. List of records in [psa.mail.account_id] that exceed N in 1:N (N=1) relation to []
49 [count in table psa.accounts:1; count in table psa.mail:2]

This indicates that there are multiple identical entries for the psa.mail.account_id field in the psa.mail table, when this entry should be unique:

# mysql -uadmin -pqweqwe -e 'select psa.mail.account_id from psa.mail where psa.mail.account_id=49'
| account_id |
|         49 |
|         49 |
  1. List of records in [] should not have a matching record in [psa.domainaliases.dns_zone_id]

    This indicates that the table has the same dns_zone_id as the psa.domainaliases table, when it should not.

Search words:


database inconsistencies

List of records in [psa.apsResources.registryId] that exceed N in 1:N (N=1) relation to [apsc.aps_resource_requirement.uid]

plesk db consistency checker

List of records in [psa.PlansSubscriptions.subscription_id] that exceed N in 1:N (N=1) relation to []

List of records in [ WHERE htype = 'vrt_hst' AND webspace_id=0] that miss a matching record in [psa.Subscriptions.object_id WHERE object_type='domain']

Plesk db checker inconsistencies

Plesk Database Inconsistency Checker (Beta)

List of records in [psa.smb_servicePermissionAccounts.servicePermissionId] that exceed N in 1:N (N=1) relati

List of records in [psa.smb_servicePermissionAccounts.servicePermissionId] that exceed N in 1:N (N=1) relation to [] 2 [count in table psa.smb_servicePermissions:1; count in table psa.smb_servicePermissionAccounts:19]

pre-upgrade checker database issues

List of records in [psa.smb_servicePermissionAccounts.servicePermissionId] that exceed N in 1:N

inconsistencies in plesk db


56797cefb1efc9130f7c48a7d1db0f0c a914db3fdc7a53ddcfd1b2db8f5a1b9c 29d1e90fd304f01e6420fbe60f66f838 85a92ca67f2200d36506862eaa6ed6b8 aea4cd7bfd353ad7a1341a257ad4724a 0a53c5a9ca65a74d37ef5c5eaeb55d7f 514af229ae32522202a910a2649c80fb bd7fc88cf1b01f097749ae6f87272128

Was this article helpful?
Tell us how we may improve it.
Yes No
Server Virtualization
- Odin Cloud Server
- Odin Containers for Windows 6.0
- Odin Virtuozzo Containers
- Odin Automation
- Odin Automation for Cloud Infrastructure
- Odin Business Automation Standard
- Odin Virtual Automation
- Odin Plesk Panel Suite
- Web Presence Builder
- Odin Plesk Automation
- Odin Small Business Panel
- Value-added Services for Hosters
- Odin Partner Storefront
Services & Resources
- Cloud Acceleration Services
- Professional Services
- Support Services
- Training & Certification