Difference between revisions of "SQWareProduction:mssql:etc:sqwmsq GlobalVar.cfg"

From Wiki_dbSQWare
Jump to: navigation, search
m (Updated by BatchUser)
m (Updated by BatchUser)
Line 1: Line 1:
 
Configuration file $gvsqw_MsqBin/../etc/sqwmsq_GlobalVar.cfg:<br>
 
Configuration file $gvsqw_MsqBin/../etc/sqwmsq_GlobalVar.cfg:<br>
 
{{SQWareProduction_sqwmsq_GlobalVar.cfg_presentation}}
 
{{SQWareProduction_sqwmsq_GlobalVar.cfg_presentation}}
<br>
+
{{SQWareProduction_sqwmsq_GlobalVar.cfg_content}}
<br>
+
{{SQWareProduction_sqwmsq_GlobalVar.cfg_explanation}}
File content:
 
<pre>
 
export gvsqw_MssqlPassFile=$gvsqw_DistPasswdFile
 
export gvsqw_MssqlSaUser='sa'
 
export gvsqw_RootAdmin='$HOME/admin/${lvsqw_InstanceParam}'
 
export gvsqw_RootAdminDisable='$HOME'
 
export gvsqw_RootCfg='$gvsqw_RootAdmin/sqwConfig'
 
export gvsqw_WhereClauseGenDatabaseList="and name not like 'tempdb%' and name != 'ReportServerTempDb'"
 
export gvsqw_DbAlias='$lvsqw_InstanceParam'
 
export gvsqw_SuppAlert=90
 
#export gvsqw_MsSqlErrorMsg='^Msg 3014, Level 0, State 1|^Msg 3211, Level 0, State 1|^Msg 4035, Level 0, State 1|^Server ..*, Line 1|@@rowcount'
 
export gvsqw_MsSqlErrorMsg='^Msg [0-9][0-9]*, Level 0, State 1|^Server ..*, Line 1|@@rowcount'
 
export gvsqw_XpCmdShellWaitTimeOut=300
 
export gvsqw_NbThreadBackup=4
 
export gvsqw_DefAGR_Backup=5
 
export gvsqw_DefAGE_Backup=20
 
export gvsqw_BackupNbGeneration=2
 
export gvsqw_SizeMaxStripe=40000
 
export gvsqw_NbMaxStripe=5
 
export gvsqw_BackupStatSize=10
 
export gvsqw_NbThreadRebuild=4
 
export gvsqw_DefAGR_Rebuild=5
 
export gvsqw_DefAGE_Rebuild=20
 
export gvsqw_SetOptionsRebuild='set ansi_defaults, concat_null_yields_null on
 
export gvsqw_RebuildType='all' #Rebuild type, 'all' for tables, 'index' for indexes
 
export gvsqw_MinRatioReb=30 #Min avg_fragmentation_in_percent before rebuild
 
export gvsqw_MinRatioRgz=10 #Min avg_fragmentation_in_percent before reorganize
 
export gvsqw_NbThreadStatistics=4
 
export gvsqw_DefAGR_Statistics=5
 
export gvsqw_DefAGE_Statistics=20
 
export gvsqw_NbThreadRestore=4
 
export gvsqw_DefAGR_Restore=5
 
export gvsqw_DefAGE_Restore=20
 
export gvsqw_RestoreStatSize=5
 
export gvsqw_NbThreadCheckdb=4
 
export gvsqw_DefAGR_Checkdb=5
 
export gvsqw_DefAGE_Checkdb=20
 
export gvsqw_SizeMinTableIndicators=10
 
export gvsqw_BackupsIndicatorsDays=2
 
export gvsqw_ExcludeDatabaseStatus="'OFFLINE','RESTORING'"
 
export gvsqw_GenExcludeDatabasesObjects="^master$|^msdb$|^model$|^ReportServer"
 
export gvsqw_GenExcludeDatabasesObjectsExtra=""
 
export gvsqw_StringReplaceSch="tr -d '\015'|tr '\311' 'E'"
 
#export gvsqw_ForcedReturnCodeScript_sqwmsq_BackupAllDatabases=0
 
