Click here to Skip to main content
15,891,204 members
Home / Discussions / Database
   

Database

 
AnswerRe: MSSQL how do I get the schema setup Pin
Wendelius11-Feb-09 18:21
mentorWendelius11-Feb-09 18:21 
QuestionDeploying Stored Procedures in Visual Studio - GRANT EXECUTE Pin
Mike Ellison11-Feb-09 13:38
Mike Ellison11-Feb-09 13:38 
AnswerRe: Deploying Stored Procedures in Visual Studio - GRANT EXECUTE Pin
Wendelius12-Feb-09 5:38
mentorWendelius12-Feb-09 5:38 
GeneralRe: Deploying Stored Procedures in Visual Studio - GRANT EXECUTE Pin
Mike Ellison12-Feb-09 5:50
Mike Ellison12-Feb-09 5:50 
GeneralRe: Deploying Stored Procedures in Visual Studio - GRANT EXECUTE Pin
Wendelius12-Feb-09 6:06
mentorWendelius12-Feb-09 6:06 
GeneralRe: Deploying Stored Procedures in Visual Studio - GRANT EXECUTE Pin
Mike Ellison12-Feb-09 10:54
Mike Ellison12-Feb-09 10:54 
GeneralRe: Deploying Stored Procedures in Visual Studio - GRANT EXECUTE Pin
Wendelius12-Feb-09 11:23
mentorWendelius12-Feb-09 11:23 
GeneralRe: Deploying Stored Procedures in Visual Studio - GRANT EXECUTE Pin
Mike Ellison13-Feb-09 6:25
Mike Ellison13-Feb-09 6:25 
Hi Mika. I ended up using a DDL trigger like the following:
CREATE TRIGGER GrantExecuteTrigger on DATABASE
   FOR CREATE_PROCEDURE
AS
  declare @user varchar(64)
  set @user = 'whateverUserWeWant'

  declare @data xml
  set @data = EVENTDATA()

  declare @sql varchar(max)
  set @sql = 'GRANT EXECUTE ON '
           + @data.value('(/EVENT_INSTANCE/ObjectName)[1]', 'varchar(256)')
           + ' TO ' + @user

  execute(@sql)

GO


This did work... every time the assembly/stored procs are deployed from Visual Studio, the trigger is applying the GRANT EXECUTE permission accordingly. I will just have to remember to adjust permissions on any stored procs that I would work with outside the VS context.

Much of what I read regarding this issue indicated there was a Script.PostDeployment.sql file that could be modified for this purpose, but I wonder if that is limited to the Database edition of Team Studio... we have the Architecture edition, and it doesn't seem like the same facility exists there (unless I'm completely missing it).
GeneralRe: Deploying Stored Procedures in Visual Studio - GRANT EXECUTE Pin
Wendelius13-Feb-09 22:54
mentorWendelius13-Feb-09 22:54 
GeneralRe: Deploying Stored Procedures in Visual Studio - GRANT EXECUTE Pin
Mike Ellison17-Feb-09 5:59
Mike Ellison17-Feb-09 5:59 
GeneralRe: Deploying Stored Procedures in Visual Studio - GRANT EXECUTE Pin
Wendelius17-Feb-09 7:27
mentorWendelius17-Feb-09 7:27 
QuestionSELECT Question Pin
MarkB77711-Feb-09 11:21
MarkB77711-Feb-09 11:21 
AnswerRe: SELECT Question Pin
MarkB77711-Feb-09 11:39
MarkB77711-Feb-09 11:39 
QuestionIs it possible to restore sql2005 backup on sql2000????????? Pin
Aman786Singh11-Feb-09 4:52
Aman786Singh11-Feb-09 4:52 
AnswerRe: Is it possible to restore sql2005 backup on sql2000????????? Pin
Wendelius11-Feb-09 6:29
mentorWendelius11-Feb-09 6:29 
QuestionUsing XQuery to update an XML field in Sql Sever 2005 Pin
Rob Philpott11-Feb-09 3:30
Rob Philpott11-Feb-09 3:30 
AnswerRe: Using XQuery to update an XML field in Sql Sever 2005 Pin
Wendelius11-Feb-09 6:48
mentorWendelius11-Feb-09 6:48 
GeneralRe: Using XQuery to update an XML field in Sql Sever 2005 Pin
Rob Philpott11-Feb-09 22:00
Rob Philpott11-Feb-09 22:00 
GeneralRe: Using XQuery to update an XML field in Sql Sever 2005 Pin
Wendelius12-Feb-09 3:04
mentorWendelius12-Feb-09 3:04 
QuestionMulti Platform Database Pin
urbane.tiger10-Feb-09 14:57
urbane.tiger10-Feb-09 14:57 
AnswerRe: Multi Platform Database Pin
Wendelius10-Feb-09 18:48
mentorWendelius10-Feb-09 18:48 
GeneralRe: Multi Platform Database Pin
urbane.tiger10-Feb-09 23:08
urbane.tiger10-Feb-09 23:08 
GeneralRe: Multi Platform Database Pin
Wendelius11-Feb-09 1:03
mentorWendelius11-Feb-09 1:03 
GeneralRe: Multi Platform Database Pin
urbane.tiger11-Feb-09 1:47
urbane.tiger11-Feb-09 1:47 
Questioninstructor allocation! Pin
Learner52010-Feb-09 2:02
Learner52010-Feb-09 2:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.