How to encrypt all existing stored procedures of a database

前端 未结 8 1951
后悔当初
后悔当初 2021-02-10 10:13

Is there any possibility to encrypt all existing stored procedures of a SQL Server 2008 database AFTER they have been created via an SQLCMD script?

The reason I want to

8条回答
  •  逝去的感伤
    2021-02-10 10:47

    I have the same problem.

    My solution is to put "-- WITH ENCRYPTION" in all of my stored procedures. This version is used by developers and stored in source control.

    I then use a tool (like sed) in my build to replace "-- WITH ENCRYPTION" with "WITH ENCRYPTION" on the files before I send them to be installed.

    For a pure SQL solution you could use REPLACE.

提交回复
热议问题