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,279 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 32

Assisted Solution

by:Stefan Hoffmann
Stefan Hoffmann earned 250 total points
Comment Utility
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
Comment Utility
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 32

Expert Comment

by:Stefan Hoffmann
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
topping2 challenge 13 56
MSSQL 2014 Query Synthax 8 38
How to select Week Start and Week End dates 5 24
Sql query 34 16
This is an explanation of a simple data model to help parse a JSON feed
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

744 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

10 Experts available now in Live!

Get 1:1 Help Now