Difference between revisions of "SQWareCentral:sybase"

From Wiki_dbSQWare
Jump to: navigation, search
m (Updated by Expdbtools)
Line 1: Line 1:
{{SQWareCentralPresSgbd|sybase}}
 
 
 
== auto ==
 
== auto ==
 
=== sqwsyb_CheckNetworker.ksh ===
 
=== sqwsyb_CheckNetworker.ksh ===
Script d'action $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_CheckNetworker.ksh:<br>
+
Action script $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_CheckNetworker.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_CheckNetworker.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_CheckNetworker.ksh.<br>
Teste les backups Networker pour Sybase
+
Check Networker backups for Sybase
 
<br><br>
 
<br><br>
Requête utilisée:
+
Action:
 
<pre>
 
<pre>
 
lfsqw_Action()
 
lfsqw_Action()
Line 33: Line 31:
 
<br>
 
<br>
 
=== sqwsyb_DeplScripts.ksh ===
 
=== sqwsyb_DeplScripts.ksh ===
Script d'action $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_DeplScripts.ksh:<br>
+
Action script $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_DeplScripts.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_DeplScripts.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_DeplScripts.ksh.<br>
Deploiement de SQWareProduction pour Sybase
+
SQWareProduction deployment for Sybase
 
<br><br>
 
<br><br>
Requête utilisée:
+
Action:
 
<pre>
 
<pre>
 
lfsqw_Action()
 
lfsqw_Action()
Line 47: Line 45:
 
mkdir -p $gvsqw_RootSQWareProductionSybase/$gvsqw_VersDeplSQWareProductionSybase
 
mkdir -p $gvsqw_RootSQWareProductionSybase/$gvsqw_VersDeplSQWareProductionSybase
 
cd $gvsqw_RootSQWareProductionSybase
 
cd $gvsqw_RootSQWareProductionSybase
ln -sf $gvsqw_VersDeplSQWareProductionSybase $gvsqw_VersSQWareProductionSybase
+
rm -f $gvsqw_VersSQWareProductionSybase
 +
ln -s $gvsqw_VersDeplSQWareProductionSybase $gvsqw_VersSQWareProductionSybase
 
EOFSSH
 
EOFSSH
 
rsync -aHv $gvsqw_RsyncPathSybase --delete $gvsqw_RootSQWareProduction/sybase/$gvsqw_VersDeplSQWareProductionSybase $lvsqw_UserName@$lvsqw_HostName:$gvsqw_RootSQWareProductionSybase/.
 
rsync -aHv $gvsqw_RsyncPathSybase --delete $gvsqw_RootSQWareProduction/sybase/$gvsqw_VersDeplSQWareProductionSybase $lvsqw_UserName@$lvsqw_HostName:$gvsqw_RootSQWareProductionSybase/.
Line 55: Line 54:
 
<br>
 
<br>
 
=== sqwsyb_GatherIndicators.ksh ===
 
=== sqwsyb_GatherIndicators.ksh ===
Script d'action $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_GatherIndicators.ksh:<br>
+
Action script $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_GatherIndicators.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_GatherIndicators.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_GatherIndicators.ksh.<br>
Collecte des indicateurs Sybase
+
Sybase indicators collection
 
<br><br>
 
<br><br>
Requête utilisée:
+
Action:
 
<pre>
 
<pre>
 
lfsqw_Action()
 
lfsqw_Action()
Line 67: Line 66:
 
echo "${c_info}$lvsqw_UserName@$lvsqw_HostName $lvsqw_Instance${c_normal}"
 
echo "${c_info}$lvsqw_UserName@$lvsqw_HostName $lvsqw_Instance${c_normal}"
 
ssh -T $lvsqw_UserName@$lvsqw_HostName <<EOFSSH &
 
