SQL data file is unknown

Hi, I have a client that sent over a copy or backup of their SQL data.  There was no extension on the file so I didn't know if it was a bak or mdf file.  There is no one to call on this to ask, the company is out of business.

I tried renaming it bak, mdf, and zip to see if I could get it to cooperate, but to no avail.

Question, is there a way to find out what type of file it is?

Thanks all.
DanOwnerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott PletcherSenior DBACommented:
If it's a .BAK, then you should be able to run a:

RESTORE FILELISTONLY FROM DISK = 'x:\path\to\file\without\extension\filename'

If you believe it's an mdf, try CREATE DATABASE ... FOR ATTACH and specify that file as the primary file.

Otherwise, Google for a free utility that can determine the type of file.  But unless it's some other type of backup -- RedGate, for example -- I'm not sure what good it will do you.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Nakul VachhrajaniTechnical Architect, Capgemini IndiaCommented:
Agree. First try to do a standard RESTORE FILELISTONLY or a VERIFYONLY in SQL Server followed by a CREATE DATABASE ... FOR ATTACH.

If these fail, I would suggest downloading the trial versions of a couple of the most popular backup tools. If one of them is able to work with the backup, then you can evaluate purchasing the tool. Some most popular tools that I have seen out in production are
- SQL Backup Pro (RedGate)
- LiteSpeed
- SQL Safe Backup (Idera)
0
DanOwnerAuthor Commented:
Thanks guys, I tried the attach and restore options, would the backup programs restore a file with no extension?  Or do I just start guessing and renaming till I get it right?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Scott PletcherSenior DBACommented:
Yes; SQL doesn't care what the file extension is, or even if you have one.
0
Vitor MontalvãoMSSQL Senior EngineerCommented:
CrunchyTime, do you still need help on this question?
0
DanOwnerAuthor Commented:
Thanks guys, fell off the planet for a while, some SQL manager got it going, don't know what he did.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.

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.