Validate data in the database

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

  • Log in to the MDrivenServer
  • Go to Settings->Admin
Documentation Validate data in the database 1715940860719.png


There are three buttons there:

  • Validate Admin DB Data
  • (1)Validate A0DB Data
  • (2)Column field consistency check (New!)

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.

Column field consistency check(2)

Video on this function : https://youtu.be/LaeTaWnemMo

This will loop through all tables and check:

  • Check type - is type same in model as in DB
  • Check null in db but not null in model - is it allownull in DB but notnull in model
  • Check notnull in db but allownull in model - is it not allownull in db - but is in model
  • Check string length shorter in db than in model - does string fields allow longer length in model than in db

Making sure that the report is clean and no issues found is essential to avoiding runtime errors.


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