Open a Database (dbOpen)

The dbOpen command opens the database so that applications can connect to it.

ttGridAdmin dbOpen name 
                   [-nowait | -wait [timeout]]

Options

The dbOpen command has the options:

Option Description

name

Name of the database to open.

-nowait | -wait [timeout]

The command initiates a state change that is recorded in the active management instance of the grid.

The -nowait option causes the command to return immediately without waiting for the state change. This is the default behavior.

The -wait option causes the command to wait for the state change to complete, when the database element has been opened on each instance in the grid. You can optionally subject the wait to a limit of timeout seconds. Otherwise, or if timeout is set to 0, there is no limit.

In a large grid, it is not typical or generally advisable to use -wait. If you do, it is advisable to set a timeout. (See Database Management Operations.)

Examples

This example opens a database without waiting for the elements to be opened on all instances, then checks status (after the database was opened successfully):

% ttGridAdmin dbOpen database1
Database database1 open started
...
% ttGridAdmin dbStatus database1
Database database1 summary status as of Mon Nov 13 19:24:39 PST 2017
 
created,loaded-complete,open
Completely created elements: 4 (of 4)
Completely loaded elements: 4 (of 4)
Completely created replica sets: 2 (of 2)
Completely loaded replica sets: 2 (of 2)
 
Open elements: 4 (of 4)

Notes

  • The database must be loaded or loading (performed automatically by dbCreate).

  • The database must have a distribution map (dbDistribute -apply).

  • If you run dbOpen asynchronously (without waiting), you can use the dbStatus command to see when the database is open.

  • If a database has been opened with dbOpen, attempting to open it again typically results in an error. However, if any element is in "open failed" state, you can retry dbOpen. Doing so will change any element in "open failed" state to "loaded" state, which will result in TimesTen Scaleout trying to open it again.