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,341 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

This is about my first experience with programming Arduino.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

830 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