Please start any new threads on our new 
    site at https://forums.sqlteam.com.  We've got lots of great SQL Server
    experts to answer whatever question you can come up with.
    
        | 
                
                    | 
                            
                                | Author | Topic |  
                                    | jazzcatoneStarting Member
 
 
                                        12 Posts | 
                                            
                                            |  Posted - 2013-08-01 : 09:52:42 
 |  
                                            | I have a list of existing stored proceudures that I can get by running the below query. I have a new sqluser called "XXXXXX" . How can I iterate through the result set in sql and give execute permissions to user XXXXXX. Any help or direction would be most appreciated. JasonSELECT [name] FROM sys.objects obj WHERE obj.[type] = 'P' and name like'JL_%'Jason |  |  
                                    | James KMaster Smack Fu Yak Hacker
 
 
                                    3873 Posts | 
                                        
                                          |  Posted - 2013-08-01 : 10:45:04 
 |  
                                          | Modify the query to generate the grant statements, run it, copy the results to an SSMS query window and execute it SELECT 'GRANT EXECUTE ON ' + [name] + ' TO XXXXXX'FROM sys.objects objWHERE obj.[type] = 'P' and name like'JL_%' |  
                                          |  |  |  
                                |  |  |  |