Hi,
Currently our users has been set the role of USER. they have no permission to test, alter, delete, & see database information.
But the problem is they still can create new database. How to prevent the user from creating new database?
I've checked in Role -> Permission. But can't find any clue.
Any solution?
Thanks
0
Answers
I'm guessing, i need to set the correct server role for the user. Right now, i've set sysadmin for all of the user.
Thanks for the reply
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Theres a lot of documents out in the internet you can view regarding SQL Security like this http://articles.techrepublic.com.com/5100-6329-1061781.html
And you are referring to native? Writing scripts on AD can handle user restrictions right?
http://msdn2.microsoft.com/en-us/library/ms175892.aspx
http://msdn2.microsoft.com/en-us/library/ms187648.aspx
I've removed any server roles from a user. So they can't create new database. But the problem is, when they create new line in the form Post Dated Check - Sales (Form 28090)
It raised error :
8104,"42000",[Microsoft][ODBC SQL Server Driver][SQL Server]The Current user is not the database or object owner of table 'XXX$Post Dated Check Line'.Cannot perform SET operation.
But it solve the problem if the user is given sysadmin server role.
Many thanks for the replies.
This error is problem of wrong C/AL code, where the code is not clearing PK field when insertin record into table with AutoIncrement field. It means, if you are inserting into table with AutoIncrement, you need to insert it with 0 in the PK, else you will get this error. And do not forget that INIT is not clearing PK fields... ;-)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Thx,
But I'm a lousy programmer. I can't find the code to insert into the Post Dated Check Line table. Where do I have to put the code to clear the PK? On insert trigger? on new record trigger?
Thx a lot
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Thank you for the reply.
But I've already turn the debugger on. & the error just pop up without goes to NAV debugger. Thx
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Ok, I'll disable the "AutoSplitKey" on the form. But then how I make the line still generating the running number? (10000, 20000, 30000,...)
Sorry for my stupid question :oops:
Thanks
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
You should not give users Sysadmin roles. Seems u restore a sql backup and started using as live database with all previous listed users. To remove such error you can do two ways;
1. make a new database , restore the latest backup delete the users from the user table and assign sql databse users to the new created databse and then create them again in Navision newly created databse and synchornise them with sql server.
2. Simply remove the user from navision and create them again and synchronise it with sql.
Hope this will help to solve your proble.
regards
Sajid
This will not solve your problem. The source is the Autoincrement used in wrong way. Have you managed to solve your problem? Have you some new results of your testing?
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Sorry for the late reply. Thanks a lot for the replies. I really, really appreciate it. But right now, I'm in charge in two projects. & we are facing some serious problem with locktable in SQL. I'm focusing to the locktable issue first. after finish with the locktable, I'll check the autoincrement problem. Soon after that i'll post the test result. Once again, thank you for the assistance.
Correct this is an autoincrement problem. Just set the property of field "Line Number" in Table "Post Dated Check Line". Set the property AutoIncrement = No
So right now, I don't give the user the Sysadmin role, so they can't create, delete the database. Thanks for all the assistance