Posts

Showing posts from June, 2016

SQL Server MDS : How to Know Actual MDS Table name for Model Entity and Column name for the Attribute

How to Know Actual MDS Table name for Model Entity and Column name for the Attribute . here is the Script  USE MDS ------------------------------------------------------------ -- TODO: Define Model name, Entity name, and Attribute Name        DECLARE @Model NVARCHAR ( 50 )        = '<<GiveModelName>>' ;        DECLARE @Entity_Name NVARCHAR ( 50 ) = '<<GiveEntityName>>' ;        DECLARE @Attribute_Name NVARCHAR ( 50 )= '<<GiveAttributeName>>' ; ------------------------------------------------------------ -- Set @Table name        DECLARE @Table NVARCHAR ( 128 );              SELECT @Table = EntityTable FROM mdm . viw_SYSTEM_SCHEMA_ENTITY WHERE Model_Name = @Model AND name = @Entity_Name ; -- Set @Column name                DECLARE @Column NVARCHAR ( 128 )         SELECT   @Column  = Attribute_Column FROM mdm . viw_SYSTEM_SCHEMA_ATTRIBUTES WHERE Model_Name = @Mod

MDS Error 300034 - The member code is already used by a member that was deleted. Pick a different code or ask an administrator to remove the deleted member from the MDS database + Solution

Hi All when we tried to delete the members whose code is not autogenerated ( ie having specific code to the member) and try to insert the same code member we will get this error. The delete in MDS is a Soft delete which will available in MDS tables even after these deletes . So fallow these steps to avoid the error Step1 : Reverse the transaction of the deleted member to bring the member and its code back to an active state. See here for reactivating a deleted member: https://msdn.microsoft.com/en-us/library/ff487037(v=sql.110).aspx Step 2 : After that , use entity based staging to purge (permanently delete) the code from MDS. This will require using an import type of 4 or 6. Here is more information regarding entity based staging: https://msdn.microsoft.com/en-us/library/ee633854(v=sql.110).aspx Step 3:  Insert the member with same code now you wont get error .