0% found this document useful (0 votes)
69 views

Listener Start and Stop

The procedure configures an Oracle Listener service to start and stop automatically on server boot and shutdown. It involves: 1. Getting the listener version from /etc/oratab. 2. Using BIB_mkappli to generate start/stop scripts. 3. Validating the scripts and symlinks with BIB_validappli to enable automatic starting and stopping. 4. Verifying the configuration with BIB_vwappli and finding the files in /etc/rc.d.

Uploaded by

ram
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views

Listener Start and Stop

The procedure configures an Oracle Listener service to start and stop automatically on server boot and shutdown. It involves: 1. Getting the listener version from /etc/oratab. 2. Using BIB_mkappli to generate start/stop scripts. 3. Validating the scripts and symlinks with BIB_validappli to enable automatic starting and stopping. 4. Verifying the configuration with BIB_vwappli and finding the files in /etc/rc.d.

Uploaded by

ram
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

Procedure

1. Get the Oracle Engine Listener version by scanning /etc/oratab file :


root@miaibk06 # cat /etc/oratab
#

# This file is used by ORACLE utilities. It is created by root.sh


# and updated by the Database Configuration Assistant when creating
# a database.

# A colon, ':', is used as the field terminator. A new line terminates


# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
# *:/bustools/oracle/xxx/product/9.2.0.5:N
*:/bustools/oracle/xxx/product/9.2.0.5:N
lsnrctldefault:/bustools/oracle/xxx/product/9.2.0.5:N
RPMDEUR2:/bustools/oracle/xxx/product/9.2.0.5:N
RPCGEUR2:/bustools/oracle/xxx/product/9.2.0.5:N
FPCGEUR1:/bustools/oracle/xxx/product/9.2.0.5:N

On this example, the listener version is 9205

2. Use BIB_mkappli tool to create start/stop service file (example on miaibk06) :


root@miaibk06 # BIB_mkappli
****************************
* BIB_mkappli *
****************************

What kind of start/stop file would you like to build ?

1 Application start/stop
2 Oracle instance start/stop
3 DB2 instance start/stop

Enter the number of your choice (0=exit) : 1

Application name [] : lsnrctldefault


Which account is used to execute command for the application [] : oracle
Enter the command to start the application [] :
/BIB_sys/oracle/shell/lsnrctl.sh default start
Enter the command to stop the application [] :
/BIB_sys/oracle/shell/lsnrctl.sh default stop
Enter the command to get the status of the application [] :

The following parameters have been entered :

Application name : lsnrctl9205


Account : oracle
Start command : /BIB_sys/oracle/shell/lsnrctl.sh default start
Stop command : /BIB_sys/oracle/shell/lsnrctl.sh default stop
Status command :

Are the parameters correct ? ([y]/n) : y

Start the application when the server is booted ([y]/n) :


Stop the application when the server is shutdown ([y]/n) :
Stop the application before backup ([y]/n) : n
Start the application after backup ([y]/n) : n

Do you want to :
0 : do nothing, it was just a test ...
[1] : generate the script (a validation is mandatory to put it in place)

Files /BIB_sys/tools/tmp/BIB_lsnrctldefault and


/BIB_sys/tools/tmp/BIB_lsnrctldefault.param are generated.

3. Use BIB_validappli to commit the service file to go to appropriate run level


directories (/etc/rc.d/init.d, /etc/rc.d/rc3.d for stop services and /etc/rc.d/rc4.d for
start services)
root@miaibk06 # BIB_validappli
****************************
* VALID_APPLI *
****************************

1 BIB_lsnrctldefault

What is the number of the application you want to validate [1] : 1


Do you want to view BIB_lsnrctl9205 before validation ? (y/[n]) :

S971BIB_maestrop S981BIB_rpcgeur2_apache S982BIB_rpmdeur2


S984BIB_fpcgeur1 S980BIB_rpcgeur2 S982BIB_rpcgeur2_was
S983BIB_rpmdeur2_app S985BIB_fpcgeur1_app

What is the number (3 digits) you want to use for the start link ? : 950

Ready to validate BIB_lsnrctldefault ? ([y]/n) :


Application BIB_lsnrctldefault has been configured for automatic start & stop

