6 Replies Latest reply on Mar 11, 2016 7:49 AM by JulianWigman

    Error on User

    jboeder Rookie

      When I try to use the New End User Wizard I get the following error "Cannot insert the value NULL into column 'tps_role_id', table 'LandeskDS.dbo.tps_user_role'; column does not allow nulls. INSERT fails.

      The statement has been terminated.

       

      Also discovered that this same error is happening when trying to run the AD import function.

        • 1. Re: Error on User
          Paul Hyman Expert

          Do you have any triggers on the database ?

          • 2. Re: Error on User
            elizabethcombrink Employee

            Yes I agree with Paul, it sounds like you have a custom trigger on your tps_user table

            • 3. Re: Error on User
              jboeder Rookie

              I do not know if there are any triggers, how would I tell that?  As I mentioned in the last 2 months it seems that the AD import is failing with the same error message.  I talked with the DBA and there has been no changes on the database in the last 2-3 months.

              • 4. Re: Error on User
                Markus.Gonser ITSMMVPGroup

                Hi,

                 

                you have to connect to your SQL server and chekc if in the table "tps_user" is a trigger configured.

                 

                best regards

                Markus

                • 5. Re: Error on User
                  jboeder Rookie

                  Yes it has a User Trigger, and it assigns a unique identifier to the user.Here is the Trigger

                   

                  USE [LandeskSD]

                  GO

                  /****** Object:  Trigger [dbo].[UserTrigger]    Script Date: 03/09/2016 07:21:58 ******/

                  SET ANSI_NULLS ON

                  GO

                  SET QUOTED_IDENTIFIER ON

                  GO

                  ALTER TRIGGER [dbo].[UserTrigger] ON [dbo].[tps_user] FOR INSERT, UPDATE AS

                        declare @guid uniqueidentifier

                        declare @Name as varchar(255)

                        declare @networkLogin as varchar(255)

                        declare @count int

                        select @Name = tps_name, @guid = tps_guid from inserted

                        -- Set network login

                        set @networkLogin = 'mainoffice\' + @Name

                        set @count = ''

                        select @count = count(*) from tps_user_network_login

                  where tps_network_login = @networkLogin group by tps_network_login

                        if @count = ''

                  begin

                  delete from tps_user_network_login where tps_user_guid = @guid

                  insert into tps_user_network_login (tps_guid,tps_user_guid,tps_network_login)

                  values (newid(),@guid,@networkLogin)

                  end

                        else

                              update tps_user_network_login set tps_user_guid = @guid where tps_network_login = @networkLogin

                  • 6. Re: Error on User
                    JulianWigman Expert

                    Are there any more triggers on that object as this one doesn't seem to be influencing the tps_user_role table.