如何在SQL Server数据库中的任何位置找到值? (在时间较短的大型数据库中) [英] How do I find a value anywhere in a SQL Server Database? (In large database with less time)

查看:78
本文介绍了如何在SQL Server数据库中的任何位置找到值? (在时间较短的大型数据库中)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想得到所有表格的列表,其中包含特定值的列。我已经尝试了谷歌,我发现了许多结果,使用了它,并且发现我的结果高达30%,但在大型数据库上它是'没有回应。我还有一个脚本,但无法找到如何使用这个的方法。请建议我如何使用下面的脚本: -

------------ -------------------------------------------------- -----------------------------



http://fullparam.wordpress.com/ 2012/09/07 / fck-it-i-am-to-search-all-tables-all-collumns / [ ^ ]

----------------------------------------------- ---------------------------------------------

论坛政策的bcoz我已经为script.Plz检查和建议提供了URL请问我如何使用以上

脚本?

-------------------------- -------------------------------------------------- ----------------

,即使有人有新的解决方案,请提供。

I want to get the list of all tables with column where a specific value is peresent.I have tried google and i found many result,used that and also found my result upto 30%, but on large database it''s not responding.I have one more script but unable to find a way that how to use this.Kindly suggest me how to use below script:-
-------------------------------------------------------------------------------------------

http://fullparam.wordpress.com/2012/09/07/fck-it-i-am-going-to-search-all-tables-all-collumns/[^]
--------------------------------------------------------------------------------------------
bcoz of the forum policy i have given url for script.Plz check and suggest me how to use above
script?
--------------------------------------------------------------------------------------------
and even if anyone have some new solution then please provide.

推荐答案

对于大型数据库,您确实需要限制它。也许不要搜索除了那些匹配特定模式的列以外的所有列?

即如果你的值代表姓氏,设置参数@SearchStrColumnName为''%Name%''
Well for large databases you really need to limit it down. Maybe do not search all columns except those that match a certain like pattern?
i.e if your value represents a lastname, setup parameter @SearchStrColumnName as ''%Name%''


这篇关于如何在SQL Server数据库中的任何位置找到值? (在时间较短的大型数据库中)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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