Quantcast
Channel: SQL Server Master Data Services forum
Viewing all articles
Browse latest Browse all 1311

Master Data Services is driving me crazy! Please help - multiple questions

$
0
0

Hi

I am having some MAJOR issues with MDS and need some assistance - there are a number of problems I am currently experiencing and cannot find any documentation to assist.

The first one is;

From the MDS Management console, I have a version which is status commited and ready under version management. I want to create a new version which is open

1st question: how can you do this programatically without the front end ? Which stored procedure performs this task?

1st issue: using the front end - pressing "copy" takes around 30seconds then says "An unknown error has occurred" - this error is not helpful atall and means literally nothing. I cannot create a new open version

2nd Issue:

I Have an SSIS package which populates a table STG.CCM_Leaf - the package has 4 steps - assuming I have the open version which has worked in the past the package is configured as follows:

Step 1: Get batch and set to variables:

DECLARE @ModelName nVarchar(100) = 'Actuarial Classes'
DECLARE @Model_id int
DECLARE @User_ID int
DECLARE @Version_ID int
DECLARE @Version_Name nvarchar(100)
declare @batch_tag nvarchar(100)
SET @User_ID = (SELECT ID
                 FROM mdm.tblUser u
                 WHERE u.UserName = SYSTEM_USER)
SET @Model_ID = (SELECT Top 1 Model_ID
                 FROM mdm.viw_SYSTEM_SCHEMA_VERSION
                 WHERE Model_Name = @ModelName)
--get latest model version id
SET @Version_ID = (SELECT MAX(ID)
                 FROM mdm.viw_SYSTEM_SCHEMA_VERSION
                 WHERE Model_ID = @Model_ID)
set @Version_Name = (select Name
                              FROM mdm.viw_SYSTEM_SCHEMA_VERSION
                              WHERE id=@Version_id)
set @batch_tag = 'CCM' + '-' + Convert(Varchar,GetDate())

Select
@ModelName
,@Model_id
,@User_ID
,@Version_ID
,@Version_Name
,@batch_tag


The output of this sql step stores the necessary values

Step 2: Pick up the rows and add in the above variables from my source and store them in STG.CCM_Leaf

Step 3: Process the batch in MDS

EXEC [stg].[udp_CCM_Leaf]
      @VersionName = ?,
@LogFlag = 1,
@BatchTag = ?

Step 4: Validate the model:

EXECUTE mdm.udpValidateModel
@User_ID = ?,
@Model_ID = ?,
@Version_ID = ?,
@Status_ID = 1

The entries appear AS expected when i load the excel MDS add-in and this works like a charm.

The idea is, that the user will verify with an additional dropdown column whether the entry is accepted or rejected in excel and press Publish to push them back

As a test, I set the top entry to "Accepted" and pressed publish it says it is successful.

When i run Select * from stg_CCM_Leaf - the row which was "Accepted" still shows a NULL value in that column despite the excel open version showing accepted.

Q2:: Where is the "Accepted" value actually stored and why can't i see it in the LEAF table? if excel can see it it must be stored somewhere else - why can i not see it in this table>??

Question3:

Again - in MDS i can highlight all rows and delete them using the Delete button. All rows dissapear from excel and the underlying _LEAF table - if i then try and re-insert the rows I get an error on all rows and none of them will insert.

Final question: How do i "clean out" an entity for an open version? What is the stored procedure to do so - Why when  Ihave deleted an entry can i not re-load a new one with the same CODE value?

Sorry for the long post but all these questions are driving me crazy, I cannot find anty MDS documentation to help me on any of these subjects

Thanks


J


Viewing all articles
Browse latest Browse all 1311

Trending Articles