我在sql Server中编写了一个存储过程.
现在它只是我不希望任何人看到我的脚本或编辑它.
请记住,我正在处理标准登录ID和密码.
哪个与每个人共享.
因此,我可以允许每个人执行该过程.
但是他们不应该看剧本.
干杯!
谢谢
解决方法
您正在寻找WITH ENCRYPTION,它会加密存储过程后面的代码.
CREATE PROCEDURE usp_MyProc WITH ENCRYPTION AS SELECT * FROM myTable
只是一个警告,来自MSDN:
Users who have no access to system tables or database files cannot retrieve the obfuscated text. However,the text will be available to privileged users who can either access system tables over the DAC port or directly access database files.
一些参考和进一步阅读:
> http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/
> http://msdn.microsoft.com/en-us/library/ms187926.aspx