哪里是保护存储过程名称的最佳位置.. [英] Where is the best place to secure stored procedure names..

查看:77
本文介绍了哪里是保护存储过程名称的最佳位置..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的数据层由许多方法组成,这些方法只是命令对象的专用包装器,后者又调用存储过程。每个方法都在参数字符串中提供所需参数的传递,并且方法体中包含
(硬编码)存储过程的名称。这并不罕见。

Our datalayer consists of many methods that are merely specialized wrappers for Command Objects that in turn call stored procs. Each method provides for the passing of required parameters in the parameter string and the name of the stored procedure is contained (hard coded) in the method body. This is not unusual.

UI调用服务层方法。服务层方法提供用于收集和处理参数以及从用户界面汇编请求然后将请求转发到数据层的逻辑。   数据
图层定义了命令对象, 存储过程的名称是 硬编码进入 方法调用,参数被包装在参数集合中,并且请求被传递给dtabase。我认为这是非常好的

The UI calls a service tier method. The service tier method provides the logic for gathereing and processing the parameters and the assembling a request from the user interface and then forwarding the request to the datalayer. The Data layer defines the command object, the name of the stored proc is hard coded into the method call, the parameters are wrapped up in a parameter collection and the request is handed of the the dtabase. I think this is pretty straight forward.

作为我们的代码修复工作的下一步我们想要概括数据层,以便我们只有少数几个处理特殊更复杂请求的方法以及处理直接数据请求的通用方法。
我们遇到的问题是我的一些同事不喜欢这个想法,他们认为我们必须将proc名称升级到服务层。

As a next step in our code rehabilitation effort We would like to generalize the data layer so that we have only a few methods to handle special more complex requests and a generalized method that handles straight forward data requests. The problem we encounter is some of my colleagues don't like the idea, they think that we'll have to move the proc names up a tier into the service tier.

一种解决方案是将proc名称放在字符串表中,甚至放在数据库中。

One solution is to put the proc names in a string table or even in the database.

对我来说这很简单但我的一些同事不同意。有没有人有任何其他建议 或者关于如何处理这项工作的意见。有很多代码涉及很多老学者,我是其中之一。
任何帮助都会被贬值。    

To me it's pretty simple but some of my colleagues don't agree. Does anyone have any other suggestions  or opinions on how to approach this effort. There is a lot of code involved and a lot of old schoolers of which I am one. Any help would be apreciated.    

推荐答案

嗨Williammz,

Hi Williammz,

欢迎来到MSDN论坛。

Welcome to MSDN Forum.

我会让高级工作人员研究这个问题,可能需要一些时间,谢谢你的理解。

I will involve senior workmates to research on this issue, it may need some time, thanks for your understanding.

最好的问候


这篇关于哪里是保护存储过程名称的最佳位置..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