Hi I found some script online to emptyfile and shrink data files for tempdb.
We have 10 data files and we dont need 10 files now.
USE tempdb
GO
DBCC SHRINKFILE (tempdb3, EMPTYFILE); -- to empty " data file
GO
ALTER DATABASE tempdb
REMOVE FILE tempdb3; --to delete data file
GO
What happens to the temp tables etc created in those files, and will emptying and deleting extra data files cause any data loss?