ssh -T $lvsqw_UserName@$lvsqw_HostName <<EOFSSH &
. ./.profile $lvsqw_Instance
+
. \$gvsqw_SybBin/../tools/sqwsyb_SetEnv.ksh $lvsqw_Instance
#$gvsqw_RootSQWareProductionSybase/$gvsqw_VersSQWareProductionSybase/bin/sqwsyb_RunJob.ksh -S $lvsqw_Instance -A IndicDba
+
\$gvsqw_SybBin/sqwsyb_RunJob.ksh -S $lvsqw_Instance -A IndicDba
export gvsqw_SybBin=/usr/users/sysdba/SQWareProduction/sybase/bin
 
$gvsqw_RootSQWareProductionSybase/$gvsqw_VersSQWareProductionSybase/bin/sqwsyb_GatherIndicators.ksh -S $lvsqw_Instance
 
 
EOFSSH
 
EOFSSH
 
sleep 1
 
sleep 1
Line 81: Line 78:
  
 
== etc ==
 
== etc ==
 +
=== CrontabRef.cfg ===
 +
Configuration file $gvsqw_RootexpdbCentral/action/sybase/etc/CrontabRef.cfg:<br>
 +
It contains the operating variables of SQWareCentral for sybase.<br>
 +
If you want to overload default variables,<br>
 +
put in $gvsqw_RootexpdbCentral/action/sybase/etc_cust/CrontabRef.cfg<br>
 +
your modifications (only variables you want to modify).<br>
 +
<br>
 +
File content:
 +
<pre>
 +
</pre>
 +
<br>
 +
<br>
 +
Variable explanation:
 +
<pre>
 +
</pre>
 +
<br>
 
=== sqwc_DbRefVar.cfg ===
 
=== sqwc_DbRefVar.cfg ===
Fichier de configuration $gvsqw_RootexpdbCentral/action/sybase/etc/sqwc_DbRefVar.cfg:<br>
+
Configuration file $gvsqw_RootexpdbCentral/action/sybase/etc/sqwc_DbRefVar.cfg:<br>
Il contient les variables de fonctionnement de SQWareCentral pour le SGBD sybase.<br>
+
It contains the operating variables of SQWareCentral for sybase.<br>
Les variables que l'on veut modifier sont à placer dans $gvsqw_RootexpdbCentral/action/sybase/etc_cust/sqwc_DbRefVar.cfg.<br>
+
If you want to overload default variables,<br>
{{Information | Vous dévez forcément adapter ce fichier à votre environnement}}
+
put in $gvsqw_RootexpdbCentral/action/sybase/etc_cust/sqwc_DbRefVar.cfg<br>
gvsqw_DbRefDatabase_sybase => Database du referentiel [par défaut: 'DatabaseInstanceNameForSybase']
+
your modifications (only variables you want to modify).<br>
gvsqw_DbRefInstance_sybase => Instance du referentiel [par défaut: 'InstanceNameForSybase']
+
<br>
gvsqw_DbRefPass_sybase => Mot de passe de connexion au referentiel [par défaut: 'ConnexionPassForSybase']
+
File content:
gvsqw_DbRefPort_sybase => Port du referentiel [par défaut: 'InstancePortForSybase']
+
<pre>
gvsqw_DbRefType_sybase => Type de referentiel [par défaut: 'sybase']
+
export gvsqw_DbRefType_sybase='sybase'
gvsqw_DbRefUser_sybase => User de connexion au referentiel [par défaut: 'ConnexionUserForSybase']
+
export gvsqw_DbRefPort_sybase='InstancePortForSybase'
 +
export gvsqw_DbRefInstance_sybase='InstanceNameForSybase'
 +
export gvsqw_DbRefDatabase_sybase='DatabaseInstanceNameForSybase'
 +
export gvsqw_DbRefUser_sybase='ConnexionUserForSybase'
 +
export gvsqw_DbRefPass_sybase='ConnexionPassForSybase'
 +
</pre>
 +
<br>
 +
<br>
 +
Variable explanation:
 +