#export gvsqw_ForcedReturnCodeScript_sqwmsq_BackupDatabase=0
 
#export gvsqw_ForcedReturnCodeScript_sqwmsq_CheckdbAllDatabases=0
 
#export gvsqw_ForcedReturnCodeScript_sqwmsq_CheckdbDatabase=0
 
#export gvsqw_ForcedReturnCodeScript_sqwmsq_CheckIndicators=0
 
#export gvsqw_ForcedReturnCodeScript_sqwmsq_GatherIndicators=0
 
#export gvsqw_ForcedReturnCodeScript_sqwmsq_ParallelRun=0
 
#export gvsqw_ForcedReturnCodeScript_sqwmsq_RebuildIndexAllDatabases=0
 
#export gvsqw_ForcedReturnCodeScript_sqwmsq_RebuildIndexDatabase=0
 
#export gvsqw_ForcedReturnCodeScript_sqwmsq_RestoreAllDatabases=0
 
#export gvsqw_ForcedReturnCodeScript_sqwmsq_RestoreDatabase=0
 
#export gvsqw_ForcedReturnCodeScript_sqwmsq_RotateErrorLog=0
 
#export gvsqw_ForcedReturnCodeScript_sqwmsq_StatisticsAllDatabases=0
 
#export gvsqw_ForcedReturnCodeScript_sqwmsq_StatisticsDatabase=0
 
</pre>
 
<br>
 
<br>
 
Variables explanation:
 
<pre>
 
gvsqw_BackupNbGeneration =>
 
gvsqw_BackupsIndicatorsDays =>
 
gvsqw_BackupStatSize =>
 
gvsqw_DbAlias =>
 
gvsqw_DefAGE_Backup =>
 
gvsqw_DefAGE_Checkdb =>
 
gvsqw_DefAGE_Rebuild =>
 
gvsqw_DefAGE_Restore =>
 
gvsqw_DefAGE_Statistics =>
 
gvsqw_DefAGR_Backup =>
 
gvsqw_DefAGR_Checkdb =>
 
gvsqw_DefAGR_Rebuild =>
 
gvsqw_DefAGR_Restore =>
 
gvsqw_DefAGR_Statistics =>
 
gvsqw_ExcludeDatabaseStatus =>
 
#gvsqw_ForcedReturnCodeScript_sqwmsq_BackupAllDatabases =>
 
#gvsqw_ForcedReturnCodeScript_sqwmsq_BackupDatabase =>
 
#gvsqw_ForcedReturnCodeScript_sqwmsq_CheckdbAllDatabases =>
 
#gvsqw_ForcedReturnCodeScript_sqwmsq_CheckdbDatabase =>
 
#gvsqw_ForcedReturnCodeScript_sqwmsq_CheckIndicators =>
 
#gvsqw_ForcedReturnCodeScript_sqwmsq_GatherIndicators =>
 
#gvsqw_ForcedReturnCodeScript_sqwmsq_ParallelRun =>
 
#gvsqw_ForcedReturnCodeScript_sqwmsq_RebuildIndexAllDatabases =>
 
#gvsqw_ForcedReturnCodeScript_sqwmsq_RebuildIndexDatabase =>
 
#gvsqw_ForcedReturnCodeScript_sqwmsq_RestoreAllDatabases =>
 
#gvsqw_ForcedReturnCodeScript_sqwmsq_RestoreDatabase =>
 
#gvsqw_ForcedReturnCodeScript_sqwmsq_RotateErrorLog =>
 
#gvsqw_ForcedReturnCodeScript_sqwmsq_StatisticsAllDatabases =>
 
#gvsqw_ForcedReturnCodeScript_sqwmsq_StatisticsDatabase =>
 
gvsqw_GenExcludeDatabasesObjectsExtra =>
 
gvsqw_GenExcludeDatabasesObjects =>
 
gvsqw_MinRatioReb =>
 
gvsqw_MinRatioRgz =>
 
gvsqw_MsSqlErrorMsg =>
 
#gvsqw_MsSqlErrorMsg =>
 
