Oracle Listener resources protect an Oracle Net Services listener process. The listener is brought in-service and out-of-service as part of the failover lifecycle, ensuring client connections are routed to the active Oracle database node.
Resource Type: database/listener
Aliases: listener
Preconditions
- Oracle Database (including Oracle Net Services) must be installed on the server.
- The Oracle home directory and listener configuration file (
listener.ora) must be accessible. - The executable directory for the listener must be specified.
Subcommands
Oracle Listener resources are managed by commands of the form:
lkcli resource database/listener <subcommand> [flags]
| Subcommand | Description | Required Role |
|---|---|---|
create
|
Create a new Oracle Listener resource | admin |
extend
|
Extend to a standby server | admin |
get-property
|
Read a resource property | guest |
set-property
|
Update an editable resource property | admin |
create
lkcli resource database/listener create \
--oracle-home-name=<string> --config-file=<string> \
--listener-list=<array> --exe-dir=<string> [flags]
| Flag | Short | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|---|
--oracle-home-name
|
— | string | Yes | — | — | Oracle home name |
--config-file
|
— | string | Yes | — | — | Full path to listener.ora file |
--listener-list
|
— | array | Yes | — | — | Comma-separated list of listener names |
--exe-dir
|
— | string | Yes | — | — | Full path to directory containing Oracle listener executables |
--protection-level
|
— | enum | No | Full
|
Full, Intermediate, Minimal
|
Listener protection level |
--recovery-level
|
— | enum | No | Standard
|
Standard, Optional
|
Recovery level |
--ip-resource-list
|
— | array | No | — | — | Tags of IP Address resources this resource depends on |
--tag
|
— | string | No | Auto-generated | — | Resource tag name |
--switchback
|
— | enum | No | INTELLIGENT
|
INTELLIGENT, AUTOMATIC
|
Switchback type |
extend
lkcli resource database/listener extend --primary-sys=<string> --primary-tag=<string> [flags]
| Flag | Short | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|---|
--primary-sys
|
— | string | Yes | — | — | Hostname of the server the existing resource is extended from |
--primary-tag
|
— | string | Yes | — | — | Tag of the existing resource to extend |
--standby-sys
|
— | string | No | Value of --host (defaults to localhost)
|
— | Hostname of the standby server |
--config-file
|
— | string | No | Matches primary | — | Override path to listener.ora on standby |
--exe-dir
|
— | string | No | Matches primary | — | Override executable directory on standby |
--switchback
|
— | enum | No | INTELLIGENT
|
INTELLIGENT, AUTOMATIC
|
Switchback type |
--primary-priority
|
— | int | No | Defaults to the current priority of the --primary-sys server, or 1 if the resource has not yet been extended
|
min: 1, max: 999 | Failover priority for the primary server |
--standby-priority
|
— | int | No | Defaults to an unused value which is computed dynamically based on the priority values currently in-use | min: 1, max: 999 | Failover priority for the standby server |
get-property / set-property
lkcli resource database/listener get-property --tag=<string> --property=<string>
lkcli resource database/listener set-property --tag=<string> --property=<string> --value=<string>
| Flag | Short | Type | Required | Description |
|---|---|---|---|---|
--tag
|
-t
|
string | Yes | Resource tag name |
--property
|
-p
|
string | Yes | Property name (see Properties table below) |
--value
|
-v
|
string | Yes (set-property only)
|
New property value |
Properties
| Property | Type | Constraints | Editable | Description |
|---|---|---|---|---|
oracle-home-name
|
string | — | No | Oracle home name |
config-file
|
string | — | No | Full path to listener.ora file |
exe-dir
|
string | — | No | Full path to directory containing Oracle listener executables |
listener-list
|
array | — | Yes | List of listener names to manage |
ip-resource-list
|
array | — | Yes | List of LifeKeeper IP resource tags associated with this listener |
protection-level
|
enum | Full, Intermediate, Minimal
|
Yes | Level of listener protection |
recovery-level
|
enum | Standard, Optional
|
Yes | Recovery level |
version
|
string | — | No | Oracle version (read-only) |
local-recovery
|
enum | enabled, disabled
|
Yes | Enable local recovery |
quickcheck-interval
|
int | min: 0, max: 604800 | Yes | Quickcheck interval in seconds (default: 180) |
Example Usage
# Create an Oracle Listener resource
lkcli resource database/listener create \
--host=server1 \
--oracle-home-name=OraDB19Home1 \
--config-file=C:\app\user\product\19.3.0\dbhome_1\network\admin\listener.ora \
--listener-list=LISTENER \
--exe-dir=C:\app\user\product\19.3.0\dbhome_1\bin \
--protection-level=Full \
--tag=listener.0
# Extend to server2
lkcli resource database/listener extend \
--primary-sys=server1 \
--primary-tag=listener.0 \
--standby-sys=server2



Post your comment on this topic.