I'm trying to add execute privelages to a user that I created on a MSSQL database. I have a administrative account which I used to create the new account:
|
Full Version: Mssql Grant Privelage Question
I'm trying to add execute privelages to a user that I created on a MSSQL database. I have a administrative account which I used to create the new account:
The user is created successfully but afterwards when I try to give execute privelages to the account using this statement:
I get an sql_error code without data return...(I'm doing this programmatically in c++ btw). I tried various variations of that command including using a NULL database...Any ideas?
it must be master.. or am I wrong?
yes, at least thats what I thought too...I tried adding it to master "ON master" but I guess I'm missing something. Since the only error that I'm getting is -1 which is "SQL_ERROR" I don't have any feedback on what the problem could be.
you might try these:
Privileges SELECT: The privilege to retrieve data INSERT: The privilege to insert new records. UPDATE: The privilege to modify records. DELETE: The privilege to delete records. REFERENCES: The privileges to reference columns of a specific table USAGE: The privileges to use domains, collations, characters sets etc. etc. Example GRANT SELECT,UPDATE ON master TO newuser
It has to be specifically EXECUTE...my user already has all entry and data manipulation privelages.
maybe these examples will help
The following example grants EXECUTE privilege on the stored command named ListUserTables to the user named Vivian. GRANT EXECUTE ON COMMAND ListUserTables TO Vivian The following example grants EXECUTE privilege on the stored procedure named ShowUsers to the users named Jenny and John, and the group Managers. GRANT EXECUTE ON PROCEDURE ShowUsers TO Jenny, John, Managers The following example grants EXECUTE privileges on all stored procedures in the InternetFunc to all present and future users using the PUBLIC keyword. GRANT EXECUTE ON PROJECT InternetFunc TO PUBLIC This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
|
||||