X

TimesTen In-Memory Database
for Extreme Performance

How to Stop a TimesTen Scaleout Database using ttGridAdmin Command

Jenny Bloom
Product Manager

When you are done using your grid, you should shut it down gracefully. Naturally TimesTen Scaleout can recover from a variety of failures, including abrupt, unplanned ones. But it is always preferable to shut the system down in a controlled manner whenever possible.

There are several steps involved in gracefully shutting down a grid and the databases it provides:

  • Prevent new connections to the database
  • Unload the database from RAM
  • Shut down your grid's data instances
  • Shut down your grid's management instance 

Like all management operations, these steps are all performed from your grid's management instance using the ttGridAdmin command.

1. Source the TimesTen Environment on the Management Instance

Before you can proceed to stop the TimesTen database on the management instance, you need to source the TimesTen environment.  For the example below, the management instance is installed to /grid/inst/mgmtinstance1 directory.

$ source /grid/inst/mgmtinstance1/bin/ttenv.sh

Commands that you execute in this shell will now be executed against the management instance in your grid.

Alternatively you can prefix any command you want to run with the ttenv script for the instance you wish to use, for example:

$ /grid/inst/mgmtinstance1/bin/ttenv ttGridAdmin dbStatus

2. Closing the database

When your database is "open" then applications can connect to it. Closing the database prevents new application connections (other than connections from the priveleged instance administrator user). 

When ttGridRollout initially creates a database it opens the database.  To close it, run the ttGridAdmin dbClose command:

$ ttGridAdmin dbclose -wait sampledb

3. Unloading the database

Since TimesTen is an in-memory database, databases can only be used when they are loaded into RAM. TimesTen Scaleout provides the ttGridAdmin dbLoad and ttGridAdmin dbUnload commands to load and unload databases into memory.

Before unloading a database from memory you should stop all applications that are connected to it.  

$ ttGridAdmin dbunload -wait sampledb

TimesTen databases are automatically persisted to disk storage using periodic checkpoints and transaction log files. Before a database is unloaded, a final checkpoint is automatically performed behind the scene.

4. Stopping your data instances

When the database is closed and unloaded from memory, you can then shutdown your data instances. 

$ ttGridAdmin instanceexec -type data ttDaemonAdmin -stop

5. Stopping your management instance

Finally you can shut down your management instance

$ ttGridAdmin mgmtActiveStop

You have now stopped all of your instances in this grid.  If you plan to perform some sort of maintenance on the hardware you may proceed. See How to Restart TimesTen Scaleout Database blog  or TimesTen 18.1 documentation library for more information when you are ready to restart this grid.

Disclaimer: These are my personal thoughts and do not represent Oracle's official viewpoint in any way, shape, or form.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.