0

Trying to detective out what is in a certain file ("HHS_WCE4.ARMV4.CAB"), I searched my hard drive for any references to that. One of the results Fileseek* was in C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Template Data\tempdb.mdf

[consider this an asterisk] Why, oh why, doesn't Windows 7 come with a file search utility? their previous one, although kind of lame in some ways, was still one of the most useful applets/utilities for daily usage.

I tried to open that database to see what reference it could have to "HHS_WCE4.ARMV4.CAB" but it says it can't see itself in one pane after exposing the same thing on another pane:

enter image description here

Am I doing something wrong? Is there another way to examine the contents of tempdb?

Note: I tried to connect to this first via Add Connection > Build data context automatically > Default (LINQ to SQL) > Next > (localdb)\v11.0 > Attach Database File > Test, but get:

enter image description here

B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862

1 Answers1

1

tempdb is not a table, it is a database.

however, you are trying to select from it - you can't treat a database as an object in this case. you have to select from a table.

Dan
  • 10,282
  • 2
  • 37
  • 64
  • Two-clicking it in the left pane does not show me any tables; how can I know what the table names are? – B. Clay Shannon-B. Crow Raven May 07 '14 at 17:02
  • if there are no tables and you're not getting errors it's safe to assume that there are no tables in the `tempdb` database. you shouldn't be trying to access that database anyway, imo - it's used for storing temporary tables – Dan May 07 '14 at 17:04
  • What good is a database with no tables? It is 12,544KB, so it's got to have *something* in it, and a database without tables is like a day without sunshine. – B. Clay Shannon-B. Crow Raven May 07 '14 at 17:12
  • 1
    I don't disagree with you. Tempdb is a table that holds temporary tables that are created during queries. They usually delete themselves after either a) current session ends (creator disconnects) or b) current query ends (end of query). The reason why the tempdb has no tables (currently) is because you haven't created any temporary tables. You probably shouldn't try and manipulate that database because it's contents are volatile and unknown for certain. – Dan May 09 '14 at 07:46