Difference between revisions of "SQWareProduction:mssql"

From Wiki_dbSQWare
Jump to: navigation, search
m (Updated by BatchUser)
m (Updated by BatchUser)
Line 21: Line 21:
 
{{SQWareProduction_sqwmsq_CheckdbDatabase.ksh_presentation}}
 
{{SQWareProduction_sqwmsq_CheckdbDatabase.ksh_presentation}}
 
[[SQWareProduction:mssql:bin:sqwmsq_CheckdbDatabase.ksh|See the detailed help for sqwmsq_CheckdbDatabase.ksh]]<br><br>
 
[[SQWareProduction:mssql:bin:sqwmsq_CheckdbDatabase.ksh|See the detailed help for sqwmsq_CheckdbDatabase.ksh]]<br><br>
 +
 +
=== sqwmsq_ExecSQL.ksh ===
 +
Script $gvsqw_MsqBin/bin/sqwmsq_ExecSQL.ksh:<br>
 +
{{SQWareProduction_sqwmsq_ExecSQL.ksh_presentation}}
 +
[[SQWareProduction:mssql:bin:sqwmsq_ExecSQL.ksh|See the detailed help for sqwmsq_ExecSQL.ksh]]<br><br>
  
 
=== sqwmsq_GatherIndicators.ksh ===
 
=== sqwmsq_GatherIndicators.ksh ===
Line 120: Line 125:
 
<br>
 
<br>
 
[[SQWareProduction:mssql:lib:sqwmsq_BackupDatabase.lib|See the detailed help for sqwmsq_BackupDatabase.lib]]<br><br>
 
[[SQWareProduction:mssql:lib:sqwmsq_BackupDatabase.lib|See the detailed help for sqwmsq_BackupDatabase.lib]]<br><br>
 +
 +
=== sqwmsq_ExecSQL.lib ===
 +
shell functions library $gvsqw_MsqBin/../lib/sqwmsq_ExecSQL.lib:<br>
 +
{{SQWareProduction_sqwmsq_ExecSQL.lib_presentation}}
 +
{{SQWareProductionSurchargeLib|mssql|Msq|sqwmsq_ExecSQL.lib}}
 +
<br>
 +
[[SQWareProduction:mssql:lib:sqwmsq_ExecSQL.lib|See the detailed help for sqwmsq_ExecSQL.lib]]<br><br>
  
 
=== sqwmsq_GatherIndicators.lib ===
 
=== sqwmsq_GatherIndicators.lib ===

Revision as of 15:16, 22 July 2018

Presentation

Usage

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

Explanation of directories

Directories located in $gvsqw_MsqBin:

  • 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

sqwmsq_BackupAllDatabases.ksh

Script $gvsqw_MsqBin/bin/sqwmsq_BackupAllDatabases.ksh:

See the detailed help for sqwmsq_BackupAllDatabases.ksh

sqwmsq_BackupDatabase.ksh

Script $gvsqw_MsqBin/bin/sqwmsq_BackupDatabase.ksh:

See the detailed help for sqwmsq_BackupDatabase.ksh

sqwmsq_CheckdbAllDatabases.ksh

Script $gvsqw_MsqBin/bin/sqwmsq_CheckdbAllDatabases.ksh:

See the detailed help for sqwmsq_CheckdbAllDatabases.ksh

sqwmsq_CheckdbDatabase.ksh

Script $gvsqw_MsqBin/bin/sqwmsq_CheckdbDatabase.ksh:

See the detailed help for sqwmsq_CheckdbDatabase.ksh

sqwmsq_ExecSQL.ksh

Script $gvsqw_MsqBin/bin/sqwmsq_ExecSQL.ksh:

See the detailed help for sqwmsq_ExecSQL.ksh

sqwmsq_GatherIndicators.ksh

Script $gvsqw_MsqBin/bin/sqwmsq_GatherIndicators.ksh:

See the detailed help for sqwmsq_GatherIndicators.ksh

sqwmsq_NetBackup.ksh

Script $gvsqw_MsqBin/bin/sqwmsq_NetBackup.ksh:

See the detailed help for sqwmsq_NetBackup.ksh

sqwmsq_ParallelRun.ksh

Script $gvsqw_MsqBin/bin/sqwmsq_ParallelRun.ksh:

See the detailed help for sqwmsq_ParallelRun.ksh

sqwmsq_RebuildIndexAllDatabases.ksh

Script $gvsqw_MsqBin/bin/sqwmsq_RebuildIndexAllDatabases.ksh:

See the detailed help for sqwmsq_RebuildIndexAllDatabases.ksh

sqwmsq_RebuildIndexDatabase.ksh

Script $gvsqw_MsqBin/bin/sqwmsq_RebuildIndexDatabase.ksh:

See the detailed help for sqwmsq_RebuildIndexDatabase.ksh

sqwmsq_RestoreAllDatabases.ksh

Script $gvsqw_MsqBin/bin/sqwmsq_RestoreAllDatabases.ksh:

See the detailed help for sqwmsq_RestoreAllDatabases.ksh

sqwmsq_RestoreDatabase.ksh

Script $gvsqw_MsqBin/bin/sqwmsq_RestoreDatabase.ksh:

