To find the most used data files on SQL Server, you can use the sys.dm_io_virtual_file_stats dynamic management view. This view contains statistics about the I/O activity of all the data files in the database. To use this view, you can run the following query: This query returns the following columns: The query orders the results by the num_of_bytes_written column in …

Query to find the most used data files on SQL Server Read more »

Merry Christmas! 2022-12-25 00:00:00.000 This output shows that the query is only returning user tables with an even object ID and the date is December 25th, and it is displaying the “Merry Christmas!” greeting and the current date. Here is another Christmas-themed query for SQL Server that retrieves a list of Christmas gifts from a table: This query uses the …

Merry Christmas! 2022-12-25 00:00:00.000 Read more »