SQWareProduction:generic

From Wiki_dbSQWare
Revision as of 15:50, 31 October 2024 by BatchUser (talk | contribs) (Updated by BatchUser)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Presentation

Usage

It's the module locally operating of generic.
It is entirely written in ksh and sql.
It allows to manage the operation for generic.
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 generic

Explanation of directories

Directories located in $gvsqw_GenBin:

  • 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

sqwgen_ExecSQL.ksh

Script $gvsqw_GenBin/bin/sqwgen_ExecSQL.ksh:

execute SQL file on instance See the detailed help for sqwgen_ExecSQL.ksh

sqwgen_FailWithoutMail.ksh

Script $gvsqw_GenBin/bin/sqwgen_FailWithoutMail.ksh:

exit with error and display imput parameters See the detailed help for sqwgen_FailWithoutMail.ksh

sqwgen_KillAllChildsProcesses.ksh

Script $gvsqw_GenBin/bin/sqwgen_KillAllChildsProcesses.ksh:

See the detailed help for sqwgen_KillAllChildsProcesses.ksh

sqwgen_NetBackup.ksh

Script $gvsqw_GenBin/bin/sqwgen_NetBackup.ksh:

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

sqwgen_ParallelRun.ksh

Script $gvsqw_GenBin/bin/sqwgen_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 sqwgen_ParallelRun.ksh

sqwgen_RsyncBackup.ksh

Script $gvsqw_GenBin/bin/sqwgen_RsyncBackup.ksh:

rsync dir (without delete) to an other host See the detailed help for sqwgen_RsyncBackup.ksh

sqwgen_RunJob.ksh

Script $gvsqw_GenBin/bin/sqwgen_RunJob.ksh:

Run <gvsqw_RdbmsName> scripts and generate log and error file
based on $gvsqw_RootCfg/sqw<gvsqw_RdbmsRoot>_Jobs.cfg configuration file
compress and purge oldest log files See the detailed help for sqwgen_RunJob.ksh


etc

Mute.cfg

Configuration file $gvsqw_GenBin/../etc/Mute.cfg:


See the detailed help for Mute.cfg

sqwgen_DbRefVar.cfg

Configuration file $gvsqw_GenBin/../etc/sqwgen_DbRefVar.cfg:
Global var for SQWareRepository connexion
It contains the operating variables of SQWareProduction.

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

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

See the detailed help for sqwgen_DbRefVar.cfg

sqwgen_GlobalVar.cfg

Configuration file $gvsqw_GenBin/../etc/sqwgen_GlobalVar.cfg:
Generic global var
It contains the operating variables of SQWareProduction.

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

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

See the detailed help for sqwgen_GlobalVar.cfg

sqwgen_IndicatorsVar.cfg

Configuration file $gvsqw_GenBin/../etc/sqwgen_IndicatorsVar.cfg:
Generic global var for indicators scripts
It contains the operating variables of SQWareProduction.

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

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

See the detailed help for sqwgen_IndicatorsVar.cfg

.profile

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

.profile_confort

File to put aliases $gvsqw_GenBin/../etc/.profile_confort:
Contains confort aliases of SQWareProduction for generic.

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

with $gvsqw_GenBin/../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

sqwgen_ExecSQL.lib

shell functions library $gvsqw_GenBin/../lib/sqwgen_ExecSQL.lib:
lib for sqwgen_ExecSQL.ksh

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

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


See the detailed help for sqwgen_ExecSQL.lib

sqwgen_GatherIndicators.lib

shell functions library $gvsqw_GenBin/../lib/sqwgen_GatherIndicators.lib:
lib for sqw..._GatherIndicators.ksh

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

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


See the detailed help for sqwgen_GatherIndicators.lib

sqwgen_GatherStructure.lib

shell functions library $gvsqw_GenBin/../lib/sqwgen_GatherStructure.lib:
lib for sqw..._GatherIndicators.ksh

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

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


See the detailed help for sqwgen_GatherStructure.lib

sqwgen_Global.lib

shell functions library $gvsqw_GenBin/../lib/sqwgen_Global.lib:
central generic lib of global fonctions

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

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


See the detailed help for sqwgen_Global.lib

sqwgen_InsertIndicators.lib

shell functions library $gvsqw_GenBin/../lib/sqwgen_InsertIndicators.lib:
generic fonctions to insert into SQWareRepository

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

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


See the detailed help for sqwgen_InsertIndicators.lib

sqwgen_NetBackup.lib

shell functions library $gvsqw_GenBin/../lib/sqwgen_NetBackup.lib:
lib for sqwgen_NetBackup.ksh

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

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


See the detailed help for sqwgen_NetBackup.lib

sqwgen_RsyncBackup.lib

shell functions library $gvsqw_GenBin/../lib/sqwgen_RsyncBackup.lib:
lib for sqwgen_RsyncBackup.ksh.ksh

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

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


See the detailed help for sqwgen_RsyncBackup.lib


tools

sqwgen_Crypt.ksh

Script $gvsqw_GenBin/../tools/sqwgen_Crypt.ksh:
Generic script to crypt file with openssl See the detailed help for sqwgen_Crypt.ksh

sqwgen_ListAsyncFilesGlobal.ksh

Script $gvsqw_GenBin/../tools/sqwgen_ListAsyncFilesGlobal.ksh:
List Async files (sql, log, mail) to upload in SQWareCentral (all in a directory) See the detailed help for sqwgen_ListAsyncFilesGlobal.ksh

sqwgen_ListAsyncFiles.ksh

Script $gvsqw_GenBin/../tools/sqwgen_ListAsyncFiles.ksh:
List Async files (sql, log, mail) to upload in SQWareCentral See the detailed help for sqwgen_ListAsyncFiles.ksh

sqwgen_TestMySQL.ksh

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

sqwgen_TestSendmail.ksh

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

sqwgen_Uncrypt.ksh

Script $gvsqw_GenBin/../tools/sqwgen_Uncrypt.ksh:
Generic script to uncrypt file with openssl See the detailed help for sqwgen_Uncrypt.ksh


help

Contains help files for "-s" option of bin scripts.


spm

SQL query toolkit
See the detailed help for spm