Question : Stored Procedure "..." does not exists

Help, I am new to the database management side of things. I have created an application that connects to a SQL 2005 database and runs sp's. I am using windows authentication with a trusted connection. The application works fine when I run it, however, when a general user runs it I get a Stored Procedure "" does not exists. I have changed a general user to sysAdmin rights and the application runs. I know this is a user right problem, but I am not sure how to fix it, and I don't want to give the entire company sysAdmin right.

Thanks for your Help
Kevin

Answer : Stored Procedure "..." does not exists

Ok delete the stored proc you initially created and change the line starting select cmd@1 to the below

SELECT @CMD1 = 'GRANT EXEC ON ' + '[' + @OwnerName + ']' + '.' + '[' + @ObjectName + ']' + ' TO [' + @user +']'


recreate the stored proc with this amendment and then use below to execute

exec spGrantExectoAllStoredProcs  'semhc\domain users'


Again just to reiterate you will be giving access to all stored procs to all domain users which is a little risky!
Random Solutions  
 
programming4us programming4us