Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
aakcse
Aged Yak Warrior
570 Posts |
Posted - 2009-08-25 : 09:51:46
|
| Hi allHow can I search a particular text in entire database user.say suppose I want to see which sp is inserting data into table1. say some thing like if I want to search "insert into table1"Regards,CSE |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2009-08-25 : 10:02:26
|
| Script all objects from the database level (Right Click -> Tasks -> Generate Scripts...), then search the produced file. |
 |
|
|
Nageswar9
Aged Yak Warrior
600 Posts |
Posted - 2009-08-25 : 10:09:13
|
| Hi, Try this onceselect object_name(id) from sys.syscomments where text like '%insert into table1%' |
 |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2009-08-25 : 10:10:31
|
| select object_name(id) from syscomments where text like '%insert into table1%' |
 |
|
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2009-08-25 : 10:21:47
|
| http://connectsql.blogspot.com/2009/08/find-text-used-in-store-procedure.html |
 |
|
|
aakcse
Aged Yak Warrior
570 Posts |
Posted - 2009-08-26 : 06:50:08
|
| Thanks all of you for the comments, each and every reply is helpful Thanks again.Also please let me know how can I mark this thread as answered |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-08-26 : 07:01:22
|
quote: Originally posted by aakcse Thanks all of you for the comments, each and every reply is helpful Thanks again.Also please let me know how can I mark this thread as answered
The only way I know is to edit the topic by appending (Solved)MadhivananFailing to plan is Planning to fail |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2009-08-26 : 07:29:52
|
AlsoSELECT ROUTINE_NAME FROM Information_shcema.ROUTINES WHERE routine_definition like '%insert into table1%' OR, just search for the table name, then look at each SP and see what it is doing to that table in case there is no SPECIFIC insert into ....http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
rohitkumar
Constraint Violating Yak Guru
472 Posts |
Posted - 2009-08-26 : 09:31:31
|
| here's one more...SELECT * FROM sys.sql_modules where definition like '%insert into table1%' |
 |
|
|
|
|
|