Cannot insert the value NULL into column 'Status', table 'X.dbo.Server Instance

CaponeCapone Member Posts: 125
Hi!

We have an upgraded database to NAV 2016 that fills the eventlog with following errors below. The weird thing is that I know NAV tables can't handle Null but this is a system table and it should be NAV itself that tries to insert Null into this column.
The error appears twice a minute.

Someone that has any ideas?
Type: Microsoft.Dynamics.Nav.Types.Exceptions.NavSqlException
SuppressMessage: False
FatalityScope: None
Message:
The following SQL error was unexpected.
Cannot insert the value NULL into column 'Status', table 'BLF500_Upgrade2.dbo.Server Instance'; column does not allow nulls. INSERT fails.
The statement has been terminated.
Sql statement:
INSERT INTO dbo."Server Instance"("Service Name","Server Computer Name","Last Active","Server Instance Name","Server Port") VALUES (@0,@1,@2,@3,@4) SELECT CAST(SCOPE_IDENTITY() AS INT)
HResult: -2146233088
Type: System.Data.SqlClient.SqlException
ClientConnectionId: d318079a-b3e6-4acd-9fa9-4fe6e458d486
Class: 16
LineNumber: 1
Number: 515
Server: 192.168.46.9
State: 2
Source: .Net SqlClient Data Provider
ErrorCode: -2146232060
Message:
Cannot insert the value NULL into column 'Status', table '<DATABASE>.dbo.Server Instance'; column does not allow nulls. INSERT fails.
The statement has been terminated.
StackTrace:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteScalar()
at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.ExecuteFunction[T](Func`1 function, NavSqlCommand command)
HResult: -2146232060
Hello IT, have you tried to turn it off and on?
Have you checked the cables?
Have you released the filters?

http://www.navfreak.com

Answers

  • tanish111tanish111 Member Posts: 1
    did anyone find the answer to this question i have the same problem withe one of my instances.

    Server instance: InstanceNAme
    Session type: UnknownClient
    Session ID: N/A
    User:
    Type: Microsoft.Dynamics.Nav.Types.Exceptions.NavSqlException
    SuppressMessage: False
    FatalityScope: None
    Message:
    The following SQL error was unexpected.
    Cannot insert the value NULL into column 'Status', table 'NAV LIVE.dbo.Server Instance'; column does not allow nulls. INSERT fails.
    The statement has been terminated.
    Sql statement:
    INSERT INTO dbo."Server Instance"("Service Name","Server Computer Name","Last Active","Server Instance Name","Server Port") VALUES (@0,@1,@2,@3,@4) SELECT CAST(SCOPE_IDENTITY() AS INT)
    HResult: -2146233088
    Type: System.Data.SqlClient.SqlException
    ClientConnectionId: e4fc1d09-3025-40a8-b0b3-720b10267de4
    Class: 16
    LineNumber: 1
    Number: 515
    Server: EONEAUSNAV
    State: 2
    Source: .Net SqlClient Data Provider
    ErrorCode: -2146232060
    Message:
    Cannot insert the value NULL into column 'Status', table 'NAV LIVE.dbo.Server Instance'; column does not allow nulls. INSERT fails.
    The statement has been terminated.
    StackTrace:
    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
    at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
    at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
    at System.Data.SqlClient.SqlDataReader.get_MetaData()
    at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
    at System.Data.SqlClient.SqlCommand.ExecuteScalar()
    at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.ExecuteFunction[T](Func`1 function, NavSqlCommand command)
    HResult: -2146232060
  • Peter+is1Peter+is1 Member Posts: 174
    Hi,

    I guess your service tier is incompatible with your database.
    Somewhere your upgrade process missed a technical upgrade step or your service tier is not the same version as your database.
    \\
    The truth exists in seven versions.
Sign In or Register to comment.