Difference between revisions of "SQWareCentral:ingres"

From Wiki_dbSQWare
Jump to: navigation, search
m (Updated by Expdbtools)
(CrontabRef.cfg)
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>

Revision as of 23:19, 22 December 2010

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 -T $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 -T $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).

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_RootSQWareProductionIngres="~$gvsqw_UserUniqueIngres/SQWareProduction/ingres"
export gvsqw_VersSQWareProductionIngres='prod'
export gvsqw_VersDeplSQWareProductionIngres='v1.2'



Variable explanation:

gvsqw_RootSQWareProductionIngres => 
gvsqw_VersDeplSQWareProductionIngres => 
gvsqw_VersSQWareProductionIngres => 


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_UserUniqueIngres='sysdba'
export gvsqw_MailMsg_ingres='TrtIngAuto'
export gvsqw_Mail_ingres='dba'



Variable explanation:

gvsqw_Mail_ingres => 
gvsqw_MailMsg_ingres => 
gvsqw_UserUniqueIngres => 


.profile_confort

File to put aliases $gvsqw_RootexpdbCentral/action/ingres/etc/.profile_confort:
File to put aliases $gvsqw_RootexpdbCentral/action/ingres/etc/.profile_confort:
Contains confort aliases of SQWareCentral for RDBMS ingres.
Contains confort aliases of SQWareCentral for RDBMS ingres.

Alias explanation:

	  act_ing => 'cd $gvsqw_RootexpdbCentral/action/ingres/prod;ls -al'
	  depl_ing => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh ingres sqwing_DeplScripts.ksh sqwing_GenLstUnique.ksh NOLOG CONFIRM'
	  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'




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