Afrikaans
Akan
Albanian
Amharic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
In this lesson, we want to discuss Listener Control.
So the listener is the process that listens
for incoming connections.
If the listener isn't running, that
will prevent any incoming connections.
So the listener has to be running in order for people
to connect to the database from the outside, at least
remote connections.
And we use the Listener Control lsnrctl mainline
tool to manage that listener.
And so it gives us an array of different commands
and functions that we can use to control the listener.
But the most common will be starting and stopping
the listener or looking at the status for it.
So let's first make a connection to our database.
Let's use the Kara connection.
And even though this is on the same machine,
Kara is using the connection information
that she has in her properties--
so the Hostname, Port, SID, using that information
to actually go out over the network,
come back in, and connect to the database.
So right now, Kara has a connection.
Let's look at the Listener Control command.
So lsnrctl.
Let's type "help" just to look at some of the options
that are available to us.
So we have things here like start, stop, and reload
and status.
So we can use any of those commands
within the Listener Control interface
in order to work with the listener.
So let's do a status.
So it shows the status of the listener.
So it has the alias for it, the version, the date that it
was started, the uptime for it.
How long has the listener been opened,
the listener parameter file--
so that's the listener.ora--
the log file for it.
And then information about the endpoints
that it's listening on.
And what we really are looking for here
is this service orcl has 1 instance.
So it shows us that the orcl database
is using this listener for incoming connections.
So that's a summary of the status command.
So let's do a stop.
Now the listener is stopped.
And to see an example of the effect of this,
let's attempt to connect with Scott.
And it gives us, "The Network Adapter
could not establish the connection."
And that's because the listener is down.
But what about the Kara connection?
Notice that the Kara connection is unaffected
because she has already made contact with the listener,
negotiated her authentication, and been
connected to the database.
So shutting down the listener only
prevents incoming connections.
It does not disconnect those that are already connected.
So let's start our listener back up.
So we get the similar information about the time
that it started, just now.
Uptime is 0.
Listener parameter file, all those kind of things.
So it just gives us that information as we connect up.
So let's exit from here.
We also want to make the point that you
don't have to actually go into the Listener Control interface
in order to access the commands.
We can also do them directly from the Command line.
So we just feed that command to Listener Control,
lsnrctl status, and it gives us the status of the listener.
And so we can do an lsnrctl stop or a listener control start.
Finally, we wanted to make the point on the Windows operating
system that there's also a Windows service that
controls the listener as well.
So if we do services.msc, brings up the Windows services.
And we go down to the Oracle section.
And we see one called OracleOraDB12Home1TNSListener.
And so by stopping and starting that service,
we can control the listener as well.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.