SQL Server Search Stored Procedure and View Text
Apr 9, 2026 / · 6 min read · sql server sql scripts sys.sql_modules sys.objects stored procedures views database administration object search maintenance scripts schema management ·Search Stored Procedure and View Definitions in SQL Server This script searches the text of stored procedures, views, functions, and triggers in the current database using sys.sql_modules, returning any programmable object whose name or definition contains a given keyword. Purpose and Overview Finding which stored …
Read MoreSQL Server Object Permissions: Generate GRANT Statements
Aug 8, 2025 / · 5 min read · sql server database security permissions grant statements database administration sql scripts security database objects sysobjects sys.objects ·SQL Server Object-Level Permissions Script: Generate GRANT Statements for Database Security Database security is a critical aspect of SQL Server administration, and managing permissions at the object level can be time-consuming when done manually. This SQL Server script automates the process of generating GRANT …
Read MoreGenerate SQL Server Space Usage Commands for All User Tables
Aug 7, 2025 / · 4 min read · sql server database administration t-sql space management database monitoring table analysis system tables database scripts sp_spaceused sys.tables sysobjects sys.objects ·Generate SQL Server Space Usage Commands for All User Tables Managing database storage is a critical aspect of SQL Server administration. Understanding how much space each table consumes helps database administrators make informed decisions about maintenance, archiving, and performance optimization. This article …
Read MoreGenerate DBCC SHOWCONTIG Commands for All SQL Server Tables
Generate DBCC SHOWCONTIG Commands for All User Tables in SQL Server Database administrators frequently need to monitor table and index fragmentation to maintain optimal database performance. This SQL Server script provides an efficient way to generate DBCC SHOWCONTIG commands for all user tables in your database …
Read More