证实这是由于该用户对应的两个表remoteobjectid和remoteobjectinfo中数据丢失。所以R&D给出了修复该数据的建议:
此处有问题的用户为 40529 , 我们可以参考一个没有问题的用户 10233 辅助完成数据修复的工作。基本步骤如下:
1) 选出在remoteobjectinfo 和remoteobjectid有记录的用户10233. 确保此用户是可以登陆Windchill的。
另外,收集一些基本信息。
1.1 select guid, lastknowndomain, ida2a2 from repository; 找出其中lastknowndomain 对应着AD的那条记录的ida2a2.
1.2 select ida2a2 from wtuser where name=''; 30052,8639
1.3 select remoteid from remoteobjectinfo where ida3a3=; 4639850
2) 用 10233对应的表的内容创建两个临时表。 这两个临时表中包含 10233用户的所有数据。
2.1 create table temp_remoteobjectinfo as select * from remoteobjectinfo where ida3a3=;
2.2 create table temp_remoteobjectid as select * from remoteobjectid where ida2a2=;
2.3 select birthid from temp_remoteobjectinfo; 此处用来验证是否记录的AD值与 1.1返回的值完全相同。
3) 更新这两个临时表,用于40529用户使用。 Note: 此处的顺序不可以颠倒。
3.1 update temp_remoteobjectid set remoteobjectid='<40529在AD中的DN, 例如:cn=刘伟,ou=.....,dc=com. 但必须全部为小写>', ida2a2=id_sequence.nextval;
3.2 select ida2a2 from wtuser where name='40529'; 48469
3.3 select ida2a2 from temp_remoteobjectid; 4796601
3.4 update temp_remoteobjectinfo set ida3a3=, remoteid=, ida2a2=id_sequence.nextval;
4) 把这两个临时表的内容 copy到实际表中。 把两个临时表移除。
insert into remoteobjectid select * from temp_remoteobjectid;
insert into remoteobjectinfo select * from temp_remoteobjectinfo;
delete from temp_remoteobjectid;
delete from temp_remoteobjectinfo;
drop table temp_remoteobjectid;
drop table temp_remoteobjectinfo;
5) 此时我们可以验证数据库内容
select i.remoteobjectid, u.name, u.ida2a2 from remoteobjectid i, RemoteObjectInfo r, WTUser u where u.ida2a2=48469 and u.ida2a2=r.ida3a3 and r.remoteid= i.ida2a2;
另外,从disconnected principal列表中,应该已经看不到这个用户了。
此时我们可以使用这个用户登陆Windchill.
阅读(879) | 评论(0) | 转发(0) |