How do I find a phantom .mdf file in explorer?

I created a database using SQL Server Management Studio.  I have a maintenance plan for my databases - the whole nine yards.  I've been working with the tables etc. for over a year with a Visual Studio interface.  Others are using the database as well.  

So, I need to restore a backup and I cannot find it!  I can't even find the .mdf files!!!!!  This is the path for database file:   d:\program files\ Microsoft SQL Server\ MSSQL.1\MSSQL\Data  I've got our network expert on it as well and we are coming up with nothing in all our searches.

Anyone out there ever have a mystery such as this?  Did you ever solve it?
Karen WilsonAsked:
Who is Participating?
WizillingConnect With a Mentor Commented:
Run these queries.
--- to get the correct machine name
select CAST(SERVERPROPERTY('MachineName') as varchar(25)) AS MachineName

-- to find the database location. check the path of your db here.
select * from sys.sysaltfiles

-- find the backup location.
 select * from msdb.dbo.backupmediafamily
 where media_set_id IN (
      select backup_set_id
       from msdb.dbo.backupset
       where database_name ='YOUR DB NAME HERE'
        and database_creation_date > GETDATE()-30
lcohanDatabase AnalystCommented:
Can you access the server and the database still? If you do just run following sql against it:

select * from sys.sysdatabases

And check the "filename" column

For backup files you could run:

SELECT *  FROM [master].[sys].[backup_devices]

and check "physical_name"
Karen WilsonAuthor Commented:
Okay, we know the file name... and it comes up on Wiz's second query.  

We can't find that file name on the server!!  It's so bizarre....  
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Karen WilsonAuthor Commented:
Here is the filename

d:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Energy.mdf

So I went to explorer and tried to map it the directory because I know that d: = WSTF-Apps.  

I got an error and ran the troubleshooter.  It says that WSTF-Apps exists but Program Files doesn't.  

Any suggestions?  I'm off to a Kid Rock concert so I will check on this later.  Thanks for any direction!!  

are you looking in the d drive of the machine name returned by my first query?

also the file can be hidden(not likely) but have you enabled folder options to view hidden files.

do u have admin access to the sever?
Karen WilsonAuthor Commented:
I am going to try and work with another person today.  Unfortunately, I do not have admin rights to the server.  The server sits across the country so I can't just walk over there and be demanding either.  Thanks for the direction.  I'll keep you posted.  
Karen WilsonAuthor Commented:
I found out that theother contractor's DBAs changed our server name so the maintenance plans were hosed!!  Therefore the phantom file was really a non-existant one!!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.