SQWareProduction:ingres

From Wiki_dbSQWare
Revision as of 20:10, 30 November 2015 by BatchUser (talk | contribs) (Updated by BatchUser)
Jump to: navigation, search

Presentation

Usage

It's the module locally operating of ingres.
It is entirely written in ksh and sql.
It allows to manage the operation for ingres.
Example uses of the tool:

  • Backup
  • Recovery
  • Compute statistics
  • Indicators collection to store in referential database SQWareRepository
  • Rotate logs
  • ....

This module is deployed locally on the machine hosting the authorities to manage, in order to avoid any points of weakness related to an NFS mount or whatever. The deployment is done through a simple command SQWareCentral module using inventory located in SQWareRepository !
Installation guide for SQWareProduction for ingres

Explanation of directories

Directories located in $gvsqw_IngBin:

  • bin : Directory containing standard scripts
  • bin_cust : Directory containing customs scripts for your environnement
  • etc : Directory containing the standard files of configuration
  • etc_cust : Directory containing the customs files of configuration for your environnement (overload standards)
  • help : Directory containing the standard files of help
  • help_cust : Directory containing the customs files of help for your environnement
  • lib : Directory containing the generic shell function librairies
  • lib_cust : Directory containing the generic shell function librairies (overload standards)
  • spm : Contain sql query toolkit
  • tools : Directory containing the standard scripts used on an ad hoc
  • tools_cust : Directory containing the customs scripts used on an ad hoc for your environnement
  • menu : Directory containing the standard menus
  • menu_cust : Directory containing the custom menus for your environnement
Nuvola apps important.png
Warning:
Do not change the standard scripts and configuration files of dbSQWare.

Use directories *_cust for customizations. This will facilitate version upgrades.


Naming convention of files

The majority of files are named with suffixes:

  • *.ksh : for scripts
  • *.cfg : for configuration files
  • *.lib : for function librairies
  • *.hlp : for help files
Nuvola apps important.png
Warning:
Do not change the standard scripts and configuration files of dbSQWare.

Use directories *_cust for customizations. This will facilitate version upgrades.


Naming convention in scripts

In general, the following naming convention is used in all scripts of SQWareProduction:

  • gvsqw_ {} : global variable initialized by the environment and / or generic library
  • lvsqw_ {} : local variable initialized by the script and / or a specific library
  • gfsqw_ {} : function defined by a generic library
  • lfsqw_ {} : function defined by the script and / or a specific library

bin

sqwing_CkpdbAllDatabases.ksh

Script $gvsqw_IngBin/bin/sqwing_CkpdbAllDatabases.ksh:

Run of sqwing_CkpdbDatabase.ksh in parallel mode for all databases
You can choose:

  • The parallel degree
  • Aggressiveness of run (number of seconds between two runs)
  • Aggressiveness of check end (number of seconds between two checks of end)


Filters to generate database list (you can mix all off them):

  • Include list of database
  • Exclude list of database

See the detailed help for sqwing_CkpdbAllDatabases.ksh

sqwing_CkpdbDatabase.ksh

Script $gvsqw_IngBin/bin/sqwing_CkpdbDatabase.ksh:

For ingres backup with ckpdb
Manage file retention
Can make only backup of jnl See the detailed help for sqwing_CkpdbDatabase.ksh

sqwing_ExportFullAllDatabases.ksh

Script $gvsqw_IngBin/bin/sqwing_ExportFullAllDatabases.ksh:

Run of sqwing_ExportFullDatabase.ksh in parallel mode
You can choose:

  • The parallel degree
  • Aggressiveness of run (number of seconds between two runs)
  • Aggressiveness of check end (number of seconds between two checks of end)


Filters to generate database list (you can mix all off them):

  • Include list of database
  • Exclude list of database

See the detailed help for sqwing_ExportFullAllDatabases.ksh

sqwing_ExportFullDatabase.ksh

Script $gvsqw_IngBin/bin/sqwing_ExportFullDatabase.ksh:

Generate full unLoad database
Manage file retention
Can make unLoad in consistent mode See the detailed help for sqwing_ExportFullDatabase.ksh

sqwing_GatherIndicators.ksh

Script $gvsqw_IngBin/bin/sqwing_GatherIndicators.ksh:

Gather Ingres indicators and put them in SQWareRepository
Summary of collection:

  • Volumetry of instance
  • Volumetry of databases
  • Volumetry (use, free) of FS
  • Version, options, configuration, ... of instance

See the detailed help for sqwing_GatherIndicators.ksh

sqwing_NetBackup.ksh

Script $gvsqw_IngBin/bin/sqwing_NetBackup.ksh:

backup with NetBackup dump/backup files See the detailed help for sqwing_NetBackup.ksh

sqwing_OptimizeAllDatabases.ksh

Script $gvsqw_IngBin/bin/sqwing_OptimizeAllDatabases.ksh:

