网狐6603 修改不了数据库存储过程

原因可能是数据库被加密了

–SQLSERVER加密存储过程
–注意:加密存储过程前应该备份原始存储过程,且加密应该在部署到生产环境前完成!!
–存储过程的内容不会被轻易看到(虽然解密也是有可能的)。应用这个,我们可以对某些关键的存储过程进行加密。但此时,存储过程仍然能被execute、alter和drop。

USE pratice
go

/**********测试表*****************/
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[encrypttb_demo](
[id] [int] NOT NULL,
[submitdate] [datetime] NULL,
[commment] [nvarchar](200) NULL,
)
GO
SET ANSI_PADDING OFF
GO
Insert into [encrypttb_demo]
select 1024, getdate(),REPLICATE(‘A’,100);
WAITFOR DELAY ’00:00:04′;
Insert into [encrypttb_demo]
select 1024, getdate(),REPLICATE(‘B’,50);
GO

———————————————————————-
/***************创建未加密的存储过程*******************/
Create Procedure CPP_test_Original
AS
select * from [encrypttb_demo]
go
/***************创建加密的存储过程*******************/
Create Procedure CPP_test_Encryption
with encryption
AS
—-可以换成任意的逻辑
execute CPP_test_Original
GO


解决方法是把平台脚本里面的存储过程中的“with encryption”删除,然后重新执行,如图执行后这个存储过程的小黄锁消失了,同时也可以修改了

猜你喜欢

转载自blog.csdn.net/Anton8801/article/details/82585077