Purpose
Allows you to create routing rules:
- REJECT LOGON
- Use this routing rule when you want to reject a connection.
- MANAGED
- Use this routing rule when you want a managed routing connection.
- PASSIVE
- Use this routing rule when you want a passive routing connection.
Syntax
ROUTING UPDATE <RoutingName>
(REJECT LOGON) |
([READ [ALL | <tdpid>[, <tdpid>, ...] [PREFERRED]]
[WRITE [ALL |
<tdpid>[, <tdpid>,...] [CREATE {PREFERRED | BALANCED}]]
[OPTIONS <OptionName>[, <OptionName>, ...]]
You must specify options.
[ERRORLIST <ErrorListName>]) |
(PASSIVE [ALLOW MANAGED
WRITES]
([LU] <tdpid>[, <tdpid>, ...] | RR <tdpid>[, <tdpid>, ...] [WEIGHTED <n1>[, <n2>,
...])
[ERRORLIST <ErrorListName>])
;
Common Parameters
- RoutingName
- Name of the routing rule to update.If a routing name does not exist, this command creates the routing name.
- tdpid
- Unique TDPID identifier of a Teradata Database.
- ErrorListName
- Specifies the error list profile for this routing rule to use.
Reject Logon Parameters
- REJECT LOGON
- Creates a routing rule that rejects any new connections that are initiated by the user you specify.
Managed Routing Parameters
- READ [ALL | <tdpid>[, <tdpid>, ...] ]
- Sets the READ attributes for this routing rule by specifying the Teradata Database systems to use when submitting read requests. If you specify the ALL option, all systems managed by Unity become available for read requests. If you specify a list of Teradata Database systems (tdpid), Unity sends read requests to only the systems that you list. By default, the READ parameter uses automatic routing among the systems in the list. If you specify the PREFERRED parameter, the order of the systems in the list defines the preferred routing order for read requests. All routing rules must include this READ parameter.
- PREFERRED
- Specifies that read requests adhere to the preferred routing algorithm. A preferred routing rule sends reads to the first TDPID specified. If a system failure or failover occurs, reads are then sent to the next TDPID specified.
- WRITE [ALL | <tdpid>[, <tdpid>, ...] ]
-
Sets the WRITE attributes for the routing rule by specifying the Teradata Database systems to use when submitting write requests. At logon, Unity opens database write sessions only on the systems specified in the WRITE parameter.
- CREATE {PREFERRED | BALANCED}
- Specifies the routing method to use for CREATE statements.
- OPTIONS
- Specifies a list of additional options for this routing rule. Options specified by [OPTIONS <OptionName>[, <OptionName>,...]] are on/off type flags. Each option is turned off for this routing rule by default. The whole [OPTIONS <OptionName>[, <OptionName>,...]] sub-option is also optional. If not specified, all supported options are turned off for this routing rule. The following <OptionName> is available.
Passive Routing Parameters
- PASSIVE
- This keyword indicates the rule is passive. This keyword must be specified for every passive routing rule; otherwise Unity considers the rule managed.
- ALLOWED MANAGED WRITES
- If specified, connections that match this rule are allowed to write to objects managed in the Unity dictionary. By default, this option is not enabled.
- LU <tdpid>[,<tdpid>, …]
- Least used. If LU is specified, connections are opened on the tdpid with the least number of connections through Unity.
- RR <tdpid>[,<tdpid>, …]
- Round robin. If RR is specified, connections are opened on the tdpids specified in round robin style. Alternating based on systems listed.
- WEIGHTED <n1>[,<n2>, …]
- Weighted round robin. If WEIGHTED is specified, you can designate the number (0-9999) of open connections on the first system (weights) before going to second system and designating a different number of open connections, and so on. Weighted round robin is useful if your network has different system sizes, allowing you to open more connections on the bigger system. The value is numbers of consuming (accepting) sessions in one round. A zero value indicates an infinite number.
Usage Considerations
When the Sequencer processes a ROUTING UPDATE command, it updates the routing rules.
At the unityadmin prompt:
Input | Description |
---|---|
ROUTING UPDATE DefaultRouting REJECT LOGON; | Updates the default routing rule to reject incoming connections. This prevents connections from any user without an explicit routing rule definition. |
ROUTING UPDATE readSys1Only READ sys1; | Creates a read-only routing rule that only accesses system 1. |
ROUTING UPDATE prefReadOnly READ PREFERRED; | Creates a read-only routing rule with a read-preferred algorithm. |
ROUTING UPDATE readSys1WriteAll READ sys1 WRITE ALL; | Creates a routing rule that only reads from system 1, but allows writes to all Teradata Database systems. |
ROUTING UPDATE MSIUser WRITE CREATE BALANCED ERRORLIST MsiErrorList; | Creates a routing rule that reads and writes to all systems, but only creates volatile tables to one system. Unity chooses the least busy system. |
ROUTING UPDATE accessUpgrade READ WRITE OPTIONS ACCESS UPGRADE; | Create a routing rule that reads and writes to all systems, but all ACCESS locks in the user request are upgraded to READ locks. |
ROUTING UPDATE prPref PASSIVE sys1, sys2; | Creates a passive routing rule that allows connections to sys1 and sys2. All connections are initially opened to sys1. Connections cannot write to Unity-managed objects. |
ROUTING UPDATE prLU PASSIVE ALLOW MANAGED WRITES LU sys1, sys2; | Creates a passive routing rule that allows connections to sys1 and sys2. Each connection is opened on the system with the lowest number of connections through Unity at the time. The connection is allowed to write to managed objects. |
ROUTING UPDATE prRR PASSIVE RR sys1, sys2; | Creates a passive routing rule that allows connections to sys1 and sys2. Each connection is opened on the next system in the specific order. |
ROUTING UPDATE prWRR PASSIVE RR sys1, sys2 WEIGHTED 2,1; | Creates a passive routing rule that allows connections to sys1 and sys2. The connections are opened in the order of sys1, sys1, and sys2. |