Write to view

toor
Member Posts: 52
Hi folks,
i've a nav 4.0 db on sql server 2005 with standard security model.
I've on the same server a second database. In the Nav db i've created a view that selects data from one table in the second db.
I want to write to that view from Nav. I'm only able to do this by granting the user sysadmin rights. No other rights seems to work. I think because of the application role that navision uses.
I can write to the view with a non sysadmin user from Management Studio.
Do you have any ideas how to write to the view from nav with a non sysadmin user?
thanks & regards
tobias
i've a nav 4.0 db on sql server 2005 with standard security model.
I've on the same server a second database. In the Nav db i've created a view that selects data from one table in the second db.
I want to write to that view from Nav. I'm only able to do this by granting the user sysadmin rights. No other rights seems to work. I think because of the application role that navision uses.
I can write to the view with a non sysadmin user from Management Studio.
Do you have any ideas how to write to the view from nav with a non sysadmin user?
thanks & regards
tobias
0
Comments
-
Check the property LinkedInTransaction of the table in NAV, may be it will helps you, but it is just a tip. Another way can be to assign the permissions manually on the view.0
-
With application roles access to objects not defined in the application role is granted via the guest account.There are no bugs - only undocumented features.0
-
Just remember to be careful if the second database is in a linked server.
SQL can't maintain transactional integrity between linked servers and if You get an error in Your code the changes won't be rolled back in the linked server.Lars Westman
http://www.linkedin.com/in/larswestman0 -
The LinkedInTransaction property must be NO if the view references objects outside the current database.
I assume your reference to transactional integrity is in the context of Navision linked tables. SQL itself has no issues supporting transactions distributed across multiple databases and servers. There are of course restrictions depending on the data providersThere are no bugs - only undocumented features.0 -
bbrown wrote:The LinkedInTransaction property must be NO if the view references objects outside the current database.
I assume your reference to transactional integrity is in the context of Navision linked tables. SQL itself has no issues supporting transactions distributed across multiple databases and servers. There are of course restrictions depending on the data providers
Yes I mean linked tables in Navision that references data on a linked server. Then you must watch out when updating data in the linked server when you e.g. is doing updates when posting.Lars Westman
http://www.linkedin.com/in/larswestman0 -
toor wrote:Hi folks,
.... I'm only able to do this by granting the user sysadmin rights. No other rights seems to work. I think because of the application role that navision uses.
I think you are correct in the statement that it is the application role that is the problem.
Once you change to an application role, the login security context is lost, so sql has no way of validating you on the second database.
Raised this question with MS, but they told us the only solution is dbowner (or sysadmin) option...
But it don't think this is correct: we resolve this problem by giving the user "guest" select and connect rights on the second database. In our case we only need to select data via a view in a second database. If you want to write data into the other database using a view i suppose there are ohter rights you need to grant to the "guest" user...
Rgds
BennyRgds
Benny Giebens0
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