• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Broken referencial integrity: Database id 15 is not found in data_bases

daanse

Regular Pleskian
Hi,
i had some trouble with Backups.

What can i do? The Log shows this Error for all the 15 Databases.
I have the Latest Plesk Version.
Server Health, Sites all fine.

Warning:
domain "x.de"
Broken referencial integrity: Database id 15 is not found in data_bases
Warning: domain "x.de"
Unable to execute SQL: Table 'psa.DatabaseCustomHosts' doesn't exist. SQL query: SELECT name, type, external_id, host FROM data_bases AS d LEFT JOIN DatabaseCustomHosts AS h ON d.id=h.id WHERE d.id = ?
Warning: domain "x.de"
Unable to execute SQL: Table 'psa.DatabaseCustomHosts' doesn't exist. SQL query: SELECT name, type, external_id, host FROM data_bases AS d LEFT JOIN DatabaseCustomHosts AS h ON d.id=h.id WHERE d.id = ?
Warning: domain "x.de"
Broken referencial integrity: Database id 14 is not found in data_bases
Warning: domain "x.de"
Unable to execute SQL: Table 'psa.DatabaseCustomHosts' doesn't exist. SQL query: SELECT name, type, external_id, host FROM data_bases AS d LEFT JOIN DatabaseCustomHosts AS h ON d.id=h.id WHERE d.id = ?
 
Looks like serious database inconsistency. You can try to fix it with repair utility before starting backup process:

# plesk repair db

Contact Plesk Support Team if this procedure not help. Fixing database directly on your server is required.
 
Hello,

thx for this command. It recreates the table and the backup finishes without error. But the table is empty. I would like to know if this is okay.
 
Will this #plesk repair db affect a running System with Customers on it?
Can i run plesk repair db without any concerns?
 
Will this #plesk repair db affect a running System with Customers on it?
Can i run plesk repair db without any concerns?
Using the Plesk repair utility with the db aspect checks the Plesk database for consistency using both system and Plesk-specific tools. If any inconsistencies are found, the repair utility creates a dump of the database, and then attempts to correct them.
 
Daka Media KG: I run it with no Problems. The recreation of the table works with no Problems (at least until now).

IgorG: Is it normal that the table is just empty and the mentioned SELECT Returns an empty result set? I only have databases hosted on localhost.
 
Yeah, I got this too, after migrating from Ubuntu 12.04.5 + Plesk 12.0.18 #75 to Ubuntu 14.04.3 + Plesk 12.5.30 #21 yesterday, the first backup gave me this error.

# plesk repair db

fixed it.
I will start another thread with some of the other issues I encountered, when i get a minute.
Regards

Lloyd
 
Back
Top