Solved

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

Posted on 2014-09-23
4
1,297 Views
Last Modified: 2014-09-25
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
Comment
Question by:smcsmc1
  • 2
4 Comments
 
LVL 33

Assisted Solution

by:ste5an
ste5an earned 250 total points
ID: 40341060
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
 

Author Comment

by:smcsmc1
ID: 40341457
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
 
LVL 33

Expert Comment

by:ste5an
ID: 40341559
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
 
LVL 37

Accepted Solution

by:
ValentinoV earned 250 total points
ID: 40341873
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

914 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now