Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,410 --> 00:00:04,290
In this lesson, we'll be taking
a look at Instance Startup,
2
00:00:04,290 --> 00:00:06,930
or in the case of a
single-instance database as
3
00:00:06,930 --> 00:00:10,530
opposed to a RAC, Instance
and Database Startup.
4
00:00:10,530 --> 00:00:13,260
So the process of
startup involves
5
00:00:13,260 --> 00:00:16,710
the database transitioning
between different states,
6
00:00:16,710 --> 00:00:18,960
and each one of those
states, something different
7
00:00:18,960 --> 00:00:21,870
occurs that's important to
the evolution of the startup
8
00:00:21,870 --> 00:00:23,040
process.
9
00:00:23,040 --> 00:00:25,110
And these different
states can actually
10
00:00:25,110 --> 00:00:27,180
be controlled by the DBA.
11
00:00:27,180 --> 00:00:29,100
So there are
situations in which we
12
00:00:29,100 --> 00:00:30,780
want to start up
the database but we
13
00:00:30,780 --> 00:00:34,710
want to stop at some
intermediary state
14
00:00:34,710 --> 00:00:38,820
before we get to the final stage
where startup has completed.
15
00:00:38,820 --> 00:00:41,800
And as the DBA, we
get to control that.
16
00:00:41,800 --> 00:00:45,300
So it's important to understand
those different states.
17
00:00:45,300 --> 00:00:47,790
So the first is
the NOMOUNT state.
18
00:00:47,790 --> 00:00:50,320
So when we start
up the database,
19
00:00:50,320 --> 00:00:54,210
the first state that's
entered is the NOMOUNT state.
20
00:00:54,210 --> 00:00:57,160
And at that point, the
parameter file is read,
21
00:00:57,160 --> 00:01:00,840
and so that reads all of the
Oracle Configuration parameters
22
00:01:00,840 --> 00:01:05,030
into memory so that it knows
how to start the instance up.
23
00:01:05,030 --> 00:01:07,670
Next, the memory is allocated.
24
00:01:07,670 --> 00:01:12,200
So that memory in the operating
system is basically fenced off.
25
00:01:12,200 --> 00:01:16,070
So if we have a 2 gigabytes
size of memory that's
26
00:01:16,070 --> 00:01:19,250
been allocated, then the
operating system, essentially,
27
00:01:19,250 --> 00:01:22,280
and Oracle takes that memory,
fences off that memory
28
00:01:22,280 --> 00:01:25,160
for exclusive use by Oracle.
29
00:01:25,160 --> 00:01:27,920
And then lastly, the background
processes are started.
30
00:01:27,920 --> 00:01:31,760
So the PMON process and the SMON
and the checkpoint and the Log
31
00:01:31,760 --> 00:01:33,620
Writer, and all of those
different processes
32
00:01:33,620 --> 00:01:35,450
that do work are started.
33
00:01:35,450 --> 00:01:39,200
So all of that occurs
during the first state
34
00:01:39,200 --> 00:01:44,080
that Oracle enters
during a startup.
35
00:01:44,080 --> 00:01:46,180
Next is the MOUNT state.
36
00:01:46,180 --> 00:01:49,560
So at the MOUNT state, the
Control file is actually read.
37
00:01:49,560 --> 00:01:50,970
So in the NOMOUNT state.
38
00:01:50,970 --> 00:01:52,210
The Parameter file is read.
39
00:01:52,210 --> 00:01:55,920
But in the MOUNT state,
which is the second state,
40
00:01:55,920 --> 00:01:57,610
the Control file is read.
41
00:01:57,610 --> 00:02:01,000
So the Control file knows where
all of the other data files
42
00:02:01,000 --> 00:02:03,610
are, and then a lot
of different things--
43
00:02:03,610 --> 00:02:06,710
even recovery information--
about the database,--
44
00:02:06,710 --> 00:02:09,580
things like the system change
number and where the redo logs
45
00:02:09,580 --> 00:02:12,010
are, the current log
sequence number--
46
00:02:12,010 --> 00:02:13,970
all of those kinds of things.
47
00:02:13,970 --> 00:02:15,950
So the Control file
is read at that point,
48
00:02:15,950 --> 00:02:18,220
and so we could say
that the database knows
49
00:02:18,220 --> 00:02:21,610
much more about itself
during the MOUNT state.
50
00:02:21,610 --> 00:02:23,410
So the data files
become visible,
51
00:02:23,410 --> 00:02:25,180
but they're not available.
52
00:02:25,180 --> 00:02:28,390
That is to say, they're not
available to a user connecting
53
00:02:28,390 --> 00:02:32,120
in who's attempting to
query data or change data.
54
00:02:32,120 --> 00:02:35,500
But the data files do
become visible to the DBA,
55
00:02:35,500 --> 00:02:37,630
and through a couple of
different data dictionary
56
00:02:37,630 --> 00:02:40,340
views, we can look
at those data files.
57
00:02:40,340 --> 00:02:42,850
And the reason for
that is the MOUNT state
58
00:02:42,850 --> 00:02:44,780
is the recovery stage.
59
00:02:44,780 --> 00:02:47,830
So when we need to do a
recovery from some kind of media
60
00:02:47,830 --> 00:02:52,430
failure, we do so
in the MOUNT state.
61
00:02:52,430 --> 00:02:54,550
And finally, the OPEN state--
62
00:02:54,550 --> 00:02:56,710
the final state of start up.
63
00:02:56,710 --> 00:02:59,050
So datafile integrity
is verified.
64
00:02:59,050 --> 00:03:01,450
If any data files are missing--
65
00:03:01,450 --> 00:03:03,310
so if someone has
dropped a data file
66
00:03:03,310 --> 00:03:05,260
or there's a disk
error or something,
67
00:03:05,260 --> 00:03:08,980
then the instance stays
in the MOUNT state.
68
00:03:08,980 --> 00:03:12,490
But if everything is verified
and the integrity is there,
69
00:03:12,490 --> 00:03:15,510
then the database becomes
made available to users.
70
00:03:15,510 --> 00:03:19,220
And so users can connect in,
query against the database,
71
00:03:19,220 --> 00:03:22,770
and then all of the
data is available.
72
00:03:22,770 --> 00:03:25,530
So let's take a look at
some of these states.
73
00:03:25,530 --> 00:03:28,120
We said that we
could control them.
74
00:03:28,120 --> 00:03:31,760
So right now we have a
database that's shut down,
75
00:03:31,760 --> 00:03:33,440
and let's just do a start up.
76
00:03:37,000 --> 00:03:40,050
So notice, in our start up,
the steps that it went through.
77
00:03:40,050 --> 00:03:42,960
So it says Oracle
instance started, and even
78
00:03:42,960 --> 00:03:47,460
gives us the size of the
memory that's been allocated.
79
00:03:47,460 --> 00:03:49,530
So that is the NOMOUNT state.
80
00:03:49,530 --> 00:03:51,060
Parameter file is read.
81
00:03:51,060 --> 00:03:52,740
The instance is started.
82
00:03:52,740 --> 00:03:53,790
Memory's allocated.
83
00:03:53,790 --> 00:03:56,190
Background processes
are allocated--
84
00:03:56,190 --> 00:03:58,140
all in the NOMOUNT state.
85
00:03:58,140 --> 00:04:01,620
Then the next message we get is
that the database is mounted.
86
00:04:01,620 --> 00:04:03,900
So the Control
file has been read.
87
00:04:03,900 --> 00:04:06,780
The data files are
visible but not available.
88
00:04:06,780 --> 00:04:09,720
And then lastly, the
database is opened and made
89
00:04:09,720 --> 00:04:11,220
available to users,
and now we could
90
00:04:11,220 --> 00:04:14,960
connect in with a
database tool and do work.
91
00:04:14,960 --> 00:04:17,130
And I'm going to
shut it down now.
92
00:04:24,700 --> 00:04:27,760
And we'll go through
the different states.
93
00:04:27,760 --> 00:04:30,630
So now the database
is shut down.
94
00:04:30,630 --> 00:04:32,410
Exit out, here.
95
00:04:32,410 --> 00:04:35,540
Clear the screen for
a little clarity.
96
00:04:35,540 --> 00:04:37,310
And so we've connected
in, and it says
97
00:04:37,310 --> 00:04:39,170
connected to an idle instance.
98
00:04:39,170 --> 00:04:42,170
So that'll be the message that
we get when our database is
99
00:04:42,170 --> 00:04:43,340
shut down, all right?
100
00:04:43,340 --> 00:04:44,640
So it's idle.
101
00:04:44,640 --> 00:04:46,490
There's nothing happening in it.
102
00:04:46,490 --> 00:04:49,950
So let's go through the
different states one at a time.
103
00:04:49,950 --> 00:04:52,100
So the first state
is NOMOUNT, and if we
104
00:04:52,100 --> 00:04:54,590
want to enter any
individual state,
105
00:04:54,590 --> 00:04:57,800
we simply type startup, and
then the name of the state.
106
00:04:57,800 --> 00:05:00,170
So if we type
startup open, that's
107
00:05:00,170 --> 00:05:01,710
the same thing as
typing a startup,
108
00:05:01,710 --> 00:05:03,590
because it's going to
go through the NOMOUNT,
109
00:05:03,590 --> 00:05:06,240
then the MOUNT,
then the open state.
110
00:05:06,240 --> 00:05:08,330
So let's try just doing
a startup nomount.
111
00:05:11,840 --> 00:05:14,300
All right, so we issued
a startup nomount,
112
00:05:14,300 --> 00:05:17,180
and the message that we get is
that the instance is started,
113
00:05:17,180 --> 00:05:21,360
and then it shows us the memory
allocation that was done.
114
00:05:21,360 --> 00:05:24,920
No other messages, because
we're only in the NOMOUNT state.
115
00:05:24,920 --> 00:05:28,500
No messages about being
mounted or anything like that.
116
00:05:28,500 --> 00:05:30,530
So the parameter file was read.
117
00:05:30,530 --> 00:05:33,560
The instance was allocated in
terms of memory and background
118
00:05:33,560 --> 00:05:34,640
processes.
119
00:05:34,640 --> 00:05:36,980
And we end the NOMOUNT state.
120
00:05:36,980 --> 00:05:40,160
Now, if we wish to take the
database to the next state--
121
00:05:40,160 --> 00:05:42,720
since we're in the
NOMOUNT state right now,
122
00:05:42,720 --> 00:05:44,630
and we need to bring
it to the next--
123
00:05:44,630 --> 00:05:50,540
we type alter database mount.
124
00:05:50,540 --> 00:05:52,290
So here we've
mounted the database.
125
00:05:52,290 --> 00:05:53,790
We've taken it to the next step.
126
00:05:53,790 --> 00:05:56,510
So behind the scenes, the
Control file was read,
127
00:05:56,510 --> 00:05:59,040
and all of the data
files were located.
128
00:05:59,040 --> 00:06:00,860
So now we're in the MOUNT state.
129
00:06:00,860 --> 00:06:03,800
If we wish to take it the rest
of the way to the OPEN state,
130
00:06:03,800 --> 00:06:08,420
we say alter database open.
131
00:06:08,420 --> 00:06:10,550
So now the database
has been taken manually
132
00:06:10,550 --> 00:06:11,870
through each state--
133
00:06:11,870 --> 00:06:12,400
NOMOUNT.
134
00:06:12,400 --> 00:06:16,340
MOUNT, and OPEN-- and
is available for users.
10795
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.