Skip to content

Instantly share code, notes, and snippets.

@ghotz
Created April 5, 2025 10:07
Show Gist options
  • Save ghotz/5e83746d1cde222f263841b1de5c9d15 to your computer and use it in GitHub Desktop.
Save ghotz/5e83746d1cde222f263841b1de5c9d15 to your computer and use it in GitHub Desktop.
Get seeding stats
SELECT
FLOOR(transferred_size_bytes * 1. / NULLIF(database_size_bytes, 0) * 100) AS Perc
, transfer_rate_bytes_per_second / 1024 / 1024. AS MBSec
, internal_state_desc
, start_time_utc, estimate_time_complete_utc
, FLOOR(transferred_size_bytes / 1024. / 1024. / 1024.) AS transferred_size_GB
, FLOOR(database_size_bytes / 1024. / 1024. / 1024.) AS database_size_bytes_GB
, *
FROM sys.dm_hadr_physical_seeding_stats
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment