May 26, 2008 at 2:23 am
I was able to fix that a user had select rights and exexute rights on a database.
But I can' t get it to work in sql 2000.
Is it anyway possible to grant rights to a user on a database?
What I want.
!!!!user x can execute stored procedures, but not modify. ==> I would realy like to enable this one.
user x can select 2 tables in database y
user x can insert in 1 table in database y
the grant permissions script included as attachment.
May 26, 2008 at 3:08 am
Steve Vos (5/26/2008)
!!!!user x can execute stored procedures, but not modify. ==> I would realy like to enable this one.
Grant the user EXECUTE rights on the stored procedure
user x can select 2 tables in database y
Grant them select rights on just those 2 tables
user x can insert in 1 table in database y
Grant them just insert rights on that table
Your script looks OK. What's the problem?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
May 26, 2008 at 3:14 am
when I login as nagios I am able to edit the stored procedures
and I am not able to edit the tables used in the script.
May 26, 2008 at 3:20 am
There is nothing in that script which will allow modification of stored procs. You'd be able to script them, but not actually run the alter procedure statement?
I notice that you are not creating the login or user from scratch though (not in the Nagios DB anyway). Does the login have other permissions from before you ran the script?
The only table that you will be able to 'edit' is the perfcounters table, and that to add rows only.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
May 26, 2008 at 3:29 am
I'll tell the whole story.
I have got 3 scripts.
1==> creates db + tables and users
2==> creates objects (functions and stored procedures)
3==> sets user rights.
I believe The 3 scripts are to be executed in order from 1 to 3
As attachment the 3 scripts
Have you any idea why I get the strange result of being able to edit the stored procedures?
May 26, 2008 at 3:48 am
I can't see anything in that script that would allow the user to modify stored procs. They'll be able to generate the edit script, but running the alter should fail.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
May 26, 2008 at 4:46 am
how can I revoke the permission to generate the edit script?
Because I don't wan't them to see the source code
May 26, 2008 at 4:52 am
In SQL 2000, I don't think you can. You can encrypt the procedures, but it's a fairly trivial procedure to decrypt them
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
May 26, 2008 at 4:54 am
encryping is useless. because you can find plenty of tools to decrypt them.
So it makes no sense.
that is why I want to protect them with user privileges
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply