Lock Store Procedure in sql 2005

  • Hello, i want to lock my store procedure , view and function , how can i do that in MSSQL2005 ?

    I see some Databases when deployed on customer computer , we can't modify store procedure ?

    how can i do that ?

  • Do you mean encryption? Here's the entyry in the Books Online.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • no , dont encryption . I saw a database , when i open Stored Procedure list , a lock icon appear near the name of Stored Procedures , and when i right click on them to modify , the modify option is off (disabled) , how can i do the same thing ?

  • That's a managed stored procedure. That means it's a procedure written in CLR code, not TSQL. Here's a link on how to write one. So that's not going to help you. The lock is in place because you can't edit CLR code inside of Management Studio, not because the procedure itself is locked.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • For what it's worth, there is virtually nothing you can do in SQL to stop an administrator from doing what he wants with the database.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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