Reputation: 3312
On a sql server I have inherited responsibility for I am getting low on space on the C: drive (about 5gb but I was running profiler and it told me it needed to stop because of low space on C)
I have found some tempdb files being stored in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data
Occupying 10gb each.
I know that tempdb is needed by sql server, so I dug a little deeper. I've found that there is another drive (G) on the server. This drive contains a group of tempdb files.
If I right click on tempdb
in Management studio, click properties, then click files it shows that all the files are stored on this G drive.
So it seems like the ones in the C drive are 'leftovers' from an initial configuration of this sql server. I want to be absolutely sure I am safe to move them off somewhere to free up the space.
Is there any chance that for some obscure behind the scenes reason they are necesary, even though Management studio reports 'tempdb' using the files in another drive?
Is there a way I can check whether the files are 'in-use'?
Upvotes: 1
Views: 137
Reputation: 17020
I would first verify there are no other instances on this machine. If you are sure there are no other SQL instances, then yes, it sounds like those are leftover files that can be deleted.
You can use Process Explorer to determine if a process has the files in use. Choose Find/Find Handle or DLL and enter a substring of the file-- "tempdb", for example.
Upvotes: 1