Thank you very much...again

From: Jason Tai (jastai@hotmail.com)
Date: 07/22/02


From: "Jason Tai" <jastai@hotmail.com>
Date: Mon, 22 Jul 2002 11:40:34 -0700


Hi! Sue:

I eventually got it to work! However there are some
things I did not do exactly what you specified because of
the following reason

* It is impossible (at least according to the syntax
check) to grant permissions from one database to
another. As a result, the grant select on tempdb will
not work if the store procedure is in master database.

The way I did it is to create the store procedure in the
model database so tempdb will have that store procedure
everytime the server restarts. After that I created a
store procedure in Master Database to call the store
procedure everytime the server restarts. It worked that
way.

If you have an alternative please let me know. Thanks.

Jason
>-----Original Message-----
>Jason,
>Yes...you can include the grant statements in the stored
>procedure, e.g.
>grant select on tempdb..SomeTable to SomeUser
>Also, you don't have to start a new message when you
have a
>follow up question on a reply. You can just reply to the
>response you received and then it keeps all the follow-up
>messages and postings on the topic together in one
thread.
>
>-Sue
>
>On Mon, 22 Jul 2002 09:33:57 -0700, "Jason Tai"
><jastai@hotmail.com> wrote:
>
>>Hi! Sue:
>>
>>Thanks a lot! It worked. However I need to grant
>>permissions to the users on two tables. Can I include
>>that in the store procedures? (i.e. They reference to
>>the same database - tempdb). Thanks again for your
help.
>>
>>Jason
>
>.
>



Relevant Pages

  • Re: Thank you very much...again
    ... exists in tempdb so all users have access to tempdb through ... database which would avoid some of this. ... the grant select on tempdb will ... >not work if the store procedure is in master database. ...
    (microsoft.public.sqlserver.security)
  • Permission Problems for Newbies
    ... Grant a user for viewing all store procedure on a database without modify ... Can I grant the user permission to view job content and/or ...
    (microsoft.public.sqlserver.security)
  • Using synonyms in security
    ... When i using select from table in store procedre at the same database, ... user who runs this who is not db_owner does need only grant exec on ... procedure and not grant select. ... However if the table which called from store procedure is not in the same ...
    (microsoft.public.sqlserver.security)
  • Re: Permission Problems for Newbies
    ... Users can execute sp_helptext to view the text of stored ... Grant a user for viewing all store procedure on a database without modify ...
    (microsoft.public.sqlserver.security)
  • RE: user permissions in a database as a whole or tables
    ... user permissions in a database as a whole or tables ... The way to give permissions to a user is a simple GRANT. ...
    (comp.databases.informix)