SQL Views and Permissions issue

tranceport
Member Posts: 8
Hi!
Basically we have created a Table in Navision which is linked to a SQL View. The SQL/Nav User has permissions to access the table data of this view. The user is set only as guest and we cannot set the user as db_owner.
When we run the table inside Navision no data is loaded into it. However if we log on to SQL Management Studio with this user and Query the view we get the results. We ran the SQL Query profiler and ran the SQL statements inside SQL and the results came through.
There seems to be something we are missing (permission or specific role?) in between to allow SQL to return the view results to Navision.
Any Ideas?
Thanks
Basically we have created a Table in Navision which is linked to a SQL View. The SQL/Nav User has permissions to access the table data of this view. The user is set only as guest and we cannot set the user as db_owner.
When we run the table inside Navision no data is loaded into it. However if we log on to SQL Management Studio with this user and Query the view we get the results. We ran the SQL Query profiler and ran the SQL statements inside SQL and the results came through.
There seems to be something we are missing (permission or specific role?) in between to allow SQL to return the view results to Navision.
Any Ideas?
Thanks
TRANCEPORT_
0
Comments
-
First - which version of SQL? Security management differs a lot in SQL2000 and 2005...tranceport wrote:The user is set only as guest and we cannot set the user as db_owner.
You can set the user as db_datareader - at least I had to do so for users who are allowed to run Stored Procedures for reporting purposes on SQL2000. However, in SQL2005 it should be enough to give a particular user EXEC rights to SP - he can't read underlying Tables directly, but SP can.
Seemingly the same applies to Views - just examine what permissions are granted to user for View in question, and WHO has granted these permisions (2005) - maybe the grantor himself has no rights to do so... Grantor must be dbo or db_securityadmin or have "With Grant" permission himself.Modris Ivans
MCP, Dynamics NAV - Application0 -
[Topic moved from 'NAV/Navision' forum to 'SQL General' forum]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
"Normal" NAV users just have the role "public"; so maybe you have to grant rights for your view to that role:
GRANT SELECT ON "MyView" TO PUBLIC
Jörg A. Stryk (MVP - Dynamics NAV)
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool0 -
stryk wrote:"Normal" NAV users just have the role "public"; so maybe you have to grant rights for your view to that role:
GRANT SELECT ON "MyView" TO PUBLIC
=D> Great idea. I have always been manually creating a separate role and giving that access to the view/table, then assigning the users to the new role. This is much simpler.David Singleton0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions