Login failed when connecting to SQL in local

RobySpainRobySpain Member Posts: 57
edited 2011-04-19 in NAV Three Tier
I've a problem and need your help. ](*,)

I've install the SQL2005 and the NAV2009 (both classic sql and RTC). Cronus database is working fine: it connects and opens even the RTC without problems.

Now, I restore an other database in SQL. When I tryed to open the database in classic NAV with SQL give me an error:

- with Database Authentication: "The login failed when connecting to SQL Server NAMEINSTANCE"
- with Windows Authentication: "The user ID and password are invalid. Try again"

Please, could you help me with this problem?

How can I restore the new sql database in my server without these problems?? The sql server authentication is Windows and SQL Server.

Sorry but I am very new with SQL. :oops:

Wait for your help...



  • mohana_cse06mohana_cse06 Member Posts: 5,503
    with which database authentication you tried?

    Did you try with SA?
  • RobySpainRobySpain Member Posts: 57
    thanks Mohana to reply.

    I tryed with both:
    Windows authentication-> the error is: the user ID and password are invalid
    Database Server Authentication -> the login failed when connecting to SQL Server

    I tryed to use the SA too and the same fail.

  • RobySpainRobySpain Member Posts: 57
    I can't open the database. Then, I can't sincronize the users ](*,)
  • tryborgtryborg Member Posts: 2
    I think it's because you haven't the current SQL-User in the database. If it's just at test environment you can delete all the users in the SQL Server and then you can log in to the database with the SA account(or another account which has the right permissions). To delete all the users you have to open SQL Server and delete all the entries in the tables 'dbo.users' and 'dbo.windows login'.
  • danlindstromdanlindstrom Member Posts: 130
    Can you open the database in SQL management studio?

    Navision enabled userIDs are stored in two tables on the SQL-server
    If so check the content of [<replacewithNAVdatabasename>].[dbo].[Users] for database usernames
    and [<replacewithNAVdatabasename>].[dbo].[Windows Login] for Windows-user SIDs

    SELECT [User ID] FROM [<replacewithNAVdatabasename>].[dbo].[User]
    SELECT [SID] FROM [<replacewithNAVdatabasename>].[dbo].[Windows Login]

    [User ID] must have a datadabe-login created in SQL to work
    [SID] must be either a member of a securitygroup or a windows-user with a windows-account in SQL
    Dan Lindström
    NCSD Navision 2.00 since 1999 (Navision Certified Solution Developer)
    MBSP Developer for Microsoft Dynamics NAV 2009
  • RobySpainRobySpain Member Posts: 57

    I solved the problem. Delete all the users in the dbo.users and dbo.windows login.

    Now I can open the database.

    Thanks a lot for all.

Sign In or Register to comment.