SQWareProduction:mssql
Sommaire
- 1 Presentation
- 2 bin
- 2.1 sqwmsq_BackupAllDatabases.ksh
- 2.2 sqwmsq_BackupDatabase.ksh
- 2.3 sqwmsq_CheckdbAllDatabases.ksh
- 2.4 sqwmsq_CheckdbDatabase.ksh
- 2.5 sqwmsq_ExecSQL.ksh
- 2.6 sqwmsq_GatherIndicators.ksh
- 2.7 sqwmsq_GatherStructure.ksh
- 2.8 sqwmsq_NetBackup.ksh
- 2.9 sqwmsq_ParallelRun.ksh
- 2.10 sqwmsq_RebuildIndexAllDatabases.ksh
- 2.11 sqwmsq_RebuildIndexDatabase.ksh
- 2.12 sqwmsq_RestoreAllDatabases.ksh
- 2.13 sqwmsq_RestoreDatabase.ksh
- 2.14 sqwmsq_RotateErrorLog.ksh
- 2.15 sqwmsq_RunJob.ksh
- 2.16 sqwmsq_StatisticsAllDatabases.ksh
- 2.17 sqwmsq_StatisticsDatabase.ksh
- 3 etc
- 4 lib
- 4.1 sqwmsq_BackupDatabase.lib
- 4.2 sqwmsq_ExecSQL.lib
- 4.3 sqwmsq_GatherIndicators.lib
- 4.4 sqwmsq_GatherIndicators_Overload.lib
- 4.5 sqwmsq_GatherStructure.lib
- 4.6 sqwmsq_GenerateCreateInstance.lib
- 4.7 sqwmsq_Global.lib
- 4.8 sqwmsq_NetBackup.lib
- 4.9 sqwmsq_RebuildIndexDatabase.lib
- 4.10 sqwmsq_RestoreDatabase.lib
- 4.11 sqwmsq_SetEnv.lib
- 4.12 sqwmsq_StatisticsDatabase.lib
- 5 menu
- 6 tools
- 7 help
- 8 spm
Presentation
Utilisation
C'est le module d'exploitation local de mssql.
Il est entierement ecrit en ksh et sql.
Il permet les operations d'exploitation pour mssql.
Exemples d'utilisations de l'outil:
- 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 !
Guide d'installation de SQWareProduction pour mssql
Explication des repertoires
Repertoires se trouvant dans $gvsqw_MsqBin:
- bin : Repertoires contenant standard scripts
- bin_cust : Repertoires contenant customs scripts for your environnement
- etc : Repertoires contenant the standard files of configuration
- etc_cust : Repertoires contenant the customs files of configuration for your environnement (overload standards)
- help : Repertoires contenant the standard files of help
- help_cust : Repertoires contenant the customs files of help for your environnement
- lib : Repertoires contenant the generic shell function librairies
- lib_cust : Repertoires contenant the generic shell function librairies (overload standards)
- spm : Contain sql query toolkit
- tools : Repertoires contenant the standard scripts used on an ad hoc
- tools_cust : Repertoires contenant the customs scripts used on an ad hoc for your environnement
- menu : Repertoires contenant the standard menus
- menu_cust : Repertoires contenant the custom menus for your environnement
Convention de nommage de fichiers
La majorite des fichiers sont nommes avec suffixes:
- *.ksh : pour les scripts
- *.cfg : pour les fichiers de configuration
- *.lib : pour les librairies de fonctions
- *.hlp : pour les fichiers d'aide
Convention de nommage dans les scripts
En général, la convention de nommage suivante est utilisée dans tous les scripts de SQWareProduction:
- gvsqw_ {}: variable globale initialisée par l'environnement et/ou la lib générique
- lvsqw_ {}: variable locale initialisée par le script et/ou une lib spécifique
- gfsqw_ {}: fonction définie par une lib générique
- lfsqw_ {}: fonction définie par le script et/ou une lib spécifique
bin
sqwmsq_BackupAllDatabases.ksh
Script $gvsqw_MsqBin/bin/sqwmsq_BackupAllDatabases.ksh:
Execution de sqwmsq_BackupDatabase.ksh en mode parallele
Vous pouvez choisir:
- Le degre de parallelisme
- Aggressivite de lancement (nombre de secondes entre deux lancements)
- Aggressivite de check de fin (nombre de secondes entre deux check de fin)
Filtres de generation de la liste des databases (vous pouvez tous les mixer):
- Liste d'inclusion de database
- Liste d'exclusion de database
- Clause d'inclusion de type like
- Clause d'exclusion de type like
- Clause where
See the detailed help for sqwmsq_BackupAllDatabases.ksh
sqwmsq_BackupDatabase.ksh
Script $gvsqw_MsqBin/bin/sqwmsq_BackupDatabase.ksh:
Genere backup database
Vous pouvez choisir le type de backup (par defaut full):
- full
- log
- diff
Le script determine automatiquement le nombre de stripes
Fait la purge des generations de backup
Vous pouvez changer les valeurs par defaut:
- change le Path pour mettre le backup (par defaut: 'HKEY_LOCAL_MACHINE', 'BackupDirectory')
- force le nombre de stripes
- taille max d'un stripe
- nombre de generations de backup a garder
See the detailed help for sqwmsq_BackupDatabase.ksh
sqwmsq_CheckdbAllDatabases.ksh
Script $gvsqw_MsqBin/bin/sqwmsq_CheckdbAllDatabases.ksh:
Execution de sqwmsq_CheckdbDatabase.ksh en mode parallele
Vous pouvez choisir:
- Le degre de parallelisme
- Aggressivite de lancement (nombre de secondes entre deux lancements)
- Aggressivite de check de fin (nombre de secondes entre deux check de fin)
Filtres de generation de la liste des databases (vous pouvez tous les mixer):
- Liste d'inclusion de database
- Liste d'exclusion de database
- Clause d'inclusion de type like
- Clause d'exclusion de type like
- Clause where
See the detailed help for sqwmsq_CheckdbAllDatabases.ksh
sqwmsq_CheckdbDatabase.ksh
Script $gvsqw_MsqBin/bin/sqwmsq_CheckdbDatabase.ksh:
Generate checkdb commandes de la database
See the detailed help for sqwmsq_CheckdbDatabase.ksh
sqwmsq_ExecSQL.ksh
Script $gvsqw_MsqBin/bin/sqwmsq_ExecSQL.ksh:
execute un fichier SQL sur l'instance
See the detailed help for sqwmsq_ExecSQL.ksh
sqwmsq_GatherIndicators.ksh
Script $gvsqw_MsqBin/bin/sqwmsq_GatherIndicators.ksh:
Gather MsSql indicateurs et les mettre dans SQWareRepository
Summary of collection:
- Volumetry (use, free) of instance
- Volumetry (use, free) of databases
- Volumetry (use, free) of files
- Version, options, configuration, ... of instance
See the detailed help for sqwmsq_GatherIndicators.ksh
sqwmsq_GatherStructure.ksh
Script $gvsqw_MsqBin/bin/sqwmsq_GatherStructure.ksh:
Gather MsSql structure and put them in SQWareRepository
Summary of collection:
- Tables list and options
- Columns list, types and options
- Indexes list, types and options
See the detailed help for sqwmsq_GatherStructure.ksh
sqwmsq_NetBackup.ksh
Script $gvsqw_MsqBin/bin/sqwmsq_NetBackup.ksh:
backup avec NetBackup des fichiers dump/backup
See the detailed help for sqwmsq_NetBackup.ksh
sqwmsq_ParallelRun.ksh
Script $gvsqw_MsqBin/bin/sqwmsq_ParallelRun.ksh:
Gere l'execution de commandes unix en parallele
Prend en parametre un fichier avec les commandes a executer
Vous pouvez choisir:
- Le degre de parallelisme
- Aggressivite de lancement (nombre de secondes entre deux lancements)
- Aggressivite de check de fin (nombre de secondes entre deux check de fin)
See the detailed help for sqwmsq_ParallelRun.ksh
sqwmsq_RebuildIndexAllDatabases.ksh
Script $gvsqw_MsqBin/bin/sqwmsq_RebuildIndexAllDatabases.ksh:
Execution de sqwmsq_RebuildIndexDatabase.ksh en mode parallele
Vous pouvez choisir:
- Le degre de parallelisme
- Aggressivite de lancement (nombre de secondes entre deux lancements)
- Aggressivite de check de fin (nombre de secondes entre deux check de fin)
Filtres de generation de la liste des databases (vous pouvez tous les mixer):
- Liste d'inclusion de database
- Liste d'exclusion de database
- Clause d'inclusion de type like
- Clause d'exclusion de type like
- Clause where
See the detailed help for sqwmsq_RebuildIndexAllDatabases.ksh
sqwmsq_RebuildIndexDatabase.ksh
Script $gvsqw_MsqBin/bin/sqwmsq_RebuildIndexDatabase.ksh:
Rebuild les indexes de la database.
version = 2000 -> Dbcc dbreindex (N'[$lvsqw_Owner].[$lvsqw_TableName]',,90)
version >= 2005 -> alter index all on [$lvsqw_Owner].[$lvsqw_TableName] Rebuild avec (online = off)
See the detailed help for sqwmsq_RebuildIndexDatabase.ksh
sqwmsq_RestoreAllDatabases.ksh
Script $gvsqw_MsqBin/bin/sqwmsq_RestoreAllDatabases.ksh:
Execution de sqwmsq_RestoreDatabase.ksh en mode parallele
Vous pouvez choisir:
- Le degre de parallelisme
- Aggressivite de lancement (nombre de secondes entre deux lancements)
- Aggressivite de check de fin (nombre de secondes entre deux check de fin)
Filtres de generation de la liste des databases (vous pouvez tous les mixer):
- Liste d'inclusion de database
- Liste d'exclusion de database
- Clause d'inclusion de type like
- Clause d'exclusion de type like
- Clause where
See the detailed help for sqwmsq_RestoreAllDatabases.ksh
sqwmsq_RestoreDatabase.ksh
Script $gvsqw_MsqBin/bin/sqwmsq_RestoreDatabase.ksh:
restauration Standard de la database MsSql
script recherche dynamiquement les fichiers de backup a restaurer
et faire la synchronisation de users/logins
Le script peut aussi:
- choisir le fichier de backup
- change Path pour trouver les backup a restaurer (par defaut: 'HKEY_LOCAL_MACHINE', 'BackupDirectory')
- demarrer un script shell avant la restauration
- demarrer un script shell apres la restauration
See the detailed help for sqwmsq_RestoreDatabase.ksh
sqwmsq_RotateErrorLog.ksh
Script $gvsqw_MsqBin/bin/sqwmsq_RotateErrorLog.ksh:
Rotation de la log et configuration de la profondeur d'historique
See the detailed help for sqwmsq_RotateErrorLog.ksh
sqwmsq_RunJob.ksh
Script $gvsqw_MsqBin/bin/sqwmsq_RunJob.ksh:
Execute les scripts pour MsSql et genere les fichiers log et erreur
base sur le fichier de configuration $gvsqw_RootCfg/sqwmsq_Jobs.cfg
compresse et purge les logs les plus anciennes
See the detailed help for sqwmsq_RunJob.ksh
sqwmsq_StatisticsAllDatabases.ksh
Script $gvsqw_MsqBin/bin/sqwmsq_StatisticsAllDatabases.ksh:
Execution de sqwmsq_StatisticsDatabase.ksh en mode parallele
Vous pouvez choisir:
- Le degre de parallelisme
- Aggressivite de lancement (nombre de secondes entre deux lancements)
- Aggressivite de check de fin (nombre de secondes entre deux check de fin)
Filtres de generation de la liste des databases (vous pouvez tous les mixer):
- Liste d'inclusion de database
- Liste d'exclusion de database
- Clause d'inclusion de type like
- Clause d'exclusion de type like
- Clause where
See the detailed help for sqwmsq_StatisticsAllDatabases.ksh
sqwmsq_StatisticsDatabase.ksh
Script $gvsqw_MsqBin/bin/sqwmsq_StatisticsDatabase.ksh:
Update Statistics pour toutes les tables de la database
Commande utilisee: update statistics [$lvsqw_Owner].[$lvsqw_TableName] with fullscan, all
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
Contient les variables operationnelles de SQWareProduction.
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.
Modèle:SQWareProductionSurchargeConfort
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
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
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
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
See the detailed help for sqwmsq_GatherIndicators_Overload.lib
sqwmsq_GatherStructure.lib
shell functions library $gvsqw_MsqBin/../lib/sqwmsq_GatherStructure.lib:
lib for sqwmsq_GatherStructure.ksh
See the detailed help for sqwmsq_GatherStructure.lib
sqwmsq_GenerateCreateInstance.lib
shell functions library $gvsqw_MsqBin/../lib/sqwmsq_GenerateCreateInstance.lib:
lib for generate configure instance
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
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
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
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
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
See the detailed help for sqwmsq_SetEnv.lib
sqwmsq_StatisticsDatabase.lib
shell functions library $gvsqw_MsqBin/../lib/sqwmsq_StatisticsDatabase.lib:
lib for sqwmsq_StatisticsDatabase.ksh
See the detailed help for sqwmsq_StatisticsDatabase.lib
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
Modèle:SQWareProductionSurchargeToo
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