BC remote Oracle DBA - Call (800) 766-1884  
Oracle Consulting Oracle Training Development

Remote DBA

Remote DBA Plans  

Remote DBA Service

Remote DBA RAC

   
Remote DBA Oracle Home
Remote DBA Oracle Training
Remote DBA SQL Tuning Consulting
Remote DBA Oracle Tuning Consulting
Remote DBA Data Warehouse Consulting
Remote DBA Oracle Project Management
Remote DBA Oracle Security Assessment
Remote DBA Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Links
Remote DBA Oracle Monitoring
Remote DBA Support Benefits
Remote DBA Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices





   

 

 

 

Remote DBA services

Remote DBA Support

Remote DBA RAC

Remote DBA Reasons

Remote Oracle Tuning

Remote DBA Links

Oracle DBA Support

Oracle DBA Forum

Oracle Disaster

Oracle Training

Oracle Tuning

Oracle Training

 Remote DBA SQL Server

Remote MSSQL Consulting

Oracle DBA Hosting

Oracle License Negotiation

 

 


 

 

 

 

 

 

 

Oracle 11g tuning: Oracle 11g and Expert Systems Technology

Oracle Tips by Burleson Consulting

Oracle 11g and Expert Systems Technology

Oracle 11g - Show lsnrctl Help Overview

The first step is using the listener help facility is to get the list of available commands.  This is done by entering “lsnrctl help” at the UNIX command prompt:

dilbert> lsnrctl help

LSNRCTL for IBM/AIX RISC System/6000: Version 2.3.4.0.0 - Production on 11-MAR-9

9 08:47:58

Copyright (c) Oracle Corporation 1994.  All rights reserved.

The following operations are available

An asterisk (*) denotes a modifier or extended command:

start               stop                status
services            version             reload
trace               spawn               dbsnmp_start       
dbsnmp_stop         dbsnmp_status       change_password
quit                exit                set*
show*               clbstat             clbserv

Now, let’s say that we want more information about the syntax of the trace command.  We simply enter “lsnrctl help trace”:

revsp2t> lsnrctl help trace

LSNRCTL for IBM/AIX RISC System/6000: Version 2.3.4.0.0 - Production on 15-MAR-9
9 10:25:36

Copyright (c) Oracle Corporation 1994.  All rights reserved.

trace OFF | USER | ADMIN [<listener_name>] : set tracing to the specified level

Here we see that the commands are “lsnrctl trace off”, “lsnrctl trace user”, and “lsnrctl trace admin”, with an optional listener name for when we are running multiple listeners.

Starting  the listener using Listener Control utility (LSNRCTL)

Now let’s take a look at starting the listener.  When the command “lsnrctl start” is issued, Oracle will invoke the $ORACLE_HOME/bin/lsnrctl utility.  This utility will then go to the listener.ora file to get the startup parameters.  The lsnrctl utility will then start a server process.  Let’s start a listener and see what happens:

dilbert> lsnrctl start

LSNRCTL for IBM/AIX RISC System/6000: Version 2.1.6.1.0 - Production on 15-MAR-9
9 10:32:24

Copyright (c) Oracle Corporation 1994.  All rights reserved.

Starting /oracle/SAS/bin/tnslsnr: please wait...

TNSLSNR for IBM/AIX RISC System/6000: Version 2.1.6.1.0 - Production
System parameter file is /etc/listener.ora
Log messages written to /oracle/network/log/listener.log
Listening on:
(DESCRIPTION=(CONNECT_TIMEOUT=10)(ADDRESS=(PROTOCOL=TCP)(HOST=dilbert)(PORT=1521)))
Listening on:
(DESCRIPTION=(CONNECT_TIMEOUT=10)(ADDRESS=(PROTOCOL=TCP)(HOST=dilbert)(PORT=1522)))
)

Connecting to (ADDRESS=(PROTOCOL=TCP)(HOST=revsp2k)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for IBM/AIX RISC System/6000: Version 2.1.6.1.
0 - Production
Start Date                15-MAR-99 10:32:28
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  OFF
Listener Parameter File   /etc/listener.ora
Listener Log File         /oracle/network/log/listener.log
Services Summary...
  tom           has 1 service handlers

The command completed successfully

From the output of the lsnrctl start command we see all of the configuration parameters including the database name, start time, and the locations of the trace log.

Since we just started a UNIX process, we can use the UNIX “ps” command to see the process:

dilbert> ps -ef|grep -i list

  oracle 11146     1   0   Mar 12      -  0:02 /ora7/product/8.0.5/bin/tnslsnr LISTENER –inherit

Note: Oracle with SQL*Net version 1 uses the start command “tcpctl start” and will start a server process called “orasrv”.

However, what do we do if we want to “automate” the starting of the listener?  In many environments, a startup UNIX script can be used to start the Oracle databases, and then start the listener.  Here is such a script:

#!/bin/ksh
ORACLE_SID=tom; export ORACLE_SID
ORACLE_HOME=/ora8/product/8.0.5;export ORACLE_HOME

# start the tom database . . .

svrmgrl << EOT    
connect internal
shutdown abort
startup
exit
EOT

# start the jerry database

ORACLE_SID=jerry; export ORACLE_SID
svrmgrl << EOT    
connect internal
shutdown abort
startup
exit
EOT

# Now, start the listsner . . .

lsnrctl << EOT    
set password secret_password
start
exit
EOT

Notice that we have defined a listener password in this script, and used it to start our listener.  In this case, we need to carefully set the “read” permissions (i.e. 700) on this script so no one can see the password.

Now that we have covered the functions of the listener, lets try an exercise . . .

 

If you like Oracle tuning, see the book "Oracle Tuning: The Definitive Reference", with 950 pages of tuning tips and scripts. 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts.


Expert Remote DBA

BC is America's oldest and largest Remote DBA Oracle support provider.  Get real Remote DBA experts, call
BC Remote DBA today.

 

 

Remote DBA Service
 

Oracle Tuning Book

Advance SQL Tuning Book 

BC Oracle support

Oracle books by Rampant

Oracle monitoring software

 

 

 

 

 

 

BC Remote Oracle Support

Remote DBA

Remote DBA Services

Copyright © 1996 -  2013 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.



Hit Counter