7 Replies Latest reply on Jul 6, 2018 9:34 AM by Julian Wigman

    Error upgrading Service Desk Framework

    dunnsu Apprentice

      Hello -

       

      We're trying to run the upgrade feature on Service Desk Framework in Configuration Center and are getting an error.  The Logon Policy is set to Explicit. Does anyone know how we can get around this?

      <MetadataLogEntry xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

      <Sql>ALTER TABLE cm_change_note ALTER COLUMN usr_text_html nvarchar(max) NOT NULL</Sql>

      <Result>Failure</Result>

      <ErrorMessage>Cannot insert the value NULL into column 'usr_text_html', table 'Landesk10.dbo.cm_change_note'; column does not allow nulls. UPDATE fails. The statement has been terminated.</ErrorMessage>

      </MetadataLogEntry>

      - <FatalError>

      <Description>Cannot insert the value NULL into column 'usr_text_html', table 'Landesk10.dbo.cm_change_note'; column does not allow nulls. UPDATE fails. The statement has been terminated.</Description>

        • 1. Re: Error upgrading Service Desk Framework
          Julian Wigman ITSMMVPGroup

          dunnsu So the MDM/upgrade is trying to add a non-null constraint to this attribute but finding records that incorrectly have null data in that particular attribute.

           

          You could try and understand the problem a bit more by running a sql query something like:

           

          select count(*) from cm_change_note where usr_text_html is null.

           

          This would tell you if you just have a few records causing the issue (I presume even a  blank html field stores some basic tags) or it is a huge issue.  If just a few you could perhaps fix them before you attempt the upgrade again. For example if you find a sample and open it up in Webdesk and check how the field shows on-screen, then maybe resave and check the raw usr_text_html field for this sample to see if it corrects itself. You may need to change something and save and then change back and save to force the record to update though. If the field is blank when showed in webdesk that might then show the default HTML tags stored for and empty field.

           

          Either way I think a bug in the past has introduced this; for example was html subdata type on this attribute been toggled a few times in the past and maybe confused everything.

           

          Ultimately I think a SQL script will be needed to correct and maybe you will have the confidence to create yourself or you should log this with Ivanti Support as they may already have something built to do this; it’s not an error I have personally encountered in my many upgrades for customers...yet! 

           

          Julian

          MarXtar Ltd

          • 2. Re: Error upgrading Service Desk Framework
            dunnsu Apprentice

            Thanks for the response and the tip.  I ran the query and it only identified one record.  That's good!  Unfortunately I haven't been able to figure out how to be able to edit it.  It's closed and in read only mode.  Also strange is that the error states the column does not allow nulls.  But the column properties has Allow Nulls set to True.  Still working on the issue. 

            • 3. Re: Error upgrading Service Desk Framework
              Julian Wigman ITSMMVPGroup

              dunnsu  does the text version of the attribute (usr_text) on that broken record have any data in it. If it were me and considering it is just one record, I’d revert to the non-upgraded backup and directly edit the field in sql and put <br> in the usr_text_html column. I’d then try the upgrade again,

               

              You are right the current design allows it to support nulls but the upgrade is trying to change that so it doesn't and thus why it is failing IMHO.

               

              Julian

              MarXtar Ltf

              • 4. Re: Error upgrading Service Desk Framework
                dunnsu Apprentice

                JulianWigman Although that worked for the issue, it only revealed deeper troubles.  I fixed that table with your assistance, but the when I ran the update again I got the same error regarding a different table and column.  I have a feeling that this will go on and on, so I'm going to open a support ticket.  But thanks so much for your help!

                • 5. Re: Error upgrading Service Desk Framework
                  Julian Wigman ITSMMVPGroup

                  dunnsu  Yes, sorry to hear thst but that is a good decision as support should be able to get a copy of your DB and analyse a bit further.  Let us know the outcome if you can later as it might help others.

                   

                  Julian

                  MarXtar Ltd

                  • 6. Re: Error upgrading Service Desk Framework
                    dunnsu Apprentice

                    The final fix was to apply hotfix ISD2018_1_ServiceUpdate002, then run a query against the database to clear the nulls: 

                    update cm_change_note

                    set usr_text_html = cm_text

                    where usr_text_html is null

                    • 7. Re: Error upgrading Service Desk Framework
                      Julian Wigman ITSMMVPGroup

                      dunnsu Good stuff! 

                       

                      Do you know the specific Problem # that fixed this?

                       

                      Julian

                      MarXtar Ltd