none
MDS - 515 A database error has occurred: Please contact your system administrator

    Question

  • OS: Server 2008 R2

    SQL: 2012 SP1 cu4 - 11.0.3368

    We are experiencing this error when attempting to view on-going batch jobs in the web UI (Integration management)

    This error was first experienced while running SQL 2012 RTM cu5, we have since updated and this is persisting.

    It has also been noted that batch jobs submitted to the staging tables are not processing to the leaf member level, and stage status is not being updated nor returning an error.

    This error is on a core production system and is causing major business disruption. Any suggestions anybody has would be very welcomed.

    Thanks.

     

    Monday, August 19, 2013 12:27 AM

Answers

  • I had the same error this morning and by using SQL Profiler I was able to determine the stored procedure causing the error. The stored procedure mdm.udpEntityStagingAllBatchesByModelGet returned the following error:

    Msg 515, Level 16, State 2, Procedure udpEntityStagingAllBatchesByModelGet, Line 87
    Cannot insert the value NULL into column 'BatchTag', table '@results'; column does not allow nulls. INSERT fails.
    The statement has been terminated.

    Once the stored procedure altered everything worked as before.

    Replace the following line in the store procedure:

            BatchTag            NVARCHAR(50)            NOT NULL,  

    by:

            BatchTag            NVARCHAR(50)            NULL, 

    Kind regards,

    Rudi Tourlousse

    • Proposed as answer by vr.babu Wednesday, September 04, 2013 7:05 AM
    • Marked as answer by ChrisMcKoy Wednesday, September 04, 2013 10:08 PM
    Wednesday, September 04, 2013 6:48 AM

All replies

  • I had the same error this morning and by using SQL Profiler I was able to determine the stored procedure causing the error. The stored procedure mdm.udpEntityStagingAllBatchesByModelGet returned the following error:

    Msg 515, Level 16, State 2, Procedure udpEntityStagingAllBatchesByModelGet, Line 87
    Cannot insert the value NULL into column 'BatchTag', table '@results'; column does not allow nulls. INSERT fails.
    The statement has been terminated.

    Once the stored procedure altered everything worked as before.

    Replace the following line in the store procedure:

            BatchTag            NVARCHAR(50)            NOT NULL,  

    by:

            BatchTag            NVARCHAR(50)            NULL, 

    Kind regards,

    Rudi Tourlousse

    • Proposed as answer by vr.babu Wednesday, September 04, 2013 7:05 AM
    • Marked as answer by ChrisMcKoy Wednesday, September 04, 2013 10:08 PM
    Wednesday, September 04, 2013 6:48 AM
  • The above resolves this issue, many thanks!
    Wednesday, September 04, 2013 10:07 PM
  • I wouldn't recommend modifying the proc, the issue is due to NULL batch tags being inserted in the staging process.

    I deleted the offending records, and the issue disappeared:

    DELETE FROM mdm.tblStgBatch

    WHERE BatchTag IS NULL

    Tuesday, March 04, 2014 10:08 AM