Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2002
    Posts
    58

    Unanswered: Denying access to view SQL

    Is there any way to deny access to see the SQL inside a view, but still be able to execute off of it?

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Code:
    GRANT SELECT ON dbo.viewname TO [role_name]
    DENY VIEW DEFINITION ON dbo.viewname TO [role_name]
    In theory, they shouldn't have permissions to view the definition unless they are in an elevated group, like dbo.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Feb 2002
    Posts
    58
    I should mention I'm using SQL Server 2000. DENY VIEW DEFINITION ON does not seem to work

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    You could encrypt the view definition... But obviously this effects all users :s
    George
    Home | Blog

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    And they can be decrypted easily.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Also, mainstream support for SQL 2k is ending (has ended?). You should really be starting to put together plans to upgrade as part of your strategy. You don't want to end up ridiculed like George was using 6.5 for so long....
    Testimonial:
    pootle flump
    ur codings are working excelent.

  7. #7
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Quote Originally Posted by pootle flump
    And they can be decrypted easily.
    They can? *shrug*

    And what do you mean "was"?! I'm still on 6.5 until June
    George
    Home | Blog

  8. #8
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by georgev
    They can? *shrug*
    Ya.
    I...ahem...."reverse engineered" a third party app once to try to find a bottleneck. I suspect they encrypted their code less to protect intellectual property and more to protect the jaws of people reading it, as said mandibles invariably hit the desk with some force.
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •