Go Premium for a chance to win a PS4. Enter to Win

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

MS Adventure works database need to get this database "into" my sqlserver Adventure Works 2014 Full Database Backup.zip

I downloaded:

Adventure Works 2014 Full Database Backup.zip

from codeplex.

I get the zip file (42 MGB) but when I try to decompress it all I get is a 42 MGB .bak file
named AdventureWorks2014.bak



I want to have all contents of database in original zip file placed into my sql server 2014 app on my machine.


Problem 1 I cannot "unzip" the back file

Question 1: After I do somehow get all files extracted is it then a simple process of using sql server management to open the database from the resulting unpacked files above?
0
smcsmc1
Asked:
smcsmc1
  • 2
2 Solutions
 
ste5anSenior DeveloperCommented:
You need to restore the database. See alse RESTORE (Transact-SQL). E.g. something like

USE [master]

RESTORE DATABASE AdventureWorks2014
	FROM DISK= 'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Backup\AdventureWorks2014.bak'
	WITH MOVE 'AdventureWorks2014_data' 
		TO 'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\AdventureWorks2014.mdf',
	MOVE 'AdventureWorks2014_Log' 
		TO 'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\AdventureWorks2014.ldf',
	REPLACE;

Open in new window

0
 
smcsmc1Author Commented:
OK, how does this relate to the .bak file

I am total newbie to SQL server (know DB concepts, SQL etc but not UI)

I have a 42 MGB .bak file how do I get data out of it? I need step by step, thanks
0
 
ste5anSenior DeveloperCommented:
OK, how does this relate to the .bak file
 I am total newbie to SQL server (know DB concepts, SQL etc but not UI)
 I have a 42 MGB .bak file how do I get data out of it? I need step by step, thanks

Follow the link and read it. It's a backup file. So you need to restore it.

Transact-SQL statements can be written and submitted to the Database Engine in the following
ways:
•   By using SQL Server Management Studio, which is available as
a free download from the Microsoft Download Center.  
•  By using the sqlcmd utility, which is installed with the client utils.
•  By connecting from an application that you create.
0
 
ValentinoVBI ConsultantCommented:
Open Management Studio, connect to your database engine, right-click the Databases node in Object Explorer and select Restore Database.

Select the Device radio button and select your .BAK file.  Those are basically the steps needed.

More info: Restore a Database Backup (SQL Server Management Studio)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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