Mega Search
23.2 Million


Sign Up

Make a donation  
Restoring a .bak file  
News Group: microsoft.public.sqlserver.server

Can anyone please tell me how I might restore a .bak file to a fresh, new db using SQL Management Studio 2008 ?

Thanks, Ive just been unable to find any documentation on this at all. RVic

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 5-Aug-2013, at 10:45 AM EST
From: RVic
 
Re: Restoring a .BAK file  
News Group: microsoft.public.sqlserver.server
RVic (rvince99@gmail.com) writes:
> Can anyone please tell me how I might restore a .bak file to a fresh,
> new db using SQL Management Studio 2008 ? 
> 

http://technet.microsoft.com/en-us/library/ms190372%28v=sql.100%29.aspx

Or first do:

RESTORE FILELISTONLY FROM DISK = ''

Make note of the names in the first column. Here I will assume that they
are yourdb and yourdb_log

RESTORE DATABASE yourdb FROM DISK = ''
WITH MOVE 'yourdb' TO '.mdf',
     MOVE 'yourdb_log' TO '.ldf'

If the database has more files, you need to list them all.


-- 
Erland Sommarskog, Stockholm, esquel@sommarskog.se

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 5-Aug-2013, at 9:41 PM EST
From: Erland Sommarskog
 
Re: Restoring a .BAK file  
News Group: microsoft.public.sqlserver.server
On  5-Aug-2013, RVic  wrote:

> Can anyone please tell me how I might restore a .bak file to a fresh, new
> db using SQL Management Studio 2008 ?
>
> Thanks, Ive just been unable to find any documentation on this at all.
> RVic

It really depends on what tool was used to perform the backup. Numerous
providers of backup solutions use the default of .bak for their backup
files. They are not all compatible with each other. Generally you must use
the same tool to do a restoration from a backup file as was used to create
that backup file.

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 5-Aug-2013, at 7:51 PM EST
From: Kirby Grant
 
Re: Restoring a .BAK file  
News Group: microsoft.public.sqlserver.server
On Tuesday, August 6, 2013 1:45:25 AM UTC+8, RVic wrote:
> Can anyone please tell me how I might restore a .bak file to a fresh, new db using SQL Management Studio 2008 ?
> 
> 
> 
> Thanks, Ive just been unable to find any documentation on this at all. RVic

Hi, 

You can use the UI of SSMS to Restore your .bak file to the New DB

Thanks

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 3-Feb-2014, at 7:11 PM EST
From: King Mhar Bayato