See the detailed help for sqwmsq_RestoreDatabase.ksh

sqwmsq_RotateErrorLog.ksh

Script $gvsqw_MsqBin/bin/sqwmsq_RotateErrorLog.ksh:

See the detailed help for sqwmsq_RotateErrorLog.ksh

sqwmsq_RunJob.ksh

Script $gvsqw_MsqBin/bin/sqwmsq_RunJob.ksh:

See the detailed help for sqwmsq_RunJob.ksh

sqwmsq_StatisticsAllDatabases.ksh

Script $gvsqw_MsqBin/bin/sqwmsq_StatisticsAllDatabases.ksh:

See the detailed help for sqwmsq_StatisticsAllDatabases.ksh

sqwmsq_StatisticsDatabase.ksh

Script $gvsqw_MsqBin/bin/sqwmsq_StatisticsDatabase.ksh:

See the detailed help for sqwmsq_StatisticsDatabase.ksh


etc

sqwmsq_ConfInst_CrontabRef.cfg

Configuration file $gvsqw_MsqBin/../etc/sqwmsq_ConfInst_CrontabRef.cfg:


See the detailed help for sqwmsq_ConfInst_CrontabRef.cfg

sqwmsq_ConfInst_Jobs.cfg

Configuration file $gvsqw_MsqBin/../etc/sqwmsq_ConfInst_Jobs.cfg:


See the detailed help for sqwmsq_ConfInst_Jobs.cfg

sqwmsq_GlobalVar.cfg

Configuration file $gvsqw_MsqBin/../etc/sqwmsq_GlobalVar.cfg:
Global var for Mssql
It contains the operating variables of SQWareProduction.

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

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

See the detailed help for sqwmsq_GlobalVar.cfg

.profile

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

.profile_confort

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

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

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

sqwmsq_BackupDatabase.lib

shell functions library $gvsqw_MsqBin/../lib/sqwmsq_BackupDatabase.lib:
lib for sqwmsq_BackupDatabase.ksh

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

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


See the detailed help for sqwmsq_BackupDatabase.lib

sqwmsq_ExecSQL.lib

shell functions library $gvsqw_MsqBin/../lib/sqwmsq_ExecSQL.lib:
lib for sqwmsq_ExecSQL.ksh

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

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


See the detailed help for sqwmsq_ExecSQL.lib

sqwmsq_GatherIndicators.lib

shell functions library $gvsqw_MsqBin/../lib/sqwmsq_GatherIndicators.lib:
lib for sqwmsq_GatherIndicators.ksh

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

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


See the detailed help for sqwmsq_GatherIndicators.lib

sqwmsq_GatherIndicators_Overload.lib

shell functions library $gvsqw_MsqBin/../lib/sqwmsq_GatherIndicators_Overload.lib:
lib for overLoad sqwmsq_GatherIndicators.ksh

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

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


See the detailed help for sqwmsq_GatherIndicators_Overload.lib

sqwmsq_GenerateCreateInstance.lib

shell functions library $gvsqw_MsqBin/../lib/sqwmsq_GenerateCreateInstance.lib:
lib for generate configure instance

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

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


See the detailed help for sqwmsq_GenerateCreateInstance.lib

sqwmsq_Global.lib

shell functions library $gvsqw_MsqBin/../lib/sqwmsq_Global.lib:
central lib of generic fonctions for mssql

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

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


See the detailed help for sqwmsq_Global.lib

sqwmsq_NetBackup.lib

shell functions library $gvsqw_MsqBin/../lib/sqwmsq_NetBackup.lib:
lib for sqwgen_NetBackup.ksh

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

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


See the detailed help for sqwmsq_NetBackup.lib

sqwmsq_RebuildIndexDatabase.lib

shell functions library $gvsqw_MsqBin/../lib/sqwmsq_RebuildIndexDatabase.lib:
lib for sqwmsq_RebuildIndexDatabase.ksh

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

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


See the detailed help for sqwmsq_RebuildIndexDatabase.lib

sqwmsq_RestoreDatabase.lib

shell functions library $gvsqw_MsqBin/../lib/sqwmsq_RestoreDatabase.lib:
lib for sqwmsq_RestoreDatabase.ksh

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

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


See the detailed help for sqwmsq_RestoreDatabase.lib

sqwmsq_SetEnv.lib

shell functions library $gvsqw_MsqBin/../lib/sqwmsq_SetEnv.lib:
fonction to set env for Mssql

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

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


See the detailed help for sqwmsq_SetEnv.lib


menu


tools

sqwmsq_GenerateCreateInstance.ksh

Script $gvsqw_MsqBin/../tools/sqwmsq_GenerateCreateInstance.ksh:
Generate configure instance files See the detailed help for sqwmsq_GenerateCreateInstance.ksh

sqwmsq_SetEnv.ksh

Script $gvsqw_MsqBin/../tools/sqwmsq_SetEnv.ksh:
set env for AliasFreeTds

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

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

See the detailed help for sqwmsq_SetEnv.ksh

sqwmsq_TestMySQL.ksh

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

sqwmsq_TestSendmail.ksh

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


help

Contains help files for -s option of bin scripts.


spm

SQL query toolkit
See the detailed help for spm