Category SQL Server

Columnstore Index Support and SQL Server 2012

Columnstore indexes and batch-query execution mode are deeply integrated in SQL Server 2012, and they work in conjunction with many of the Database Engine features found in SQL Server 2012. For example, database administrators can implement a columnstore index on…

Get Object Names Based on Parameter

If we now the parameter name and want to know the Objects using that parameter then in that case we can use the below stored procedure to retrive the Object Names /*********************************************************************** * Author : V.U.M.Sastry Sagi * Date   :…

SP_Depends Wont Work

I had observed that sp_depends wont work properly in many scenarios. So i had wrote this code to fetch the dependent objects on a table. /*********************************************************************** * Author : V.U.M.Sastry Sagi * Date   : 11/11/2011 * Purpose: Returns all Objects…

Finding Possible Bad Indexes in SQL Server

CREATE PROCEDURE FindPossibleBadIndex AS BEGIN — Possible bad Indexes (writes > reads) DECLARE @dbid INT SELECT @dbid = DB_ID() SELECT ‘Table Name’ = OBJECT_NAME(s.object_id), ‘Index Name’ = i.name, i.index_id, ‘Total #of Writes’ = user_updates, ‘Total #of Reads’ = user_seeks +…

Finding Missing Indexes

The Below script will brings the Missing Indexes in the databases — =================================================== — Author: V.U.M.Sastry Sagi — Create date: 01/30/2011 — Description: Fetches the Missing Indexes — =================================================== CREATE PROCEDURE [DBO].[FINDMISSINGINDEXES] AS BEGIN SELECT MID.STATEMENT, MIGS.AVG_TOTAL_USER_COST * ( MIGS.AVG_USER_IMPACT…

Finding the size of the Tables inside a DB

The Below code will fetches each Table Name,# of Rows in that table, Reserved Size, Index Size,UnUsed Space in the given Database. — =================================================== — Author: V.U.M.Sastry Sagi — Create date: 01/12/2011 — Description: Fetches the tables and the size…