Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,420 --> 00:00:04,690
In this lesson, we want to
discuss Listener Control.
2
00:00:04,690 --> 00:00:07,360
So the listener is the
process that listens
3
00:00:07,360 --> 00:00:09,220
for incoming connections.
4
00:00:09,220 --> 00:00:11,320
If the listener
isn't running, that
5
00:00:11,320 --> 00:00:13,730
will prevent any
incoming connections.
6
00:00:13,730 --> 00:00:15,940
So the listener has to be
running in order for people
7
00:00:15,940 --> 00:00:18,880
to connect to the database
from the outside, at least
8
00:00:18,880 --> 00:00:20,770
remote connections.
9
00:00:20,770 --> 00:00:24,520
And we use the Listener
Control lsnrctl mainline
10
00:00:24,520 --> 00:00:27,640
tool to manage that listener.
11
00:00:27,640 --> 00:00:29,930
And so it gives us an
array of different commands
12
00:00:29,930 --> 00:00:33,470
and functions that we can
use to control the listener.
13
00:00:33,470 --> 00:00:35,960
But the most common will
be starting and stopping
14
00:00:35,960 --> 00:00:38,780
the listener or looking
at the status for it.
15
00:00:38,780 --> 00:00:42,560
So let's first make a
connection to our database.
16
00:00:42,560 --> 00:00:44,660
Let's use the Kara connection.
17
00:00:44,660 --> 00:00:46,890
And even though this
is on the same machine,
18
00:00:46,890 --> 00:00:49,310
Kara is using the
connection information
19
00:00:49,310 --> 00:00:52,390
that she has in her properties--
20
00:00:52,390 --> 00:00:56,480
so the Hostname, Port,
SID, using that information
21
00:00:56,480 --> 00:00:58,370
to actually go out
over the network,
22
00:00:58,370 --> 00:01:01,220
come back in, and
connect to the database.
23
00:01:01,220 --> 00:01:04,260
So right now, Kara
has a connection.
24
00:01:04,260 --> 00:01:06,210
Let's look at the
Listener Control command.
25
00:01:06,210 --> 00:01:09,080
So lsnrctl.
26
00:01:09,080 --> 00:01:11,540
Let's type "help" just to
look at some of the options
27
00:01:11,540 --> 00:01:13,370
that are available to us.
28
00:01:13,370 --> 00:01:17,000
So we have things here like
start, stop, and reload
29
00:01:17,000 --> 00:01:18,570
and status.
30
00:01:18,570 --> 00:01:20,030
So we can use any
of those commands
31
00:01:20,030 --> 00:01:22,550
within the Listener
Control interface
32
00:01:22,550 --> 00:01:25,310
in order to work
with the listener.
33
00:01:25,310 --> 00:01:26,320
So let's do a status.
34
00:01:29,240 --> 00:01:31,550
So it shows the status
of the listener.
35
00:01:31,550 --> 00:01:34,520
So it has the alias for it,
the version, the date that it
36
00:01:34,520 --> 00:01:36,650
was started, the uptime for it.
37
00:01:36,650 --> 00:01:38,690
How long has the
listener been opened,
38
00:01:38,690 --> 00:01:40,440
the listener parameter file--
39
00:01:40,440 --> 00:01:42,830
so that's the listener.ora--
40
00:01:42,830 --> 00:01:45,770
the log file for it.
41
00:01:45,770 --> 00:01:48,080
And then information
about the endpoints
42
00:01:48,080 --> 00:01:50,060
that it's listening on.
43
00:01:50,060 --> 00:01:52,130
And what we really
are looking for here
44
00:01:52,130 --> 00:01:55,410
is this service
orcl has 1 instance.
45
00:01:55,410 --> 00:01:58,070
So it shows us that
the orcl database
46
00:01:58,070 --> 00:02:01,220
is using this listener
for incoming connections.
47
00:02:01,220 --> 00:02:03,950
So that's a summary
of the status command.
48
00:02:03,950 --> 00:02:04,910
So let's do a stop.
49
00:02:07,700 --> 00:02:09,930
Now the listener is stopped.
50
00:02:09,930 --> 00:02:12,890
And to see an example
of the effect of this,
51
00:02:12,890 --> 00:02:16,650
let's attempt to
connect with Scott.
52
00:02:16,650 --> 00:02:18,190
And it gives us,
"The Network Adapter
53
00:02:18,190 --> 00:02:19,840
could not establish
the connection."
54
00:02:19,840 --> 00:02:22,030
And that's because
the listener is down.
55
00:02:22,030 --> 00:02:26,120
But what about the
Kara connection?
56
00:02:26,120 --> 00:02:28,970
Notice that the Kara
connection is unaffected
57
00:02:28,970 --> 00:02:32,300
because she has already made
contact with the listener,
58
00:02:32,300 --> 00:02:35,240
negotiated her
authentication, and been
59
00:02:35,240 --> 00:02:36,740
connected to the database.
60
00:02:36,740 --> 00:02:38,690
So shutting down
the listener only
61
00:02:38,690 --> 00:02:40,640
prevents incoming connections.
62
00:02:40,640 --> 00:02:45,590
It does not disconnect those
that are already connected.
63
00:02:45,590 --> 00:02:47,560
So let's start our
listener back up.
64
00:02:51,940 --> 00:02:55,210
So we get the similar
information about the time
65
00:02:55,210 --> 00:02:57,040
that it started, just now.
66
00:02:57,040 --> 00:02:58,570
Uptime is 0.
67
00:02:58,570 --> 00:03:00,650
Listener parameter file,
all those kind of things.
68
00:03:00,650 --> 00:03:04,510
So it just gives us that
information as we connect up.
69
00:03:04,510 --> 00:03:06,520
So let's exit from here.
70
00:03:06,520 --> 00:03:08,410
We also want to make
the point that you
71
00:03:08,410 --> 00:03:11,440
don't have to actually go into
the Listener Control interface
72
00:03:11,440 --> 00:03:13,090
in order to access the commands.
73
00:03:13,090 --> 00:03:17,300
We can also do them directly
from the Command line.
74
00:03:17,300 --> 00:03:20,440
So we just feed that
command to Listener Control,
75
00:03:20,440 --> 00:03:25,760
lsnrctl status, and it gives
us the status of the listener.
76
00:03:25,760 --> 00:03:36,340
And so we can do an lsnrctl stop
or a listener control start.
77
00:03:36,340 --> 00:03:40,030
Finally, we wanted to make the
point on the Windows operating
78
00:03:40,030 --> 00:03:43,060
system that there's also
a Windows service that
79
00:03:43,060 --> 00:03:46,450
controls the listener as well.
80
00:03:46,450 --> 00:03:52,300
So if we do services.msc,
brings up the Windows services.
81
00:03:52,300 --> 00:03:56,040
And we go down to
the Oracle section.
82
00:04:00,000 --> 00:04:05,880
And we see one called
OracleOraDB12Home1TNSListener.
83
00:04:05,880 --> 00:04:08,910
And so by stopping and
starting that service,
84
00:04:08,910 --> 00:04:11,390
we can control the
listener as well.
6633
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.