SQWareProduction:sybase
Contents
- 1 Presentation
- 2 bin
- 2.1 sqwsyb_CheckstorageAllDatabases.ksh
- 2.2 sqwsyb_CheckstorageDatabase.ksh
- 2.3 sqwsyb_CopyDumpAllDatabases.ksh
- 2.4 sqwsyb_CopyDumpDatabase.ksh
- 2.5 sqwsyb_DbccAllDatabases.ksh
- 2.6 sqwsyb_DbccDatabase.ksh
- 2.7 sqwsyb_DumpAllDatabases.ksh
- 2.8 sqwsyb_DumpDatabase.ksh
- 2.9 sqwsyb_GatherDistantFsSize.ksh
- 2.10 sqwsyb_GatherIndicators.ksh
- 2.11 sqwsyb_KillSessions.ksh
- 2.12 sqwsyb_LoadAllDatabases.ksh
- 2.13 sqwsyb_LoadDatabase.ksh
- 2.14 sqwsyb_NetBackup.ksh
- 2.15 sqwsyb_ParallelRun.ksh
- 2.16 sqwsyb_RebuildAllDatabases.ksh
- 2.17 sqwsyb_RebuildDatabase.ksh
- 2.18 sqwsyb_RsyncBackup.ksh
- 2.19 sqwsyb_RunJob.ksh
- 2.20 sqwsyb_StatisticsAllDatabases.ksh
- 2.21 sqwsyb_StatisticsDatabase.ksh
- 2.22 sqwsyb_UpdtStatsAllDatabases.ksh
- 2.23 sqwsyb_UpdtStatsDatabase.ksh
- 2.24 sqwsyb_UpdtStatsRebuildWithFlag.ksh
- 3 etc
- 4 lib
- 4.1 sqwsyb_CopyDumpDatabase.lib
- 4.2 sqwsyb_DumpAllDatabases.lib
- 4.3 sqwsyb_DumpDatabase.lib
- 4.4 sqwsyb_GatherDistantFsSize.lib
- 4.5 sqwsyb_GatherIndicators.lib
- 4.6 sqwsyb_GatherIndicators_Overload.lib
- 4.7 sqwsyb_GenerateCreateInstance.lib
- 4.8 sqwsyb_Global.lib
- 4.9 sqwsyb_LoadAllDatabases.lib
- 4.10 sqwsyb_LoadDatabase.lib
- 4.11 sqwsyb_NetBackup.lib
- 4.12 sqwsyb_RebuildDatabase.lib
- 4.13 sqwsyb_RsyncBackup.lib
- 4.14 sqwsyb_SetEnv.lib
- 4.15 sqwsyb_StatisticsDatabase.lib
- 4.16 sqwsyb_UpdtStatsDatabase.lib
- 5 menu
- 6 tools
- 7 help
- 8 spm
Presentation
Usage
It's the module locally operating of sybase.
It is entirely written in ksh and sql.
It allows to manage the operation for sybase.
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 sybase
Explanation of directories
Directories located in $gvsqw_SybBin:
- 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
sqwsyb_CheckstorageAllDatabases.ksh
Script $gvsqw_SybBin/bin/sqwsyb_CheckstorageAllDatabases.ksh:
Run of sqwsyb_CheckstorageDatabase.ksh in parallel mode
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)
Filters to generate database list (you can mix all off them):
- Include list of database
- Exclude list of database
- Include like clause
- Exclude like clause
- Where clause
See the detailed help for sqwsyb_CheckstorageAllDatabases.ksh
sqwsyb_CheckstorageDatabase.ksh
Script $gvsqw_SybBin/bin/sqwsyb_CheckstorageDatabase.ksh:
Run Checkstorage commands on database
See the detailed help for sqwsyb_CheckstorageDatabase.ksh
sqwsyb_CopyDumpAllDatabases.ksh
Script $gvsqw_SybBin/bin/sqwsyb_CopyDumpAllDatabases.ksh:
copy dump all databases in parallel
See the detailed help for sqwsyb_CopyDumpAllDatabases.ksh
sqwsyb_CopyDumpDatabase.ksh
Script $gvsqw_SybBin/bin/sqwsyb_CopyDumpDatabase.ksh:
Copy Dump file by rsync between two dataservers
You can choose different options:
- different unix users between the two dataservers
- parallel degree of copy
- the file to copy (latest full Dump by default)
- different directory (by default search in standard directory)
The script can also:
- run shell script before Load
- run shell script after Load
See the detailed help for sqwsyb_CopyDumpDatabase.ksh
sqwsyb_DbccAllDatabases.ksh
Script $gvsqw_SybBin/bin/sqwsyb_DbccAllDatabases.ksh:
Run of sqwsyb_DbccDatabase.ksh in parallel mode
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)
Filters to generate database list (you can mix all off them):
- Include list of database
- Exclude list of database
- Include like clause
- Exclude like clause
- Where clause
See the detailed help for sqwsyb_DbccAllDatabases.ksh
sqwsyb_DbccDatabase.ksh
Script $gvsqw_SybBin/bin/sqwsyb_DbccDatabase.ksh:
Run Dbcc command on database
See the detailed help for sqwsyb_DbccDatabase.ksh
sqwsyb_DumpAllDatabases.ksh
Script $gvsqw_SybBin/bin/sqwsyb_DumpAllDatabases.ksh:
Run of sqwsyb_DumpDatabase.ksh in parallel mode
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)
Filters to generate database list (you can mix all off them):
- Include list of database
- Exclude list of database
- Include like clause
- Exclude like clause
- Where clause
See the detailed help for sqwsyb_DumpAllDatabases.ksh
sqwsyb_DumpDatabase.ksh
Script $gvsqw_SybBin/bin/sqwsyb_DumpDatabase.ksh:
Generate Dump database
You can choose type of Dump (by default full):
- full -> full Dump
- inc -> Dump tran
- stb -> Dump tran for standby
- fstb -> full Dump plus Dump tran for standby
Script automatically determine how many stripes
Makes backup of master..syslogins (permet to make synchronisation on Load)
Makes purges of Dump generations
You can change default values:
- compression level
- force number of stripes
- size max of a stripe
- number of Dump generations to keep online
See the detailed help for sqwsyb_DumpDatabase.ksh
sqwsyb_GatherDistantFsSize.ksh
Script $gvsqw_SybBin/bin/sqwsyb_GatherDistantFsSize.ksh:
Collect FS size
See the detailed help for sqwsyb_GatherDistantFsSize.ksh
sqwsyb_GatherIndicators.ksh
Script $gvsqw_SybBin/bin/sqwsyb_GatherIndicators.ksh:
Gather Sybase indicators and put them in SQWareRepository
Summary of collection:
- Volumetry (use, free) of dataserver
- Volumetry (use, free) of databases
- Volumetry of tables
- Volumetry (use, free) of FS
- Version, options, configuration, ... of dataserver
See the detailed help for sqwsyb_GatherIndicators.ksh
sqwsyb_KillSessions.ksh
Script $gvsqw_SybBin/bin/sqwsyb_KillSessions.ksh:
Generate kill of sybase connections
You can include or exclude databases by lists
By default kill all sessions
you can also choose the number of retry to kill session
See the detailed help for sqwsyb_KillSessions.ksh
sqwsyb_LoadAllDatabases.ksh
Script $gvsqw_SybBin/bin/sqwsyb_LoadAllDatabases.ksh:
load of all databases in parallel
See the detailed help for sqwsyb_LoadAllDatabases.ksh
sqwsyb_LoadDatabase.ksh
Script $gvsqw_SybBin/bin/sqwsyb_LoadDatabase.ksh:
Standard database Load sybase
script dynamically find dump files to Load
You can choose type of Load (by default full):
- full -> Load full dump
- inc -> Load dump tran
- stb -> Load dump tran for standby
- fstb -> Load full dump plus dump tran for standby
You can choose to online database or not(default on):
- on -> online
- off -> not online
- ostb -> online for standby access
The script can also:
- kill connected sessions on the database to Load
- make a synchronisation of syslogins/sysusers
- run shell script before Load
- run shell script after Load
See the detailed help for sqwsyb_LoadDatabase.ksh
sqwsyb_NetBackup.ksh
Script $gvsqw_SybBin/bin/sqwsyb_NetBackup.ksh:
backup with NetBackup dump/backup files
See the detailed help for sqwsyb_NetBackup.ksh
sqwsyb_ParallelRun.ksh
Script $gvsqw_SybBin/bin/sqwsyb_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 sqwsyb_ParallelRun.ksh
sqwsyb_RebuildAllDatabases.ksh
Script $gvsqw_SybBin/bin/sqwsyb_RebuildAllDatabases.ksh:
Run of sqwsyb_RebuildDatabase.ksh in parallel mode
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)
Filters to generate database list (you can mix all off them):
- Include list of database
- Exclude list of database
- Include like clause
- Exclude like clause
- Where clause
See the detailed help for sqwsyb_RebuildAllDatabases.ksh
sqwsyb_RebuildDatabase.ksh
Script $gvsqw_SybBin/bin/sqwsyb_RebuildDatabase.ksh:
Rebuild index or table who need reorganisation
based on optdiag command to retrieve cluster ratio of tables and indexes
You can choose options:
- Size min of table to consider
- Min cluster ratio for table before Rebuild it
- Min cluster ratio for index before Rebuild it
See the detailed help for sqwsyb_RebuildDatabase.ksh
sqwsyb_RsyncBackup.ksh
Script $gvsqw_SybBin/bin/sqwsyb_RsyncBackup.ksh:
rsync dir (without delete) to an other host
See the detailed help for sqwsyb_RsyncBackup.ksh
sqwsyb_RunJob.ksh
Script $gvsqw_SybBin/bin/sqwsyb_RunJob.ksh:
Run Sybase scripts and generate log and error file
based on $gvsqw_RootCfg/sqwsyb_Jobs.cfg configuration file
compress and purge oldest log files
See the detailed help for sqwsyb_RunJob.ksh
sqwsyb_StatisticsAllDatabases.ksh
Script $gvsqw_SybBin/bin/sqwsyb_StatisticsAllDatabases.ksh:
Run of sqwsyb_StatisticsDatabase.ksh in parallel mode
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)
Filters to generate database list (you can mix all off them):
- Include list of database
- Exclude list of database
- Include like clause
- Exclude like clause
- Where clause
See the detailed help for sqwsyb_StatisticsAllDatabases.ksh
sqwsyb_StatisticsDatabase.ksh
Script $gvsqw_SybBin/bin/sqwsyb_StatisticsDatabase.ksh:
update statistics
use the command 'update statistics $Owner.$Table'
compute Statistics only on the firsts indexed columns
See the detailed help for sqwsyb_StatisticsDatabase.ksh
sqwsyb_UpdtStatsAllDatabases.ksh
Script $gvsqw_SybBin/bin/sqwsyb_UpdtStatsAllDatabases.ksh:
Run of sqwsyb_UpdtStatsDatabase.ksh in parallel mode
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)
Filters to generate database list (you can mix all off them):
- Include list of database
- Exclude list of database
- Include like clause
- Exclude like clause
- Where clause
See the detailed help for sqwsyb_UpdtStatsAllDatabases.ksh
sqwsyb_UpdtStatsDatabase.ksh
Script $gvsqw_SybBin/bin/sqwsyb_UpdtStatsDatabase.ksh:
update index Statistics
use the command 'update index Statistics $lvsqw_Owner.$lvsqw_Table'
compute Statistics on all indexed columns
you can also force delete with 'delete Statistics $lvsqw_Owner.$lvsqw_Table'
dynamically calculates a sample to put option 'with sampling=$lvsqw_SamplePct percent'
See the detailed help for sqwsyb_UpdtStatsDatabase.ksh
sqwsyb_UpdtStatsRebuildWithFlag.ksh
Script $gvsqw_SybBin/bin/sqwsyb_UpdtStatsRebuildWithFlag.ksh:
Flag + UpdtStats + Rebuild
See the detailed help for sqwsyb_UpdtStatsRebuildWithFlag.ksh
etc
sqwsyb_CreDs_AseRs_157.cfg
Configuration file $gvsqw_SybBin/../etc/sqwsyb_CreDs_AseRs_157.cfg:
See the detailed help for sqwsyb_CreDs_AseRs_157.cfg
sqwsyb_CreDs_AseRs.cfg
Configuration file $gvsqw_SybBin/../etc/sqwsyb_CreDs_AseRs.cfg:
See the detailed help for sqwsyb_CreDs_AseRs.cfg
sqwsyb_CreDs_BsRs_157.cfg
Configuration file $gvsqw_SybBin/../etc/sqwsyb_CreDs_BsRs_157.cfg:
See the detailed help for sqwsyb_CreDs_BsRs_157.cfg
sqwsyb_CreDs_BsRs.cfg
Configuration file $gvsqw_SybBin/../etc/sqwsyb_CreDs_BsRs.cfg:
See the detailed help for sqwsyb_CreDs_BsRs.cfg
sqwsyb_CreDs_CrontabRef.cfg
Configuration file $gvsqw_SybBin/../etc/sqwsyb_CreDs_CrontabRef.cfg:
See the detailed help for sqwsyb_CreDs_CrontabRef.cfg
sqwsyb_CreDs_Jobs.cfg
Configuration file $gvsqw_SybBin/../etc/sqwsyb_CreDs_Jobs.cfg:
See the detailed help for sqwsyb_CreDs_Jobs.cfg
sqwsyb_GlobalVar.cfg
Configuration file $gvsqw_SybBin/../etc/sqwsyb_GlobalVar.cfg:
Global var for Sybase
It contains the operating variables of SQWareProduction.
See the detailed help for sqwsyb_GlobalVar.cfg
sqwsyb_Template.cfg
Configuration file $gvsqw_SybBin/../etc/sqwsyb_Template.cfg:
Template for overLoad default paramaters of 'All' scripts
See the detailed help for sqwsyb_Template.cfg
.profile
Sample file for .profile $gvsqw_SybBin/../etc/.profile:
Sample of lines to add to .profile of sybase users.
See the detailed help for .profile
.profile_confort
File to put aliases $gvsqw_SybBin/../etc/.profile_confort:
Contains confort aliases of SQWareProduction for RDBMS sybase.
See the detailed help for .profile_confort
lib
sqwsyb_CopyDumpDatabase.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_CopyDumpDatabase.lib:
lib for sqwsyb_CopyDumpDatabase.ksh
See the detailed help for sqwsyb_CopyDumpDatabase.lib
sqwsyb_DumpAllDatabases.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_DumpAllDatabases.lib:
lib for sqwsyb_DumpAllDatabases.ksh
See the detailed help for sqwsyb_DumpAllDatabases.lib
sqwsyb_DumpDatabase.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_DumpDatabase.lib:
lib for sqwsyb_DumpDatabase.ksh
See the detailed help for sqwsyb_DumpDatabase.lib
sqwsyb_GatherDistantFsSize.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_GatherDistantFsSize.lib:
lib for sqwsyb_GatherFsSize.ksh
See the detailed help for sqwsyb_GatherDistantFsSize.lib
sqwsyb_GatherIndicators.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_GatherIndicators.lib:
lib for sqwsyb_GatherIndicators.ksh
See the detailed help for sqwsyb_GatherIndicators.lib
sqwsyb_GatherIndicators_Overload.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_GatherIndicators_Overload.lib:
lib for overLoad sqwsyb_GatherIndicators.ksh
See the detailed help for sqwsyb_GatherIndicators_Overload.lib
sqwsyb_GenerateCreateInstance.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_GenerateCreateInstance.lib:
lib for generate create dataserver
See the detailed help for sqwsyb_GenerateCreateInstance.lib
sqwsyb_Global.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_Global.lib:
central lib of generic fonctions for sybase
See the detailed help for sqwsyb_Global.lib
sqwsyb_LoadAllDatabases.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_LoadAllDatabases.lib:
lib for sqwsyb_LoadAllDatabases.ksh
See the detailed help for sqwsyb_LoadAllDatabases.lib
sqwsyb_LoadDatabase.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_LoadDatabase.lib:
lib for sqwsyb_LoadDatabase.ksh
See the detailed help for sqwsyb_LoadDatabase.lib
sqwsyb_NetBackup.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_NetBackup.lib:
lib for sqwgen_NetBackup.ksh
See the detailed help for sqwsyb_NetBackup.lib
sqwsyb_RebuildDatabase.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_RebuildDatabase.lib:
lib for sqwsyb_RebuildDatabase.ksh
See the detailed help for sqwsyb_RebuildDatabase.lib
sqwsyb_RsyncBackup.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_RsyncBackup.lib:
lib for sqwgen_RsyncBackup.ksh.ksh
See the detailed help for sqwsyb_RsyncBackup.lib
sqwsyb_SetEnv.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_SetEnv.lib:
fonction to set env for $DSQUERY
See the detailed help for sqwsyb_SetEnv.lib
sqwsyb_StatisticsDatabase.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_StatisticsDatabase.lib:
lib for sqwsyb_StatisticsDatabase.ksh
See the detailed help for sqwsyb_StatisticsDatabase.lib
sqwsyb_UpdtStatsDatabase.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_UpdtStatsDatabase.lib:
lib for sqwsyb_UpdtStatsDatabase.ksh
See the detailed help for sqwsyb_UpdtStatsDatabase.lib
tools
sqwsyb_GenerateCreateInstance.ksh
Script $gvsqw_SybBin/../tools/sqwsyb_GenerateCreateInstance.ksh:
Generate create dataserver files
See the detailed help for sqwsyb_GenerateCreateInstance.ksh
sqwsyb_GetSaPass.ksh
Script $gvsqw_SybBin/../tools/sqwsyb_GetSaPass.ksh:
set env for $DSQUERY
See the detailed help for sqwsyb_GetSaPass.ksh
sqwsyb_SetEnv.ksh
Script $gvsqw_SybBin/../tools/sqwsyb_SetEnv.ksh:
set env for $DSQUERY
See the detailed help for sqwsyb_SetEnv.ksh
sqwsyb_Spm.ksh
Script $gvsqw_SybBin/../tools/sqwsyb_Spm.ksh:
request for sybase
See the detailed help for sqwsyb_Spm.ksh
sqwsyb_TestMySQL.ksh
Script $gvsqw_SybBin/../tools/sqwsyb_TestMySQL.ksh:
Generic test MySQL connection script
See the detailed help for sqwsyb_TestMySQL.ksh
sqwsyb_TestSendmail.ksh
Script $gvsqw_SybBin/../tools/sqwsyb_TestSendmail.ksh:
Generic test sendmail script
See the detailed help for sqwsyb_TestSendmail.ksh
help
Contains help files for -s option of bin scripts.
spm
SQL query toolkit
See the detailed help for spm