Tag: Sql Server
018. find a list of Weekends between given two Dates in SQL Server
This script helps to DBA for finding available weekends between the dates so they can set auto-schedule for database maintenance.
017. Find stored procedures which have used Dynamic Sql
Whenever we are finding some issues in performance, we are also try to avoid Dynamic Sql in Stored Procedure.To avoid
016. Find stored procedures which have used Temporary Table
Whenever we are finding some issues in performance, we are also try to avoid Dynamic Sql in Stored Procedure.To avoid

134. Get all tables from database – SQL Server
Get all tables from database – SQL Server –Get all tables from database – SQL Server SELECT schema_name(t.schema_id) as schema_name,

012. Get all schemas in SQL Server database
Get all schemas in SQL Server database –Get all schemas in SQL Server database SELECT s.name as schema_name, s.schema_id, u.name

006. Find most used column names in database – Sql Server
Find most used column names in database Query: select col.name as ColumnName, count(*) as Tables, cast(100.0 * count(*) / (select