SQL Roles

raven44
Member Posts: 85
Hi,
I received an error message stating:
"8104,"42000",[Microsoft] ODBC SQL Server Driver Error. The current user is not the database or object owner of table %. Cannot perform set operation."
I have looked at http://www.mibuso.org/forum/viewtopic.php?t=7262&start=0&postdays=0&postorder=asc&highlight=
and noticed that the $ndo$shadow role is only visible in my 3.7 databases.
I am currently working on a 4.0 sp2 database.
Is there another role that v4.0 sp2 utilises?
Any suggestions would be great.
Thanks in advance
I received an error message stating:
"8104,"42000",[Microsoft] ODBC SQL Server Driver Error. The current user is not the database or object owner of table %. Cannot perform set operation."
I have looked at http://www.mibuso.org/forum/viewtopic.php?t=7262&start=0&postdays=0&postorder=asc&highlight=
and noticed that the $ndo$shadow role is only visible in my 3.7 databases.
I am currently working on a 4.0 sp2 database.
Is there another role that v4.0 sp2 utilises?
Any suggestions would be great.
Thanks in advance
0
Answers
-
Which function did you launch? For some things you need to be DBowner or even SQLadmin.
Since 4.00, the security system has changed. Each time you add a user or an object, or change permissions in Navision, you need to synchronize the security system on SQL. This can be a long process. To avoid that, you can make each user a DBowner on SQL, but this can be a security issue (each user can delete the DB!) if the user can access the DB from outside Navision.
From 4.00SP3, MS added again the possibility to switch to the old security system.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
This is not about permission. This is about filling autoincrement field when inserting record. Catch the code through debugger and check the code. You need to clear the autoincrement field before inserting into table (set it to 0).
For more info search the forum. I wrote "why" in them...0 -
Its a customized function on an Order that updates a field on the Order and writes to a newly customized table.
Synchronizing was the first step I tried, it synchronizes the user but unfortunately same error when running the function.
Adding the dbo role to the user works but for security risks I don't think its wise to do that.
Still stuck as to what permissions or roles (in SQL) should be added to the user with the new security structure 4.0...
they do have $dbo$ar$############## - (that unique key)
just wouldnt be sure which to add.0 -
raven44 wrote:Its a customized function on an Order that updates a field on the Order and writes to a newly customized table.
You can forget the permissions. You do not need to change anything there. You need to make the C/AL code correct. Can you post the code which is inserting the data into this new table? The error is there.
I assume that there is just one field as primary key of type Integer (or BigInteger) and the Autoincrement property is set to Yes. In the code you are missing the code like:<your new record>.<PK field> := 0;
In many cases is the problem hidden in one thing - that the .INIT function is not clearing the PK fields! You need to clear the PK field manually... 8)0 -
Hi,
thanks for all your comments.
it was the code!
the way in which it was structured.
was misled by the error message thinking that it was to do with SQL.
Thanks again0 -
You are welcome.
It is hard to find the real source of this error. It is just secondary effect of the code. You will know the reason next time you will see this error... 8)0 -
[Topic moved from Navision forum to SQL General forum]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!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