Difference between revisions of "SQWareProduction:db2"
m (Updated by BatchUser) |
m (Updated by BatchUser) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
{{SQWareProduction_sqwdb2_BackupDatabase.ksh_presentation}} | {{SQWareProduction_sqwdb2_BackupDatabase.ksh_presentation}} | ||
[[SQWareProduction:db2:bin:sqwdb2_BackupDatabase.ksh|See the detailed help for sqwdb2_BackupDatabase.ksh]]<br><br> | [[SQWareProduction:db2:bin:sqwdb2_BackupDatabase.ksh|See the detailed help for sqwdb2_BackupDatabase.ksh]]<br><br> | ||
+ | |||
+ | === sqwdb2_ExecSQL.ksh === | ||
+ | Script $gvsqw_D2db2Bin/bin/sqwdb2_ExecSQL.ksh:<br> | ||
+ | {{SQWareProduction_sqwdb2_ExecSQL.ksh_presentation}} | ||
+ | [[SQWareProduction:db2:bin:sqwdb2_ExecSQL.ksh|See the detailed help for sqwdb2_ExecSQL.ksh]]<br><br> | ||
+ | |||
+ | === sqwdb2_FailWithoutMail.ksh === | ||
+ | Script $gvsqw_D2db2Bin/bin/sqwdb2_FailWithoutMail.ksh:<br> | ||
+ | {{SQWareProduction_sqwdb2_FailWithoutMail.ksh_presentation}} | ||
+ | [[SQWareProduction:db2:bin:sqwdb2_FailWithoutMail.ksh|See the detailed help for sqwdb2_FailWithoutMail.ksh]]<br><br> | ||
=== sqwdb2_GatherIndicators.ksh === | === sqwdb2_GatherIndicators.ksh === | ||
Line 66: | Line 76: | ||
=== .profile_confort === | === .profile_confort === | ||
File to put aliases $gvsqw_D2db2Bin/../etc/.profile_confort:<br> | File to put aliases $gvsqw_D2db2Bin/../etc/.profile_confort:<br> | ||
− | Contains confort aliases of SQWareProduction for | + | Contains confort aliases of SQWareProduction for db2.<br> |
{{SQWareProductionSurchargeConfort|db2|D2db2}} | {{SQWareProductionSurchargeConfort|db2|D2db2}} | ||
<br> | <br> | ||
Line 80: | Line 90: | ||
<br> | <br> | ||
[[SQWareProduction:db2:lib:sqwdb2_BackupDatabase.lib|See the detailed help for sqwdb2_BackupDatabase.lib]]<br><br> | [[SQWareProduction:db2:lib:sqwdb2_BackupDatabase.lib|See the detailed help for sqwdb2_BackupDatabase.lib]]<br><br> | ||
+ | |||
+ | === sqwdb2_ExecSQL.lib === | ||
+ | shell functions library $gvsqw_D2db2Bin/../lib/sqwdb2_ExecSQL.lib:<br> | ||
+ | {{SQWareProduction_sqwdb2_ExecSQL.lib_presentation}} | ||
+ | {{SQWareProductionSurchargeLib|db2|D2db2|sqwdb2_ExecSQL.lib}} | ||
+ | <br> | ||
+ | [[SQWareProduction:db2:lib:sqwdb2_ExecSQL.lib|See the detailed help for sqwdb2_ExecSQL.lib]]<br><br> | ||
=== sqwdb2_GatherIndicators.lib === | === sqwdb2_GatherIndicators.lib === | ||
Line 122: | Line 139: | ||
<br> | <br> | ||
[[SQWareProduction:db2:lib:sqwdb2_ReorganizeDatabase.lib|See the detailed help for sqwdb2_ReorganizeDatabase.lib]]<br><br> | [[SQWareProduction:db2:lib:sqwdb2_ReorganizeDatabase.lib|See the detailed help for sqwdb2_ReorganizeDatabase.lib]]<br><br> | ||
+ | |||
+ | === sqwdb2_RunStatsDatabase.lib === | ||
+ | shell functions library $gvsqw_D2db2Bin/../lib/sqwdb2_RunStatsDatabase.lib:<br> | ||
+ | {{SQWareProduction_sqwdb2_RunStatsDatabase.lib_presentation}} | ||
+ | {{SQWareProductionSurchargeLib|db2|D2db2|sqwdb2_RunStatsDatabase.lib}} | ||
+ | <br> | ||
+ | [[SQWareProduction:db2:lib:sqwdb2_RunStatsDatabase.lib|See the detailed help for sqwdb2_RunStatsDatabase.lib]]<br><br> | ||
=== sqwdb2_SetEnv.lib === | === sqwdb2_SetEnv.lib === | ||
Line 136: | Line 160: | ||
== tools == | == tools == | ||
+ | === sqwdb2_Crypt.ksh === | ||
+ | Script $gvsqw_D2db2Bin/../tools/sqwdb2_Crypt.ksh:<br> | ||
+ | {{SQWareProduction_sqwdb2_Crypt.ksh_presentation}} | ||
+ | [[SQWareProduction:db2:tools:sqwdb2_Crypt.ksh|See the detailed help for sqwdb2_Crypt.ksh]]<br><br> | ||
+ | |||
=== sqwdb2_GenerateCreateInstance.ksh === | === sqwdb2_GenerateCreateInstance.ksh === | ||
Script $gvsqw_D2db2Bin/../tools/sqwdb2_GenerateCreateInstance.ksh:<br> | Script $gvsqw_D2db2Bin/../tools/sqwdb2_GenerateCreateInstance.ksh:<br> | ||
{{SQWareProduction_sqwdb2_GenerateCreateInstance.ksh_presentation}} | {{SQWareProduction_sqwdb2_GenerateCreateInstance.ksh_presentation}} | ||
[[SQWareProduction:db2:tools:sqwdb2_GenerateCreateInstance.ksh|See the detailed help for sqwdb2_GenerateCreateInstance.ksh]]<br><br> | [[SQWareProduction:db2:tools:sqwdb2_GenerateCreateInstance.ksh|See the detailed help for sqwdb2_GenerateCreateInstance.ksh]]<br><br> | ||
+ | |||
+ | === sqwdb2_ListAsyncFilesGlobal.ksh === | ||
+ | Script $gvsqw_D2db2Bin/../tools/sqwdb2_ListAsyncFilesGlobal.ksh:<br> | ||
+ | {{SQWareProduction_sqwdb2_ListAsyncFilesGlobal.ksh_presentation}} | ||
+ | [[SQWareProduction:db2:tools:sqwdb2_ListAsyncFilesGlobal.ksh|See the detailed help for sqwdb2_ListAsyncFilesGlobal.ksh]]<br><br> | ||
+ | |||
+ | === sqwdb2_ListAsyncFiles.ksh === | ||
+ | Script $gvsqw_D2db2Bin/../tools/sqwdb2_ListAsyncFiles.ksh:<br> | ||
+ | {{SQWareProduction_sqwdb2_ListAsyncFiles.ksh_presentation}} | ||
+ | [[SQWareProduction:db2:tools:sqwdb2_ListAsyncFiles.ksh|See the detailed help for sqwdb2_ListAsyncFiles.ksh]]<br><br> | ||
=== sqwdb2_SetEnv.ksh === | === sqwdb2_SetEnv.ksh === | ||
Line 147: | Line 186: | ||
{{SQWareProductionSurchargeToo|db2|D2db2|sqwdb2_SetEnv.ksh}} | {{SQWareProductionSurchargeToo|db2|D2db2|sqwdb2_SetEnv.ksh}} | ||
[[SQWareProduction:db2:tools:sqwdb2_SetEnv.ksh|See the detailed help for sqwdb2_SetEnv.ksh]]<br><br> | [[SQWareProduction:db2:tools:sqwdb2_SetEnv.ksh|See the detailed help for sqwdb2_SetEnv.ksh]]<br><br> | ||
+ | |||
+ | === sqwdb2_TestMySQL.ksh === | ||
+ | Script $gvsqw_D2db2Bin/../tools/sqwdb2_TestMySQL.ksh:<br> | ||
+ | {{SQWareProduction_sqwdb2_TestMySQL.ksh_presentation}} | ||
+ | [[SQWareProduction:db2:tools:sqwdb2_TestMySQL.ksh|See the detailed help for sqwdb2_TestMySQL.ksh]]<br><br> | ||
+ | |||
+ | === sqwdb2_TestSendmail.ksh === | ||
+ | Script $gvsqw_D2db2Bin/../tools/sqwdb2_TestSendmail.ksh:<br> | ||
+ | {{SQWareProduction_sqwdb2_TestSendmail.ksh_presentation}} | ||
+ | [[SQWareProduction:db2:tools:sqwdb2_TestSendmail.ksh|See the detailed help for sqwdb2_TestSendmail.ksh]]<br><br> | ||
+ | |||
+ | === sqwdb2_Uncrypt.ksh === | ||
+ | Script $gvsqw_D2db2Bin/../tools/sqwdb2_Uncrypt.ksh:<br> | ||
+ | {{SQWareProduction_sqwdb2_Uncrypt.ksh_presentation}} | ||
+ | [[SQWareProduction:db2:tools:sqwdb2_Uncrypt.ksh|See the detailed help for sqwdb2_Uncrypt.ksh]]<br><br> | ||
<br> | <br> | ||
== help == | == help == | ||
− | Contains help files for -s option of bin scripts.<br> | + | Contains help files for "-s" option of bin scripts.<br> |
<br><br> | <br><br> | ||
Latest revision as of 08:57, 18 December 2023
Presentation
Usage
It's the module locally operating of db2.
It is entirely written in ksh and sql.
It allows to manage the operation for db2.
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 db2
Explanation of directories
Directories located in $gvsqw_D2db2Bin:
- 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
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
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
sqwdb2_BackupDatabase.ksh
Script $gvsqw_D2db2Bin/bin/sqwdb2_BackupDatabase.ksh:
Generate db2Dump compressed by PIPE
Script makes purge of old generation automatically
You can also choose:
- different retention policy with -O and -T
- use different support with -TC
See the detailed help for sqwdb2_BackupDatabase.ksh
sqwdb2_ExecSQL.ksh
Script $gvsqw_D2db2Bin/bin/sqwdb2_ExecSQL.ksh:
execute SQL file on instance
See the detailed help for sqwdb2_ExecSQL.ksh
sqwdb2_FailWithoutMail.ksh
Script $gvsqw_D2db2Bin/bin/sqwdb2_FailWithoutMail.ksh:
exit with error and display imput parameters
See the detailed help for sqwdb2_FailWithoutMail.ksh
sqwdb2_GatherIndicators.ksh
Script $gvsqw_D2db2Bin/bin/sqwdb2_GatherIndicators.ksh:
Gather Db2 indicators and put them in SQWareRepository
Summary of collection:
- Volumetry of instance
- Volumetrys
- Volumetry (use, free) of FS
- Version, options, configuration, ... of instance
See the detailed help for sqwdb2_GatherIndicators.ksh
sqwdb2_NetBackup.ksh
Script $gvsqw_D2db2Bin/bin/sqwdb2_NetBackup.ksh:
backup with NetBackup dump/backup files
See the detailed help for sqwdb2_NetBackup.ksh
sqwdb2_ParallelRun.ksh
Script $gvsqw_D2db2Bin/bin/sqwdb2_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 sqwdb2_ParallelRun.ksh
sqwdb2_ReorganizeDatabase.ksh
Script $gvsqw_D2db2Bin/bin/sqwdb2_ReorganizeDatabase.ksh:
Reorganize of all tables for the instance
Use command: reorg table <TableName>
See the detailed help for sqwdb2_ReorganizeDatabase.ksh
sqwdb2_RunJob.ksh
Script $gvsqw_D2db2Bin/bin/sqwdb2_RunJob.ksh:
Run Db2 scripts and generate log and error file
based on $gvsqw_RootCfg/sqwdb2_Jobs.cfg configuration file
compress and purge oldest log files
See the detailed help for sqwdb2_RunJob.ksh
sqwdb2_RunStatsDatabase.ksh
Script $gvsqw_D2db2Bin/bin/sqwdb2_RunStatsDatabase.ksh:
RUNSTATS of all tables for the instance
Use command: RUNSTATS table <TableName>
See the detailed help for sqwdb2_RunStatsDatabase.ksh
etc
sqwdb2_CreInst_CrontabRef.cfg
Configuration file $gvsqw_D2db2Bin/../etc/sqwdb2_CreInst_CrontabRef.cfg:
See the detailed help for sqwdb2_CreInst_CrontabRef.cfg
sqwdb2_CreInst_Jobs.cfg
Configuration file $gvsqw_D2db2Bin/../etc/sqwdb2_CreInst_Jobs.cfg:
See the detailed help for sqwdb2_CreInst_Jobs.cfg
sqwdb2_GlobalVar.cfg
Configuration file $gvsqw_D2db2Bin/../etc/sqwdb2_GlobalVar.cfg:
Global var for Db2
It contains the operating variables of SQWareProduction.
See the detailed help for sqwdb2_GlobalVar.cfg
.profile
Sample file for .profile $gvsqw_D2db2Bin/../etc/.profile:
Sample of lines to add to .profile of db2 users.
See the detailed help for .profile
.profile_confort
File to put aliases $gvsqw_D2db2Bin/../etc/.profile_confort:
Contains confort aliases of SQWareProduction for db2.
See the detailed help for .profile_confort
lib
sqwdb2_BackupDatabase.lib
shell functions library $gvsqw_D2db2Bin/../lib/sqwdb2_BackupDatabase.lib:
lib for sqwdb2_BackupDatabase.ksh
See the detailed help for sqwdb2_BackupDatabase.lib
sqwdb2_ExecSQL.lib
shell functions library $gvsqw_D2db2Bin/../lib/sqwdb2_ExecSQL.lib:
lib for sqwdb2_ExecSQL.ksh
See the detailed help for sqwdb2_ExecSQL.lib
sqwdb2_GatherIndicators.lib
shell functions library $gvsqw_D2db2Bin/../lib/sqwdb2_GatherIndicators.lib:
lib for sqwdb2_GatherIndicators.ksh
See the detailed help for sqwdb2_GatherIndicators.lib
sqwdb2_GatherIndicators_Overload.lib
shell functions library $gvsqw_D2db2Bin/../lib/sqwdb2_GatherIndicators_Overload.lib:
lib for overLoad sqwdb2_GatherIndicators.ksh
See the detailed help for sqwdb2_GatherIndicators_Overload.lib
sqwdb2_GenerateCreateInstance.lib
shell functions library $gvsqw_D2db2Bin/../lib/sqwdb2_GenerateCreateInstance.lib:
lib for generate create instance
See the detailed help for sqwdb2_GenerateCreateInstance.lib
sqwdb2_Global.lib
shell functions library $gvsqw_D2db2Bin/../lib/sqwdb2_Global.lib:
central lib of generic fonctions for db2
See the detailed help for sqwdb2_Global.lib
sqwdb2_NetBackup.lib
shell functions library $gvsqw_D2db2Bin/../lib/sqwdb2_NetBackup.lib:
lib for sqwgen_NetBackup.ksh
See the detailed help for sqwdb2_NetBackup.lib
sqwdb2_ReorganizeDatabase.lib
shell functions library $gvsqw_D2db2Bin/../lib/sqwdb2_ReorganizeDatabase.lib:
lib for sqwdb2_ReorganizeDatabase.ksh
See the detailed help for sqwdb2_ReorganizeDatabase.lib
sqwdb2_RunStatsDatabase.lib
shell functions library $gvsqw_D2db2Bin/../lib/sqwdb2_RunStatsDatabase.lib:
lib for sqwdb2_RunStatsDatabase.ksh
See the detailed help for sqwdb2_RunStatsDatabase.lib
sqwdb2_SetEnv.lib
shell functions library $gvsqw_D2db2Bin/../lib/sqwdb2_SetEnv.lib:
fonction to set env for $lvsqw_InstanceParam
See the detailed help for sqwdb2_SetEnv.lib
tools
sqwdb2_Crypt.ksh
Script $gvsqw_D2db2Bin/../tools/sqwdb2_Crypt.ksh:
Generic script to crypt file with openssl
See the detailed help for sqwdb2_Crypt.ksh
sqwdb2_GenerateCreateInstance.ksh
Script $gvsqw_D2db2Bin/../tools/sqwdb2_GenerateCreateInstance.ksh:
Generate create instance files
See the detailed help for sqwdb2_GenerateCreateInstance.ksh
sqwdb2_ListAsyncFilesGlobal.ksh
Script $gvsqw_D2db2Bin/../tools/sqwdb2_ListAsyncFilesGlobal.ksh:
List Async files (sql, log, mail) to upload in SQWareCentral (all in a directory)
See the detailed help for sqwdb2_ListAsyncFilesGlobal.ksh
sqwdb2_ListAsyncFiles.ksh
Script $gvsqw_D2db2Bin/../tools/sqwdb2_ListAsyncFiles.ksh:
List Async files (sql, log, mail) to upload in SQWareCentral
See the detailed help for sqwdb2_ListAsyncFiles.ksh
sqwdb2_SetEnv.ksh
Script $gvsqw_D2db2Bin/../tools/sqwdb2_SetEnv.ksh:
set env for $lvsqw_InstanceParam
See the detailed help for sqwdb2_SetEnv.ksh
sqwdb2_TestMySQL.ksh
Script $gvsqw_D2db2Bin/../tools/sqwdb2_TestMySQL.ksh:
Generic test MySQL connection script
See the detailed help for sqwdb2_TestMySQL.ksh
sqwdb2_TestSendmail.ksh
Script $gvsqw_D2db2Bin/../tools/sqwdb2_TestSendmail.ksh:
Generic test sendmail script
See the detailed help for sqwdb2_TestSendmail.ksh
sqwdb2_Uncrypt.ksh
Script $gvsqw_D2db2Bin/../tools/sqwdb2_Uncrypt.ksh:
Generic script to uncrypt file with openssl
See the detailed help for sqwdb2_Uncrypt.ksh
help
Contains help files for "-s" option of bin scripts.
spm
SQL query toolkit
See the detailed help for spm