Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2011-03-14
7
Medium Priority
?
305 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 2000 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
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

618 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