The combination of User ID and Password entered is invalid.

parthivparthiv Member Posts: 16
when i try to insert a record from Navision into a table , say "Table1", I get the error message "The combination of User ID and Password entered is invalid.Try again." . The thing is the table has got "after Insert" SQL trigger , which will insert the record from "Table1" into another table, say "Table1Copy", in a different database(Not a Navision database).

we are using SQL Server = 2000, and the Security model = standard.

currently the user is assigned is "public" role in SQL database. when we assign "dbo" role to the same user , the record is inserted successfully and the trigger is executed. Even after assigning "datareader" and "datawriter" role for both the databases ,still getting the same error!!..

Anyone encountered this issue ?? Please let me know how you got around it.
Thanks in advance...

Comments

  • kinekine Member Posts: 12,562
    Do not forgot that all things in NAV are done under Application role, not directly under the user account (of course the account have some impact to the permissions too).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • dmccraedmccrae Member, Microsoft Employee Posts: 144
    Yes, you'll need to grant the permission(s) you need directly to the application role from Management Studio (or Enterprise manager). If your table is called [MyTable] then:

    GRANT INSERT ON [MyTable] TO [$ndo$shadow]

    This will mean that, whilst running NAV, all users effectively will have this permission. But, to restrict this to the actual users that it is relevant for, you can of course control this with NAV permissions on the actual NAV table that the trigger is based on. That is, if a user can access the NAV table then he can also access the [MyTable].

    Is that clear?
    Dean McCrae - Senior Software Developer, NAV Server & Tools

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • parthivparthiv Member Posts: 16
    Thanks for the suggestions.

    The trigger is based on Navision table which will insert the records into a table in a different database(not a Navision database).

    When i tried to grant permission for $ndo$shadow (Application role)

    Grant Insert on [Non-Navision Database].dbo.[MyTable] to [$ndo$shadow]

    I got the error message,

    Msg 4604, Level 16, State 1, Line 1
    There is no such user or group '$ndo$shadow'.


    Is there any work around for this scenario? Don't want to assign dbo privileges to all the users. Thanks.
  • kinekine Member Posts: 12,562
    The application role is only for one database, it is not working on "whole" server. :-k
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • parthivparthiv Member Posts: 16
    kine wrote:
    The application role is only for one database, it is not working on "whole" server. :-k

    The application role is working on Navision database. Not able to execute the trigger on the table (which inserts record into the non-Navision database).If i disable the trigger i'm able to insert the records into the table from Navision.

    My security model is Standard; can't i execute the trigger (which inserts record into the non-Navision database) without assigning dbo privileges to the user??
  • kinekine Member Posts: 12,562
    You will need to solve the permissions problem because:

    The User account have only public permissions to NAV DB, the Application role have db_owner permissions, but only for NAV DB. It means, if the user wants to do something in non-Nav database, you need to assing appropriate permissions to the user. Try to assign Public permissions for the user on non-Nav db and assign the Insert permissions for the target table.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • parthivparthiv Member Posts: 16
    kine wrote:
    You will need to solve the permissions problem because:

    The User account have only public permissions to NAV DB, the Application role have db_owner permissions, but only for NAV DB. It means, if the user wants to do something in non-Nav database, you need to assing appropriate permissions to the user. Try to assign Public permissions for the user on non-Nav db and assign the Insert permissions for the target table.

    Kine, Thanks for the reply. I assigned Public , Datareader & Datawriter on non-Navision database for the user , say NAVUSER1 . If i log into the SQL Query Analyzer as "NAVUSER1" and try to insert the records into the Navision table using SQL Query, the records are inserted and trigger is executed. But when i try to insert it from Navision, i'm still getting the same error. Thanks.
Sign In or Register to comment.