Skip to main content

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.

  1. Connect to Hubble Accelerator server.

  2. Switch user to the Actian database user.

    # su actian
  3. Use iinamu to get the server number that you will need to pass to iimonitor.

    # iinamu
    Actian Vector NAME SERVICE MANAGEMENT UTILITY --
    -- Copyright (c) 2009 Actian Corporation
    IINAMU> showINGRES    *    41271 (sole server)
    IINAMU> quit
  4. Run iimonitor using the number of the "sole server" returned by the above iinamu command.

    # iimonitor 41271
    IIMONITOR>
  5. Stop new SQL sessions from starting.

    IIMONITOR> set server closed
    User connections now disabled
    IIMONITOR>
  6. 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 formatted
    Session 0000000007023C80:1399772928 (jde810a    ) cs_state: CS_EVENT_WAIT (BIOR) cs_mask: CS_INTERRUPT_MASK,CS_NOXACT_
    MASK OS_tid: 31151
    DB Name: db        (Owned by: root    ) User: jde810a    (jde810a    ) Session started at 3-May-2016 12:04:56 as user jde810a
    Terminal: batch Group Id:
    Role Id:
    Application Code: 00000000    Current Facility: CLF (00000001) Client user: Edward
    Client host: edward0912 Client tty:
    Client pid:
    Client connection target: db
    Client 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 readonly
    Session 000000000714BFC0:-566962432 (integration_test    ) cs_state: CS_EVENT_WAIT (BIOR) cs_mask: CS_INTERRUPT_MASK,CS_NOXACT_
    MASK OS_tid: 4031
    ...
  7. 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 0000000007023C80
    Session 0000000007023C80 removed
  8. Repeat steps 6 and 7 until there are no non-administrator sessions running.

  9. 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 open
    User connections now allowed
  10. 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).