No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
The MDrivenServer has a built in feature to check for database consistency. | The MDrivenServer has a built-in feature to check for database consistency. | ||
* Log in to the MDrivenServer | * Log in to the MDrivenServer | ||
* | * Go to Settings->Admin | ||
There are two buttons there | There are two buttons there: | ||
# Validate Admin DB Data | # Validate Admin DB Data | ||
# Validate A0DB Data | # Validate A0DB Data | ||
Admin DB is the database internal | Admin DB is the database internal of the MDrivenServer containing model information. | ||
A0DB is the internal or external database containing the application data. | A0DB is the internal or external database containing the application data. | ||
Line 12: | Line 12: | ||
Click to run a check on all the tables in the databases. | 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 | You will get an error report and an SQL statement to run to see the problem data: | ||
Single link dupes(38146711), execute | Single link dupes(38146711), execute | ||
select PublisherAgreementPeriodID,Count(PublisherAgreementPeriodID) from AgreementImport where not PublisherAgreementPeriodID is null group by PublisherAgreementPeriodID having Count(PublisherAgreementPeriodID)>1 | 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. | Copy the SQL command to your SQL server query interface, find the offending object, and decide what to do. | ||
Most likely you want to delete the row, | 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 | 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. |
Revision as of 06:08, 30 March 2023
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:
- Validate Admin DB Data
- 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.