Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!transit3.readnews.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: rollscanardly@att.net Newsgroups: comp.databases.ms-sqlserver Subject: EXECUTE AS Date: Thu, 26 Jul 2012 12:54:40 -0700 (PDT) Organization: http://groups.google.com Lines: 22 Message-ID: NNTP-Posting-Host: 198.234.82.254 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1343332481 6560 127.0.0.1 (26 Jul 2012 19:54:41 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 26 Jul 2012 19:54:41 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=198.234.82.254; posting-account=H0CbGQoAAACbl_tS1RfYwvMt_jmh18zO User-Agent: G2/1.0 Xref: csiph.com comp.databases.ms-sqlserver:1181 I have a rather simple stored procedure for starting a batch job in SQL Server 2008: ALTER PROCEDURE [dbo].[BUGSTARTPOST] WITH EXECUTE AS OWNER AS BEGIN DECLARE @rc as int SET NOCOUNT ON; EXECUTE @rc=msdb.dbo.sp_start_job 'Budget Update' RETURN @rc END where I am owner of the database containing the procedure and a have a sysadmin server role. When a user, inlcuding me, with execute permission on this procedure, the result is a message that EXECUTE permission was denied msdb.dbo.sp_start_job. If I execute the procedure without the WITH clause it runs for me. How do I go about permitting a user to execute this stored procedure under my,or some other administrator's credetials so he or she can run sp_start_job as controlled by this procedure? Fred.