This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Upgrade error ([810143] Database error 515: Cannot insert the value NULL into column 'EventName', table 'D1IM.dbo.QBMEvent')

Hi Experts,

 

i am getting the below error when i was upgrading from dell 7.0 to 7.1.1

Processing step 'QBM 2016.0008.0003.0000 (JobeventGen)' failed.

      at ConfigWizard.Pages.PageMigration.<StartMigration>d__17.MoveNext()

      at System.Threading.Tasks.Task.Execute()

      at Quantum.Migrator.Migrator.RunInstallation(Boolean bUpdate)

1 - SqlFile command failed.

      at Quantum.Migrator.Base.ExtensionMethods.ExecuteWithLogging(IMigrationStep step, MigrationContext context)

      at Quantum.Migrator.Base.ExtensionMethods.ExecuteWithLogging(IList`1 lCommands, MigrationContext context)

Error processing sql command line 29 in file Migration\2016.0008.0003.0000.sql

      at Quantum.Migrator.Base.ExtensionMethods.ExecuteWithLogging(IList`1 lCommands, MigrationContext context)

      at Quantum.Migrator.Base.CommandBase.Execute(MigrationContext context)

      at Quantum.Migrator.SqlFileCommand.OnExecute(MigrationContext context)

[810023] Error during execution of statement:   declare @Puffer QBM_YParameterList    insert into @Puffer (Parameter1, Parameter2, Parameter3) select dbo.QBM_FCVGUIDToModuleOwner(e.UID_JobEventGen)

, t.TableName, e.Event  from JobEventGen e join DialogTable t on e.UID_DialogTable = t.UID_DialogTable  declare @XUser nvarchar(64) = 'Migration' declare

@Xdate datetime = getUtcdate() insert into QBMEvent(UID_QBMEvent, EventName, UID_DialogTable , XDateInserted , XDateUpdated, XUserInserted, XUserUpdated

, XObjectKey ) select x.UID_QBMEvent,upper( x.EventName), x.UID_DialogTable , @Xdate, @Xdate, @XUser, @XUser , dbo.QBM_FCVElementToObjectKey1('QBMEvent'

, 'UID_QBMEvent', x.UID_QBMEvent ) from ( select distinct dbo.QBM_FCVStringToGUID(p.Parameter1, t.UID_DialogTable + p.Parameter3 ) as UID_QBMEvent , p.Parameter3

as EventName, t.UID_DialogTable from @Puffer p join DialogTable t on p.Parameter2 = t.TableName join QBMModuleDef m on m.ModuleName = p.Parameter1 ) as

x where not exists (select top 1 1 from QBMEvent e where e.UID_QBMEvent = x.UID_QBMEvent or (e.UID_DialogTable = x.UID_DialogTable and e.EventName = x.EventName

) )

 

      at VI.DB.DataAccess.ReadWriteDbSession.<SqlExecuteNonQueryAsync>d__13.MoveNext()

[810143] Database error 515: Cannot insert the value NULL into column 'EventName', table 'D1IM.dbo.QBMEvent'; column does not allow nulls. INSERT fails.

The statement has been terminated.

      at VI.DB.DataAccess.ReadWriteDbSession.<SqlExecuteNonQueryAsync>d__13.MoveNext()

      at VI.DB.DataAccess.ReadWriteDbSession.<IgnoreBrokenConnectionAsync>d__42`1.MoveNext()

      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()

      at VI.DB.DataAccess.ReadWriteDbSession.<_SqlExecuteNonQueryAsync>d__14.MoveNext()

      at VI.DB.DataAccess.ReadOnlyDbSession.<ExecuteAndLogAsync>d__92`1.MoveNext()

      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()

      at VI.DB.DataAccess.ReadOnlyDbSession.<ExecuteAndLogAsync>d__93`1.MoveNext()

      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()

      at VI.DB.DataAccess.SafeDbCommand.<ExecuteNonQueryAsync>d__16.MoveNext()

      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()

      at VI.DB.DataAccess.SafeDbCommand.<_CheckedAsync>d__40`1.MoveNext()