<pre>
 +
gvsqw_DbRefDatabase_sybase =>
 +
gvsqw_DbRefInstance_sybase =>
 +
gvsqw_DbRefPass_sybase =>
 +
gvsqw_DbRefPort_sybase =>  
 +
gvsqw_DbRefType_sybase =>  
 +
gvsqw_DbRefUser_sybase =>  
 +
</pre>
 
<br>
 
<br>
 
 
=== sqwc_ExpVar.cfg ===
 
=== sqwc_ExpVar.cfg ===
Fichier de configuration $gvsqw_RootexpdbCentral/action/sybase/etc/sqwc_ExpVar.cfg:<br>
+
Configuration file $gvsqw_RootexpdbCentral/action/sybase/etc/sqwc_ExpVar.cfg:<br>
Il contient les variables de fonctionnement de SQWareCentral pour le SGBD sybase.<br>
+
It contains the operating variables of SQWareCentral for sybase.<br>
Les variables que l'on veut modifier sont à placer dans $gvsqw_RootexpdbCentral/action/sybase/etc_cust/sqwc_ExpVar.cfg.<br>
+
If you want to overload default variables,<br>
gvsqw_MailMsg_sybase => message de début de sujet de mail [par défaut: 'TrtSybAuto']
+
put in $gvsqw_RootexpdbCentral/action/sybase/etc_cust/sqwc_ExpVar.cfg<br>
gvsqw_Mail_sybase => adresse pour envoi des mails [par défaut: 'dba']
+
your modifications (only variables you want to modify).<br>
gvsqw_RootSQWareProductionSybase => Répertoire de déploiement de SQWareProduction [par défaut: "~$gvsqw_UserUniqueSybase/SQWareProduction/sybase"v
+
<br>
gvsqw_VersDeplSQWareProductionSybase => Version de SQWareProduction à déployer  [par défaut: 'v1.1']
+
File content:
gvsqw_VersSQWareProductionSybase => Lien utilisé pour la version courante [par défaut: 'prod']
+
<pre>
 +
export gvsqw_RootSQWareProductionSybase="~$gvsqw_UserUniqueSybase/SQWareProduction/sybase"
 +
export gvsqw_VersSQWareProductionSybase='prod'
 +
export gvsqw_VersDeplSQWareProductionSybase='v1.2'
 +
export gvsqw_Mail_sybase='dba'
 +
export gvsqw_MailMsg_sybase='TrtSybAuto'
 +
</pre>
 +
<br>
 +
<br>
 +
Variable explanation:
 +
<pre>
 +
gvsqw_MailMsg_sybase =>
 +
gvsqw_Mail_sybase =>
 +
gvsqw_RootSQWareProductionSybase =>
 +
gvsqw_VersDeplSQWareProductionSybase =>
 +
gvsqw_VersSQWareProductionSybase =>  
 +
</pre>
 
<br>
 
<br>
 
 
=== sqwc_GlobalVar.cfg ===
 
=== sqwc_GlobalVar.cfg ===
Fichier de configuration $gvsqw_RootexpdbCentral/action/sybase/etc/sqwc_GlobalVar.cfg:<br>
+
Configuration file $gvsqw_RootexpdbCentral/action/sybase/etc/sqwc_GlobalVar.cfg:<br>
Il contient les variables de fonctionnement de SQWareCentral pour le SGBD sybase.<br>
+
It contains the operating variables of SQWareCentral for sybase.<br>
Les variables que l'on veut modifier sont à placer dans $gvsqw_RootexpdbCentral/action/sybase/etc_cust/sqwc_GlobalVar.cfg.<br>
+
If you want to overload default variables,<br>
gvsqw_UserUniqueSybase => User Unix generique (unique) de deploiement [par défaut: 'sysdba']
+
put in $gvsqw_RootexpdbCentral/action/sybase/etc_cust/sqwc_GlobalVar.cfg<br>
 +
your modifications (only variables you want to modify).<br>
 +
<br>
 +
File content:
 +
<pre>
 +
export gvsqw_UserUniqueSybase='sysdba'
 +
</pre>
 +
<br>
 +
<br>
 +
Variable explanation:
 +
<pre>
 +
gvsqw_UserUniqueSybase =>
 +
</pre>
 
<br>
 
<br>
 
 
=== .profile_confort ===
 
=== .profile_confort ===
Fichier de positionnement d'alias $gvsqw_RootexpdbCentral/action/sybase/etc/.profile_confort:<br>
+
File to put aliases $gvsqw_RootexpdbCentral/action/sybase/etc/.profile_confort:<br>
Il contient les alias de confort de SQWareCentral pour le SGBD sybase.<br>
+
File to put aliases $gvsqw_RootexpdbCentral/action/sybase/etc/.profile_confort:<br>
Peut-être surchargé par $gvsqw_RootexpdbCentral/action/sybase/etc_cust/.profile_confort.<br>
+
Contains confort aliases of SQWareCentral for RDBMS sybase.<br>
act_syb => 'cd $gvsqw_RootexpdbCentral/action/sybase/prod;ls -al'
+
Contains confort aliases of SQWareCentral for RDBMS sybase.<br>
depl_syb => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh sybase sqwsyb_DeplScripts.ksh sqwsyb_GenLstUnique.ksh NOLOG CONFIRM'
+
<br>
gen_syb => '$gvsqw_RootexpdbCentral/action/sybase/lst/sqwc_GenRefSybase.ksh'
+
Alias explanation:
repind_syb => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh sybase sqwsyb_GatherIndicators.ksh sqwsyb_GenLstRepind.ksh NOLOG'
+
<pre>
 +
  act_syb => 'cd $gvsqw_RootexpdbCentral/action/sybase/prod;ls -al'
 +
  depl_syb => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh sybase sqwsyb_DeplScripts.ksh sqwsyb_GenLstUnique.ksh NOLOG CONFIRM'
 +
  repind_syb => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh sybase sqwsyb_GatherIndicators.ksh sqwsyb_GenLstRepind.ksh NOLOG'
 +
  gen_syb => '$gvsqw_RootexpdbCentral/action/sybase/lst/sqwc_GenRefSybase.ksh'
 +
</pre>
 +
<br>
 
<br><br>
 
<br><br>
  
 
== lst ==
 
== lst ==
 
=== sqwc_GenRefDbSybase.ksh ===
 
=== sqwc_GenRefDbSybase.ksh ===
Script de génération de liste $gvsqw_RootexpdbCentral/action/sybase/lst/sqwc_GenRefDbSybase.ksh:<br>
+
List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwc_GenRefDbSybase.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwc_GenRefDbSybase.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwc_GenRefDbSybase.ksh.<br>
Génére le fichier de référence ''database'' Sybase automatiquement à partir du référentiel contenu en bdd.<br>
 
[[SQWareRepository:general|En savoir plus sur le référentiel dbb.]]<br>
 
[[SQWareRepository:sybase|En savoir plus sur le référentiel dbb sybase.]]<br>
 
Le fichier de référence se trouvent dans $gvsqw_RootexpdbCentral/etc_cust/RefDb_sybase.txt.
 
 
<br><br>
 
<br><br>
Requête utilisée:
+
Query used:
 
<pre>
 
<pre>
 
select 'SYB;' + vol.DataServer + ';' + vol.Database_name + ';' + ref.Env + ';' +
 
select 'SYB;' + vol.DataServer + ';' + vol.Database_name + ';' + ref.Env + ';' +
  hist.Version + ';' + hist.Maj_version + ';' + convert(varchar(15),convert(int,round(vol.Size_db/1024,0))) + ';' +
 
  ref.Comments + ';' + ref.Virt_Hostname + ';' + ref.Hostname + ';' + convert(char(10),vol.Gather_date,103)
 
 
from tsqw_Repository ref, tsqw_VolDb vol, tsqw_GenHisto hist
 
from tsqw_Repository ref, tsqw_VolDb vol, tsqw_GenHisto hist
 
where hist.Month = convert(smalldatetime,'01'+substring(convert(char(10),getdate(),103),3,8),103)
 
where hist.Month = convert(smalldatetime,'01'+substring(convert(char(10),getdate(),103),3,8),103)
Line 147: Line 201:
 
</pre>
 
</pre>
 
<br>
 
<br>
 
 
=== sqwc_GenRefSybase.ksh ===
 
=== sqwc_GenRefSybase.ksh ===
Script de génération de liste $gvsqw_RootexpdbCentral/action/sybase/lst/sqwc_GenRefSybase.ksh:<br>
+
List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwc_GenRefSybase.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwc_GenRefSybase.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwc_GenRefSybase.ksh.<br>
Génére le fichier de référence Sybaseautomatiquement à partir du référentiel contenu en bdd.<br>
 
[[SQWareRepository:general|En savoir plus sur le référentiel dbb.]]<br>
 
[[SQWareRepository:sybase|En savoir plus sur le référentiel dbb sybase.]]<br>
 
Le fichier de référence se trouvent dans $gvsqw_RootexpdbCentral/etc_cust/Ref_sybase.txt.
 
 
<br><br>
 
<br><br>
Requête utilisée:
+
Query used:
 
<pre>
 
<pre>
select convert(char(18),Virt_Hostname) "VirtHost",
+
select convert(char(18),Virt_Hostname) "VirtHost",  
convert(char(12),Hostname) "Host",
 
convert(char(12),Username) "User",
 
convert(char(20),DataServer) "DataServer",
 
convert(char(4),Port) "Port",
 
convert(char(5),Status) "Stat",
 
convert(char(3),Env) "Env",
 
convert(char(30),Comments) "Description",
 
convert(char(20),Contact) "Contact",
 
convert(char(8),Client) "Client"
 
 
from tsqw_Repository
 
from tsqw_Repository
union
+
select convert(char(18),Virt_Hostname) "VirtHost",  
select convert(char(18),Virt_Hostname) "VirtHost",
 
convert(char(12),Hostname) "Host",
 
convert(char(12),Username) "User",
 
convert(char(20),DataServer) "DataServer",
 
convert(char(4),Port) "Port",
 
convert(char(5),Status) "Stat",
 
convert(char(3),Env) "Env",
 
convert(char(30),Comments) "Description",
 
convert(char(20),Contact) "Contact",
 
convert(char(8),Client) "Client"
 
 
from tsqw_RepositoryOther
 
from tsqw_RepositoryOther
 
order by 6,2,1,3,4
 
order by 6,2,1,3,4
 
</pre>
 
</pre>
 
<br>
 
<br>
 
 
=== sqwsyb_GenLstDataserver.ksh ===
 
=== sqwsyb_GenLstDataserver.ksh ===
Script de génération de liste $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstDataserver.ksh:<br>
+
List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstDataserver.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstDataserver.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstDataserver.ksh.<br>
Generation de la liste des dataservers Sybase (tsqw_Repository)
+
Generation of the list of Sybase dataservers (tsqw_Repository)
 
<br><br>
 
<br><br>
Requête utilisée:
+
Query used:
 
<pre>
 
<pre>
 
select convert(varchar(70),Virt_Hostname+' '+Username+' '+DataServer)
 
select convert(varchar(70),Virt_Hostname+' '+Username+' '+DataServer)
Line 199: Line 228:
 
<br>
 
<br>
 
=== sqwsyb_GenLstNetworker.ksh ===
 
=== sqwsyb_GenLstNetworker.ksh ===
Script de génération de liste $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstNetworker.ksh:<br>
+
List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstNetworker.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstNetworker.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstNetworker.ksh.<br>
Generation de la liste des users unix Sybase (tsqw_Repository)
+
Generation of the list of unix users Sybase (tsqw_Repository)
 
<br><br>
 
<br><br>
Requête utilisée:
+
Query used:
 
<pre>
 
<pre>
 
select distinct convert(varchar(70),Virt_Hostname+' '+Username)
 
select distinct convert(varchar(70),Virt_Hostname+' '+Username)
Line 212: Line 241:
 
<br>
 
<br>
 
=== sqwsyb_GenLstRepind.ksh ===
 
=== sqwsyb_GenLstRepind.ksh ===
Script de génération de liste $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstRepind.ksh:<br>
+
List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstRepind.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstRepind.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstRepind.ksh.<br>
Generation de la liste pour reprise des indicateurs (tsqw_Repository/tsqw_GenHisto)
+
Generation of the list for reprise of indicators (tsqw_Repository/tsqw_GenHisto)
 
<br><br>
 
<br><br>
Requête utilisée:
+
Query used:
 
<pre>
 
<pre>
 
select convert(varchar(70),ref.Virt_Hostname+' '+ref.Username+' '+ref.DataServer)
 
select convert(varchar(70),ref.Virt_Hostname+' '+ref.Username+' '+ref.DataServer)
Line 223: Line 252:
 
and not exists ( select 1 from tsqw_GenHisto inf
 
and not exists ( select 1 from tsqw_GenHisto inf
 
where inf.Gather_date = convert(smalldatetime,convert(char(10),getdate(),103),103)  
 
where inf.Gather_date = convert(smalldatetime,convert(char(10),getdate(),103),103)  
 +
and ref.DataServer = inf.DataServer)
 
order by Virt_Hostname, Username
 
order by Virt_Hostname, Username
 
</pre>
 
</pre>
 
<br>
 
<br>
 
=== sqwsyb_GenLstUnique.ksh ===
 
=== sqwsyb_GenLstUnique.ksh ===
Script de génération de liste $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstUnique.ksh:<br>
+
List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstUnique.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstUnique.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstUnique.ksh.<br>
Generation liste user unique (tsqw_Repository/tsqw_RepositoryOther)
+
Generation of the user unique list (tsqw_Repository/tsqw_RepositoryOther)
 
<br><br>
 
<br><br>
Requête utilisée:
+
Query used:
 
<pre>
 
<pre>
 
select distinct Hostname||' $gvsqw_UserUniqueSybase'
 
select distinct Hostname||' $gvsqw_UserUniqueSybase'

Revision as of 21:48, 22 December 2010

auto

sqwsyb_CheckNetworker.ksh

Action script $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_CheckNetworker.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_CheckNetworker.ksh.
Check Networker backups for Sybase

Action:

lfsqw_Action()
{
isql -n -b -w200 -U$gvsqw_DbRefUser_sybase -S$gvsqw_DbRefInstance_sybase -D$gvsqw_DbRefDatabase_sybase << EOFSQL
$gvsqw_DbRefPass_sybase
delete tsqw_Networker
go
delete tsqw_Networker_retard
go
EOFSQL

while read lvsqw_HostName lvsqw_UserName
do
echo "${c_info}$lvsqw_UserName@$lvsqw_HostName${c_normal}"
ssh -T $lvsqw_UserName@$lvsqw_HostName <<EOFSSH &
$gvsqw_RootSQWareProductionSybase/$gvsqw_VersSQWareProductionSybase/bin/sqwsyb_CheckNetworker.ksh -c $lvsqw_HostName
EOFCAT
EOFSSH
sleep 10
done <$gvsqw_TmpFile.lst
wait
}


sqwsyb_DeplScripts.ksh

Action script $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_DeplScripts.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_DeplScripts.ksh.
SQWareProduction deployment for Sybase

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_RootSQWareProductionSybase/$gvsqw_VersDeplSQWareProductionSybase
cd $gvsqw_RootSQWareProductionSybase
rm -f $gvsqw_VersSQWareProductionSybase
ln -s $gvsqw_VersDeplSQWareProductionSybase $gvsqw_VersSQWareProductionSybase
EOFSSH
rsync -aHv $gvsqw_RsyncPathSybase --delete $gvsqw_RootSQWareProduction/sybase/$gvsqw_VersDeplSQWareProductionSybase $lvsqw_UserName@$lvsqw_HostName:$gvsqw_RootSQWareProductionSybase/.
done <$gvsqw_TmpFile.lst
}


sqwsyb_GatherIndicators.ksh

Action script $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_GatherIndicators.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_GatherIndicators.ksh.
Sybase indicators collection

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_SybBin/../tools/sqwsyb_SetEnv.ksh $lvsqw_Instance
\$gvsqw_SybBin/sqwsyb_RunJob.ksh -S $lvsqw_Instance -A IndicDba
EOFSSH
sleep 1
done <$gvsqw_TmpFile.lst
wait
}




