SQL

zhaozj2021-02-16  88

G. The text of the stored procedure to the user using the Encryption option with Encryption clause. The following example creates an encryption process, using the sp_helptext system stored procedure to get information about the encryption process, then try to get information about the process directly from the SysComments table.

IF EXISTS (SELECT name FROM sysobjects WHERE name = 'encrypt_this' AND type = 'P') DROP PROCEDURE encrypt_thisGOUSE pubsGOCREATE PROCEDURE encrypt_thisWITH ENCRYPTIONASSELECT * FROM authorsGO

EXEC SP_HELPTEXT Encrypt_this

The following is the result set:

The Object's Comments Have Been Encrypted.

Next, select the identification number and text of the encrypted storage process content.

Select C.ID, C.Text from SysComments C Inner Join Sysobjects O on C.ID = O.Idwhere O.Name = 'Encrypt_This'

The following is the result set:

Note The output of the TEXT column is displayed in a single line. When executed, this information will appear in the same row with the ID column information.

ID TEXT ---------- -------------------------------------- ---------------------- 1413580074 ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ?????? e ??????????????????????????????????? ???????????????????????????????????????????????????????????????

(1 row (s) affected)

转载请注明原文地址:https://www.9cbs.com/read-11698.html

New Post(0)