Author: Yavuz Selim Kart

Listing All Time Zones in SQL Server

Hello everyone, In this article, I will try to give information about listing all time zones in SQL Server. In SQL Server you may want to list all time zones in some cases. You can easily do this using the code below. SELECT * FROM sys.time_zone_info When you run the...

Most Used Database Files in SQL Server

Hello everyone, In this article, I will try to give information about finding the most used database files in SQL Server. In SQL Server, in some cases you may want to find the most used database files. You can easily do this by using the script below. SELECT DB_NAME(DbId) ‘Database...

Finding Unused Index in SQL Server

Hello everyone, In this article, I will try to give information about finding Unused Index values in SQL Server. In SQL Server you may want to find unused Index values in some cases. You can easily do this by using the script below. SELECT TOP 25 o.name AS ObjectName, i.name...

Dropping Temporary Table in SQL Server

Hello everyone, In this article, I will try to give information about how to drop Temp tables in SQL Server. You can easily do this using the code below. CREATE TABLE #TempTable ( ID INT, NameSurname VARCHAR(50) ); IF OBJECT_ID(‘tempdb..#TempTable’) IS NOT NULL DROP TABLE #TempTable; When you run the...

Calculating Available Disk Size in SQL Server

Hello everyone, In this article, I will try to give information about calculating the available disk size in SQL Server. You can easily do this using the code below. SELECT Drive, TotalSpaceGB, FreeSpaceGB, PctFree FROM ( SELECT DISTINCT SUBSTRING(dovs.volume_mount_point, 1, 10) AS Drive, CONVERT(INT, dovs.total_bytes / 1024.0 / 1024.0 /...

Listing Disk Spaces in SQL Server

Hello everyone, In this article, I will talk about how to list disk spaces in SQL Server. In SQL Server, in some cases, it may be desired to display disk spaces with a query. In such cases, we can list the disk spaces using the following query. EXEC master..xp_fixeddrives; When...

Physical Dimensions of Tables in SQL Server

Hello everyone, In this article, I will try to give information about the physical dimensions of Tables in SQL Server. In SQL Server, in some cases, you may want to learn the physical size information of the tables. You can easily do this by using the query below. SELECT t.name...

Don`t copy text!