Administering : Verifying workspace integrity : Verifying the database for inconsistencies
  
Verifying the database for inconsistencies
You can test a database to check for inconsistencies at both global and workspace levels.
Before you begin
Ensure that you are a Global administrator. To run the verifier at workspace level, you must be added to the workspace.
Run tests when few users are logged in. When you run tests, the performance of the product might be slow.
Before running the SQL queries, back up of the database.
About this task
You can check for the following inconsistencies at the global and the workspace levels.
Global level
 
Test
Description
Attribute table test
Detects missing rows in the attribute table. For the views to work properly, each attribute must have a row in the attribute table.
Redundant links test
Detects redundant links belonging to deleted projects in the link table.
Redundant mail log test
Detects redundant mail logs entries that are associated with the ID of a user who is not in the database.
Workspace level
 
Test
Description
Attribute table test
Detects missing rows in the attribute table in the workspace. For the views to work properly, each attribute must have a row in the attribute table.
Redundant links test
Detects redundant links belonging to deleted attributes in the workspace. After the attributes are deleted, the history table might still retain the rows for those attributes because of missing keys or deletion errors.
Baseline links test
Detects deleted baselines and incorrectly flagged links in the workspace. When links from baselines are incorrectly flagged or references to deleted baselines are not removed from the link table, performance might be affected.
Redundant history rows test
Detects redundant rows in the history table, related to deleted attributes. After attributes are deleted, the history table might still contain rows for those attributes because of missing keys or deletion errors.
Procedure
1 To test at the workspace level, open the workspace. To test at the global level, go to step 2.
2 Click the Settings icon Settings iconand then, from the Advanced group, click Verify Database. The name, description, last run date, and status of the test are displayed.
3 Click the link to run the test. For example, if you delete an attribute that mirrors a link attribute, the attribute record is not deleted from the Link table. In this case, click the Settings icon Settings icon and then, from the Advanced group, click Verify Database. Select Redundant links test to detect the redundant links belonging to the deleted attribute. The result of the test is displayed in the Status field. The details of the issue and a link to a .txt file are displayed. The .txt file contains one or several SQL queries separated with a ; and a newline character.
4 Click the link to the .txt file. The query is displayed.
5 Copy the query.
6 Click the Settings icon Settings icon and then, from the Advanced group, click SQL.
7 Paste the query, and click Execute to run the query.
Note The cache has to be cleared after running the SQL query for a few tests.
8 Click the Settings icon Settings icon and then, from the Advanced group, click Verify Database. Run the test again. The problem is resolved.
See also
Verifying the database for inconsistencies
Verifying workspace integrity