gvsqw_MssqlPassFile =>
 
gvsqw_MssqlSaUser =>
 
gvsqw_NbMaxStripe =>
 
gvsqw_NbThreadBackup =>
 
gvsqw_NbThreadCheckdb =>
 
gvsqw_NbThreadRebuild =>
 
gvsqw_NbThreadRestore =>
 
gvsqw_NbThreadStatistics =>
 
gvsqw_RebuildType =>
 
gvsqw_RestoreStatSize =>
 
gvsqw_RootAdminDisable =>
 
gvsqw_RootAdmin =>
 
gvsqw_RootCfg =>
 
gvsqw_SetOptionsRebuild =>
 
gvsqw_SizeMaxStripe =>
 
gvsqw_SizeMinTableIndicators =>
 
gvsqw_StringReplaceSch =>
 
gvsqw_SuppAlert =>
 
gvsqw_WhereClauseGenDatabaseList =>
 
gvsqw_XpCmdShellWaitTimeOut =>
 
</pre>
 
 
{{SQWareProductionSurchargeVar|mssql|Msq|sqwmsq_GlobalVar.cfg}}
 
{{SQWareProductionSurchargeVar|mssql|Msq|sqwmsq_GlobalVar.cfg}}
 
<br>
 
<br>

Revision as of 18:10, 14 April 2019

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

File content:

#!/bin/ksh
###################################################################
# SQWareProduction for Mssql module of dbSQWare
# 
# dbSQWare is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# CGU/CGA for more details.
# 
# You should have received a copy of the CGU/CGA
# along with this program.  If not, see <http://www.dbsqware.com/licenses/>.
# 
# For information : contact@dbsqware.com or www.dbsqware.com
###################################################################
## @Synopsis	Global var for Mssql
## @Copyright	Copyright 2010-2024, dbSQWare (www.dbsqware.com)

#global
export gvsqw_SqwVersionDbms=2024.07
if [ "$gvsqw_DistPasswdFile" != "" ]
then
	export gvsqw_MssqlPassFile=$gvsqw_DistPasswdFile
else
	export gvsqw_DistPasswdFile="$HOME/.passwd_mssql"
fi
export gvsqw_MssqlSaUser='sa'
export gvsqw_RootAdmin='$HOME/admin/${lvsqw_InstanceParam}'
export gvsqw_RootAdminDisable='$HOME'
export gvsqw_RootCfg='$gvsqw_RootAdmin/sqwConfig'
export gvsqw_WhereClauseGenDatabaseList="and name not like 'tempdb%' and name not like 'ReportServer%TempDb'"
export gvsqw_DbAlias='$lvsqw_InstanceParam'
export gvsqw_SuppAlert=90
#export gvsqw_MsSqlErrorMsg='^Msg 3014, Level 0, State 1|^Msg 3211, Level 0, State 1|^Msg 4035, Level 0, State 1|^Server ..*, Line 1|@@rowcount'
export gvsqw_MsSqlErrorMsg='^Msg [0-9][0-9]*, Level 0, State 1|^Server ..*, Line 1|@@rowcount'
export gvsqw_XpCmdShellWaitTimeOut=300
#to avoid "Cannot resolve collation conflict for column ..."
export gvsqw_Collate='Latin1_General_CI_AI'

#for backup scripts
export gvsqw_NbThreadBackup=4
export gvsqw_DefAGR_Backup=5
export gvsqw_DefAGE_Backup=20
export gvsqw_BackupNbGeneration=2
export gvsqw_SizeMaxStripe=40000
export gvsqw_NbMaxStripe=5
export gvsqw_BackupStatSize=10

#for Rebuild index scripts
export gvsqw_NbThreadRebuild=4
export gvsqw_DefAGR_Rebuild=5
export gvsqw_DefAGE_Rebuild=20
export gvsqw_SetOptionsRebuild='set ansi_defaults, concat_null_yields_null on
go'
export gvsqw_RebuildType='index' #Rebuild type, 'all' for tables, 'index' for indexes
export gvsqw_MinRatioReb=30 #Min avg_fragmentation_in_percent before rebuild
export gvsqw_MinRatioRgz=10 #Min avg_fragmentation_in_percent before reorganize
export gvsqw_SizeMinIndexRebuild=1 #Min size of index in Mb to take into account
export gvsqw_SizeMaxIndexRebuild=50000 #Max size of index in Mb to take into account

