Shutdown NAV All Service

Hi Expert,

I’m testing NAV 2009 and i detect database.I restored new database(Std database) to sql(2005). And then when i open RTC and later 2 or 3 mins all service is shutdown(NAV). Database login is window author:.

How to solve this problem?

Best Regards,
Yukon

Is same thing happening with Classic client also? Check the Event Viewer, there might be something logged which can give you a clue.

Dhan Raj Bansal

Hi Dhan Raj Bansal,

Thank your reply. I don’t get any error when i open Class Client (SQL). When i check at Event Log i saw this

Service:
User: iDC1\Administrator
Type: System.Data.SqlClient.SqlException
Class: 14
LineNumber: 1
Number: 229
Server: iDC1
State: 5
Source: .Net SqlClient Data Provider
ErrorCode: -2146232060
Message: SELECT permission denied on object ‘Object Tracking’, database ‘Demo Database NAV (6-0)’, schema ‘dbo’.
StackTrace:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
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)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader()
at Microsoft.Dynamics.Nav.Runtime.NavDatabaseChangeListener.TryExecuteReader()
at Microsoft.Dynamics.Nav.Runtime.NavDatabaseChangeListener.CollectTrackingObjects()
at Microsoft.Dynamics.Nav.Runtime.NavDatabaseChangeListener.TimerHandler(Object param)

From MSDN: (http://msdn.microsoft.com/en-us/library/dd301254.aspx)

To enable and assign minimum permissions for the Object Change Listener

  1. Open SQL Server Management Studio, and then connect to your SQL Server instance.

  2. On the File menu, point to New, and then click Query with Current Connection.

  3. Type the following SQL statements.

    Copy

    USE MASTER
    CREATE LOGIN [ReplaceWithNAVServerAccount] FROM WINDOWS;
    GO
    
    
  4. Highlight the lines that you typed, and then on the Query menu, click Execute.

  5. Type these lines after the existing lines.

    Copy

    USE [ReplaceWithYourDatabaseName]
    CREATE USER [ReplaceWithNAVServerAccount] FOR LOGIN [ReplaceWithNAVServerAccount];
    
    
  6. Highlight the lines that you just typed, and then on the Query menu, click Execute.

  7. Type these lines after the existing lines.

    Copy

    CREATE SCHEMA [$ndo$navlistener] AUTHORIZATION [ReplaceWithNAVServerAccount];
    GO
    
    
  8. Highlight the lines that you just typed, and then on the Query menu, click Execute.

    You may see an error stating that the schema in question already exists. You can ignore this error.

  9. Type these lines after the existing lines.

    Copy

    ALTER USER [ReplaceWithNAVServerAccount] WITH DEFAULT_SCHEMA = [$ndo$navlistener];
    GRANT SELECT ON [Object Tracking] TO [ReplaceWithNAVServerAccount];
    GO
    
    
  10. Highlight the lines that you just typed, and then on the Query menu, click Execute.

    NoteNote


    The Object Tracking table name may be in a different language than English. If it is, then replace “Object Tracking” with the actual table name from your database.

  11. Save your query to keep a record of these actions.

Hi DRB,

I followed your instruction. Please check my SQL Code. After i run sql code stay auto shutdown NAV Service and Web Service. Do you have any idea for that case?

USE MASTER
CREATE LOGIN [NT AUTHORITY\NETWORK SERVICE] FROM WINDOWS;
USE NAV Database
GO
CREATE USER [NETWORK SERVICE] FOR LOGIN [NT AUTHORITY\NETWORK SERVICE];
GO
CREATE SCHEMA [$ndo$navlistener] AUTHORIZATION [NETWORK SERVICE];
GO
ALTER USER [NETWORK SERVICE] WITH DEFAULT_SCHEMA = [$ndo$navlistener];
GRANT SELECT ON [Object Tracking] TO [NETWORK SERVICE];
GO

Best Regards,

Yukon

Hi Yukon… Can you please check this thing?

Go to Microsoft Dynamics NAV Server service… than select its properties and than select Logon tab… In this can u tell me what is Id over that?

I had this problem because of this ID.

1)In this if your database is on another PC and if your current user Domain and that database server domain is different than this might be case,

2)If both are on different pc and both are in same domain and In LogOn if ID is NTNETWORKSERVICE than you have to change it to current user.

got it?

Hi Alok Shah,

Thank your reply. I let you know my service setting and pc setting.

  1. My PC is installed window2008 but don’t create AD.

  2. My NAS Service is running with Network Services (NT Service). I don’t change anything at there. (This setting is NAV install default setting) . I’m using same pc.

  3. When i run NAV 2009 RTC, it is quiet work. After that i detect NAV Demo database and rename file. Then restore standard database. But i can run RTC within 1 or 2 min only. If i check at service, all services are stopped.

  4. I run Query base on DRB reply and read at microsoft site. But stay auto shutdown.

  5. I detect restored database and attach back original database. In this time service is not auto shutdown and i can use RTC. But i can’t use original database.

So do you have any idea for that.

Thanks and Regards,

Yukon

Thanks for the reply .

I was also facing same problem.