How to repair the imsorgid6 when some DNs are wrong.

Document ID : KB000004982
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

From the User Console searching users by specifying an Organization can return no results even if there is data.

Environment:
The user store is a Relational Database (RDB).
Cause:

Looking at Organization IDs and their Org ID parents into custom <primary organization table>, CA imsorgid6 showed wrong DNs into imsorgid6.

Those DNs were not dealing with the proper path to match with the custom <primary organization table>.

e.g. you have:

Org3 (ID = 3) with parent ID = 2, Org2 (ID =2) with parent ID =1 (the root) then into imsorgid6 the DN for ID=3 should be: 3,2,1

Else this is the issue.

This is a rare issue. The circumstances which could lead to this corrupted imsorgid6 are not the subject of this article.

Resolution:

To repair the imsorgid6 please do the following: 

1. From IM Management Console; Stop the IMEs working with your RDB user store. 

2. Save the imsorgid6 table data. 

E.g. for one RDB user store on MS SQL server; 

3. Run the following script: 

"...\IAM Suite\Identity Manager\tools\directoryTemplates\RelationalDatabase\ims_mssql_rdb_delete.sql" 

4. Run the following script: 

"...\IAM Suite\Identity Manager\tools\directoryTemplates\RelationalDatabase\ims_mssql_rdb.sql" 

You can remove the following last statement since there is already an object named 'FK_UserOrgs' in the database: 

ALTER TABLE tblUsers ADD CONSTRAINT FK_UserOrgs FOREIGN KEY (org) REFERENCES tblOrganizations (id); 

5. Restart IMEs.

Additional Information:

From the original ims_<mssql>_rdb.sql script, Search and replace the value <@primary organization table@> with the name of the primary table used for the organization managed object. This change should have been already done during the implementation phase.

The last update into ims_<mssql>_rdb.sql does not do anything against your "primary organization table" but triggers the UPDATEPATH (the goal) to re-populate the imsorgid6 table.