Difference between revisions of "SQWareCentral:ingres"
Expdbtools (talk | contribs) (→.profile_confort) |
m (Updated by BatchUser) |
||
(One intermediate revision by one other user not shown) | |||
Line 12: | Line 12: | ||
do | do | ||
echo "${c_info}$lvsqw_UserName@$lvsqw_HostName${c_normal}" | echo "${c_info}$lvsqw_UserName@$lvsqw_HostName${c_normal}" | ||
− | ssh | + | ssh $gvsqw_SshOptions $lvsqw_UserName@$lvsqw_HostName <<EOFSSH |
mkdir -p $gvsqw_RootSQWareProductionIngres/$gvsqw_VersDeplSQWareProductionIngres | mkdir -p $gvsqw_RootSQWareProductionIngres/$gvsqw_VersDeplSQWareProductionIngres | ||
cd $gvsqw_RootSQWareProductionIngres | cd $gvsqw_RootSQWareProductionIngres | ||
Line 35: | Line 35: | ||
do | do | ||
echo "${c_info}$lvsqw_UserName@$lvsqw_HostName $lvsqw_Instance${c_normal}" | echo "${c_info}$lvsqw_UserName@$lvsqw_HostName $lvsqw_Instance${c_normal}" | ||
− | ssh | + | ssh $gvsqw_SshOptions $lvsqw_UserName@$lvsqw_HostName <<EOFSSH & |
. \$gvsqw_IngBin/../tools/sqwing_SetEnv.ksh $lvsqw_Instance | . \$gvsqw_IngBin/../tools/sqwing_SetEnv.ksh $lvsqw_Instance | ||
\$gvsqw_IngBin/sqwing_RunJob.ksh -I $lvsqw_Instance -A IndicDba | \$gvsqw_IngBin/sqwing_RunJob.ksh -I $lvsqw_Instance -A IndicDba | ||
Line 56: | Line 56: | ||
your modifications (only variables you want to modify).<br> | your modifications (only variables you want to modify).<br> | ||
<br> | <br> | ||
− | + | File content: | |
+ | <pre> | ||
+ | </pre> | ||
+ | <br> | ||
+ | <br> | ||
+ | Variable explanation: | ||
+ | <pre> | ||
+ | </pre> | ||
+ | <br> | ||
=== sqwc_DbRefVar.cfg === | === sqwc_DbRefVar.cfg === | ||
Configuration file $gvsqw_RootexpdbCentral/action/ingres/etc/sqwc_DbRefVar.cfg:<br> | Configuration file $gvsqw_RootexpdbCentral/action/ingres/etc/sqwc_DbRefVar.cfg:<br> | ||
Line 77: | Line 85: | ||
Variable explanation: | Variable explanation: | ||
<pre> | <pre> | ||
− | gvsqw_DbRefDatabase_ingres => | + | gvsqw_DbRefDatabase_ingres => |
− | gvsqw_DbRefInstance_ingres => | + | gvsqw_DbRefInstance_ingres => |
− | gvsqw_DbRefPass_ingres => | + | gvsqw_DbRefPass_ingres => |
− | gvsqw_DbRefPort_ingres => | + | gvsqw_DbRefPort_ingres => |
− | gvsqw_DbRefType_ingres => | + | gvsqw_DbRefType_ingres => |
− | gvsqw_DbRefUser_ingres => | + | gvsqw_DbRefUser_ingres => |
</pre> | </pre> | ||
<br> | <br> | ||
− | |||
=== sqwc_ExpVar.cfg === | === sqwc_ExpVar.cfg === | ||
Configuration file $gvsqw_RootexpdbCentral/action/ingres/etc/sqwc_ExpVar.cfg:<br> | Configuration file $gvsqw_RootexpdbCentral/action/ingres/etc/sqwc_ExpVar.cfg:<br> | ||
Line 95: | Line 102: | ||
File content: | File content: | ||
<pre> | <pre> | ||
− | export | + | export gvsqw_RootexpdbExpIngres="~$gvsqw_UserUniqueIngres/SQWareProduction/ingres" |
− | export | + | export gvsqw_VersexpdbExpIngres='prod' |
− | export | + | export gvsqw_VersDeplexpdbExpIngres='v3.1' |
</pre> | </pre> | ||
<br> | <br> | ||
Line 103: | Line 110: | ||
Variable explanation: | Variable explanation: | ||
<pre> | <pre> | ||
− | + | gvsqw_RootexpdbExpIngres => | |
− | + | gvsqw_VersDeplexpdbExpIngres => | |
− | + | gvsqw_VersexpdbExpIngres => | |
− | |||
− | |||
</pre> | </pre> | ||
<br> | <br> | ||
− | |||
=== sqwc_GlobalVar.cfg === | === sqwc_GlobalVar.cfg === | ||
Configuration file $gvsqw_RootexpdbCentral/action/ingres/etc/sqwc_GlobalVar.cfg:<br> | Configuration file $gvsqw_RootexpdbCentral/action/ingres/etc/sqwc_GlobalVar.cfg:<br> | ||
Line 120: | Line 124: | ||
File content: | File content: | ||
<pre> | <pre> | ||
− | export | + | export gvsqw_Mail_ingres='default@dbsqware.com' |
export gvsqw_MailMsg_ingres='TrtIngAuto' | export gvsqw_MailMsg_ingres='TrtIngAuto' | ||
− | export | + | export gvsqw_UserUniqueIngres='dbsqware' |
+ | export gvsqw_RootSQWareProductionIngres="~$gvsqw_UserUniqueIngres/SQWareProduction/ingres" | ||
+ | export gvsqw_VersSQWareProductionIngres='prod' | ||
+ | export gvsqw_VersDeplSQWareProductionIngres='v3.1' | ||
</pre> | </pre> | ||
<br> | <br> | ||
Line 130: | Line 137: | ||
gvsqw_Mail_ingres => | gvsqw_Mail_ingres => | ||
gvsqw_MailMsg_ingres => | gvsqw_MailMsg_ingres => | ||
+ | gvsqw_RootSQWareProductionIngres => | ||
gvsqw_UserUniqueIngres => | gvsqw_UserUniqueIngres => | ||
+ | gvsqw_VersDeplSQWareProductionIngres => | ||
+ | gvsqw_VersSQWareProductionIngres => | ||
</pre> | </pre> | ||
<br> | <br> | ||
Line 139: | Line 149: | ||
Alias explanation: | Alias explanation: | ||
<pre> | <pre> | ||
− | act_ing => 'cd $gvsqw_RootexpdbCentral/action/ingres/prod;ls -al' | + | act_ing => 'cd $gvsqw_RootexpdbCentral/action/ingres/prod;ls -al' |
− | depl_ing => '$gvsqw_RootexpdbCentral/ | + | etc_ing => 'cd $gvsqw_RootexpdbCentral/action/ingres/etc;ls -al' |
− | repind_ing => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh ingres sqwing_GatherIndicators.ksh sqwing_GenLstRepind.ksh NOLOG' | + | lst_ing => 'cd $gvsqw_RootexpdbCentral/action/ingres/lst;ls -al' |
− | gen_ing => '$gvsqw_RootexpdbCentral/action/ingres/lst/sqwc_GenRefIngres.ksh' | + | auto_ing => 'cd $gvsqw_RootexpdbCentral/action/ingres/auto;ls -al' |
+ | cetc_ing => 'cd $gvsqw_RootexpdbCentral/action/ingres/etc_cust;ls -al' | ||
+ | clst_ing => 'cd $gvsqw_RootexpdbCentral/action/ingres/lst_cust;ls -al' | ||
+ | cauto_ing => 'cd $gvsqw_RootexpdbCentral/action/ingres/auto_cust;ls -al' | ||
+ | depl_ing => '$gvsqw_RootexpdbCentral/menu/sqwc_MenuAction.ksh ingres sqwing_DeplScripts.ksh sqwing_GenLstUnique.ksh' | ||
+ | repind_ing => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh ingres sqwing_GatherIndicators.ksh sqwing_GenLstRepind.ksh NOLOG' | ||
+ | gen_ing => '$gvsqw_RootexpdbCentral/action/ingres/lst/sqwc_GenRefIngres.ksh' | ||
+ | menu_ing => '$gvsqw_RootexpdbCentral/menu/sqwc_MenuAction.ksh ingres' | ||
</pre> | </pre> | ||
<br> | <br> |
Latest revision as of 22:53, 17 December 2012
auto
sqwing_DeplScripts.ksh
Action script $gvsqw_RootexpdbCentral/action/ingres/auto/sqwing_DeplScripts.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/ingres/auto_cust/sqwing_DeplScripts.ksh.
SQWareProduction deployment for Ingres
Action:
lfsqw_Action() { while read lvsqw_HostName lvsqw_UserName do echo "${c_info}$lvsqw_UserName@$lvsqw_HostName${c_normal}" ssh $gvsqw_SshOptions $lvsqw_UserName@$lvsqw_HostName <<EOFSSH mkdir -p $gvsqw_RootSQWareProductionIngres/$gvsqw_VersDeplSQWareProductionIngres cd $gvsqw_RootSQWareProductionIngres rm -f $gvsqw_VersSQWareProductionIngres ln -s $gvsqw_VersDeplSQWareProductionIngres $gvsqw_VersSQWareProductionIngres EOFSSH rsync -aHv $gvsqw_RsyncPathIngres --delete $gvsqw_RootSQWareProduction/ingres/$gvsqw_VersDeplSQWareProductionIngres $lvsqw_UserName@$lvsqw_HostName:$gvsqw_RootSQWareProductionIngres/. done <$gvsqw_TmpFile.lst }
sqwing_GatherIndicators.ksh
Action script $gvsqw_RootexpdbCentral/action/ingres/auto/sqwing_GatherIndicators.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/ingres/auto_cust/sqwing_GatherIndicators.ksh.
Ingres 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 $gvsqw_SshOptions $lvsqw_UserName@$lvsqw_HostName <<EOFSSH & . \$gvsqw_IngBin/../tools/sqwing_SetEnv.ksh $lvsqw_Instance \$gvsqw_IngBin/sqwing_RunJob.ksh -I $lvsqw_Instance -A IndicDba EOFSSH sleep 1 done <$gvsqw_TmpFile.lst jobs wait }
etc
CrontabRef.cfg
Configuration file $gvsqw_RootexpdbCentral/action/ingres/etc/CrontabRef.cfg:
It contains the operating variables of SQWareCentral for ingres.
If you want to overload default variables,
put in $gvsqw_RootexpdbCentral/action/ingres/etc_cust/CrontabRef.cfg
your modifications (only variables you want to modify).
File content:
Variable explanation:
sqwc_DbRefVar.cfg
Configuration file $gvsqw_RootexpdbCentral/action/ingres/etc/sqwc_DbRefVar.cfg:
It contains the operating variables of SQWareCentral for ingres.
If you want to overload default variables,
put in $gvsqw_RootexpdbCentral/action/ingres/etc_cust/sqwc_DbRefVar.cfg
your modifications (only variables you want to modify).
File content:
export gvsqw_DbRefType_ingres='mysql' export gvsqw_DbRefPort_ingres='InstancePortForMysql' export gvsqw_DbRefInstance_ingres='InstanceNameForMysql' export gvsqw_DbRefDatabase_ingres='DatabaseInstanceNameForMysql' export gvsqw_DbRefUser_ingres='ConnexionUserForMysql' export gvsqw_DbRefPass_ingres='ConnexionPassForMysql'
Variable explanation:
gvsqw_DbRefDatabase_ingres => gvsqw_DbRefInstance_ingres => gvsqw_DbRefPass_ingres => gvsqw_DbRefPort_ingres => gvsqw_DbRefType_ingres => gvsqw_DbRefUser_ingres =>
sqwc_ExpVar.cfg
Configuration file $gvsqw_RootexpdbCentral/action/ingres/etc/sqwc_ExpVar.cfg:
It contains the operating variables of SQWareCentral for ingres.
If you want to overload default variables,
put in $gvsqw_RootexpdbCentral/action/ingres/etc_cust/sqwc_ExpVar.cfg
your modifications (only variables you want to modify).
File content:
export gvsqw_RootexpdbExpIngres="~$gvsqw_UserUniqueIngres/SQWareProduction/ingres" export gvsqw_VersexpdbExpIngres='prod' export gvsqw_VersDeplexpdbExpIngres='v3.1'
Variable explanation:
gvsqw_RootexpdbExpIngres => gvsqw_VersDeplexpdbExpIngres => gvsqw_VersexpdbExpIngres =>
sqwc_GlobalVar.cfg
Configuration file $gvsqw_RootexpdbCentral/action/ingres/etc/sqwc_GlobalVar.cfg:
It contains the operating variables of SQWareCentral for ingres.
If you want to overload default variables,
put in $gvsqw_RootexpdbCentral/action/ingres/etc_cust/sqwc_GlobalVar.cfg
your modifications (only variables you want to modify).
File content:
export gvsqw_Mail_ingres='default@dbsqware.com' export gvsqw_MailMsg_ingres='TrtIngAuto' export gvsqw_UserUniqueIngres='dbsqware' export gvsqw_RootSQWareProductionIngres="~$gvsqw_UserUniqueIngres/SQWareProduction/ingres" export gvsqw_VersSQWareProductionIngres='prod' export gvsqw_VersDeplSQWareProductionIngres='v3.1'
Variable explanation:
gvsqw_Mail_ingres => gvsqw_MailMsg_ingres => gvsqw_RootSQWareProductionIngres => gvsqw_UserUniqueIngres => gvsqw_VersDeplSQWareProductionIngres => gvsqw_VersSQWareProductionIngres =>
.profile_confort
File to put aliases $gvsqw_RootexpdbCentral/action/ingres/etc/.profile_confort:
Contains confort aliases of SQWareCentral for RDBMS ingres.
Alias explanation:
act_ing => 'cd $gvsqw_RootexpdbCentral/action/ingres/prod;ls -al' etc_ing => 'cd $gvsqw_RootexpdbCentral/action/ingres/etc;ls -al' lst_ing => 'cd $gvsqw_RootexpdbCentral/action/ingres/lst;ls -al' auto_ing => 'cd $gvsqw_RootexpdbCentral/action/ingres/auto;ls -al' cetc_ing => 'cd $gvsqw_RootexpdbCentral/action/ingres/etc_cust;ls -al' clst_ing => 'cd $gvsqw_RootexpdbCentral/action/ingres/lst_cust;ls -al' cauto_ing => 'cd $gvsqw_RootexpdbCentral/action/ingres/auto_cust;ls -al' depl_ing => '$gvsqw_RootexpdbCentral/menu/sqwc_MenuAction.ksh ingres sqwing_DeplScripts.ksh sqwing_GenLstUnique.ksh' repind_ing => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh ingres sqwing_GatherIndicators.ksh sqwing_GenLstRepind.ksh NOLOG' gen_ing => '$gvsqw_RootexpdbCentral/action/ingres/lst/sqwc_GenRefIngres.ksh' menu_ing => '$gvsqw_RootexpdbCentral/menu/sqwc_MenuAction.ksh ingres'
lst
sqwc_GenRefDbIngres.ksh
List generator $gvsqw_RootexpdbCentral/action/ingres/lst/sqwc_GenRefDbIngres.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/ingres/lst_cust/sqwc_GenRefDbIngres.ksh.
Query used:
select concat('ING;',ref.ingres_sid,';',vol.database_name,';',ref.env,';', from tsqw_Repository ref, tsqw_GenHisto hist, tsqw_VolInstance inst, tsqw_VolDb vol where hist.month = str_to_date(concat('01/',month(now()),'/',year(now())), '%d/%m/%Y') and hist.ingres_sid = ref.ingres_sid and hist.ingres_sid = vol.ingres_sid and hist.gather_date = vol.gather_date and hist.ingres_sid = inst.ingres_sid and hist.gather_date = inst.gather_date order by 1
sqwc_GenRefIngres.ksh
List generator $gvsqw_RootexpdbCentral/action/ingres/lst/sqwc_GenRefIngres.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/ingres/lst_cust/sqwc_GenRefIngres.ksh.
Query used:
select cast(virt_host_name as char(22)) "Virthost", from tsqw_Repository select cast(virt_host_name as char(22)) "Virthost", from tsqw_RepositoryOther order by 6,2,1,3,4'| sed 's,\|, ,g'|grep -v '+' |sed 's,^ *,,' > $lvsqw_FicRef
sqwing_GenLstInstance.ksh
List generator $gvsqw_RootexpdbCentral/action/ingres/lst/sqwing_GenLstInstance.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/ingres/lst_cust/sqwing_GenLstInstance.ksh.
Generation of the list of Ingres instances (tsqw_Repository)
Query used:
select virt_host_name, username, ingres_sid from tsqw_Repository where status = 'ON' order by virt_host_name, username
sqwing_GenLstRepind.ksh
List generator $gvsqw_RootexpdbCentral/action/ingres/lst/sqwing_GenLstRepind.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/ingres/lst_cust/sqwing_GenLstRepind.ksh.
Generation of the list for reprise of indicators (tsqw_Repository/tsqw_GenHisto)
Query used:
select virt_host_name, username, ingres_sid from tsqw_Repository ref where ref.status = 'ON' and not exists ( select 1 from tsqw_GenHisto inf where inf.gather_date = date(now()) and ref.ingres_sid = inf.ingres_sid)
sqwing_GenLstUnique.ksh
List generator $gvsqw_RootexpdbCentral/action/ingres/lst/sqwing_GenLstUnique.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/ingres/lst_cust/sqwing_GenLstUnique.ksh.
Generation of the user unique list (tsqw_Repository)
Query used:
select distinct host_name, '$gvsqw_UserUniqueIngres' from tsqw_Repository where status != 'OFF' select distinct host_name, '$gvsqw_UserUniqueIngres' from tsqw_RepositoryOther where status != 'OFF' order by host_name