Search Results

Search found 2 results on 1 pages for 'lewray'.

Page 1/1 | 1 

  • How do I grant a database role execute permissions on a schema? What am I doing wrong?

    - by Lewray
    I am using SQL Server 2008 Express edition. I have created a Login , User, Role and Schema. I have mapped the user to the login, and assigned the role to the user. The schema contains a number of tables and stored procedures. I would like the Role to have execute permissions on the entire schema. I have tried granting execute permission through management studio and through entering the command in a query window. GRANT EXEC ON SCHEMA::schema_name TO role_name But When I connect to the database using SQL management studio (as the login I have created) firstly I cannot see the stored procedures, but more importantly I get a permission denied error when attempting to run them. The stored procedure in question does nothing except select data from a table within the same schema. I have tried creating the stored procedure with and without the line: WITH EXECUTE AS OWNER This doesn't make any difference. I suspect that I have made an error when creating my schema, or there is an ownership issue somewhere, but I am really struggling to get something working. The only way I have successfully managed to execute the stored procedures is by granting control permissions to the role as well as execute, but I don't believe this is the correct, secure way to proceed. Any suggestions/comments would be really appreciated. Thanks.

    Read the article

  • Is it possible to have a cell in table1 "point to" a cell in table2?

    - by Lewray
    I have a hierarchical structure in a database driven software application. Each row in parentTable 'owns' a number of rows in childTable. If the childTable does not have a value set in columnA then it should return the value specified in the appropriate row of parentTable columnB. Is it possible to implement a pointer or cell reference somehow so that I do not have to copy values from parent to child. (A change in parent could result in a large number of changes in child). If this is not possible, could anyone suggest a different approach?

    Read the article

1