Disable new Connections to the Accelerator Database
Note: According to the instructions for Shutdown Replication (see Hubble Accelerator Shutdown Steps), you must ensure that no transactions are added while propagating the log, as this can cause the process to fail. Besides stopping replication, you also need to prevent new SQL sessions from starting on the accelerator database during this time. Refer to the section on Propagating Accelerator In-Memory Changes and Condensing the Log for more details.
Connect to Hubble Accelerator server.
-
Switch user to the Actian database user.
# su actian
-
Use
iinamuto get the server number that you will need to pass toiimonitor.# iinamuActian Vector NAME SERVICE MANAGEMENT UTILITY ---- Copyright (c) 2009 Actian CorporationIINAMU> showINGRES * 41271 (sole server)IINAMU> quit -
Run
iimonitorusing the number of the "sole server" returned by the above iinamu command.# iimonitor 41271IIMONITOR> -
Stop new SQL sessions from starting.
IIMONITOR> set server closedUser connections now disabledIIMONITOR> -
Wait a few minutes to allow user sessions to naturally terminate and then get a formatted list of all the active sessions. The following only shows the details of a single session but will give you a feel for what to expect to see.
IIMONITOR> show sessions formattedSession 0000000007023C80:1399772928 (jde810a ) cs_state: CS_EVENT_WAIT (BIOR) cs_mask: CS_INTERRUPT_MASK,CS_NOXACT_MASK OS_tid: 31151DB Name: db (Owned by: root ) User: jde810a (jde810a ) Session started at 3-May-2016 12:04:56 as user jde810aTerminal: batch Group Id:Role Id:Application Code: 00000000 Current Facility: CLF (00000001) Client user: EdwardClient host: edward0912 Client tty:Client pid:Client connection target: dbClient information: user='Edward',host='edward0912',conn='db', server='57468',session='1c250c0'Description:Query:Last Query: open ~Q cursor for SELECT CVCRCD, CVCDEC, CVDL01 FROM jde810a.F0013 for readonlySession 000000000714BFC0:-566962432 (integration_test ) cs_state: CS_EVENT_WAIT (BIOR) cs_mask: CS_INTERRUPT_MASK,CS_NOXACT_MASK OS_tid: 4031... -
Shut down each non-terminated session using the following command.
Note: The sessionID that needs to be passed is the hexadecimal number that precedes the colon. Thus for the above example, Session 0000000007023C80:1399772928, the session identifier is 0000000007023C80.
IIMONITOR> remove 0000000007023C80Session 0000000007023C80 removed Repeat steps 6 and 7 until there are no non-administrator sessions running.
-
Re enable connections to the database. This is to ensure that you can run the sql command in the next section to allow the in-memory changes to the database to be propagated and condensed.
IIMONITOR> set server openUser connections now allowed -
Exit
iimonitorleaving the server closed.IIMONITOR> quit #
The iimonitor command is an extremely useful tool for monitoring and understanding what the accelerator database is doing. For more information on this tool refer to Appendix A of the Actian User Guide (Vector 6.3 guide).