Is there a way to find out the progress of
DBCC SHRINKFILE statement?
Here is how I was running it
dbcc shrinkfile('main_data', 250000)
I am running above statement on both SQL Server 2005 and 2008.
[UPDATE] Here is the query I ran to check the progress and the text that's being run.
select T.text, R.Status, R.Command, DatabaseName = db_name(R.database_id) , R.cpu_time, R.total_elapsed_time, R.percent_complete from sys.dm_exec_requests R cross apply sys.dm_exec_sql_text(R.sql_handle) T