﻿1
00:00:00,860 --> 00:00:06,690
in this<font color="#E5E5E5"> video I'll walk you</font><font color="#CCCCCC"> through how</font>

2
00:00:03,990 --> 00:00:10,980
<font color="#CCCCCC">to backup</font><font color="#E5E5E5"> and restore a database in</font>

3
00:00:06,690 --> 00:00:13,349
sequel server 2012 to backup<font color="#CCCCCC"> a database</font>

4
00:00:10,980 --> 00:00:16,199
first<font color="#E5E5E5"> launch management studio and</font>

5
00:00:13,349 --> 00:00:20,250
connect<font color="#CCCCCC"> to</font><font color="#E5E5E5"> your server instance then</font>

6
00:00:16,199 --> 00:00:23,609
expand databases and right click<font color="#E5E5E5"> on the</font>

7
00:00:20,250 --> 00:00:32,549
database that<font color="#E5E5E5"> you</font><font color="#CCCCCC"> want to backup</font><font color="#E5E5E5"> go to</font>

8
00:00:23,609 --> 00:00:34,770
tasks and click on backup<font color="#E5E5E5"> first make</font>

9
00:00:32,549 --> 00:00:37,050
<font color="#CCCCCC">sure that the database selected in a</font>

10
00:00:34,770 --> 00:00:42,870
<font color="#CCCCCC">drop-down is the correct database you</font>

11
00:00:37,050 --> 00:00:45,260
want<font color="#E5E5E5"> to backup under backup type we have</font>

12
00:00:42,870 --> 00:00:48,360
<font color="#CCCCCC">the option to perform a full a</font>

13
00:00:45,260 --> 00:00:52,260
differential<font color="#E5E5E5"> or a transaction log backup</font>

14
00:00:48,360 --> 00:00:54,750
<font color="#E5E5E5">a full backup backs up the entire</font>

15
00:00:52,260 --> 00:00:58,430
<font color="#E5E5E5">database including the transaction log</font>

16
00:00:54,750 --> 00:01:01,289
<font color="#E5E5E5">it includes all the data in the database</font>

17
00:00:58,430 --> 00:01:04,199
<font color="#E5E5E5">but</font><font color="#CCCCCC"> the problem with full backups</font><font color="#E5E5E5"> is</font>

18
00:01:01,289 --> 00:01:06,270
that the larger a database<font color="#E5E5E5"> gets the</font>

19
00:01:04,199 --> 00:01:09,360
<font color="#E5E5E5">longer it takes</font><font color="#CCCCCC"> for these backups to</font>

20
00:01:06,270 --> 00:01:12,960
complete and also the size of the backup

21
00:01:09,360 --> 00:01:15,650
file becomes larger so we<font color="#CCCCCC"> have the</font>

22
00:01:12,960 --> 00:01:19,530
<font color="#E5E5E5">option</font><font color="#CCCCCC"> to create differential backups</font>

23
00:01:15,650 --> 00:01:22,049
<font color="#E5E5E5">now this type of backup it only backs</font>

24
00:01:19,530 --> 00:01:25,530
out the data<font color="#E5E5E5"> that was changed since the</font>

25
00:01:22,049 --> 00:01:28,290
last<font color="#E5E5E5"> full backup since it's only taking</font>

26
00:01:25,530 --> 00:01:32,840
<font color="#CCCCCC">the changes these differential backups</font>

27
00:01:28,290 --> 00:01:35,970
are usually much<font color="#CCCCCC"> smaller and run faster</font>

28
00:01:32,840 --> 00:01:39,930
<font color="#CCCCCC">for the transaction log backup option</font>

29
00:01:35,970 --> 00:01:41,700
this backs up the contents of<font color="#CCCCCC"> your</font>

30
00:01:39,930 --> 00:01:43,860
transaction log and it backs<font color="#E5E5E5"> up</font>

31
00:01:41,700 --> 00:01:46,470
everything<font color="#E5E5E5"> since the last time the</font>

32
00:01:43,860 --> 00:01:48,659
transactional log was backed up the

33
00:01:46,470 --> 00:01:50,220
transaction<font color="#CCCCCC"> log</font><font color="#E5E5E5"> contains all the</font>

34
00:01:48,659 --> 00:01:52,860
transactions<font color="#CCCCCC"> executes against the</font>

35
00:01:50,220 --> 00:01:55,590
<font color="#E5E5E5">database since the last time</font><font color="#CCCCCC"> it was</font>

36
00:01:52,860 --> 00:01:58,259
<font color="#E5E5E5">backed up this gives you the ability to</font>

37
00:01:55,590 --> 00:01:59,030
recover the database to a<font color="#E5E5E5"> specific point</font>

38
00:01:58,259 --> 00:02:01,710
in<font color="#CCCCCC"> time</font>

39
00:01:59,030 --> 00:02:03,810
<font color="#E5E5E5">now since the differential and</font>

40
00:02:01,710 --> 00:02:07,559
transactional log backups don't<font color="#CCCCCC"> backup</font>

41
00:02:03,810 --> 00:02:11,220
the full database you do need a full

42
00:02:07,560 --> 00:02:12,840
database backup in order to<font color="#E5E5E5"> restore your</font>

43
00:02:11,220 --> 00:02:17,220
differential and your true

