How to encrypt your script on sql server

  • 3,987 views
Uploaded on

 

More in: Technology , Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
3,987
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
19
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. How to encrypt your function or stored procedure on Microsoft SQL Server 2008 R2
    By:
    IkhwanKrisnadi
    Software Engineer
    Y!: ikhwankrisnadi
    Gtalk: krisnadiikhwan
  • 2. Introduction
    SQL Server 2008 R2 gives facility to encrypt your script of function or stored procedure
    If you encrypt it, your function or stored procedure can not be viewed its source code
    Also, you can not generate script of your function or stored procedure that you encrypted
  • 3. How to encrypt?
    Add option WITH ENCRYPTION on your script of function or stored procedure
    Encryption on function
  • 4. How to encrypt? (continued)
    Encryption on stored procedure
  • 5. Example: Encrypt on Function
    Create function with named fnAdd2Numbers . This function to calculate sum of 2 numbers
  • 6. Example: Encrypt on Function (Continued)
    Right click on your function at Microsoft SQL Server Management Studio 2008 R2 . Then click “Modify” or “Script Function as”
  • 7. Example: Encrypt on Function (Continued)
    It will displayed below message to indicate that you can not modify or view its script
  • 8. Example: Encrypt on Stored Procedure
    Create function with named spAdd2Numbers . This stored procedure to calculate sum of 2 numbers then output the result
  • 9. Example: Encrypt on Stored Procedure (Continued)
    Right click on your stored procedure at Microsoft SQL Server Management Studio 2008 R2 . Then click “Modify” or “Script Function as”. You can not click “Modify” because it is disabled. Click “Script Function as”
  • 10. Example: Encrypt on Stored Procedure (Continued)
    It will displayed below message to indicate that you can not modify or view its script