#for update statistics scripts
export gvsqw_NbThreadStatistics=4
export gvsqw_DefAGR_Statistics=5
export gvsqw_DefAGE_Statistics=20

#for restore scripts
export gvsqw_NbThreadRestore=4
export gvsqw_DefAGR_Restore=5
export gvsqw_DefAGE_Restore=20
export gvsqw_RestoreStatSize=5

#for checkdb scripts
export gvsqw_NbThreadCheckdb=4
export gvsqw_DefAGR_Checkdb=5
export gvsqw_DefAGE_Checkdb=20

#for indicators
export gvsqw_SizeMinTableIndicators=10
export gvsqw_BackupsIndicatorsDays=2
export gvsqw_ExcludeDatabaseStatus="'OFFLINE','RESTORING'"
export gvsqw_GenExcludeDatabasesObjects="^master$|^msdb$|^model$|^ReportServer"
export gvsqw_GenExcludeDatabasesObjectsExtra=""
#Remove or replace extra characters like E with accent !
export gvsqw_StringReplaceSch="tr -d '\015'|tr '\311' 'E'"
export gvsqw_UserTypeList="'SQL_LOGIN','WINDOWS_LOGIN'"

##Globaly forcing return code for scripts
#export gvsqw_ForcedReturnCodeScript_sqwmsq_BackupAllDatabases=0
#export gvsqw_ForcedReturnCodeScript_sqwmsq_BackupDatabase=0
#export gvsqw_ForcedReturnCodeScript_sqwmsq_CheckdbAllDatabases=0
#export gvsqw_ForcedReturnCodeScript_sqwmsq_CheckdbDatabase=0
#export gvsqw_ForcedReturnCodeScript_sqwmsq_CheckIndicators=0
#export gvsqw_ForcedReturnCodeScript_sqwmsq_GatherIndicators=0
#export gvsqw_ForcedReturnCodeScript_sqwmsq_ParallelRun=0
#export gvsqw_ForcedReturnCodeScript_sqwmsq_RebuildIndexAllDatabases=0
#export gvsqw_ForcedReturnCodeScript_sqwmsq_RebuildIndexDatabase=0
#export gvsqw_ForcedReturnCodeScript_sqwmsq_RestoreAllDatabases=0
#export gvsqw_ForcedReturnCodeScript_sqwmsq_RestoreDatabase=0
#export gvsqw_ForcedReturnCodeScript_sqwmsq_RotateErrorLog=0
#export gvsqw_ForcedReturnCodeScript_sqwmsq_StatisticsAllDatabases=0
#export gvsqw_ForcedReturnCodeScript_sqwmsq_StatisticsDatabase=0


Variables explanation:

#General variables
gvsqw_SqwVersion => SQWare Production version
gvsqw_MssqlPassFile => Password file path
gvsqw_SuppAlert => number of days to delete errorlog files
gvsqw_RootAdmin => admin directory
gvsqw_RootCfg => configuration directory
gvsqw_NbThread => default number of thread for parallelism
gvsqw_WhereClauseGenDatabaseList => XXXXX
gvsqw_DbAlias => Database Alias
gvsqw_MsSqlErrorMsg => XXXXX
gvsqw_XpCmdShellWaitTimeOut => XXXXX
gvsqw_Collate => XXXXX

#for backup scripts
gvsqw_NbThreadBackup => default number of thread for parallelism for backup
gvsqw_DefAGR_Backup => default aggressiveness for execution of backup
gvsqw_DefAGE_Backup => default aggressiveness for check end of backup
gvsqw_BackupNbGeneration => default number generation of backup to keep online
gvsqw_SizeMaxStripe => default size max of stripe
gvsqw_NbMaxStripe => default number max of stripe
#Put disable in gvsqw_TraceBackup if you don't want to trace backup execution in SQWareRepository