Cannot insert the value NULL into column 'EventName', table 'D1IM.dbo.QBMEvent'; column does not allow nulls. INSERT fails.

The statement has been terminated.

      at VI.DB.DataAccess.SafeDbCommand.<_CheckedAsync>d__40`1.MoveNext()

      at VI.DB.DataAccess.PhysicalMsSqlConnection._AsyncSqlCommand.<ExecuteNonQueryAsync>d__31.MoveNext()

      at System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(IAsyncResult asyncResult)

      at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult)

      at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

      at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

      at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

  • Did you run another migration after the work around?
  • So I guess we are back at my suggestions to start from your backup. Execute the workaround and then start the migration as described in the manuals.

    If that is not helping, contact support.
  • After Restoring the DB ,When i start upgrade i was getting the below error

    Please let me know after restoring DB should i perform any thing

    Processing step 'QBM DatabaseSettings (Invalid database properties)' failed.
    1 - SqlFile command failed.
    Error processing sql command line 229 in file StartupPhase\DatabaseSettings.sql
    Error during execution of statement: set lock_timeout 10000 declare @SQLCmd nvarchar(max) declare @SQLExec nvarchar(max) declare @Dbname nvarchar(128) = db_name() declare @DebugSwitch int
    = 0 select @SQLCmd = N'

    if ISNULL(@@servername, N'''') = N''''
    begin
    raiserror(''Your @@servername must not be null'', 18, 1 ) with nowait
    end
    else
    begin
    print ''Servername was OK''
    end

    if isnull(convert(nvarchar(1000), SERVERPROPERTY(''servername'')), N'''') <> ISNULL(@@servername, N'''')
    begin
    raiserror (''#LDS#Your @@Servername is different from Your ServerProperty (''''servername'''') '', 18, 1) WITH NOWAIT
    end
    else
    begin
    print ''SERVERPROPERTY was OK''
    end
    '
    select @SQLCmd = @SQLCmd + N'

    set quoted_identifier on

    if 0 = ( select DATABASEPROPERTY(''%dbname%'', ''IsQuotedIdentifiersEnabled''))
    begin
    alter database "%dbname%" set quoted_Identifier on
    print ''IsQuotedIdentifiersEnabled switched on''
    end
    else
    begin
    print ''IsQuotedIdentifiersEnabled was OK''
    end

    if 0 = (select DATABASEPROPERTY(''%dbname%'', ''IsArithmeticAbortEnabled''))
    begin
    alter database "%dbname%" set arithabort on
    print ''IsArithmeticAbortEnabled switched on''
    end
    else
    begin
    print ''IsArithmeticAbortEnabled was OK''
    end

    -- select DATABASEPROPERTY(''%dbname%'', ''IsBulkCopy'')
    '
    select @SQLCmd = @SQLCmd + N'
    if not (
    select top 1 compatibility_level
    from sys.databases
    where name = ''%dbname%''
    ) between ''110'' and ''120''
    begin
    ALTER DATABASE "%dbname%" SET COMPATIBILITY_LEVEL = 110
    print ''COMPATIBILITY_LEVEL switched''
    end
    else
    begin
    print ''COMPATIBILITY_LEVEL was OK''
    end
    '
    select @SQLCmd = @SQLCmd + N'
    if 0 = (select is_read_committed_snapshot_on
    from sys.databases where name = ''%dbname%'' )
    begin
    if exists (select top 1 1
    from sys.sysprocesses
    where dbid = db_id()
    and spid <> @@spid
    )
    begin
    raiserror(''#LDS#Cannot switch transactionmode because of other users are active.|'', 18, 1 ) with nowait
    end
    else
    begin
    alter database "%dbname%" set READ_COMMITTED_SNAPSHOT ON
    end

    print ''READ_COMMITTED_SNAPSHOT switched''
    end
    else
    begin
    print ''READ_COMMITTED_SNAPSHOT was OK''
    end

    '
    select @SQLCmd = @SQLCmd + N'
    if 0 = (select is_auto_create_stats_on
    from sys.databases where name = ''%dbname%'' )
    begin
    alter database "%dbname%" set AUTO_CREATE_STATISTICS ON
    print ''AUTO_CREATE_STATISTICS switched''
    end
    else
    begin
    print ''AUTO_CREATE_STATISTICS was OK''
    end

    if 0 = (select is_auto_update_stats_on
    from sys.databases where name = ''%dbname%'' )
    begin
    alter database "%dbname%" set AUTO_UPDATE_STATISTICS ON
    print ''AUTO_UPDATE_STATISTICS switched''
    end
    else
    begin
    print ''AUTO_UPDATE_STATISTICS was OK''
    end

    if 1 = (select is_auto_update_stats_async_on
    from sys.databases where name = ''%dbname%'' )
    begin
    alter database "%dbname%" set AUTO_UPDATE_STATISTICS_ASYNC OFF
    print ''AUTO_UPDATE_STATISTICS_ASYNC switched''
    end
    else
    begin
    print ''AUTO_UPDATE_STATISTICS_ASYNC was OK''
    end

    '
    select @SQLCmd = @SQLCmd + N'
    if 0 = (select is_broker_enabled -- , *
    from sys.databases where name = ''%dbname%'' )
    begin
    if exists (select top 1 1
    from sys.databases d
    where isnull(d.service_broker_guid, ''00000000-0000-0000-0000-000000000000'') <> ''00000000-0000-0000-0000-000000000000''
    and d.name = ''%dbname%''
    )
    begin
    if exists (select top 1 1
    from sys.databases d join sys.sysprocesses p on d.database_id = p.dbid
    where d.name = ''%dbname%''
    and p.spid <> @@SPID
    )
    begin
    raiserror (''#LDS#Cannot enable broker because of other users are active.|'', 18, 1 ) with nowait
    end
    else
    begin
    alter database "%dbname%" set NEW_BROKER
    alter database "%dbname%" set enable_broker
    print ''new_broker set and enabled OK''
    end
    end
    else
    begin
    alter database "%dbname%" set enable_broker
    print ''enable_broker switched''
    end
    end
    else
    begin
    print ''enable_broker was OK''
    end
    '
    select @SQLCmd = @SQLCmd + N'
    if isnull(DATABASEPROPERTYEX(''%dbname%'', ''Recovery''), '''') <> ''SIMPLE''
    and not exists (select top 1 1
    from sys.tables t
    where t.name = ''QBMModuleDef''
    )
    begin
    raiserror(''#LDS#Cannot do migration in recovery mode not simple.|'', 18, 1 ) with nowait
    end
    else
    begin
    print ''recovery was OK''
    end

    if isnull(DATABASEPROPERTYEX(''%dbname%'', ''IsMergePublished''), 0) <> 0
    or isnull(DATABASEPROPERTYEX(''%dbname%'', ''IsPublished''), 0) <> 0
    begin
    raiserror(''#LDS#Cannot do migration while active replication.|'', 18, 1 ) with nowait
    end
    else
    begin
    print ''replication was OK''
    end

    '
    select @SQLCmd = @SQLCmd + N'
    if exists(select top 1 1
    from sys.tables
    where name = ''QBMModuleDef''
    )
    begin
    declare @cmd nvarchar(max) = ''
    if exists (select top 1 d.MigrationVersion
    from QBMModuleDef d
    where d.ModuleName <> ''''CCC''''
    and d.MigrationVersion > ''''2016.0010.0001.9999''''
    )
    begin
    raiserror(''''#LDS#Cannot do migration for Modules newer then 0.|2016.0010.0001.9999|'''', 18, 1 ) with nowait
    end''
    exec sp_executesql @cmd
    end

    '
    select @SQLExec = REPLACE(@SQLCmd, '%dbname%', @dbname) if @DebugSwitch > 0 begin select @SQLExec end else begin exec sp_executesql @SQLExec end set
    lock_timeout -1

    Database error 50000: Cannot enable broker because of other users are active.
  • Thanks Markus,


    Now the schema issue are fixed but getting some web customization issues

    VI.DB.Auth.AuthpropType doesnot contain definition for a token
  • Where exactly do you get the error message? In the Web Designer or in the Web Portal?

    Which authenticator are you using?

    Did you update the Web Portal as described in the documentation?