title: TempDB has 2 data files, but SQL Server doesn't know it?
body: <p>I'm on a SQL Server 2008 R2 box. </p>
  
  <p>According to SQL Server, my <code>TempDB</code> looks like this:</p>
  
  <pre><code>CREATE DATABASE [tempdb] ON  PRIMARY 
  ( NAME = N'tempdev', FILENAME = N'D:\Program Files\Microsoft SQL
   Server\MSSQL10_50.MSSQLSERVER\MSSQL\Data\tempdb.mdf' , SIZE = 6499584KB , MAXSIZE = 
  81920000KB , FILEGROWTH = 10%)
  
  LOG ON 
  
  ( NAME = N'templog', FILENAME = N'T:\Program Files\Microsoft SQL 
  Server\MSSQL10_50.MSSQLSERVER\MSSQL\Data\templog.ldf' , SIZE = 512KB , MAXSIZE = 
  UNLIMITED, FILEGROWTH = 10%)
  
  GO
  </code></pre>
  
  <p>Which is fine... Except I have 2 <code>Tempdb</code> files: <code>Tempdb.mdf</code> and <code>Tempdb2.mdf</code>.</p>
  
  <p>I can't find it anywhere in <code>sys.masterdatafiles</code>, I can't delete it in windows -- because it says Windows is using it, and when the first <code>tempdb</code> file grows, it does too, so I know SQL Server is using it. </p>
  
  <p>How can I find this file in SQL Server so I can remove it from use?</p>