在数据库中没有过程的搜索(通过管理页面) [英] Searches without procedures in the databases (through admin pages)

查看:80
本文介绍了在数据库中没有过程的搜索(通过管理页面)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我们的要求是在不同表的不同sql服务器数据库上创建搜索.以前,我们是通过管理页面在数据库本身中创建存储过程的,当实际搜索要通过其他客户端应用程序执行时,它通常用于在与选定搜索相关的数据库中运行那些存储过程.但是我们发现存储过程正在大量涌现,我们不想给数据库增加负担,客户将不喜欢他们数据库中的其他脚本.

因此,现在我们不想在各个数据库中存储创建和存储过程.但是我的困惑是,然后将搜索所必需的脚本存储在哪里?在数据库中没有SP的情况下如何执行搜索?如果将它们作为文本文件存储在公共文件夹中,并且从客户端应用程序运行搜索时,它将使用相应文本文件中的脚本.即,它将根据相应脚本中的脚本在相应数据库中创建存储过程.文本文件,运行过程以获取结果,然后再次删除存储过程.

请注意,我们以前有存储过程,因为这些搜索不是基于对单个表的常规选择查询,这有点乏味,涉及基于少量条件的更多脚本.

在上述情况下,搜索是否还可以进行其他处理?

谢谢

Vijay

解决方案

它们将存储在您的数据层中,与存储在proc中的代码相同,它们将与SQL在数据层中存在.

Hi,

Our requirement is to create searches on different sql server databases on different tables. Previously through our admin pages, we were creating stored procedures in the databases itself and when the actual search was to perform through other client application, it used to run those stored procedures in the databases relevant to selected search. But we found that the stored procedures were coming in large numbers and we dont want to burden the databases and customer will not like the additional scripts in their databases.

So now we do not want to store the create and store procedures in the respective databases. But my confusion is to where then the scripts necessary for the searches to be stored? without the SPs in the databases how to perform the searches? Should they be stored as text files at a common folder and when the search is run form the client application, it will use the script from the respective text file.. i.e. it will create the stored procedure in the respective database from the script in the text file, run the procedure to get the results and drop the stored procedure again.

Note that we used to have stored procedures as these searches are not based on normal select query on a single table, it is bit tedious involved more script based on few conditions.

Is there any other work around for the searches to run in the above scenario?

Thanks

Vijay

解决方案

They would be stored in your data layer, the same code that would have been in your stored procs would exist as SQL in your data layer.


这篇关于在数据库中没有过程的搜索(通过管理页面)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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