We often have the situations where we want to find string in all the stored procedures in a database. Some of the situations are listed below
System.sql_modules and sys.syscomments system views can be used to dig into the definition of objects and search if any other object is used in the definition or not. Let's suppose if I am looking for comments in objects Creator Name=Aamir. I can use both system views to find out required information by using below queries.
SELECT OBJECT_NAME(OBJECT_ID) AS ObjectName,
definition AS ObjectDefinition
FROM sys.sql_modules
WHERE definition LIKE '%Creator Name=Aamir%'
SELECT OBJECT_NAME(id) AS ObjectName,
TEXT AS ObjectDefinition
FROM sys.syscomments
WHERE TEXT LIKE '%Creator Name=Aamir%'
- Find out how many stored procedure are using Cross Database Queries, so we want to search for Database name in all the stored procedures in a database.
- Find out in how many stored procedure a table/view is used in a Database? This can be situation where we are planning to change the name of table/view and want to make sure if any Stored Procedure/s will be effected.
- Find out a column name used in Stored Procedure/s in SQL Server Database.
- Find out some comments in all the Stored Procedure to see who created those Stored Procedure, if Creator name is used in the comments.
System.sql_modules and sys.syscomments system views can be used to dig into the definition of objects and search if any other object is used in the definition or not. Let's suppose if I am looking for comments in objects Creator Name=Aamir. I can use both system views to find out required information by using below queries.
SELECT OBJECT_NAME(OBJECT_ID) AS ObjectName,
definition AS ObjectDefinition
FROM sys.sql_modules
WHERE definition LIKE '%Creator Name=Aamir%'
SELECT OBJECT_NAME(id) AS ObjectName,
TEXT AS ObjectDefinition
FROM sys.syscomments
WHERE TEXT LIKE '%Creator Name=Aamir%'
Fig 1: Search String in all Stored Procedures in SQL Server Database
I enjoyed reading your article. Please make more interesting topics like this on.
ReplyDeleteI'll come back for more :)
From Japs a researcher from AOC, a company whois into ecommerce website design Sydney
Even when you are looking at inexpensive materials, an L-shaped desk is still an investment! It is crucial that the desk you choose fits your needs and be able to provide you with the storage as well as workspace necessary to carry out your goals.
ReplyDeletereplica watches uk, combining elegant style and cutting-edge technology, a variety of styles of replica cartier watches, the pointer walks between your exclusive taste style.
ReplyDeleteThis is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. find out more
ReplyDeleteWell, that’s the first time on your blog but I really like your post.
ReplyDeleteI have my own blog where I post about E Scooter App Development and much more take a look.
Please share more like that. buy likes on instagram app
ReplyDeleteBeauty is one's ability to generate light through character. Light requires energy. Energy requires movement. Character implies self confidence and self esteem. Character also implies wisdom gained through experience. Beauty is, therefore, character in motion. Ecommerce savona
ReplyDeleteI have bookmarked your website because this site contains valuable information in it. I am really happy with articles quality and presentation. Thanks a lot for keeping great stuff. I am very much thankful for this site. Ecommerce Liguria
ReplyDeleteThis is actually the kind of information I have been trying to find. Thank you for writing this information. buy 500 instagram likes uk
ReplyDelete
ReplyDeleteشركات نقل عفش فى خميس مشيط
شركة تسليك مجارى بخميس مشيط
شركة تنظيف بابها و بخميس مشيط
شركة تنظيف بالخميس
شركة تنظيف بخميس
شركة كشف تسريبات المياة وارتفاع فاتورة المياه
شركة تنظيف المنازل والفلل
This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck. subtle signs he's not into you..ruhul Amin
ReplyDeleteperte de poids de Laurence Boccolini
ReplyDeletecarla moreau chirurgie esthétique
https://clinique-equilibre-lifting-visage.com/lifting-visage-tunisie/
https://clinique-equilibre-lifting-visage.com/lifting-cervico-facial-tunisie/
https://clinique-equilibre-lifting-visage.com/lifting-temporal-tunisie/
https://www.chirurgie-obesite-tunisie.net/
ReplyDeleteBypass Tunisie prix
Mini bypass Tunisie prix
Sleeve Tunisie prix
Prix anneau gastrique Tunisie
Prix abdominoplastie en Tunisie
ReplyDeleteMini abdominoplastie en Tunisie prix
Abdominoplastie en Tunisie tarif
Liposuccion culotte cheval Tunisie
ReplyDeleteLiposuccion fesses Tunisie prix
Liposuccion jambes Tunisie prix
Lipolyse laser Tunisie
ReplyDeleteReduction mammaire Tunisie
Liposuccion Tunisie tout compris
PRP cheveux en Tunisie
Abdominoplastie en Tunisie prix
Blanchiment dentaire Tunisie tarif
Chirurgie esthétique Tunisie pas cher
Prix lifting cuisses Tunisie
Facette dentaire en Tunisie prix
Sleeve en Tunisie
Chirurgie mammaire Tunisie
ReplyDeleteImplants mammaires Tunisie
Lipofilling mammaire Tunisie prix
Reconstruction seins Tunisie prix
Séjour médical Tunisie
Avis chirurgie mammaire en Tunisie
cryolipolyse tunisie
ReplyDeletechirurgie mammaire
ReplyDeleteprothèse mammaire
sejour chirurgie mammaire
Augmentation mammaire témoignage
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteliposuccion tunisie
ReplyDelete
ReplyDeleteaugmentation mammaire Tunisie
lifting mammaire Tunisie
reduction mammaire Tunisie
lipofilling mammaire Tunisie
augmentation mammaire et allaitement
ReplyDeletechirurgie esthetique paris
chirurgie ventre plat paris
liposuccion ventre paris
lifting des cuisses paris
augmentation mammaire paris
lifting des bras paris
lifting mammaire sans prothese paris
ReplyDeletereduction mammaire paris avis
mini lifting visage paris
chirurgie nez paris
blépharoplastie paris avis
facette dentaire prix france
implant dentaire paris
clinique chirurgie esthetique Tunisie
ReplyDeletechirurgie esthetique Tunisie avis
ReplyDeletechirurgie visage Tunisie
rhinoplastie Tunisie
blepharoplastie Tunisie
lip lift Tunisie
prp Tunisie
chirurgie esthetique Tunisie
ReplyDeleteclinique esthetique Tunisie
rhinoplastie Tunisie
augmentation mammaire Tunisie
greffe cheveux Tunisie
abdominoplastie Tunisie
sleeve Tunisie
I truly welcome the sort of points you post here. A debt of gratitude is in order for sharing us an incredible data that is really useful. Great day! 192.168.1.254
ReplyDeleteThis is my first time visit to your blog and I am very interested in the articles that you serve. Provide enough knowledge for me. Thank you for sharing useful and don't forget, keep sharing useful info: shopify dropshipping websites for sale
ReplyDelete