SQL permissions writing in a view

HansDutting
Member Posts: 25
Hello all,
Im absolutely not an SQL wizard but need some advice on this scenario.
I have this situation:
Database 1 with a table Order (SQL database)
Database 2 with a view to table Order in Database 1 (NAVISION SQL)
The user should be able to read and write in the view of table Order in NAV.
Now this user gets the message that he doesnt have reading permissions to Table Order.
This happens when he activates CSIDE code which modifies the view in NAV.
This user has permissions on database 1: db_datareader and db_datawriter.
He also has permissions in NAVISION to modify, read delete etc..
When we make the user sysadmin of database 1 there is no problem ofcourse.
Question is how to approach and set the correct security settings for this user, without making him db_owner or sysadmin on Database 1?
Who can help me out?
Tnx,
Hans Dutting
Im absolutely not an SQL wizard but need some advice on this scenario.
I have this situation:
Database 1 with a table Order (SQL database)
Database 2 with a view to table Order in Database 1 (NAVISION SQL)
The user should be able to read and write in the view of table Order in NAV.
Now this user gets the message that he doesnt have reading permissions to Table Order.
This happens when he activates CSIDE code which modifies the view in NAV.
This user has permissions on database 1: db_datareader and db_datawriter.
He also has permissions in NAVISION to modify, read delete etc..
When we make the user sysadmin of database 1 there is no problem ofcourse.
Question is how to approach and set the correct security settings for this user, without making him db_owner or sysadmin on Database 1?
Who can help me out?
Tnx,
Hans Dutting
0
Comments
-
I take it that both databases are on the same server? In that case then you need to activate the guest account on DB1 and grant it appropriate permissions to the Order table.There are no bugs - only undocumented features.0
-
Hi,
I would guess that it's not possible to write into a view. A view consists of fields from one or several tables, with computed fields, too. Writing is only possible for tables.
with best regards
Jens0 -
jglathe wrote:Hi,
I would guess that it's not possible to write into a view. A view consists of fields from one or several tables, with computed fields, too. Writing is only possible for tables.
with best regards
Jens
There is what's known as "updateable views". These are views that will accept insert,delete,and modify statements. So yes it is possible to write to a viewThere are no bugs - only undocumented features.0 -
tnx bbrown,
So what you are saying is that we dont give the windowslogin of the user the permissions but the default "guest" account?
were going to try, I report later on.
Does this mean the user goes indirect to the DB1 instead of directly on his windowsaccount?
gr,
Hans D.0 -
HansDutting wrote:tnx bbrown,
So what you are saying is that we dont give the windowslogin of the user the permissions but the default "guest" account?
were going to try, I report later on.
Does this mean the user goes indirect to the DB1 instead of directly on his windowsaccount?
gr,
Hans D.
I guess you could think of it like that. A NAV user accesses the NAV database usign the security context of the applicaiton role. When running with an application role, any object permissions assigned directly to the user are ignored. That's why assigning the user permission to the table in DB1 doesn't work.
When a user connects to a database, to which they do not have access, then the permisisons granted to the guest account are used.There are no bugs - only undocumented features.0
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