Difference between revisions of "SQWareProduction:sybase"
m (Updated by BatchUser) |
m (Updated by BatchUser) |
||
Line 196: | Line 196: | ||
<br> | <br> | ||
[[SQWareProduction:sybase:lib:sqwsyb_CheckIndicators_Overload.lib|See the detailed help for sqwsyb_CheckIndicators_Overload.lib]]<br><br> | [[SQWareProduction:sybase:lib:sqwsyb_CheckIndicators_Overload.lib|See the detailed help for sqwsyb_CheckIndicators_Overload.lib]]<br><br> | ||
+ | |||
+ | === sqwsyb_CopyDumpDatabase.lib === | ||
+ | shell functions library $gvsqw_SybBin/../lib/sqwsyb_CopyDumpDatabase.lib:<br> | ||
+ | {{SQWareProduction_sqwsyb_CopyDumpDatabase.lib_presentation}} | ||
+ | {{SQWareProductionSurchargeLib|sybase|Syb|sqwsyb_CopyDumpDatabase.lib}} | ||
+ | <br> | ||
+ | [[SQWareProduction:sybase:lib:sqwsyb_CopyDumpDatabase.lib|See the detailed help for sqwsyb_CopyDumpDatabase.lib]]<br><br> | ||
=== sqwsyb_DumpDatabase.lib === | === sqwsyb_DumpDatabase.lib === | ||
Line 238: | Line 245: | ||
<br> | <br> | ||
[[SQWareProduction:sybase:lib:sqwsyb_InsertIndicators.lib|See the detailed help for sqwsyb_InsertIndicators.lib]]<br><br> | [[SQWareProduction:sybase:lib:sqwsyb_InsertIndicators.lib|See the detailed help for sqwsyb_InsertIndicators.lib]]<br><br> | ||
+ | |||
+ | === sqwsyb_LoadDatabase.lib === | ||
+ | shell functions library $gvsqw_SybBin/../lib/sqwsyb_LoadDatabase.lib:<br> | ||
+ | {{SQWareProduction_sqwsyb_LoadDatabase.lib_presentation}} | ||
+ | {{SQWareProductionSurchargeLib|sybase|Syb|sqwsyb_LoadDatabase.lib}} | ||
+ | <br> | ||
+ | [[SQWareProduction:sybase:lib:sqwsyb_LoadDatabase.lib|See the detailed help for sqwsyb_LoadDatabase.lib]]<br><br> | ||
=== sqwsyb_RebuildDatabase.lib === | === sqwsyb_RebuildDatabase.lib === |
Revision as of 16:25, 25 March 2012
Contents
- 1 Presentation
- 2 bin
- 2.1 sqwsyb_CheckIndicators.ksh
- 2.2 sqwsyb_CheckstorageAllDatabases.ksh
- 2.3 sqwsyb_CheckstorageDatabase.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_LoadDatabase.ksh
- 2.13 sqwsyb_ParallelRun.ksh
- 2.14 sqwsyb_RebuildAllDatabases.ksh
- 2.15 sqwsyb_RebuildDatabase.ksh
- 2.16 sqwsyb_RunJob.ksh
- 2.17 sqwsyb_StatisticsAllDatabases.ksh
- 2.18 sqwsyb_StatisticsDatabase.ksh
- 2.19 sqwsyb_UpdtStatsAllDatabases.ksh
- 2.20 sqwsyb_UpdtStatsDatabase.ksh
- 3 etc
- 4 lib
- 4.1 sqwsyb_CheckIndicators.lib
- 4.2 sqwsyb_CheckIndicators_Overload.lib
- 4.3 sqwsyb_CopyDumpDatabase.lib
- 4.4 sqwsyb_DumpDatabase.lib
- 4.5 sqwsyb_GatherDistantFsSize.lib
- 4.6 sqwsyb_GatherIndicators.lib
- 4.7 sqwsyb_GenerateCreateDataserver.lib
- 4.8 sqwsyb_Global.lib
- 4.9 sqwsyb_InsertIndicators.lib
- 4.10 sqwsyb_LoadDatabase.lib
- 4.11 sqwsyb_RebuildDatabase.lib
- 4.12 sqwsyb_SetEnv.lib
- 4.13 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_CheckIndicators.ksh
Script $gvsqw_SybBin/bin/sqwsyb_CheckIndicators.ksh:
Checks the indicators collected by sqwsyb_GatherIndicators.ksh
indicators are stored in SQWareRepository
generates email in html format with links to SQWareWeb
Standards checks:
- Dataservers without indicators
- Usage rate of databases
- Usage rate of FS
- Dataserver without backup succeed since ${gvsqw_NbDaysFull} days
- Databases without backup full succeed since ${gvsqw_NbDaysFull} days
See the detailed help for sqwsyb_CheckIndicators.ksh
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_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_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_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_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
etc
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.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_CrontabRef.cfg
Configuration file $gvsqw_SybBin/../etc/sqwsyb_CrontabRef.cfg:
See the detailed help for sqwsyb_CrontabRef.cfg
sqwsyb_DbRefVar.cfg
Configuration file $gvsqw_SybBin/../etc/sqwsyb_DbRefVar.cfg:
Global var for indicators
It contains the operating variables of SQWareProduction.
See the detailed help for sqwsyb_DbRefVar.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_IndicatorsVar.cfg
Configuration file $gvsqw_SybBin/../etc/sqwsyb_IndicatorsVar.cfg:
Global var for indicators scripts
It contains the operating variables of SQWareProduction.
See the detailed help for sqwsyb_IndicatorsVar.cfg
sqwsyb_Jobs.cfg
Configuration file $gvsqw_SybBin/../etc/sqwsyb_Jobs.cfg:
See the detailed help for sqwsyb_Jobs.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_CheckIndicators.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_CheckIndicators.lib:
lib for sqwora_CheckIndicators.ksh
See the detailed help for sqwsyb_CheckIndicators.lib
sqwsyb_CheckIndicators_Overload.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_CheckIndicators_Overload.lib:
template lib for overload sqwora_CheckIndicators.ksh
See the detailed help for sqwsyb_CheckIndicators_Overload.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_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_GenerateCreateDataserver.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_GenerateCreateDataserver.lib:
lib for generate create dataserver
See the detailed help for sqwsyb_GenerateCreateDataserver.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_InsertIndicators.lib
shell functions library $gvsqw_SybBin/../lib/sqwsyb_InsertIndicators.lib:
generic fonctions to insert into referential
See the detailed help for sqwsyb_InsertIndicators.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_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_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_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_GenerateCreateDataserver.ksh
Script $gvsqw_SybBin/../tools/sqwsyb_GenerateCreateDataserver.ksh:
Generate create dataserver files
See the detailed help for sqwsyb_GenerateCreateDataserver.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
help
Contains help files for -s option of bin scripts.
spm
SQL query toolkit
See the detailed help for spm