Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 399
  • Last Modified:

how to open sql.bak file in SQL Studio managment express

I download a back database file 8GB to my XP local computer and i am trying to open it with SQL Stuido managment express

i added .mdf to the file name and i double click on the file and choose to open it with SSME and vizard installation of SQL Server 2005 started and finish ok without errors or warnning but at the end a meassge show that file can not be open (see attachment)

what i am doing wrong? or how i can open the .bak file

Thanks
Gvilbis
open-sql-db.JPG
0
gvilbis
Asked:
gvilbis
4 Solutions
 
EddyvanOpdorpCommented:
Hi,

You must create a new database with the same name.
Choos restore for that database, and restore from disk. Selecte the .bak file.

See here:
http://msdn.microsoft.com/en-us/library/ms177429.aspx
0
 
Matt BowlerDB team leadCommented:
Yep - this looks like a backup file and will need to be restored to a SQL Server instance - nothing useful can be gained from 'opening' this file...

Do you have SSME installed on the machine you are working on? How about SQL Server?
0
 
David ToddSenior DBACommented:
Hi,

>>You must create a new database with the same name.

Wrong, the restored database can be called - within reason - anythingyoulike!

If the database is from another SQL instance, from memory you need to specify with replace.

If the database is restored to something other than original database you need to specify with replace.

If specifying with replace, need to specify the mapping between logical filenames and physical filenames.

Its a good practice to always specify the mapping between logical filenames and physical filenames and not just accept the default location/filename.

HTH
  David
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Anthony PerkinsCommented:
This is a duplicate question and should be deleted, please see here:
http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/Q_28139818.html
0
 
Anthony PerkinsCommented:
Mind boggling.
0
 
David ToddSenior DBACommented:
Hi Antony

>> Mind boggling
Yip, only got a grade of B for that solution. I thought it deserved at least an A <wry grin>

Regards
  David
0
 
Anthony PerkinsCommented:
Yes, not to mention that my non-solution was "awarded" points which sort of defeats the point of this site.  Rather sad considering the author has been a member for nearly 3 years.
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now