Solved

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

Posted on 2011-03-14
7
284 Views
Last Modified: 2012-06-21
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?
0
Comment
Question by:Karen Wilson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 40

Expert Comment

by:lcohan
ID: 35132683
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"
0
 
LVL 13

Accepted Solution

by:
Wizilling earned 500 total points
ID: 35132734
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
 
 )
 
 
0
 

Author Comment

by:Karen Wilson
ID: 35132878
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....  
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 

Author Comment

by:Karen Wilson
ID: 35132980
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!!  

0
 
LVL 13

Expert Comment

by:Wizilling
ID: 35134002
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?
0
 

Author Comment

by:Karen Wilson
ID: 35136891
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.  
0
 

Author Closing Comment

by:Karen Wilson
ID: 35232694
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!!
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question