SQWareProduction:teradata

From Wiki_dbSQWare
Jump to: navigation, search

Presentation

Usage

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

Explanation of directories

Directories located in $gvsqw_TerBin:

  • 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

sqwter_ExecSQL.ksh

Script $gvsqw_TerBin/bin/sqwter_ExecSQL.ksh:

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

sqwter_FailWithoutMail.ksh

Script $gvsqw_TerBin/bin/sqwter_FailWithoutMail.ksh:

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

sqwter_GatherIndicators.ksh

Script $gvsqw_TerBin/bin/sqwter_GatherIndicators.ksh:

gather DBA indicators See the detailed help for sqwter_GatherIndicators.ksh

sqwter_NetBackup.ksh

Script $gvsqw_TerBin/bin/sqwter_NetBackup.ksh:

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

sqwter_ParallelRun.ksh

Script $gvsqw_TerBin/bin/sqwter_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 sqwter_ParallelRun.ksh

sqwter_RunJob.ksh

Script $gvsqw_TerBin/bin/sqwter_RunJob.ksh:

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


etc

sqwter_CreInst_CrontabRef.cfg

Configuration file $gvsqw_TerBin/../etc/sqwter_CreInst_CrontabRef.cfg:


See the detailed help for sqwter_CreInst_CrontabRef.cfg

sqwter_CreInst_Jobs.cfg

Configuration file $gvsqw_TerBin/../etc/sqwter_CreInst_Jobs.cfg:


See the detailed help for sqwter_CreInst_Jobs.cfg

sqwter_GlobalVar.cfg

Configuration file $gvsqw_TerBin/../etc/sqwter_GlobalVar.cfg:
Global var for Teradata
It contains the operating variables of SQWareProduction.

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

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

See the detailed help for sqwter_GlobalVar.cfg

.profile

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

.profile_confort

File to put aliases $gvsqw_TerBin/../etc/.profile_confort:
Contains confort aliases of SQWareProduction for teradata.

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

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

sqwter_ExecSQL.lib

shell functions library $gvsqw_TerBin/../lib/sqwter_ExecSQL.lib:
lib for sqwter_ExecSQL.ksh

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

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


See the detailed help for sqwter_ExecSQL.lib

sqwter_GatherIndicators.lib

shell functions library $gvsqw_TerBin/../lib/sqwter_GatherIndicators.lib:
lib for sqwter_GatherIndicators.ksh

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

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


See the detailed help for sqwter_GatherIndicators.lib

sqwter_GatherIndicators_Overload.lib

shell functions library $gvsqw_TerBin/../lib/sqwter_GatherIndicators_Overload.lib:
lib for overLoad sqwter_GatherIndicators.ksh

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

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


See the detailed help for sqwter_GatherIndicators_Overload.lib

sqwter_GenerateCreateInstance.lib

shell functions library $gvsqw_TerBin/../lib/sqwter_GenerateCreateInstance.lib:
lib for generate create instance

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

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


See the detailed help for sqwter_GenerateCreateInstance.lib

sqwter_Global.lib

shell functions library $gvsqw_TerBin/../lib/sqwter_Global.lib:
central lib of generic fonctions for teradata

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

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


See the detailed help for sqwter_Global.lib

sqwter_NetBackup.lib

shell functions library $gvsqw_TerBin/../lib/sqwter_NetBackup.lib:
lib for sqwgen_NetBackup.ksh

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

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


See the detailed help for sqwter_NetBackup.lib

sqwter_SetEnv.lib

shell functions library $gvsqw_TerBin/../lib/sqwter_SetEnv.lib:
fonction to set env for $TER_SID

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

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


See the detailed help for sqwter_SetEnv.lib


menu


tools

sqwter_Crypt.ksh

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

sqwter_GenerateCreateInstance.ksh

Script $gvsqw_TerBin/../tools/sqwter_GenerateCreateInstance.ksh:
Generate create instance files See the detailed help for sqwter_GenerateCreateInstance.ksh

sqwter_GetConnectString.ksh

Script $gvsqw_TerBin/../tools/sqwter_GetConnectString.ksh:
set env for $TER_SID See the detailed help for sqwter_GetConnectString.ksh

sqwter_ListAsyncFilesGlobal.ksh

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

sqwter_ListAsyncFiles.ksh

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

sqwter_SetEnv.ksh

Script $gvsqw_TerBin/../tools/sqwter_SetEnv.ksh:
set env for $TER_SID

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

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

See the detailed help for sqwter_SetEnv.ksh

sqwter_TestMySQL.ksh

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

sqwter_TestSendmail.ksh

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

sqwter_Uncrypt.ksh

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


help

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


spm

SQL query toolkit
See the detailed help for spm