Re: Executing dynamic select statement in a SP
From: John Bell (jrm_bell@hotmail.com)
Date: 12/30/02
- Next message: Jasper Smith: "Re: Linked SQL Servers"
- Previous message: Brian: "Linked SQL Servers"
- In reply to: Chen: "Executing dynamic select statement in a SP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "John Bell" <jrm_bell@hotmail.com> Date: Mon, 30 Dec 2002 14:36:09 -0000
Hi
>From the Execute topic in books online:
Permissions
EXECUTE permissions for a stored procedure default to the owner of the
stored procedure, who can transfer them to other users. Permissions to use
the statement(s) within the EXECUTE string are checked at the time EXECUTE
is encountered, even if the EXECUTE statement is included within a stored
procedure. When a stored procedure is run that executes a string,
permissions are checked in the context of the user who executes the
procedure, not in the context of the user who created the procedure.
However, if a user owns two stored procedures in which the first procedure
calls the second, then EXECUTE permission checking is not performed for the
second stored procedure
John
"Chen" <cshn@yahoo.com> wrote in message
news:030201c2b00c$1324cc30$89f82ecf@TK2MSFTNGXA01...
> Hi all,
>
> I have a SP which has dynamic SQL statements. I have given
> the execute only permission to couple of users on this SP.
> These users do not have any permission on the tables
> referred inside the SP. If I do not use the dynamic SQLs
> everything works just fine but with dynamic SQLs when I
> execute them in the SP I get select permission denied to
> tables. This is urgent. Any help is appriciated.
>
> Thanks in advance
>
> Chen
- Next message: Jasper Smith: "Re: Linked SQL Servers"
- Previous message: Brian: "Linked SQL Servers"
- In reply to: Chen: "Executing dynamic select statement in a SP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|