44
00:02:12,840 --> 00:02:22,769
<font color="#CCCCCC">log backups a four-hour backup</font><font color="#E5E5E5"> will</font>

45
00:02:17,220 --> 00:02:25,470
select full and specify<font color="#CCCCCC"> the location</font>

46
00:02:22,769 --> 00:02:29,040
where<font color="#E5E5E5"> we want</font><font color="#CCCCCC"> to store the backup</font><font color="#E5E5E5"> here</font>

47
00:02:25,470 --> 00:02:34,670
<font color="#E5E5E5">I'm going to create my backup in the</font><font color="#CCCCCC"> C</font>

48
00:02:29,040 --> 00:02:34,670
backup folder and call it test<font color="#E5E5E5"> DB</font><font color="#CCCCCC"> 1</font><font color="#E5E5E5"> bak</font>

49
00:02:36,049 --> 00:02:45,030
click<font color="#E5E5E5"> OK and it will create the backup</font>

50
00:02:38,610 --> 00:02:49,380
<font color="#E5E5E5">for</font><font color="#CCCCCC"> us so now if we go to the</font><font color="#E5E5E5"> backup</font>

51
00:02:45,030 --> 00:02:53,970
<font color="#E5E5E5">folder under seat backup we see that it</font>

52
00:02:49,380 --> 00:02:55,349
just<font color="#CCCCCC"> now created</font><font color="#E5E5E5"> our test DB back to</font>

53
00:02:53,970 --> 00:02:58,579
restore this<font color="#E5E5E5"> backup</font>

54
00:02:55,349 --> 00:03:01,679
we can go back<font color="#CCCCCC"> to management studio</font>

55
00:02:58,579 --> 00:03:07,920
<font color="#E5E5E5">right click on databases and select</font>

56
00:03:01,680 --> 00:03:10,739
<font color="#E5E5E5">restore database so the first step is to</font>

57
00:03:07,920 --> 00:03:14,099
select<font color="#E5E5E5"> the source and the source will be</font>

58
00:03:10,739 --> 00:03:17,310
the backup<font color="#E5E5E5"> file that we just created so</font>

59
00:03:14,099 --> 00:03:20,810
select<font color="#CCCCCC"> device and let's navigate to</font><font color="#E5E5E5"> that</font>

60
00:03:17,310 --> 00:03:20,810
location and<font color="#CCCCCC"> select it</font>

61
00:03:29,020 --> 00:03:34,590
the next step is to specify<font color="#E5E5E5"> the</font>

62
00:03:31,270 --> 00:03:38,140
destination<font color="#E5E5E5"> and by default</font><font color="#CCCCCC"> is going</font><font color="#E5E5E5"> to</font>

63
00:03:34,590 --> 00:03:41,020
keep the original<font color="#E5E5E5"> database name testdb</font><font color="#CCCCCC"> 1</font>

64
00:03:38,140 --> 00:03:45,010
and if you<font color="#E5E5E5"> leave it</font><font color="#CCCCCC"> like this</font><font color="#E5E5E5"> it's going</font>

65
00:03:41,020 --> 00:03:47,160
<font color="#E5E5E5">to restore over this database if you</font>

66
00:03:45,010 --> 00:03:50,260
don't want to wipe out this<font color="#E5E5E5"> database</font>

67
00:03:47,160 --> 00:03:52,870
what you can do is restore as a

68
00:03:50,260 --> 00:03:56,620
different database name so we<font color="#CCCCCC"> can</font>

69
00:03:52,870 --> 00:04:00,520
<font color="#E5E5E5">restore as</font><font color="#CCCCCC"> tests db2 and the other thing</font>

70
00:03:56,620 --> 00:04:06,090
is we need to change<font color="#E5E5E5"> the physical file</font>

71
00:04:00,520 --> 00:04:12,760
name for<font color="#CCCCCC"> test db2</font><font color="#E5E5E5"> so click on files and</font>

72
00:04:06,090 --> 00:04:15,550
under restore as if we scroll all<font color="#CCCCCC"> the</font>

73
00:04:12,760 --> 00:04:18,789
way to<font color="#E5E5E5"> the right you'll see that the</font>

74
00:04:15,550 --> 00:04:21,040
physical<font color="#E5E5E5"> file name is</font><font color="#CCCCCC"> test DB 1 2 MDF we</font>

75
00:04:18,790 --> 00:04:25,600
just want to change that to<font color="#E5E5E5"> test DB to</font>

76
00:04:21,040 --> 00:04:30,730
the MDF and the same thing<font color="#E5E5E5"> for the log</font>

77
00:04:25,600 --> 00:04:34,990
file test DB to underscore log<font color="#CCCCCC"> the LDF</font>

78
00:04:30,730 --> 00:04:43,840
and once you have<font color="#E5E5E5"> that we're set and we</font>

79
00:04:34,990 --> 00:04:45,970
could click OK to begin<font color="#E5E5E5"> the restore now</font>

80
00:04:43,840 --> 00:04:49,750
if you go<font color="#E5E5E5"> back to management studio and</font>

81
00:04:45,970 --> 00:04:53,410
refresh databases you'll see that both

82
00:04:49,750 --> 00:04:56,280
<font color="#E5E5E5">tests DB 1 and testdb 2 are available</font>

83
00:04:53,410 --> 00:04:56,280
<font color="#CCCCCC">for you to use</font>