etc

CrontabRef.cfg

Configuration file $gvsqw_RootexpdbCentral/action/sybase/etc/CrontabRef.cfg:
It contains the operating variables of SQWareCentral for sybase.
If you want to overload default variables,
put in $gvsqw_RootexpdbCentral/action/sybase/etc_cust/CrontabRef.cfg
your modifications (only variables you want to modify).

File content:




Variable explanation:



sqwc_DbRefVar.cfg

Configuration file $gvsqw_RootexpdbCentral/action/sybase/etc/sqwc_DbRefVar.cfg:
It contains the operating variables of SQWareCentral for sybase.
If you want to overload default variables,
put in $gvsqw_RootexpdbCentral/action/sybase/etc_cust/sqwc_DbRefVar.cfg
your modifications (only variables you want to modify).

File content:

export gvsqw_DbRefType_sybase='sybase'
export gvsqw_DbRefPort_sybase='InstancePortForSybase'
export gvsqw_DbRefInstance_sybase='InstanceNameForSybase'
export gvsqw_DbRefDatabase_sybase='DatabaseInstanceNameForSybase'
export gvsqw_DbRefUser_sybase='ConnexionUserForSybase'
export gvsqw_DbRefPass_sybase='ConnexionPassForSybase'



Variable explanation:

gvsqw_DbRefDatabase_sybase => 
gvsqw_DbRefInstance_sybase => 
gvsqw_DbRefPass_sybase => 
gvsqw_DbRefPort_sybase => 
gvsqw_DbRefType_sybase => 
gvsqw_DbRefUser_sybase => 


