Validate data in the database
m ((username removed) (log details removed): Moving to Documentation namespace)
(Automatically adding template at the end of the page.)
Line 21: Line 21:
We suggest you set the link attribute creating the problem to null (thus removing the duplicate problem) and then use the OCL debugger to delete the object. In the debugger, you can use OCL or OclPS to find the (now disconnected) object and delete it. It will then correctly delete any linked aggregate objects, links from other objects to it, and link objects.
We suggest you set the link attribute creating the problem to null (thus removing the duplicate problem) and then use the OCL debugger to delete the object. In the debugger, you can use OCL or OclPS to find the (now disconnected) object and delete it. It will then correctly delete any linked aggregate objects, links from other objects to it, and link objects.
[[Category:Database]]
[[Category:Database]]
{{Edited|July|12|2024}}

Revision as of 15:49, 10 February 2024

The MDrivenServer has a built-in feature to check for database consistency.

  • Log in to the MDrivenServer
  • Go to Settings->Admin

There are two buttons there:

  1. Validate Admin DB Data
  2. Validate A0DB Data

Admin DB is the database internal of the MDrivenServer containing model information.

A0DB is the internal or external database containing the application data.

Click to run a check on all the tables in the databases.

You will get an error report and an SQL statement to run to see the problem data:

Single link dupes(38146711), execute 
select PublisherAgreementPeriodID,Count(PublisherAgreementPeriodID) from AgreementImport where not PublisherAgreementPeriodID is null group by PublisherAgreementPeriodID having Count(PublisherAgreementPeriodID)>1

Copy the SQL command to your SQL server query interface, find the offending object, and decide what to do.

Most likely, you may want to delete the row - but then, you would have to manually remove all references to that row. Otherwise, you will create new problems, so using SQL to delete things can be tricky.

We suggest you set the link attribute creating the problem to null (thus removing the duplicate problem) and then use the OCL debugger to delete the object. In the debugger, you can use OCL or OclPS to find the (now disconnected) object and delete it. It will then correctly delete any linked aggregate objects, links from other objects to it, and link objects.

This page was edited 1 days ago on 05/17/2024. What links here