1

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'?

MrVimes
  • 3,212
  • 10
  • 39
  • 57

1 Answers1

1

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.

Paul Williams
  • 16,585
  • 5
  • 47
  • 82
  • The file dates should also give you an indication: i.e. Date Modified – Tanner Jul 02 '14 at 13:27
  • Tanner, I thought of that, but the date modified date on the other files is old. I suspect the OS can't reliably determine the date modified date until the files are 'finished with'. I notice the same phenomenon on IIS log files that are locked by IIS. – MrVimes Jul 02 '14 at 13:35
  • Thanks @Paul. I removed them and nothing exploded. – MrVimes Jul 02 '14 at 15:24