Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,320 --> 00:00:03,280
In this lesson we're
going to be looking at how
2
00:00:03,280 --> 00:00:05,950
to modify database parameters.
3
00:00:05,950 --> 00:00:10,120
So modifying parameters is
extremely important in the life
4
00:00:10,120 --> 00:00:13,210
of a DBA, because
database parameters
5
00:00:13,210 --> 00:00:17,650
will control every aspect of
how the database operates.
6
00:00:17,650 --> 00:00:20,830
So we have two types of
parameters in the database.
7
00:00:20,830 --> 00:00:24,430
We have dynamic parameters
and static parameters.
8
00:00:24,430 --> 00:00:27,790
Dynamic parameters
can be modified hot
9
00:00:27,790 --> 00:00:29,830
if an spfile is used.
10
00:00:29,830 --> 00:00:32,930
So we must start up the
database with an spfile,
11
00:00:32,930 --> 00:00:34,600
which is the default method.
12
00:00:34,600 --> 00:00:37,660
And as long as we do, there
are dynamic parameters
13
00:00:37,660 --> 00:00:40,900
that we can change while
the database is still open.
14
00:00:40,900 --> 00:00:42,790
So this is radically
different than if we
15
00:00:42,790 --> 00:00:45,310
were to use a pfile,
where we would have
16
00:00:45,310 --> 00:00:47,920
to restart the database
anytime we changed
17
00:00:47,920 --> 00:00:50,020
any of the database parameters.
18
00:00:50,020 --> 00:00:52,930
So the spfile is highly
recommended and is the default
19
00:00:52,930 --> 00:00:55,060
method, because it
gives us the ability
20
00:00:55,060 --> 00:00:58,750
to change some, not all, but
many parameters and the amount
21
00:00:58,750 --> 00:01:02,080
of parameters that we can change
while the database is open,
22
00:01:02,080 --> 00:01:03,840
things like memory parameters.
23
00:01:03,840 --> 00:01:07,840
It's so beneficial that
the spfile is really
24
00:01:07,840 --> 00:01:10,440
the preferred method.
25
00:01:10,440 --> 00:01:12,270
The second type are
static parameters.
26
00:01:12,270 --> 00:01:14,760
And static parameters
require the database
27
00:01:14,760 --> 00:01:18,210
to be restarted in order
for those parameter changes
28
00:01:18,210 --> 00:01:19,680
to take effect.
29
00:01:19,680 --> 00:01:24,770
And again, if an spfile is
used, all parameters are static.
30
00:01:24,770 --> 00:01:29,260
So let's take a look at
how to modify parameters.
31
00:01:29,260 --> 00:01:32,470
We're going to log in as sysdba.
32
00:01:32,470 --> 00:01:35,410
And we'll look at some
commands to find out what
33
00:01:35,410 --> 00:01:37,600
the values of parameters are.
34
00:01:37,600 --> 00:01:40,720
So if we want to just see
a list of the parameters,
35
00:01:40,720 --> 00:01:44,460
we could say, show parameter.
36
00:01:44,460 --> 00:01:46,330
And it gives us a list
of all the parameters
37
00:01:46,330 --> 00:01:47,370
that are in the database.
38
00:01:47,370 --> 00:01:48,610
And it's a very long list.
39
00:01:48,610 --> 00:01:50,830
I think it actually
scrolls back further
40
00:01:50,830 --> 00:01:53,440
than I can get to the top of.
41
00:01:53,440 --> 00:01:56,260
But you see here
things like a parameter
42
00:01:56,260 --> 00:01:57,820
called timed statistics.
43
00:01:57,820 --> 00:01:59,720
And the type of value it is.
44
00:01:59,720 --> 00:02:01,020
And it's a Boolean value.
45
00:02:01,020 --> 00:02:02,590
So the value is true.
46
00:02:02,590 --> 00:02:06,310
So true is the state
of timed statistics.
47
00:02:06,310 --> 00:02:10,670
So timed statistics are
being taken in the database.
48
00:02:10,670 --> 00:02:14,690
Undo management is a string
which is set to auto.
49
00:02:14,690 --> 00:02:17,120
So automatic undo
management is occurring.
50
00:02:17,120 --> 00:02:21,680
Undo retention is a number
value, and it's set to 900.
51
00:02:21,680 --> 00:02:23,510
In order to interpret
these, you'd
52
00:02:23,510 --> 00:02:25,820
need some Oracle documentation.
53
00:02:25,820 --> 00:02:29,060
The document that they call
Reference on their document
54
00:02:29,060 --> 00:02:32,270
site that has all the
information about parameters.
55
00:02:32,270 --> 00:02:36,830
So the values, min and
max values, the type
56
00:02:36,830 --> 00:02:39,230
of parameter, a little
bit of explanation
57
00:02:39,230 --> 00:02:43,460
about what it does, all
of those kinds of things.
58
00:02:43,460 --> 00:02:48,760
So if I want to limit this
list a little bit, I can do,
59
00:02:48,760 --> 00:02:51,940
show parameter, and
then any portion
60
00:02:51,940 --> 00:02:55,770
of the name of the
parameter itself.
61
00:02:55,770 --> 00:02:58,140
Show parameter undo.
62
00:02:58,140 --> 00:03:00,690
So it will give me all
of the parameters that
63
00:03:00,690 --> 00:03:05,400
have undo in the name of the
parameter, in the beginning,
64
00:03:05,400 --> 00:03:07,440
in the middle,
the end, wherever.
65
00:03:07,440 --> 00:03:11,200
It'll show me those parameters.
66
00:03:11,200 --> 00:03:15,280
So let's take a look at how
to modify these a little bit.
67
00:03:15,280 --> 00:03:17,710
We said that there's
dynamic parameters
68
00:03:17,710 --> 00:03:20,060
and then there are
static parameters.
69
00:03:20,060 --> 00:03:23,260
So let's attempt to just change
one of the static parameters.
70
00:03:23,260 --> 00:03:26,290
So any time we want
to change a parameter,
71
00:03:26,290 --> 00:03:30,670
we use the command
alter system, set,
72
00:03:30,670 --> 00:03:37,320
then the name of the parameter
equal to the value, and then
73
00:03:37,320 --> 00:03:38,520
the scope.
74
00:03:38,520 --> 00:03:41,370
So the scope has
three possible values,
75
00:03:41,370 --> 00:03:47,850
scope=memory scope=spfile,
or scope=both.
76
00:03:47,850 --> 00:03:52,200
So when we do a scope=memory,
we're saying that we want
77
00:03:52,200 --> 00:03:56,610
to change the parameter in
the database memory right now.
78
00:03:56,610 --> 00:04:00,700
So in a dynamic parameter, those
would take effect immediately.
79
00:04:00,700 --> 00:04:03,360
However, they're not
written out to the spfile.
80
00:04:03,360 --> 00:04:05,910
So whenever the
database is restarted,
81
00:04:05,910 --> 00:04:10,440
that value of 301 for processes
would not be in there.
82
00:04:10,440 --> 00:04:14,390
And it would start with
whatever it has in the spfile.
83
00:04:14,390 --> 00:04:20,510
If we set scope=spfile, it
will only change the value
84
00:04:20,510 --> 00:04:22,670
of the parameter in the spfile.
85
00:04:22,670 --> 00:04:25,550
It will not change it in
memory, so that would not
86
00:04:25,550 --> 00:04:28,790
take effect until the
database was restarted
87
00:04:28,790 --> 00:04:32,530
and the spfile was reread.
88
00:04:32,530 --> 00:04:35,150
And the other
possibility is both.
89
00:04:35,150 --> 00:04:38,930
When we do both, we're changing
it in memory and the spfile
90
00:04:38,930 --> 00:04:40,160
simultaneously.
91
00:04:40,160 --> 00:04:44,870
So again, this can only be done
if the parameter is dynamic.
92
00:04:44,870 --> 00:04:48,920
So for testing purposes, let's
try to change the parameter
93
00:04:48,920 --> 00:04:53,910
processes to scope=memory.
94
00:04:53,910 --> 00:04:54,410
All right.
95
00:04:54,410 --> 00:04:59,090
So it says that our specified
initialization parameter cannot
96
00:04:59,090 --> 00:05:00,080
be modified.
97
00:05:00,080 --> 00:05:01,460
So this will be
the error message
98
00:05:01,460 --> 00:05:03,980
that we get any
time that we want
99
00:05:03,980 --> 00:05:09,200
to change a static parameter
dynamically and can't do that.
100
00:05:09,200 --> 00:05:11,130
So we'll get this error message.
101
00:05:11,130 --> 00:05:13,640
So let's try one
that is dynamic.
102
00:05:13,640 --> 00:05:18,650
Alter system set undo
retention equal to--
103
00:05:18,650 --> 00:05:22,670
notice that our value for
undo retention is 900--
104
00:05:22,670 --> 00:05:26,000
and we'll set it to 1,200.
105
00:05:26,000 --> 00:05:27,930
So we say scope=memory.
106
00:05:32,510 --> 00:05:33,930
And it changes it.
107
00:05:33,930 --> 00:05:38,860
If we do show parameter
undo retention,
108
00:05:38,860 --> 00:05:42,550
it shows us that now the value
for undo retention is 1,200.
109
00:05:42,550 --> 00:05:44,760
And this is actually
measured in seconds,
110
00:05:44,760 --> 00:05:47,590
and is the number of
seconds that Oracle attempts
111
00:05:47,590 --> 00:05:54,270
to retain undo information even
after a commit has occurred.
112
00:05:54,270 --> 00:05:56,370
And then we may
say, well, I also
113
00:05:56,370 --> 00:06:01,070
want undo retention to
be set in the spfile.
114
00:06:01,070 --> 00:06:06,040
So in that case, we could
simply say, scope=both.
115
00:06:06,040 --> 00:06:09,060
So now, when the
database is restarted,
116
00:06:09,060 --> 00:06:13,470
it will retain that parameter
change and the undo retention
117
00:06:13,470 --> 00:06:16,250
will be set to 1,200.
118
00:06:16,250 --> 00:06:17,830
So let's go back to processes.
119
00:06:20,750 --> 00:06:23,400
So the value for
processes is 300.
120
00:06:23,400 --> 00:06:26,880
We attempted to set it
to 301, but it told us
121
00:06:26,880 --> 00:06:29,740
that we couldn't change
that parameter dynamically.
122
00:06:29,740 --> 00:06:31,600
So how do we change it?
123
00:06:31,600 --> 00:06:39,840
Well, in this case, let's do an
alter system set processes=301.
124
00:06:39,840 --> 00:06:43,800
scope equal-- now, think of
what our options here are.
125
00:06:43,800 --> 00:06:45,840
We can't set it in memory.
126
00:06:45,840 --> 00:06:47,820
So we can't do scope=memory.
127
00:06:47,820 --> 00:06:51,510
We can't do scope=both, because
that would do it in memory
128
00:06:51,510 --> 00:06:53,070
and in the spfile.
129
00:06:53,070 --> 00:06:55,890
So our option is to
say scope=spfile.
130
00:06:58,420 --> 00:07:01,880
Now, if we look at
the value of it,
131
00:07:01,880 --> 00:07:05,210
we notice that it's still
300, because it will not
132
00:07:05,210 --> 00:07:08,480
pick up that change until
we restart the database.
133
00:07:08,480 --> 00:07:14,260
So we're going to shut down
the database and start it up.
134
00:07:17,200 --> 00:07:19,060
So now, we'll take a
look at our parameters.
135
00:07:19,060 --> 00:07:24,860
So first, we'll show
parameter undo retention.
136
00:07:24,860 --> 00:07:27,110
Notice that undo
retention, which
137
00:07:27,110 --> 00:07:30,080
was 900 when the database
was started before,
138
00:07:30,080 --> 00:07:33,380
we modified it in memory
and the spfile both.
139
00:07:33,380 --> 00:07:35,810
So now that the
database is restarted,
140
00:07:35,810 --> 00:07:38,180
it reads the spfile
and the value
141
00:07:38,180 --> 00:07:43,490
that we put into the spfile,
and has the new value for 1,200.
142
00:07:43,490 --> 00:07:44,720
What about processes?
143
00:07:48,310 --> 00:07:50,220
Notice here that the
value for processes,
144
00:07:50,220 --> 00:07:54,190
which was static and we
could not change dynamically,
145
00:07:54,190 --> 00:07:57,360
we changed it to
301 in the spfile.
146
00:07:57,360 --> 00:07:59,370
And when the database
was restarted,
147
00:07:59,370 --> 00:08:02,640
the parameter file was
reread, and the spfile
148
00:08:02,640 --> 00:08:04,680
had the value of 301.
149
00:08:04,680 --> 00:08:07,300
And so now that is the
value in the database.
150
00:08:07,300 --> 00:08:09,420
So now we've increased
the number of processes
151
00:08:09,420 --> 00:08:14,190
that a database can
have to 301 from 300
152
00:08:14,190 --> 00:08:18,440
using the modification
of parameters.
12303
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.