sqwc_ExpVar.cfg

Configuration file $gvsqw_RootexpdbCentral/action/sybase/etc/sqwc_ExpVar.cfg:
It contains the operating variables of SQWareCentral for sybase.
If you want to overload default variables,
put in $gvsqw_RootexpdbCentral/action/sybase/etc_cust/sqwc_ExpVar.cfg
your modifications (only variables you want to modify).

File content:

export gvsqw_RootSQWareProductionSybase="~$gvsqw_UserUniqueSybase/SQWareProduction/sybase"
export gvsqw_VersSQWareProductionSybase='prod'
export gvsqw_VersDeplSQWareProductionSybase='v1.2'
export gvsqw_Mail_sybase='dba'
export gvsqw_MailMsg_sybase='TrtSybAuto'



Variable explanation:

gvsqw_MailMsg_sybase => 
gvsqw_Mail_sybase => 
gvsqw_RootSQWareProductionSybase => 
gvsqw_VersDeplSQWareProductionSybase => 
gvsqw_VersSQWareProductionSybase => 


sqwc_GlobalVar.cfg

Configuration file $gvsqw_RootexpdbCentral/action/sybase/etc/sqwc_GlobalVar.cfg:
It contains the operating variables of SQWareCentral for sybase.
If you want to overload default variables,
put in $gvsqw_RootexpdbCentral/action/sybase/etc_cust/sqwc_GlobalVar.cfg
your modifications (only variables you want to modify).