Run of sqwing_OptimizeDatabase.ksh in parallel mode
You can choose:

  • The parallel degree
  • Aggressiveness of run (number of seconds between two runs)
  • Aggressiveness of check end (number of seconds between two checks of end)


Filters to generate database list (you can mix all off them):

  • Include list of database
  • Exclude list of database

See the detailed help for sqwing_OptimizeAllDatabases.ksh

sqwing_OptimizeDatabase.ksh

Script $gvsqw_IngBin/bin/sqwing_OptimizeDatabase.ksh:

Update Statisticsiscs for all tables of the database See the detailed help for sqwing_OptimizeDatabase.ksh

sqwing_ParallelRun.ksh

Script $gvsqw_IngBin/bin/sqwing_ParallelRun.ksh:

Manages the execution of unix commands in parallel mode
Takes in parameter file with unix command to execute
You can choose:

  • The parallel degree
  • Aggressiveness of run (number of seconds between two runs)
  • Aggressiveness of check end (number of seconds between two checks of end)


See the detailed help for sqwing_ParallelRun.ksh

sqwing_RefreshAllDatabases.ksh

Script $gvsqw_IngBin/bin/sqwing_RefreshAllDatabases.ksh:

Run of sqwing_RefreshDatabase.ksh in parallel mode
You can choose:

  • The parallel degree
  • Aggressiveness of run (number of seconds between two runs)
  • Aggressiveness of check end (number of seconds between two checks of end)


Filters to generate database list (you can mix all of them):

  • Include list of database
  • Exclude list of database

See the detailed help for sqwing_RefreshAllDatabases.ksh

sqwing_RefreshDatabase.ksh

Script $gvsqw_IngBin/bin/sqwing_RefreshDatabase.ksh:

Transfert the export files locally from the source server
Generate database refresh (import full of database after destroy and recreation of database)
Export name to use can be chosen See the detailed help for sqwing_RefreshDatabase.ksh

sqwing_ReorgAllDatabases.ksh

Script $gvsqw_IngBin/bin/sqwing_ReorgAllDatabases.ksh:

Run of sqwing_ReorgDatabase.ksh in parallel mode
You can choose:

  • The parallel degree
  • Aggressiveness of run (number of seconds between two runs)
  • Aggressiveness of check end (number of seconds between two checks of end)


Filters to generate database list (you can mix all off them):

  • Include list of database
  • Exclude list of database

See the detailed help for sqwing_ReorgAllDatabases.ksh

sqwing_ReorgDatabase.ksh

Script $gvsqw_IngBin/bin/sqwing_ReorgDatabase.ksh:

Generate reorganisation for all tables See the detailed help for sqwing_ReorgDatabase.ksh

sqwing_RunJob.ksh

Script $gvsqw_IngBin/bin/sqwing_RunJob.ksh:

Run Ingres scripts and generate log and error file
based on $gvsqw_RootCfg/sqwing_Jobs.cfg configuration file
compress and purge oldest log files See the detailed help for sqwing_RunJob.ksh


etc

CrontabRef

Configuration file $gvsqw_IngBin/../etc/CrontabRef:


See the detailed help for CrontabRef

sqwing_GlobalVar.cfg

Configuration file $gvsqw_IngBin/../etc/sqwing_GlobalVar.cfg:
Global var for Ingres
It contains the operating variables of SQWareProduction.

Nuvola apps information.png
Note:
You can overload variables contain in $gvsqw_IngBin/../etc/sqwing_GlobalVar.cfg

by the same variables in $gvsqw_IngBin/../etc_cust/sqwing_GlobalVar.cfg for all your environnement
or in $HOME/sqwConfig/sqwing_GlobalVar.cfg specifically for this user.

See the detailed help for sqwing_GlobalVar.cfg

sqwing_Jobs.cfg

Configuration file $gvsqw_IngBin/../etc/sqwing_Jobs.cfg:


See the detailed help for sqwing_Jobs.cfg

.profile

Sample file for .profile $gvsqw_IngBin/../etc/.profile:
Sample of lines to add to .profile of ingres users.
See the detailed help for .profile

.profile_confort

File to put aliases $gvsqw_IngBin/../etc/.profile_confort:
Contains confort aliases of SQWareProduction for RDBMS ingres.

Nuvola apps information.png
Note:
You can overload confort environnement $gvsqw_IngBin/../etc/.profile_confort

with $gvsqw_IngBin/../etc_cust/.profile_confort for all your environnement
or with $HOME/edtConfig/.profile_confort specifically for this user .


See the detailed help for .profile_confort


lib

sqwing_GatherIndicators.lib

shell functions library $gvsqw_IngBin/../lib/sqwing_GatherIndicators.lib:
lib for sqwing_GatherIndicators.ksh

Nuvola apps information.png
Note:
You can overload functions contained in $gvsqw_IngBin/../lib/sqwing_GatherIndicators.lib

