Options

Nav 2017 posting error with SQL

kmkaotkmkaot Member Posts: 261
dear Friends,

When I am posting purchase invoice, it is giving error with SQL with message ' Connection to the SQL is no longer useble';, please help me

Warm regards
Kris1q55dkv2rh0r.png

Answers

  • Options
    Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    try recompiling all the objects with forced synchronisation. You would need to start DEV Env in elevated mode for that operation.

    Slawek
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • Options
    kmkaotkmkaot Member Posts: 261
    Ho
    thanks
    what you mean by 'elevated mode '

    warm regards
    Kris
  • Options
    Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    You need to right-click and use "Run As Administrator" when starting Dev Env.

    Slawek
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • Options
    kmkaotkmkaot Member Posts: 261
    Hi Slawek
    I did as you said. still there is same error

    Warn regards
    Kris
  • Options
    Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Please check the Application Event Log on the server where the NST service is installed, it may shed some light on the problem.

    Slawek
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • Options
    vivek4121vivek4121 Member Posts: 165
    Did you tried debug it?
  • Options
    kmkaotkmkaot Member Posts: 261
    when I debug I found error here as attached documentu94s6qcc126m.png
  • Options
    kmkaotkmkaot Member Posts: 261
    in the event viwer I can see the errr text as shown below'
    Server instance: DynamicsNAV100 Tenant ID: <ii>User: Type: Microsoft.Dynamics.Nav.Types.Exceptions.NavSqlException ErrorNumber: 8630 SuppressMessage: False SuppressExceptionCreatedEvent: False FatalityScope: None Message: <ii>The following SQL error was unexpected: Internal Query Processor Error: The query processor encountered an unexpected error during execution (HRESULT = 0x80040e19). SQL statement: UPDATE [NAV17].[dbo].[$ndo$taskscheduling] SET [state] = @newState, [Server Instance ID] = @serverInstanceId, ended=@ended WHERE [id] = @id AND [tenantid] = @tenantId AND [state] = @oldState AND ([Server Instance ID] = 0 OR [Server Instance ID] = @ROWCOUNT StackTrace: at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.ThrowNavSqlException(SqlExceptionAdapter exceptionAdapter, NavSqlCommand command, Boolean isLastExceptionARollbackCause, Boolean logExceptions) at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.<>c__DisplayClass96_0`1.<ExecuteFunction>b__0() at Microsoft.Dynamics.Nav.Diagnostic.NavDiagnostics.SendTraceTagOnThreshold[T](String tag, Category category, Verbosity verbosity, Int32 threshold, Func`1 action, String message, Object[] parameters) at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.ExecuteFunctionWithTrace[T](EventTask task, Func`1 function, NavSqlCommand command) at Microsoft.Dynamics.Nav.Runtime.NavSqlCommand.ExecuteScalar() at Microsoft.Dynamics.Nav.Runtime.NavTaskScheduler.SqlDml.<>c__DisplayClass22_1.<SetTaskState>b__2(NavSqlCommand cmd) at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.ExecuteCommandAndCacheOnSuccess[T](NavSqlCommandCacheKey commandKey, Func`1 createFunc, Func`2 executeFunc) at Microsoft.Dynamics.Nav.Runtime.NavTaskScheduler.SqlDml.<>c__DisplayClass22_1.<SetTaskState>b__0() at Microsoft.Dynamics.Nav.Runtime.NavTaskScheduler.SqlDml.RetrySql[T](Func`1 func, Boolean throwOnError) at Microsoft.Dynamics.Nav.Runtime.NavTaskScheduler.TaskScheduleInfo.SetStarting() at Microsoft.Dynamics.Nav.Runtime.NavTaskScheduler.CreateTaskRunInfo(TaskScheduleInfo schedule) at Microsoft.Dynamics.Nav.Runtime.NavTaskScheduler.RunScheduler() at Microsoft.Dynamics.Nav.Runtime.PeriodicScheduler.RunAction() at Microsoft.Dynamics.Nav.Runtime.ThreadPeriodicScheduler.DoScheduledAction() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()</ii> HResult: -2146233088
    Type: System.Data.SqlClient.SqlException ClientConnectionId: 2c87fde0-ee36-46c3-8035-ef7fc3ce7d0e Class: 16 LineNumber: 1 Number: 8630 Server: 192.168.1.10\RRDATA State: 1 Source: .Net SqlClient Data Provider ErrorCode: -2146232060 Message: <ii>Internal Query Processor Error: The query processor encountered an unexpected error during execution (HRESULT = 0x80040e19).</ii> 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, Boolean isInternal, Boolean forDescribeParameterEncryption) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) 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.<>c__DisplayClass96_0`1.<ExecuteFunction>b__0() HResult: -2146232060 </ii>
    May SQL license expired ??
  • Options
    Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    SQL Server license does not expire.

    This is the most worrying error.

    I would start from ensuring you have the most recent service pack applied on your SQL server, and, if the SQL Server runs on physical box, seriously think about at least running exaustive memory / cpu / network card tests, or just replacing the whole server hardware. After all the hardware is relatively cheap these days, most of the money is burnt on software licenses.

    I'd also raise it with Microsoft.

    Slawek
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • Options
    kmkaotkmkaot Member Posts: 261
    My SQL server evaluation period ends in June-17. I am going to buy license or extend the evaluation period and Test the error

    Warm regards
    Kris
  • Options
    Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Still, this is the internal SQL Server error - it is certainlty not a way of telling the user that his/her evaluation license expired.

    If you google around for "SQL Server Error 8630" you will find it appears mostly in context fo SQL Server 2005, or SQL Server 2008. I guess you are not evaluating any of those?

    Some of the possible conditions where the error was occurring in older SQL server version were low memory available for SQL server, or database corruption.

    Try to examine the SQL Server error log, maybe something regarding that error was recorded in there.

    Slawek
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
Sign In or Register to comment.