File content:

export gvsqw_UserUniqueSybase='sysdba'



Variable explanation:

gvsqw_UserUniqueSybase => 


.profile_confort

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

Alias explanation:

	  act_syb => 'cd $gvsqw_RootexpdbCentral/action/sybase/prod;ls -al'
	  depl_syb => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh sybase sqwsyb_DeplScripts.ksh sqwsyb_GenLstUnique.ksh NOLOG CONFIRM'
	  repind_syb => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh sybase sqwsyb_GatherIndicators.ksh sqwsyb_GenLstRepind.ksh NOLOG'
	  gen_syb => '$gvsqw_RootexpdbCentral/action/sybase/lst/sqwc_GenRefSybase.ksh'




lst

sqwc_GenRefDbSybase.ksh

List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwc_GenRefDbSybase.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwc_GenRefDbSybase.ksh.


Query used:

select 'SYB;' + vol.DataServer + ';' + vol.Database_name + ';' + ref.Env + ';' +
from tsqw_Repository ref, tsqw_VolDb vol, tsqw_GenHisto hist
where hist.Month = convert(smalldatetime,'01'+substring(convert(char(10),getdate(),103),3,8),103)
    and hist.DataServer = vol.DataServer
    and hist.Gather_date = vol.Gather_date
    and ref.DataServer = hist.DataServer
    and ref.Status!='OFF'
    and vol.Database_name not in ('dbccdb','master','tempdb','sybsecurity','sybsystemdb','sybsystemprocs','model','audsa','auditdb','sybmgmtdb')
    and vol.Database_name not like 'temp%'