As a summary :

• Procedure

1. Get the Oracle Engine Listener version by scanning /etc/oratab file :


root@miaibk06 # cat /etc/oratab
#

# This file is used by ORACLE utilities. It is created by root.sh


# and updated by the Database Configuration Assistant when creating
# a database.

# A colon, ':', is used as the field terminator. A new line terminates


# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
# *:/bustools/oracle/xxx/product/9.2.0.5:N
*:/bustools/oracle/xxx/product/9.2.0.5:N
lsnrctldefault:/bustools/oracle/xxx/product/9.2.0.5:N
RPMDEUR2:/bustools/oracle/xxx/product/9.2.0.5:N
RPCGEUR2:/bustools/oracle/xxx/product/9.2.0.5:N
FPCGEUR1:/bustools/oracle/xxx/product/9.2.0.5:N

On this example, the listener version is 9205

2. Use BIB_mkappli tool to create start/stop service file (example on miaibk06) :


root@miaibk06 # BIB_mkappli
****************************
* BIB_mkappli *
****************************

What kind of start/stop file would you like to build ?

1 Application start/stop
2 Oracle instance start/stop
3 DB2 instance start/stop

Enter the number of your choice (0=exit) : 1

Application name [] : lsnrctldefault


Which account is used to execute command for the application [] : oracle
Enter the command to start the application [] :
/BIB_sys/oracle/shell/lsnrctl.sh default start
Enter the command to stop the application [] :
/BIB_sys/oracle/shell/lsnrctl.sh default stop
Enter the command to get the status of the application [] :

The following parameters have been entered :

Application name : lsnrctl9205


Account : oracle
Start command : /BIB_sys/oracle/shell/lsnrctl.sh default start
Stop command : /BIB_sys/oracle/shell/lsnrctl.sh default stop
Status command :

Are the parameters correct ? ([y]/n) : y

Start the application when the server is booted ([y]/n) :


Stop the application when the server is shutdown ([y]/n) :
Stop the application before backup ([y]/n) : n
Start the application after backup ([y]/n) : n

Do you want to :
0 : do nothing, it was just a test ...
[1] : generate the script (a validation is mandatory to put it in place)

Files /BIB_sys/tools/tmp/BIB_lsnrctldefault and


/BIB_sys/tools/tmp/BIB_lsnrctldefault.param are generated.

3. Use BIB_validappli to commit the service file to go to appropriate run level


directories (/etc/rc.d/init.d, /etc/rc.d/rc3.d for stop services and /etc/rc.d/rc4.d for
start services)
root@miaibk06 # BIB_validappli
****************************
* VALID_APPLI *
****************************

1 BIB_lsnrctldefault

What is the number of the application you want to validate [1] : 1


Do you want to view BIB_lsnrctl9205 before validation ? (y/[n]) :

S971BIB_maestrop S981BIB_rpcgeur2_apache S982BIB_rpmdeur2


S984BIB_fpcgeur1 S980BIB_rpcgeur2 S982BIB_rpcgeur2_was
S983BIB_rpmdeur2_app S985BIB_fpcgeur1_app

What is the number (3 digits) you want to use for the start link ? : 950

Ready to validate BIB_lsnrctldefault ? ([y]/n) :


Application BIB_lsnrctldefault has been configured for automatic start & stop

4. Check the configutation with BIB_vwappli tool :


root@miaibk06 # BIB_vwappli
Application list for miaibk06

Boot Shutdown Backup Backup


APPLI Start # Stop # Stop Start
[...]
. lsnrctldefault 1 950 1 050 0 0
[...]

Enter the number of the procedure you want to see or <Return> to quit :

The application name lsnrctldefault should appear in the list.

To check that manually, you can perform the following command :


root@miaibk06 # find /etc/rc.d -name "*lsnrctl*"
/etc/rc.d/init.d/BIB_lsnrctldefault => service file
/etc/rc.d/rc3.d/K050BIB_lsnrctldefault => link to service file for stopping
/etc/rc.d/rc4.d/S950BIB_lsnrctldefault => link to service file for starting
/etc/rc.d/rc.config.d/BIB_lsnrctldefault => BIB_sys configuration file

You might also like