Difference between revisions of "SQWareCentral:mssql"
Expdbtools (talk | contribs) (→.profile_confort) |
Expdbtools (talk | contribs) (→v1.2) |
||
Line 244: | Line 244: | ||
</pre> | </pre> | ||
<br> | <br> | ||
− | |||
− | |||
− | |||
<br><br> | <br><br> |
Revision as of 22:17, 22 December 2010
auto
sqwmsq_DeplScripts.ksh
Action script $gvsqw_RootexpdbCentral/action/mssql/auto/sqwmsq_DeplScripts.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/mssql/auto_cust/sqwmsq_DeplScripts.ksh.
SQWareProduction deployment for Mssql
Action:
lfsqw_Action() { while read lvsqw_HostName lvsqw_UserName do echo "${c_info}$lvsqw_UserName@$lvsqw_HostName${c_normal}" ssh -T $lvsqw_UserName@$lvsqw_HostName <<EOFSSH mkdir -p $gvsqw_RootSQWareProductionMssql/$gvsqw_VersDeplSQWareProductionMssql cd $gvsqw_RootSQWareProductionMssql rm -f $gvsqw_VersSQWareProductionMssql ln -s $gvsqw_VersDeplSQWareProductionMssql $gvsqw_VersSQWareProductionMssql EOFSSH rsync -aHv $gvsqw_RsyncPathMssql --delete $gvsqw_RootSQWareProduction/mssql/$gvsqw_VersDeplSQWareProductionMssql $lvsqw_UserName@$lvsqw_HostName:$gvsqw_RootSQWareProductionMssql/. done <$gvsqw_TmpFile.lst }
sqwmsq_GatherIndicators.ksh
Action script $gvsqw_RootexpdbCentral/action/mssql/auto/sqwmsq_GatherIndicators.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/mssql/auto_cust/sqwmsq_GatherIndicators.ksh.
Mssql gather indicators
Action:
lfsqw_Action() { while read lvsqw_HostName lvsqw_UserName lvsqw_Instance do echo "${c_info}$lvsqw_UserName@$lvsqw_HostName $lvsqw_Instance${c_normal}" ssh -T $lvsqw_UserName@$lvsqw_HostName <<EOFSSH & . \$gvsqw_MsqBin/../tools/sqwmsq_SetEnv.ksh $lvsqw_Instance \$gvsqw_MsqBin/sqwmsq_RunJob.ksh -S $lvsqw_Instance -A IndicDba EOFSSH sleep 1 done <$gvsqw_TmpFile.lst wait }
sqwmsq_RotateLog.ksh
Action script $gvsqw_RootexpdbCentral/action/mssql/auto/sqwmsq_RotateLog.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/mssql/auto_cust/sqwmsq_RotateLog.ksh.
Execute RotateErrorLog action
Action:
lfsqw_Action() { while read lvsqw_HostName lvsqw_UserName lvsqw_Instance do echo "${c_info}$lvsqw_UserName@$lvsqw_HostName $lvsqw_Instance${c_normal}" ssh -T $lvsqw_UserName@$lvsqw_HostName <<EOFSSH & . \$gvsqw_MsqBin/../tools/sqwmsq_SetEnv.ksh $lvsqw_Instance \$gvsqw_MsqBin/sqwmsq_RunJob.ksh -S $lvsqw_Instance -A RotateErrorLog EOFSSH sleep 1 done <$gvsqw_TmpFile.lst wait }
etc
CrontabRef.cfg
Configuration file $gvsqw_RootexpdbCentral/action/mssql/etc/CrontabRef.cfg:
It contains the operating variables of SQWareCentral for mssql.
If you want to overload default variables,
put in $gvsqw_RootexpdbCentral/action/mssql/etc_cust/CrontabRef.cfg
your modifications (only variables you want to modify).
sqwc_DbRefVar.cfg
Configuration file $gvsqw_RootexpdbCentral/action/mssql/etc/sqwc_DbRefVar.cfg:
It contains the operating variables of SQWareCentral for mssql.
If you want to overload default variables,
put in $gvsqw_RootexpdbCentral/action/mssql/etc_cust/sqwc_DbRefVar.cfg
your modifications (only variables you want to modify).
File content:
export gvsqw_DbRefType_mssql='mssql' export gvsqw_DbRefPort_mssql='InstancePortForMssql' export gvsqw_DbRefInstance_mssql='InstanceNameForMssql' export gvsqw_DbRefDatabase_mssql='DatabaseInstanceNameForMssql' export gvsqw_DbRefUser_mssql='ConnexionUserForMssql' export gvsqw_DbRefPass_mssql='ConnexionPassForMssql' export gvsqw_EgrepiV_mssql='Sun Microsystems|you have'
Variable explanation:
gvsqw_DbRefDatabase_mssql => Database of SQWareRepository for Mssql gvsqw_DbRefInstance_mssql => Instance of SQWareRepository for Mssql gvsqw_DbRefPass_mssql => password to connect to SQWareRepository for Mssql gvsqw_DbRefPort_mssql => Not used gvsqw_DbRefType_mssql => type of RDBMS for SQWareRepository for Mssql gvsqw_DbRefUser_mssql => user to connect to SQWareRepository for Mssql gvsqw_EgrepiV_mssql => to supress trace of ssh connection
sqwc_ExpVar.cfg
Configuration file $gvsqw_RootexpdbCentral/action/mssql/etc/sqwc_ExpVar.cfg:
It contains the operating variables of SQWareCentral for mssql.
If you want to overload default variables,
put in $gvsqw_RootexpdbCentral/action/mssql/etc_cust/sqwc_ExpVar.cfg
your modifications (only variables you want to modify).
File content:
export gvsqw_RootSQWareProductionMssql="~$gvsqw_UserUniqueMssql/SQWareProduction/mssql" export gvsqw_VersSQWareProductionMssql='prod' export gvsqw_VersDeplSQWareProductionMssql='v1.2' export gvsqw_Mail_mssql='dba' export gvsqw_MailMsg_mssql='TrtMssqlAuto'
Variable explanation:
gvsqw_MailMsg_mssql => begining of email subject for Mssql gvsqw_Mail_mssql => email adress for Mssql gvsqw_RootSQWareProductionMssql => SQWareProduction directory source for Mssql gvsqw_VersDeplSQWareProductionMssql => version of SQWareProduction to deploy for Mssql gvsqw_VersSQWareProductionMssql => link for current version of SQWareProduction for Mssql
sqwc_GlobalVar.cfg
Configuration file $gvsqw_RootexpdbCentral/action/mssql/etc/sqwc_GlobalVar.cfg:
It contains the operating variables of SQWareCentral for mssql.
If you want to overload default variables,
put in $gvsqw_RootexpdbCentral/action/mssql/etc_cust/sqwc_GlobalVar.cfg
your modifications (only variables you want to modify).
File content:
export gvsqw_UserUniqueMssql='sysdba'
Variable explanation:
gvsqw_UserUniqueMssql => user to deploy SQWareProduction for Mssql
.profile_confort
File to put aliases $gvsqw_RootexpdbCentral/action/mssql/etc/.profile_confort:
File to put aliases $gvsqw_RootexpdbCentral/action/mssql/etc/.profile_confort:
Contains confort aliases of SQWareCentral for RDBMS mssql.
Contains confort aliases of SQWareCentral for RDBMS mssql.
Alias explanation:
act_msq => 'cd $gvsqw_RootexpdbCentral/action/mssql/prod;ls -al' depl_msq => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh mssql sqwmsq_DeplScripts.ksh sqwmsq_GenLstUnix.ksh NOLOG CONFIRM' repind_msq => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh mssql sqwmsq_GatherIndicators.ksh sqwmsq_GenLstRepind.ksh NOLOG' gen_msq => '$gvsqw_RootexpdbCentral/action/mssql/lst/sqwc_GenRefMssql.ksh'
lst
sqwc_GenRefDbMssql.ksh
List generator $gvsqw_RootexpdbCentral/action/mssql/lst/sqwc_GenRefDbMssql.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/mssql/lst_cust/sqwc_GenRefDbMssql.ksh.
Query used:
select 'MSQ;' + vol.Alias + ';' + vol.Database_name + ';' + ref.Env + ';' + from tsqw_Repository ref, tsqw_GenInfos inf, tsqw_VolDb vol, tsqw_GenHisto hist where hist.Month = convert(smalldatetime,'01'+substring(convert(char(10),getdate(),103),3,8),103) and inf.Alias = hist.Alias and inf.Gather_date = hist.Gather_date and inf.Alias = vol.Alias and inf.Gather_date = vol.Gather_date and ref.Alias = inf.Alias and ref.Status!='OFF' and vol.Database_name not in ('master','tempdb','Northwind','msdb','model','pubs') and vol.Database_name not like 'temp%' order by vol.Database_name, vol.Alias
sqwc_GenRefMssql.ksh
List generator $gvsqw_RootexpdbCentral/action/mssql/lst/sqwc_GenRefMssql.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/mssql/lst_cust/sqwc_GenRefMssql.ksh.
Query used:
select convert(char(15),Alias) ++ from tsqw_Repository order by alias
sqwmsq_GenLstInstance.ksh
List generator $gvsqw_RootexpdbCentral/action/mssql/lst/sqwmsq_GenLstInstance.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/mssql/lst_cust/sqwmsq_GenLstInstance.ksh.
Generation of the list of Mssql instances (tsqw_Repository)
Query used:
select '$gvsqw_HostTsql_mssql', '$gvsqw_UserTsql_mssql', alias from tsqw_Repository where STATUS = 'ON' order by alias
sqwmsq_GenLstRepind.ksh
List generator $gvsqw_RootexpdbCentral/action/mssql/lst/sqwmsq_GenLstRepind.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/mssql/lst_cust/sqwmsq_GenLstRepind.ksh.
Generation of the list for reprise of indicators (tsqw_Repository/tsqw_GenInfos)
Query used:
select '$gvsqw_HostTsql_mssql', '$gvsqw_UserTsql_mssql', alias from tsqw_Repository ref where STATUS = 'ON' and not exists ( select 1 from tsqw_GenInfos inf where inf.Gather_date = convert(smalldatetime,convert(char(10),getdate(),103),103) and ref.alias = inf.alias) order by alias
sqwmsq_GenLstUnix.ksh
List generator $gvsqw_RootexpdbCentral/action/mssql/lst/sqwmsq_GenLstUnix.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/mssql/lst_cust/sqwmsq_GenLstUnix.ksh.
Generation of the list of unix users FreeTds (tsqw_RepositoryFreeTds)
Query used:
select HostName, UserName from tsqw_RepositoryFreeTds order by 1,2