How to Disable SP_Helptext

  • Hi,

    I have a requirement, i want to diable "Sp_helptext" because i don't want user of the database to read the scripts that is written in the Database.

    Any suggestions will be highly helpful.

    Thanks

    Jim

  • I know if you had done it the opposite way, where you granted the user or role minimum rights like db_datareader and db_datawriter, then you had to do GRANT VIEW ANY DEFINITION in order to give them the ability to see the definitions, which i think includes the successful use of sp_helptext.

    try DENY VIEW ANY DEFINITION and see if that takes away that right.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Or create the procedures and functions using

    WITH ENCRYPTION

    will make it harder for people to read your code.


    N 56°04'39.16"
    E 12°55'05.25"

  • Peso (7/26/2009)


    Or create the procedures and functions using

    WITH ENCRYPTION

    will make it harder for people to read your code.

    Heh... just make sure that you have clear copy of the code stashed away or you'll need to lookup how to break that encryption (which is why Peso said "make it harder" instead of "make it impossible").

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • I tried to use deny view. Still it is not working.

    How i did is

    - Logged in as Admin

    - Went to the Database, Security folder-->Users--Selected the User-->Property-->Securable-->Add Securable-->I mentioned the object (Store Procedure) and denied the view.

    Plz correct me if i'm wrong.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply