views and security problems in navision

BGIBGI Member Posts: 176
edited 2008-07-01 in SQL General
Following scenario:
DB A :4.0 navision with standard security
DB B :4.0 navision with standard security
Both on sql 2005
In DB A: views to retrieve data in DB B.
Views defined as linked tables in navision

User X , super role on both databases, not db_owner.

When user x opens linked table, sql error no priviliges.

According to me we need to put guest user in sql on DB B.
In sql via properties on DB B, permission, add user guest with connect and select grant.

Is this everything???
Someone told me you must enable guest account, but i don't seem to find any more info...

Rgds
Benny
Rgds
Benny Giebens

Comments

  • jlandeenjlandeen Member Posts: 524
    Have you checked the privedges of User X in SQL? You should be able to execute the view logged into SQL as that user from query analyzer or any other SQL tool.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
  • queries on a linked server execute with the permissions of the account the linked server is set up to use not the user calling the linked server; assuming you're using sql logins and users.
  • strykstryk Member Posts: 645
    Hi!

    I think you need to grant SELECT rights for your views to the role PUBLIC (not GUEST):
    GRANT SELECT ON "MyView" TO PUBLIC
    

    Regards,
    Jörg[/code]
    Jörg A. Stryk (MVP - Dynamics NAV)
    NAV/SQL Performance Optimization & Troubleshooting
    STRYK System Improvement
    The Blog - The Book - The Tool
  • bbrownbbrown Member Posts: 3,268
    Navision uses Application Roles. From BOL:

    "An application role is a database principal that enables an application to run with its own, user-like privileges. You can use application roles to allow access to specific data to only those users that connect through a particular application. Unlike database roles, application roles contain no members and are inactive by default. Application roles work with both authentication modes. Application roles are activated by using sp_setapprole, which requires a password. Because application roles are a database-level principal, they can access other databases only through permissions granted in those databases to guest. Therefore, any database in which guest has been disabled will be inaccessible to application roles in other databases."


    The discussion on linked server is only relevant if the database is on another server.
    There are no bugs - only undocumented features.
  • dakyndakyn Member Posts: 36
    The user don't have serveradmin role. You need this role to view all sessions.
  • garakgarak Member Posts: 3,263
    give the sql role public the permissions (GRANT)
    Do you make it right, it works too!
Sign In or Register to comment.