order by vol.Database_name, vol.DataServer


sqwc_GenRefSybase.ksh

List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwc_GenRefSybase.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwc_GenRefSybase.ksh.


Query used:

select convert(char(18),Virt_Hostname) "VirtHost", 
from tsqw_Repository
select convert(char(18),Virt_Hostname) "VirtHost", 
from tsqw_RepositoryOther
order by 6,2,1,3,4


sqwsyb_GenLstDataserver.ksh

List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstDataserver.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstDataserver.ksh.
Generation of the list of Sybase dataservers (tsqw_Repository)

Query used:

select convert(varchar(70),Virt_Hostname+' '+Username+' '+DataServer)
from tsqw_Repository
where Status = 'ON'
order by Virt_Hostname, Username


sqwsyb_GenLstNetworker.ksh

List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstNetworker.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstNetworker.ksh.
Generation of the list of unix users Sybase (tsqw_Repository)

Query used:

select distinct convert(varchar(70),Virt_Hostname+' '+Username)
from tsqw_Repository
where Status = 'ON'
order by Virt_Hostname, Username


sqwsyb_GenLstRepind.ksh

List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstRepind.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstRepind.ksh.
Generation of the list for reprise of indicators (tsqw_Repository/tsqw_GenHisto)

Query used:

select convert(varchar(70),ref.Virt_Hostname+' '+ref.Username+' '+ref.DataServer)
from tsqw_Repository ref
where ref.Status = 'ON'
and not exists ( select 1 from tsqw_GenHisto inf
where inf.Gather_date = convert(smalldatetime,convert(char(10),getdate(),103),103) 
and ref.DataServer = inf.DataServer)
order by Virt_Hostname, Username


sqwsyb_GenLstUnique.ksh

List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstUnique.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstUnique.ksh.
Generation of the user unique list (tsqw_Repository/tsqw_RepositoryOther)

Query used:

select distinct Hostname||' $gvsqw_UserUniqueSybase'
from tsqw_Repository
where Status != 'OFF'
select distinct Hostname||' $gvsqw_UserUniqueSybase'
from tsqw_RepositoryOther
order by 1