gvsqw_BackupStatSize => size of Statistics backup option (to prevent timeout of tsql)

#for Rebuild index scripts
gvsqw_NbThreadRebuild => default number of thread for parallelism for Rebuild
gvsqw_DefAGR_Rebuild => default aggressiveness for execution of Rebuild
gvsqw_DefAGE_Rebuild => default aggressiveness for check end of Rebuild
gvsqw_SetOptionsRebuild => XXXXX
gvsqw_RebuildType => XXXXX
gvsqw_MinRatioReb => XXXXX
gvsqw_MinRatioRgz => XXXXX

#for update statistics scripts
gvsqw_NbThreadStatistics => default number of thread for parallelism for update statistics
gvsqw_DefAGR_Statistics => default aggressiveness for execution of update statistics
gvsqw_DefAGE_Statistics => default aggressiveness for check end of update statistics

#for restore scripts
gvsqw_NbThreadRestore => default number of thread for parallelism for restore
gvsqw_DefAGR_Restore => default aggressiveness for execution of restore
gvsqw_DefAGE_Restore => default aggressiveness for check end of restore
gvsqw_RestoreStatSize => XXXXX

#for checkdb scripts
gvsqw_NbThreadCheckdb => default number of thread for parallelism for checkdb
gvsqw_DefAGR_Checkdb => default aggressiveness for execution of checkdb
gvsqw_DefAGE_Checkdb => default aggressiveness for check end of checkdb

#for indicators
gvsqw_BackupsIndicatorsDays => XXXXX
gvsqw_ExcludeDatabaseStatus => XXXXX
gvsqw_GenExcludeDatabasesObjects => XXXXX
gvsqw_GenExcludeDatabasesObjectsExtra => XXXXX
#Remove or replace extra characters like E with accent !
gvsqw_StringReplaceSch => XXXXX
gvsqw_UserTypeList => List of users types to take into account when gather user access

##Globaly forcing return code for scripts
gvsqw_ForcedReturnCodeScript_sqwmsq_BackupAllDatabases => To force return code of sqwmsq_BackupAllDatabases.ksh
gvsqw_ForcedReturnCodeScript_sqwmsq_BackupDatabase => To force return code of sqwmsq_BackupDatabase.ksh
gvsqw_ForcedReturnCodeScript_sqwmsq_CheckdbAllDatabases => To force return code of sqwmsq_CheckdbAllDatabases.ksh
gvsqw_ForcedReturnCodeScript_sqwmsq_CheckdbDatabase => To force return code of sqwmsq_CheckdbDatabase.ksh
gvsqw_ForcedReturnCodeScript_sqwmsq_GatherIndicators => To force return code of sqwmsq_GatherIndicators.ksh
gvsqw_ForcedReturnCodeScript_sqwmsq_ParallelRun => To force return code of sqwmsq_ParallelRun.ksh
gvsqw_ForcedReturnCodeScript_sqwmsq_RebuildIndexAllDatabases => To force return code of sqwmsq_RebuildIndexAllDatabases.ksh
gvsqw_ForcedReturnCodeScript_sqwmsq_RebuildIndexDatabase => To force return code of sqwmsq_RebuildIndexDatabase.ksh
gvsqw_ForcedReturnCodeScript_sqwmsq_RestoreAllDatabases => To force return code of sqwmsq_RestoreAllDatabases.ksh
gvsqw_ForcedReturnCodeScript_sqwmsq_RestoreDatabase => To force return code of RestoreDatabase.ksh
gvsqw_ForcedReturnCodeScript_sqwmsq_RotateErrorLog => To force return code of sqwmsq_RotateErrorLog.ksh
gvsqw_ForcedReturnCodeScript_sqwmsq_StatisticsAllDatabases => To force return code of sqwmsq_StatisticsAllDatabases.ksh
gvsqw_ForcedReturnCodeScript_sqwmsq_StatisticsDatabase => To force return code of sqwmsq_StatisticsDatabase.ksh

#for SQWare Web
gvsqw_WebDbaUserConn => Connection string ssh user@hostname to SQWare Web

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.