Category Archives: how to

Creating a new file system in Linux

Here how you would create a new file system : First create a new partition using fdisk. eg: fdisk /dev/sdb     –> Options (m , n,p,1,  ,t,8e,w) Create volume group vgcreate myvg /dev/sdb1 Create a logical volume lvcreate -L … Continue reading

Posted in how to, linux | Tagged , , , , | Leave a comment

Script check the index fragmentation in SQL Server

Today I had a need to find the index fragmentation on one of my sql server database and I found this script buried on my computer, thought I will share it here: DECLARE @DatabaseID int SET @DatabaseID = DB_ID() SELECT … Continue reading

Posted in database, how to, sql server | Tagged , , , | Leave a comment

SQL Server Replication status

Few days back I had to query to my production sql replication server to find what all publications are running and what is the status for each of those. A search on the web found me this (unfortunately I don’t … Continue reading

Posted in database, how to, sql server | Tagged , , , , | Leave a comment

Find SSRS reports that are run

WITH RankedReports AS (SELECT ReportID, TimeStart, UserName, RANK() OVER (PARTITION BY ReportID ORDER BY TimeStart DESC) AS iRank FROM dbo.ExecutionLog t1 JOIN dbo.Catalog t2 ON t1.ReportID = t2.ItemID ) SELECT t2.Name AS ReportName, t1.TimeStart, t1.UserName, t2.Path, t1.ReportID FROM RankedReports t1 … Continue reading

Posted in database, how to, sql server | Tagged , | Leave a comment