LizzyYao / DailyPractice

Python practice
0 stars 0 forks source link

Download AdventureWorks DB and restore to your local #4

Closed jackhwl closed 9 years ago

jackhwl commented 9 years ago

AdventureWorks DB download from here:

http://msftdbprodsamples.codeplex.com/releases/view/59211 AdventureWorks2008R2-Full Database Backup.zip AdventureWorks 2008R2 LT Data File

LT is light version, you can work on this one first, when you trying to attach only mdf file you need this article: http://blog.sqlauthority.com/2010/04/26/sql-server-attach-mdf-file-without-ldf-file-in-database/

after you done with LT, you can restore that zip file(bak) , below is how to restore a backup file to new DB, I think it's covered in the video already. https://msdn.microsoft.com/en-us/library/ms177429.aspx

LizzyYao commented 9 years ago

Is this just reminding me? AdventureworksDB download is done already.

jackhwl commented 9 years ago

not really, your local AdventureDB is install automatically by a executable file, what I want you to do is practice on cloud or on your local (by renaming the original or delete original or install new renamed db), use the link I gave to you, since restore DB is very common scenario in daily work, (restore by .bak file or by .mdf file), so you need practice it in this way.

Date: Wed, 24 Jun 2015 13:30:04 -0700 From: notifications@github.com To: PythonPractice@noreply.github.com CC: jackhwl@hotmail.com Subject: Re: [PythonPractice] Download AdventureWorks DB and restore to your local (#4)

Is this just reminding me? AdventureworksDB download is done already.

— Reply to this email directly or view it on GitHub.

jackhwl commented 9 years ago

not really, your local AdventureDB is install automatically by a executable file, what I want you to do is practice on cloud or on your local (by renaming the original or delete original or install new renamed db), use the link I gave to you, since restore DB is very common scenario in daily work, (restore by .bak file or by .mdf file), so you need practice it in this way.

jackhwl commented 9 years ago

if you already downloaded those db from the link:

http://msftdbprodsamples.codeplex.com/releases/view/59211 AdventureWorks2008R2-Full Database Backup.zip AdventureWorks 2008R2 LT Data File

then you need restore it to your local, since you already have those db installed on your local, you need do the following: opt 1: delete all your local AdventureWorka DB, restore the AdventureWorka DB to your local opt 2: rename all your local AdventureWorka DB, restore the AdventureWorka DB to your local opt 3: restore the AdventureWorka DB to your local with another name

this issue is let you practice how to restore a DB from a .bak or .mdf file.

current your local AdventureWork DB is coming from an executable file, in really life you'll never have those executable file for you to install a DB on the machine.

LizzyYao commented 9 years ago

Oh I see. I prefer to do it on my cloud SQL server. I am watching the training video now, I can't leave it on-going. I need that DB for my learning at night. OK, I'll try once I get time.

On Thu, Jun 25, 2015 at 9:29 AM, Jack Huang notifications@github.com wrote:

if you already downloaded those db from the link:

http://msftdbprodsamples.codeplex.com/releases/view/59211 AdventureWorks2008R2-Full Database Backup.zip AdventureWorks 2008R2 LT Data File

then you need restore it to your local, since you already have those db installed on your local, you need do the following: opt 1: delete all your local AdventureWorka DB, restore the AdventureWorka DB to your local opt 2: rename all your local AdventureWorka DB, restore the AdventureWorka DB to your local opt 3: restore the AdventureWorka DB to your local with another name

this issue is let you practice how to restore a DB from a .bak or .mdf file.

current your local AdventureWork DB is coming from an executable file, in really life you'll never have those executable file for you to install a DB on the machine.

— Reply to this email directly or view it on GitHub https://github.com/LizzyYao/PythonPractice/issues/4#issuecomment-115258750 .

LizzyYao commented 9 years ago

attach new db and restore to my local SQL server instance done. I haven't try cloud server yet. you said either this or that. I may try cloud tomorrow.