Wednesday, November 14, 2012
MDS Missing attribute
Tag
Master Data Services
I had an issue where the subscription view would show all the attributes but when trying to edit the entity in Explorer or System Administration the attribute would not appear.
So started looking at mdm.tblAttribute table and there it was. So then I looked in mdm.viw_SYSTEM_SCHEMA_ATTRIBUTES and it was missing
SELECT
*
FROM
mdm.tblModel tMod
JOIN mdm.tblEntity tEnt ON tMod.ID = tEnt.Model_ID
JOIN mdm.tblAttribute tAtt ON tEnt.ID = tAtt.Entity_ID
JOIN mdm.tblEntityMemberType tMemberType ON tAtt.MemberType_ID = tMemberType.ID
JOIN mdm.tblList tAttributeType ON tAttributeType.ListCode = N'lstAttributeType' AND tAtt.AttributeType_ID = tAttributeType.OptionID
JOIN mdm.tblList tDataType ON tDataType.ListCode = N'lstDataType' AND tAtt.DataType_ID = tDataType.OptionID
--JOIN mdm.tblUser usrE ON tAtt.EnterUserID = usrE.ID
--JOIN mdm.tblUser usrL ON tAtt.LastChgUserID = usrL.ID
LEFT OUTER JOIN mdm.tblList tDataMask ON tDataMask.ListCode = N'lstInputMask' AND tAtt.InputMask_ID = tDataMask.OptionID AND tAtt.DataType_ID = tDataMask.Group_ID
LEFT OUTER JOIN mdm.tblEntity tDBAEnt ON tAtt.DomainEntity_ID = tDBAEnt.ID
It turns out I had DELETED all the users from the mdm.tblUser table except for user ID 1. Problem is viw_SYSTEM_SCHEMA_ATTRIBUTES does an INNER JOIN with the tblUser table.
Run the following to check if there are any issues.
SELECT * FROM mdm.tblEntity WHERE
EnterUserID <> 1
OR LastChgUserID <> 1
SELECT * FROM mdm.tblAttribute WHERE
EnterUserID <> 1
OR LastChgUserID <> 1
UPDATE mdm.tblAttribute SET EnterUserID = 1, LastChgUserID = 1 WHERE EnterUserID <> 1 OR LastChgUserID <> 1
Subscribe to:
Post Comments (Atom)
Hi,
ReplyDeleteI am getting error intermittently where LastChgUser is null and sometimes MDS server's credentials are returned instead of the logged in user's.Can you please help me out ?My custom workflow can't execute withour user .
I got 89 rows returned with query : SELECT * FROM mdm.tblEntity WHERE
EnterUserID <> 1
OR LastChgUserID <> 1
and 2414 rows with query :
Wednesday, November 14, 2012
MDS Missing attribute
Tag
Master Data Services
I had an issue where the subscription view would show all the attributes but when trying to edit the entity in Explorer or System Administration the attribute would not appear.
So started looking at mdm.tblAttribute table and there it was. So then I looked in mdm.viw_SYSTEM_SCHEMA_ATTRIBUTES and it was missing
SELECT
*
FROM
mdm.tblModel tMod
JOIN mdm.tblEntity tEnt ON tMod.ID = tEnt.Model_ID
JOIN mdm.tblAttribute tAtt ON tEnt.ID = tAtt.Entity_ID
JOIN mdm.tblEntityMemberType tMemberType ON tAtt.MemberType_ID = tMemberType.ID
JOIN mdm.tblList tAttributeType ON tAttributeType.ListCode = N'lstAttributeType' AND tAtt.AttributeType_ID = tAttributeType.OptionID
JOIN mdm.tblList tDataType ON tDataType.ListCode = N'lstDataType' AND tAtt.DataType_ID = tDataType.OptionID
--JOIN mdm.tblUser usrE ON tAtt.EnterUserID = usrE.ID
--JOIN mdm.tblUser usrL ON tAtt.LastChgUserID = usrL.ID
LEFT OUTER JOIN mdm.tblList tDataMask ON tDataMask.ListCode = N'lstInputMask' AND tAtt.InputMask_ID = tDataMask.OptionID AND tAtt.DataType_ID = tDataMask.Group_ID
LEFT OUTER JOIN mdm.tblEntity tDBAEnt ON tAtt.DomainEntity_ID = tDBAEnt.ID
It turns out I had DELETED all the users from the mdm.tblUser table except for user ID 1. Problem is viw_SYSTEM_SCHEMA_ATTRIBUTES does an INNER JOIN with the tblUser table.
Run the following to check if there are any issues.
SELECT * FROM mdm.tblEntity WHERE
EnterUserID <> 1
OR LastChgUserID <> 1
SELECT * FROM mdm.tblAttribute WHERE
EnterUserID <> 1
OR LastChgUserID <> 1
IS THAT AN ISSUE?
THANKS IN ADVANCE.