Connect a new Database to a Webservice

srocacsrocac Member Posts: 11
edited 2009-01-05 in NAV Three Tier
Hello,

I'm created a new Navision Database, created the broker (ALTER DATABASE MyDatabase SET ENABLE_BROKER), and lauched sql srcipt from manual (GRANT CREATE QUEUE TO [NT Authority\NetworkService] ...) is not necessary is possible but ¿?¿? ; the Windows navision services is the logon user: NT Authority\NetworkService, in SQL SERVER is DBOWNER in the database MyDatabase :


When open the browser in http://localhost:7047/DynamicsNAV/WS/services.

I have this errror:


<faultcode xmlns:a="urn:microsoft-dynamics-schemas/error">a:Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLChangeListenerConnectionFailedException</faultcode>

<faultstring xml:lang="es-ES">Servidor Microsoft Dynamics NAV no puede conectar el servicio de escucha de cambios a SQL Server debido al siguiente error: Error de inicio de sesión del usuario 'MYDOMANIN\MYMACHINE$'.</faultstring>

In English:

The Servidor Microsoft Dynamics NAV cannot connect the Change Listener to SQL Server due to the following error: Login failed for user 'MYDOMAIN\MYMACHINE$


Can I help you please?

Answers

  • ara3nara3n Member Posts: 9,248
    You need to set the service to login as a different user. It doesn't work with NetworkService user.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • srocacsrocac Member Posts: 11
    Thanks for you reply,

    Now I created a local user: WS, this user is the user to logon in the Windows serivces, I'm created in the script manual GRANT CREATE QUEUE TO [mymachine\WS], DBOWNER in Database, dbo default Schema... When logon in my machine with the user WS is possible to connect with Navission.

    When open Browser ... :oops:


    Servidor Microsoft Dynamics NAV no puede conectar el servicio de escucha de cambios a SQL Server debido al siguiente error: Error de inicio de sesión del usuario ''. El usuario no está asociado a una conexión de SQL Server de confianza


    In English:
    The Servidor Microsoft Dynamics NAV cannot connect the Change Listener to SQL Server due to the following error:
    Login failed for user ''. The user not associated with a trusted SQL Server connection.

    mmmmmm user'' my user is mymachine\WS ¿?¿?

    The trusted SQL Server connection is a problem when you use only windows autentification ???

    Thanks
  • dmccraedmccrae Member, Microsoft Employee Posts: 144
    After you create your database you can leave the BROKER setting disabled. If you would like later to use Query Notifications for change detection on the NAV Server, you can enable it and add the additional required permissions, but it is better to get the simple case working first.

    If you are going machine<->machine with the NetworkService account being used in the NAV Server, you need to ensure that you create that account (using the machinename$ notation) as a login in SQL Server. Check this using Management Studio.

    Then map that login to the database itself, as a database user (it is simpler to use the same name for the user as the login).

    Then, using a query window issue: GRANT SELECT ON [Object Tracking] TO [machinename$] in the database.

    It is not necessary to do any of these steps if the NAV Server and SQL Server are on the same machine, and you are using NetworkService for the NAV Server, since c/side will do this for you. But for the machine<->machine scenario you need to do this yourself.
    Dean McCrae - Senior Software Developer, NAV Server & Tools

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • srocacsrocac Member Posts: 11
    Thanks, Im reinstalled Navision WS, created a new Database. And read
    dmccrae wrote:
    After you create your database you can leave the BROKER setting disabled. If you would like later to use Query Notifications for change detection on the NAV Server, you can enable it and add the additional required permissions, but it is better to get the simple case working first.

    If you are going machine<->machine with the NetworkService account being used in the NAV Server, you need to ensure that you create that account (using the machinename$ notation) as a login in SQL Server. Check this using Management Studio.

    Then map that login to the database itself, as a database user (it is simpler to use the same name for the user as the login).

    Then, using a query window issue: GRANT SELECT ON [Object Tracking] TO [machinename$] in the database.

    It is not necessary to do any of these steps if the NAV Server and SQL Server are on the same machine, and you are using NetworkService for the NAV Server, since c/side will do this for you. But for the machine<->machine scenario you need to do this yourself.

    PERFECT!!!!!
  • srocacsrocac Member Posts: 11
    Please Mark Solved
Sign In or Register to comment.