How to use DBCC SHOWFILESTATS result in temp table

  DBCC showfilestats will give you the number of pages are used in extents and number of filgroups are generated for sql server database. If you want to store these information into temporary table then you can use the below query. if not exists (select 1 from sys.objects where object_id = object_id(‘#tmpfilestats’)) begin drop table ...

How to find list of stored procedures in sql server

This query will display list of stored procedure and tables present in databases with their last modified date / updated date. It has one parameter where you can change as per your needs like if you want to find out list of trigger then use ‘TR’ for Trigger and ‘FN’ for function in where clause. ...

How to find string in sql stored procedure

  This query will give you the list of stored procedure or sql server objects that contains the word profile in there definition or data content. select routine_name from information_schema.routines where object_definition(object_id(routine_name)) like ‘%profile%’ OR select object_name(id),* from sys.syscomments where text like ‘%text%’