Management Instance Operations

Use ttGridAdmin commands in this section to start, stop, switch, examine, or check status of the management instance or instances. Run the commands from the appropriate management instance.

Note:

Typically, there are two management instances, the active and standby. Before you can perform any grid management functions, a management instance must be started as the active instance, from which you can run ttGridAdmin. (Initially, the instance from which you create the grid becomes the active management instance.)

See Managing Failover for the Management Instances in Oracle TimesTen In-Memory Database Scaleout User's Guide for related information.

Start the Active Management Instance (mgmtActiveStart)

The mgmtActiveStart command starts the current management instance (from which the command is run) as the active management instance.

ttGridAdmin mgmtActiveStart

Examples

% ttGridAdmin mgmtActiveStart
This management instance is now the active

Notes

  • The current management instance must previously be stopped.

  • There cannot be another management instance that has been started as the active instance.

Stop the active management instance (mgmtActiveStop)

The mgmtActiveStop command stops the active management instance.

ttGridAdmin mgmtActiveStop

This command is typically used as the last step in shutting down a grid. Otherwise, if there are two management instances, it is recommended to instead use mgmtActiveSwitch.

Examples

% ttGridAdmin mgmtActiveStop
Active management instance stopped 

Notes

  • If this command is used in a grid with two management instances (not recommended unless you are shutting down the grid), it can be run from either the active or the standby management instance. Nothing is done automatically to then promote the standby management instance to active. (See mgmtActiveSwitch.)

  • If data instances are running, then the database elements currently loaded in them will continue to operate.

  • You cannot perform any management operations until you restart the active management instance.

  • If data instances have stopped or failed, they cannot be restarted until you restart the active management instance.

Switch the Active Management Instance (mgmtActiveSwitch)

The mgmtActiveSwitch command, run from the current standby management instance, results in that instance becoming the active management instance. The original active management instance is stopped if it can be reached.

ttGridAdmin mgmtActiveSwitch [-force]

Options

The mgmtActiveSwitch command has the option:

Option Description

-force

Specifies that the command will take effect even if the management instance from which it is run cannot be clearly identified as the standby management instance or is not ideally eligible to become the active management instance.

Important: Using -force will likely result in substantial data loss. Use only as a last resort.

Examples

% ttGridAdmin mgmtActiveSwitch
This is now the active management instance

Notes

  • This command is typically used if the active management instance has failed.

  • If or when the original active management instance is back up, you can use mgmtStandbyStart to restart it as the standby.

  • All data instances in the grid will automatically failover from the previous active management instance to the new active management instance.

Examine Management Instances (mgmtExamine)

The mgmtExamine command examines the management instances and recommends any necessary corrective action. Run the suggested commands.

ttGridAdmin mgmtExamine

Examples

This example shows output when both management instances are up. Aside from the opening note that they are both up, the output is the same as for the mgmtStatus command. See Display Status of Management Instances (mgmtStatus) for descriptions of the columns. (For brevity, the Message column, which had no entries, is not shown in this example.)

% ttGridAdmin mgmtExamine
Both active and standby management instances are up. No action required.
 
Host        Instance  Reachable RepRole(Self) Role(Self) Seq RepAgent RepActive
----------- --------- --------- ------------- ---------- --- -------- ---------
mysys1host  gridmgmt1 Yes       Active        Active     554 Up       Yes
mysys2host  gridmgmt1 Yes       Standby       Standby    554 Up       No

This example shows output when the active management instance is down, including recommended actions and commands to run:

% ttGridAdmin mgmtExamine
Standby management instance is up, but active is down
Promote the standby to active

Host        Instance  Reachable RepRole(Self) Role(Self) Seq RepAgent RepActive Message
----------- --------- --------- ------------- ---------- --- -------- --------- -------------------
----------------
mysys1host  gridmgmt1 No        Unknown       Unknown        Down     No        Management database 
is not available
mysys2host  gridmgmt1 Yes       Standby       Standby    557 Up       No            
Recommended commands:
ssh -o StrictHostKeyChecking=yes -o PasswordAuthentication=no -x host1.example.com 
/sw/tten/gridsetup/ttinstances/gridmgmt1/bin/ttenv ttGridAdmin mgmtActiveSwitch

Notes

One use case is if both management instances fail, and you are not certain which one was the active. Run this command to examine them both and determine which one is "current" or "most recent", then start that one as the active management instance.

Start the Standby Management Instance (mgmtStandbyStart)

The mgmtStandbyStart command starts the current management instance (from which the command is run) as the standby management instance.

ttGridAdmin mgmtStandbyStart

A typical scenario is when the active management instance fails, you promote the standby to active, then run this command to make the original active management instance become the new standby management instance.

Examples

% ttGridAdmin mgmtStandbyStart
Standby management instance started

Notes

  • The instance must previously be stopped.

  • There must be another management instance previously started as the active management instance.

  • This command initiates replication between the active and standby management instances, synchronizing management data between them.

Stop the Standby Management Instance (mgmtStandbyStop)

The mgmtStandbyStop command stops the standby management instance.

ttGridAdmin mgmtStandbyStop

Examples

% ttGridAdmin mgmtStandbyStop
Standby management instance stopped

Notes

  • This command can be run from either the active or the standby management instance if they are both operational.

  • Usage scenarios include:

    • If the standby has failed

    • If you want to stop the standby for any reason, such as to reboot it or perform maintenance

  • The command will fail with an error if there is not an operational standby instance at the time the command is run.

Display Status of Management Instances (mgmtStatus)

The mgmtStatus command displays status information for the management instances.

ttGridAdmin mgmtStatus

(Also see Examine Management Instances (mgmtExamine). The mgmtExamine command recommends actions to repair any reported problems with the management instances.)

Examples

% ttGridAdmin mgmtStatus
Host        Instance  Reachable RepRole(Self) Role(Self) Seq RepAgent RepActive
----------- --------- --------- ------------- ---------- --- -------- ---------
mysys1host  gridmgmt1 Yes       Active        Active     554 Up       Yes
mysys2host  gridmgmt1 Yes       Standby       Standby    554 Up       No

For each instance displayed:

  • Host and Instance show the name of the instance and the name of the host where it is located.

  • Reachable indicates whether the command was successful in reaching the instance to determine its state.

  • RepRole(Self) indicates the recorded role, if any, for the instance in replicating data between management instances.

  • Role(Self) indicates the recorded role, if any, for the instance.

  • Seq is the sequence number of the most recent change on the instance. If the Seq values are the same, then the two management instances are synchronized; otherwise, the one with the larger Seq value has the more recent data.

  • RepAgent indicates whether the replication agent is running on the instance.

  • RepActive indicates whether changes by the mgmtStatus command to management data on the instance were successful. The mgmtStatus command attempts to modify management data on each management instance, but this will not work on the standby management instance, which is read-only.

  • Message has any further information about the instance. (For brevity, this column is not shown in the example.)