With SQL Server 2017, a new dmv named sys.dm_tran_version_store_space_usage was announced to find out which database uses how much space due to row versioning in tempdb.
Especially if you are using Read Committed Snapshot (RCSI) or SNAPSHOT Isolation levels, this dmw will help you a lot to manage the size of temdb.
You can query as follows.
1 2 3 4 5 | SELECT DB_NAME(database_id) as 'Database_Name', reserved_page_count, reserved_space_kb FROM sys.dm_tran_version_store_space_usage; |