Login Register Actian.com  

Actian Community Wiki

Navigation
Learn About
Developing With
Ingres Talk
Information
Toolbox

DBA assist tool - ingaccess

From Ingres Community Wiki

Jump to: navigation, search

Contents

Overview

The Ingres Command line tools lack a single point of control. To address this the ingaccess tool has been conceived.

A failing feature of ingstop is that it first attempts to stop Ingres and if this fails during the attempt to shutdown the DBMS server the server may be re-opened for connections but the DAS server and NET connections will already have been terminated. ingaccess adresses this by first identifying if any DBMS servers are running and if they have connections.

The ingaccess tool also makes viewing the current connections simpler - especially if there are multiple DBMS servers.

Scope

Syntax

ingaccess uses a position free parameter parser that has few limits to teh combination of parameters.

If the command is run with no parameters a short syntax is output to the terminal.

Comprehensive help is available if teh help keyword is found anywhere in the parameter list

  • supported standard functions are
    • ingstart
    • ingstop
    • ingstatus
  • Key additional functions
    • restart (ingstop ; ingstart )
    • show (sends dm420 to imadb; lockstat and logstat -statistics ; iimonitor->show sessions formatted against all running DBMS servers )
  • Each of the commands can be given additional options and flags that modify the behaviour.

Further possibilities

  • checkpoint and rollforward actions may be possible from this tool. Ensuring that all databases have been checkpointed by the database owner
  • usermod of tables requiring this process.
  • sysmod of databases and the tables requiring this process.
  • space used by all, system or user tables (excluding and including indexes) of tables.
  • changing the extend size of tables that have grown.
  • inglogs - the inglogs tool can be run and automatically emailed using a unix mail tool such as mail or nail or transferred by ftp. this keeps the 'sending' Ingres information simple. the mail and ftp being optional
    • e.g. ingaccess inglogs -mail keith.bolam@ingres.com
    • ingaccess inglogs -ftp company_id sd_issue_no

Limitations / Future Feature

  • Community directed development is required to ensure this feature grows in the direction that is most intuitive and provided the features that are expected by DBAs both old hands and DBAs used to alternative database management systems.

Usage Details

Usage : ingaccess [ help ] 
                  [ [ start | restart [-f] ] [-all | -dba | -dbms ] |  
                    stop [-f] | open | close | shut | status | show ]
                  [-v | -s ] 

    help   :  general help or help on the specified action.

    start  :  starts ingres DBMS server and all connection processes. 
              [Default : -all ]
  
    restart:  restarts ingres DBMS server as specified by start flags. 
              [Default : -all ]
  
      START FLAGS
      -all :  starts ingres DBMS server and all associated processes
              as configured in the config.dat file
  
      -dbms:  starts ingres DBMS servers only as configured in the 
              config.dat file.
  
      -dba :  starts ingres DBMS Server only with image name DBA.
              sets the II_DBMS_SERVER variable to the Server ID.
              Note: the config.dat file will be modified using 
                    iisetres 'ii.hostname.*.server_class' DBA
                    temporarily if no DBA Dbms server is defined.

    stop   :  stops ingres BBMS server and all associated processes.
              Note: optionally the force flag -f can be passed here.

    open   :  opens the access to the installation by shutting down
              any servers with image name DBA and starts as single 
              default DBMS Server.

    close  :  closes the installation to new sessions and starts a
              DBMS server as DBA (see dba action). The connectivity 
              processes will continue to run.

    status :  Runs the ingstatus command anc displays the current number of 
              connections.
 
    show   :  Runs the iimonitor command and displays the current queries. 
 
      COMAND FLAGS
      -v :  Verbose mode: additional informational messages are output
      -s :  Silent mode : only error messages are output
   see also
      ingstart, ingstop, ingstatus , cbf, iimonitor, iinamu===Ingres Update===

Change Info

Bug# :
IP :
SVN Rev :

QA

Limited testing has been run on this script.

  • It is recommended that the script be tested on non-production environments to ensure that the expected behavior actually happens.
  • the following works OK
    • ingaccess start
    • ingaccess restart
    • ingaccess restart -f
    • ingaccess show
    • ingaccess status
    • ingaccess stop
  • the following appears to work but requires additional testing
    • ingaccess close
    • ingaccess open

FILE

ingaccess

Documentation

The ingaccess parameters and options are documented in the script.

The information contained in the script is reproduced here in WIKI format.

help

general help or help on the specified action.

start

uses the ingstart command to start Ingres if the no option or the default option is used

 start [ -all | -dbms | -dba ] 
 [Default : -all ]
 [see also restart]

START FLAGS

      -all :  starts ingres DBMS server and all associated processes
              as configured in the config.dat file
  
      -dbms:  starts ingres DBMS servers only as configured in the 
              config.dat file.
  
      -dba :  starts ingres DBMS Server only with image name DBA.
              sets the II_DBMS_SERVER variable to the Server ID.
              Note: the config.dat file will be modified using 
                    iisetres 'ii.hostname.*.server_class' DBA
                    temporarily if no DBA Dbms server is defined.

  

restart

restarts ingres DBMS server as specified by start flags.

 restart [ -all | -dbms | -dba ] 
 [Default : -all ]
 see start for details of options
  

stop

stops ingres BBMS server and all associated processes.

     Note: optionally the force flag -f can be passed here.

open

opens the access to the installation by shutting down any servers with image name DBA and starts as single default DBMS Server.

close

closes the installation to new sessions and starts a DBMS server as DBA (see dba action). The connectivity processes will continue to run.

status

Runs the ingstatus command and displays the current number of connections.

show

Runs the iimonitor command and displays the current queries.

The output of this command is a file (or set of files if multiple DBMS servers exist) that contains teh output of

  • set trace point dm420
  • iimonitor -> show sessions formatted

COMAND FLAGS

verbose

-v : Verbose mode: additional informational messages are output

silent

-s : Silent mode : only error messages are output

END

Personal tools
© 2011 Actian Corporation. All Rights Reserved