• PearlJammer1 - Thursday, February 28, 2013 8:02 AM

    apologies for this i am having problems !when i try to run a dbcc shrinkfile i get an error saying "Could not locate file 'tempdev2' for database tempdb in sys.database_files. The file either does not exist or was dropped.When i browse to the location i can see the physical file - am i ok just to delete this ?the properties of the database when using SSMS show the file as well !

    I was reading the thread and saw that you didn't explain how you removed the additional tempdev file. For anyone else reading this thread, removing the quotes from tempdev2 should fixed it.
    DBCC SHRINKFILE (tempdev2, emptyfile)
    ALTER DATABASE tempdb REMOVE FILE tempdev2
    FYI, in SQL 2017 the additional files is now named tempdb_mssql_2 instead of tempdev2.