by function with same name in $gvsqw_IngBin/../lib_cust/sqwing_GatherIndicators.lib for all your environnement
or by $HOME/sqwConfig/sqwing_GatherIndicators.lib specifically for this user .


See the detailed help for sqwing_GatherIndicators.lib

sqwing_GatherIndicators_Overload.lib

shell functions library $gvsqw_IngBin/../lib/sqwing_GatherIndicators_Overload.lib:
lib for overLoad sqwing_GatherIndicators.ksh

Nuvola apps information.png
Note:
You can overload functions contained in $gvsqw_IngBin/../lib/sqwing_GatherIndicators_Overload.lib

by function with same name in $gvsqw_IngBin/../lib_cust/sqwing_GatherIndicators_Overload.lib for all your environnement
or by $HOME/sqwConfig/sqwing_GatherIndicators_Overload.lib specifically for this user .


See the detailed help for sqwing_GatherIndicators_Overload.lib

sqwing_Global.lib

shell functions library $gvsqw_IngBin/../lib/sqwing_Global.lib:
central lib of generic fonctions for ingres

Nuvola apps information.png
Note:
You can overload functions contained in $gvsqw_IngBin/../lib/sqwing_Global.lib

by function with same name in $gvsqw_IngBin/../lib_cust/sqwing_Global.lib for all your environnement
or by $HOME/sqwConfig/sqwing_Global.lib specifically for this user .


See the detailed help for sqwing_Global.lib

sqwing_NetBackup.lib

shell functions library $gvsqw_IngBin/../lib/sqwing_NetBackup.lib:
lib for sqwgen_NetBackup.ksh

Nuvola apps information.png
Note:
You can overload functions contained in $gvsqw_IngBin/../lib/sqwing_NetBackup.lib

by function with same name in $gvsqw_IngBin/../lib_cust/sqwing_NetBackup.lib for all your environnement
or by $HOME/sqwConfig/sqwing_NetBackup.lib specifically for this user .


See the detailed help for sqwing_NetBackup.lib

sqwing_SetEnv.lib

shell functions library $gvsqw_IngBin/../lib/sqwing_SetEnv.lib:
fonction to set env for $INGRES_SID

Nuvola apps information.png
Note:
You can overload functions contained in $gvsqw_IngBin/../lib/sqwing_SetEnv.lib

by function with same name in $gvsqw_IngBin/../lib_cust/sqwing_SetEnv.lib for all your environnement
or by $HOME/sqwConfig/sqwing_SetEnv.lib specifically for this user .


See the detailed help for sqwing_SetEnv.lib


menu


tools

sqwing_DbmsClose.ksh

Script $gvsqw_IngBin/../tools/sqwing_DbmsClose.ksh:
Close DBMS See the detailed help for sqwing_DbmsClose.ksh

sqwing_DbmsOpen.ksh

Script $gvsqw_IngBin/../tools/sqwing_DbmsOpen.ksh:
Open DBMS See the detailed help for sqwing_DbmsOpen.ksh

sqwing_DbmsStatus.ksh

Script $gvsqw_IngBin/../tools/sqwing_DbmsStatus.ksh:
DBMS status See the detailed help for sqwing_DbmsStatus.ksh

sqwing_DeleteOldestBackup.ksh

Script $gvsqw_IngBin/../tools/sqwing_DeleteOldestBackup.ksh:
delete oldest ckp See the detailed help for sqwing_DeleteOldestBackup.ksh

sqwing_KillSessions.ksh

Script $gvsqw_IngBin/../tools/sqwing_KillSessions.ksh:
Kill sessions See the detailed help for sqwing_KillSessions.ksh

sqwing_ManageIngres.ksh

Script $gvsqw_IngBin/../tools/sqwing_ManageIngres.ksh:
For ingres stop/start See the detailed help for sqwing_ManageIngres.ksh

sqwing_SetEnv.ksh

Script $gvsqw_IngBin/../tools/sqwing_SetEnv.ksh:
set env for $INGRES_SID

Nuvola apps information.png
Note:
You can replace the file in $gvsqw_IngBin/../tools/sqwing_SetEnv.ksh

by $gvsqw_IngBin/../tools_cust/sqwing_SetEnv.ksh for all your environnement
or by $HOME/edtConfig/sqwing_SetEnv.ksh specifically for this user .

See the detailed help for sqwing_SetEnv.ksh

sqwing_TestMySQL.ksh

Script $gvsqw_IngBin/../tools/sqwing_TestMySQL.ksh:
Generic test MySQL connection script See the detailed help for sqwing_TestMySQL.ksh

sqwing_TestSendmail.ksh

Script $gvsqw_IngBin/../tools/sqwing_TestSendmail.ksh:
Generic test sendmail script See the detailed help for sqwing_TestSendmail.ksh


help

Contains help files for -s option of bin scripts.


spm

SQL query toolkit
See the detailed help for spm