Difference between revisions of "SQWareCentral:sybase"

From Wiki_dbSQWare
Jump to: navigation, search
(sqwc_ExpVar.cfg)
m (Updated by BatchUser)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== auto ==
 
== auto ==
=== sqwsyb_CheckNetworker.ksh ===
+
=== sqwsyb_AdddbSQWareProfile.ksh ===
Script d'action $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_CheckNetworker.ksh:<br>
+
Action script $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_AdddbSQWareProfile.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_AdddbSQWareProfile.ksh.<br>
Teste les backups Networker pour Sybase
+
Add dbSQWare profile
 
<br><br>
 
<br><br>
Requête utilisée:
+
Action:
 
<pre>
 
<pre>
 
lfsqw_Action()
 
lfsqw_Action()
 
{
 
{
isql -n -b -w200 -U$gvsqw_DbRefUser_sybase -S$gvsqw_DbRefInstance_sybase -D$gvsqw_DbRefDatabase_sybase << EOFSQL
+
while read lvsqw_HostName lvsqw_UserName lvsqw_Instance
$gvsqw_DbRefPass_sybase
+
do
delete tsqw_Networker
+
echo "${c_info}$lvsqw_UserName@$lvsqw_HostName $lvsqw_Instance${c_normal}"
go
+
lvsqw_Instance=$(echo "$lvsqw_Instance"|cut -d':' -f1)
delete tsqw_Networker_retard
+
ssh $gvsqw_SshOptions $lvsqw_UserName@$lvsqw_HostName <<EOFSSH
go
+
if [ -r ~/.profile ]
EOFSQL
+
then
 +
if [ \$(grep -c 'gvsqw_SybBin' ~/.profile) -eq 0 ]
 +
then
 +
cat <<EOFCAT >>~/.profile
 +
 
 +
#dbSQWare
 +
export gvsqw_Env=''
 +
export gvsqw_SybBin=\\\$HOME/SQWareProduction/sybase/bin
 +
lvsqw_IsTerminal=\\\$(tty 2>&1 >/dev/null;echo \\\$?)
 +
if [ "\\\$lvsqw_IsTerminal" = "0" ] && [ -r \\\$gvsqw_SybBin/../etc/.profile_confort ]
 +
then
 +
. \\\$gvsqw_SybBin/../etc/.profile_confort
 +
fi
 +
 
 +
EOFCAT
 +
fi
 +
elif [ -r ~/.bash_profile ]
 +
then
 +
if [ \$(grep -c 'gvsqw_SybBin' ~/.bash_profile) -eq 0 ]
 +
then
 +
cat <<EOFCAT >>~/.bash_profile
 +
 
 +
#dbSQWare
 +
export gvsqw_Env=''
 +
export gvsqw_SybBin=\\\$HOME/SQWareProduction/sybase/bin
 +
lvsqw_IsTerminal=\\\$(tty 2>&1 >/dev/null;echo \\\$?)
 +
if [ "\\\$lvsqw_IsTerminal" = "0" ] && [ -r \\\$gvsqw_SybBin/../etc/.profile_confort ]
 +
then
 +
. \\\$gvsqw_SybBin/../etc/.profile_confort
 +
fi
  
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
 
EOFCAT
 +
fi
 +
fi
 
EOFSSH
 
EOFSSH
sleep 10
 
 
done <$gvsqw_TmpFile.lst
 
done <$gvsqw_TmpFile.lst
wait
+
 
 
}
 
}
 
</pre>
 
</pre>
 
<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 42: Line 67:
 
do
 
do
 
echo "${c_info}$lvsqw_UserName@$lvsqw_HostName${c_normal}"
 
echo "${c_info}$lvsqw_UserName@$lvsqw_HostName${c_normal}"
ssh -T $lvsqw_UserName@$lvsqw_HostName <<EOFSSH
+
ssh $gvsqw_SshOptions $lvsqw_UserName@$lvsqw_HostName <<EOFSSH
 
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/.
 
done <$gvsqw_TmpFile.lst
 
done <$gvsqw_TmpFile.lst
 +
}
 +
</pre>
 +
<br>
 +
=== sqwsyb_GatherDistFsSize.ksh ===
 +
Action script $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_GatherDistFsSize.ksh:<br>
 +
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_GatherDistFsSize.ksh.<br>
 +
Gather FS size
 +
<br><br>
 +
Action:
 +
<pre>
 +
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 $gvsqw_DistSQWareProdUser_sybase <<EOFSSH &
 +
\$gvsqw_SybBin/sqwsyb_GatherDistantFsSize.ksh -S "$lvsqw_Instance" -U "$lvsqw_UserName" -H "$lvsqw_HostName"
 +
EOFSSH
 +
sleep 3
 +
done <$gvsqw_TmpFile.lst
 +
jobs
 +
wait
 +
}
 +
</pre>
 +
<br>
 +
=== sqwsyb_GatherIndicatorsDist.ksh ===
 +
Action script $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_GatherIndicatorsDist.ksh:<br>
 +
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_GatherIndicatorsDist.ksh.<br>
 +
Sybase indicators collection in distant mode
 +
<br><br>
 +
Action:
 +
<pre>
 +
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 $gvsqw_DistSQWareProdUser_sybase <<EOFSSH &
 +
\$gvsqw_SybBin/sqwsyb_GatherIndicators.ksh -S "$lvsqw_Instance" -Dist
 +
EOFSSH
 +
sleep 1
 +
done <$gvsqw_TmpFile.lst
 +
jobs
 +
wait
 
}
 
}
 
</pre>
 
</pre>
 
<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 63: Line 133:
 
while read lvsqw_HostName lvsqw_UserName lvsqw_Instance
 
while read lvsqw_HostName lvsqw_UserName lvsqw_Instance
 
do
 
do
 +
lvsqw_Instance=$(echo "$lvsqw_Instance"|cut -d':' -f1)
 
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 $gvsqw_SshOptions $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
 
done <$gvsqw_TmpFile.lst
 
done <$gvsqw_TmpFile.lst
 
wait
 
wait
 +
}
 +
</pre>
 +
<br>
 +
=== sqwsyb_Gen_dbSQWare.ksh ===
 +
Action script $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_Gen_dbSQWare.ksh:<br>
 +
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_Gen_dbSQWare.ksh.<br>
 +
generate dbSQWare files
 +
<br><br>
 +
Action:
 +
<pre>
 +
lfsqw_Action()
 +
{
 +
while read lvsqw_HostName lvsqw_UserName lvsqw_Instance
 +
do
 +
lvsqw_Instance=$(echo "$lvsqw_Instance"|cut -d':' -f1)
 +
echo "${c_info}$lvsqw_UserName@$lvsqw_HostName $lvsqw_Instance${c_normal}"
 +
ssh $gvsqw_SshOptions $lvsqw_UserName@$lvsqw_HostName <<EOFSSH
 +
. \$gvsqw_SybBin/../tools/sqwsyb_SetEnv.ksh $lvsqw_Instance
 +
if [ "\$DSQUERY" != "$lvsqw_Instance" ]
 +
then
 +
export DSQUERY="$lvsqw_Instance"
 +
fi
 +
\$gvsqw_SybBin/../tools/sqwsyb_GenerateCreateDataserver.ksh -dbsOnly <<EOF
 +
y
 +
EOF
 +
EOFSSH
 +
done <$gvsqw_TmpFile.lst
 +
}
 +
</pre>
 +
<br>
 +
=== sqwsyb_GenSshKeysInstance.ksh ===
 +
Action script $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_GenSshKeysInstance.ksh:<br>
 +
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_GenSshKeysInstance.ksh.<br>
 +
ssh keys deployment for Sybase
 +
<br><br>
 +
Action:
 +
<pre>
 +
lfsqw_Action()
 +
{
 +
 +
echo "#########################################################################"
 +
echo "#Create/Retrieve key for SQWareCentral"
 +
mkdir -p $HOME/tmp
 +
if [ -r $HOME/.ssh/id_dsa.pub ]
 +
then
 +
echo "Id DSA found:"
 +
ls -l $HOME/.ssh/id_dsa.pub
 +
lvsqw_CentralKey=$(cat $HOME/.ssh/id_dsa.pub)
 +
elif [ -r $HOME/.ssh/id_rsa.pub ]
 +
then
 +
echo "Id RSA found:"
 +
ls -l $HOME/.ssh/id_rsa.pub
 +
lvsqw_CentralKey=$(cat $HOME/.ssh/id_rsa.pub)
 +
else
 +
ssh-keygen -t rsa -N '' -f $HOME/.ssh/id_rsa
 +
lvsqw_CentralKey=$(cat $HOME/.ssh/id_rsa.pub)
 +
fi
 +
#Retrieve additionnal keys if found (your windows key for exemple)
 +
if [ -r $HOME/.ssh/id_dbSQWare.pub ]
 +
then
 +
echo "Id dbSQWare found:"
 +
ls -l $HOME/.ssh/id_dbSQWare.pub
 +
lvsqw_AdditionnalKey=$(cat $HOME/.ssh/id_dbSQWare.pub)
 +
else
 +
lvsqw_AdditionnalKey=""
 +
fi
 +
chmod go-w $HOME
 +
touch $HOME/.ssh/authorized_keys
 +
chmod 700 $HOME/.ssh
 +
chmod 600 $HOME/.ssh/authorized_keys
 +
echo "${c_menu}#########################################################################"
 +
echo "#create key if not found and put SQWareCentral key for distant users"
 +
echo "Enter password when necessary${c_normal}"
 +
while read lvsqw_HostName lvsqw_UserName lvsqw_Instance
 +
do
 +
echo ""
 +
echo "${c_info}$lvsqw_UserName@$lvsqw_HostName${c_normal}"
 +
ssh -o StrictHostKeyChecking=no $lvsqw_UserName@$lvsqw_HostName <<EOFSSH
 +
mkdir -p \$HOME/tmp
 +
if [ -r \$HOME/.ssh/id_dsa.pub ]
 +
then
 +
echo "Id DSA found:"
 +
ls -l \$HOME/.ssh/id_dsa.pub
 +
cat \$HOME/.ssh/id_dsa.pub
 +
elif [ -r \$HOME/.ssh/id_rsa.pub ]
 +
then
 +
echo "Id RSA found:"
 +
ls -l \$HOME/.ssh/id_rsa.pub
 +
cat \$HOME/.ssh/id_rsa.pub
 +
else
 +
ssh-keygen -t rsa -N '' -f \$HOME/.ssh/id_rsa
 +
cat \$HOME/.ssh/id_rsa.pub
 +
fi
 +
chmod go-w \$HOME
 +
echo "$lvsqw_CentralKey" >>\$HOME/.ssh/authorized_keys
 +
echo "$lvsqw_AdditionnalKey" >>\$HOME/.ssh/authorized_keys
 +
chmod 700 \$HOME/.ssh
 +
chmod 600 \$HOME/.ssh/authorized_keys
 +
EOFSSH
 +
 +
done <$gvsqw_TmpFile.lst
 +
}
 +
</pre>
 +
<br>
 +
=== sqwsyb_GenSshKeys.ksh ===
 +
Action script $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_GenSshKeys.ksh:<br>
 +
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_GenSshKeys.ksh.<br>
 +
ssh keys deployment for Sybase
 +
<br><br>
 +
Action:
 +
<pre>
 +
lfsqw_Action()
 +
{
 +
 +
echo "#########################################################################"
 +
echo "#Create/Retrieve key for SQWareCentral"
 +
mkdir -p $HOME/tmp
 +
if [ -r $HOME/.ssh/id_dsa.pub ]
 +
then
 +
echo "Id DSA found:"
 +
ls -l $HOME/.ssh/id_dsa.pub
 +
lvsqw_CentralKey=$(cat $HOME/.ssh/id_dsa.pub)
 +
elif [ -r $HOME/.ssh/id_rsa.pub ]
 +
then
 +
echo "Id RSA found:"
 +
ls -l $HOME/.ssh/id_rsa.pub
 +
lvsqw_CentralKey=$(cat $HOME/.ssh/id_rsa.pub)
 +
else
 +
ssh-keygen -t rsa -N '' -f $HOME/.ssh/id_rsa
 +
lvsqw_CentralKey=$(cat $HOME/.ssh/id_rsa.pub)
 +
fi
 +
#Retrieve additionnal keys if found (your windows key for exemple)
 +
if [ -r $HOME/.ssh/id_dbSQWare.pub ]
 +
then
 +
echo "Id dbSQWare found:"
 +
ls -l $HOME/.ssh/id_dbSQWare.pub
 +
lvsqw_AdditionnalKey=$(cat $HOME/.ssh/id_dbSQWare.pub)
 +
else
 +
lvsqw_AdditionnalKey=""
 +
fi
 +
chmod go-w $HOME
 +
touch $HOME/.ssh/authorized_keys
 +
chmod 700 $HOME/.ssh
 +
chmod 600 $HOME/.ssh/authorized_keys
 +
echo "${c_menu}#########################################################################"
 +
echo "#create key if not found and put SQWareCentral key for distant users"
 +
echo "Enter password when necessary${c_normal}"
 +
while read lvsqw_HostName lvsqw_UserName
 +
do
 +
echo ""
 +
echo "${c_info}$lvsqw_UserName@$lvsqw_HostName${c_normal}"
 +
ssh -o StrictHostKeyChecking=no $lvsqw_UserName@$lvsqw_HostName <<EOFSSH
 +
mkdir -p \$HOME/tmp
 +
if [ -r \$HOME/.ssh/id_dsa.pub ]
 +
then
 +
echo "Id DSA found:"
 +
ls -l \$HOME/.ssh/id_dsa.pub
 +
cat \$HOME/.ssh/id_dsa.pub
 +
elif [ -r \$HOME/.ssh/id_rsa.pub ]
 +
then
 +
echo "Id RSA found:"
 +
ls -l \$HOME/.ssh/id_rsa.pub
 +
cat \$HOME/.ssh/id_rsa.pub
 +
else
 +
ssh-keygen -t rsa -N '' -f \$HOME/.ssh/id_rsa
 +
cat \$HOME/.ssh/id_rsa.pub
 +
fi
 +
chmod go-w \$HOME
 +
echo "$lvsqw_CentralKey" >>\$HOME/.ssh/authorized_keys
 +
echo "$lvsqw_AdditionnalKey" >>\$HOME/.ssh/authorized_keys
 +
chmod 700 \$HOME/.ssh
 +
chmod 600 \$HOME/.ssh/authorized_keys
 +
EOFSSH
 +
 +
done <$gvsqw_TmpFile.lst
 
}
 
}
 
</pre>
 
</pre>
Line 79: Line 323:
  
 
== 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_RootexpdbExpSybase="~$gvsqw_UserUniqueSybase/SQWareProduction/sybase"
 +
export gvsqw_VersexpdbExpSybase='prod'
 +
export gvsqw_VersDeplexpdbExpSybase='v3.1'
 +
export gvsqw_Mail_sybase='dba'
 +
export gvsqw_MailMsg_sybase='TrtSybAuto'
 +
</pre>
 +
<br>
 +
<br>
 +
Variable explanation:
 +
<pre>
 +
gvsqw_MailMsg_sybase =>
 +
gvsqw_Mail_sybase =>
 +
gvsqw_RootexpdbExpSybase =>
 +
gvsqw_VersDeplexpdbExpSybase =>
 +
gvsqw_VersexpdbExpSybase =>
 +
</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_Mail_sybase='default@dbsqware.com'
 +
export gvsqw_MailMsg_sybase='TrtSybAuto'
 +
export gvsqw_UserUniqueSybase='dbsqware'
 +
export gvsqw_RootSQWareProductionSybase="~$gvsqw_UserUniqueSybase/SQWareProduction/sybase"
 +
export gvsqw_VersSQWareProductionSybase='prod'
 +
export gvsqw_VersDeplSQWareProductionSybase='v3.1'
 +
export gvsqw_DistSQWareProdUser_sybase="$gvsqw_UserUniqueSybase@$gvsqw_Hostname"
 +
</pre>
 +
<br>
 +
<br>
 +
Variable explanation:
 +
<pre>
 +
gvsqw_DistSQWareProdUser_sybase =>
 +
gvsqw_MailMsg_sybase =>
 +
gvsqw_Mail_sybase =>
 +
gvsqw_RootSQWareProductionSybase =>
 +
gvsqw_UserUniqueSybase =>
 +
gvsqw_VersDeplSQWareProductionSybase =>
 +
gvsqw_VersSQWareProductionSybase =>
 +
</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>
+
Contains confort aliases of SQWareCentral for RDBMS sybase.<br>
Peut-être surchargé par $gvsqw_RootexpdbCentral/action/sybase/etc_cust/.profile_confort.<br>
+
<br>
act_syb => 'cd $gvsqw_RootexpdbCentral/action/sybase/prod;ls -al'
+
Alias explanation:
depl_syb => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh sybase sqwsyb_DeplScripts.ksh sqwsyb_GenLstUnique.ksh NOLOG CONFIRM'
+
<pre>
gen_syb => '$gvsqw_RootexpdbCentral/action/sybase/lst/sqwc_GenRefSybase.ksh'
+
  act_syb => 'cd $gvsqw_RootexpdbCentral/action/sybase/prod;ls -al'
repind_syb => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh sybase sqwsyb_GatherIndicators.ksh sqwsyb_GenLstRepind.ksh NOLOG'
+
  etc_syb => 'cd $gvsqw_RootexpdbCentral/action/sybase/etc;ls -al'
 +
  lst_syb => 'cd $gvsqw_RootexpdbCentral/action/sybase/lst;ls -al'
 +
  auto_syb => 'cd $gvsqw_RootexpdbCentral/action/sybase/auto;ls -al'
 +
  cetc_syb => 'cd $gvsqw_RootexpdbCentral/action/sybase/etc_cust;ls -al'
 +
  clst_syb => 'cd $gvsqw_RootexpdbCentral/action/sybase/lst_cust;ls -al'
 +
  cauto_syb => 'cd $gvsqw_RootexpdbCentral/action/sybase/auto_cust;ls -al'
 +
  depl_syb => '$gvsqw_RootexpdbCentral/menu/sqwc_MenuAction.ksh sybase sqwsyb_DeplScripts.ksh sqwsyb_GenLstUnique.ksh'
 +
  repind_syb => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh sybase sqwsyb_GatherIndicators.ksh sqwsyb_GenLstRepind.ksh NOLOG'
 +
  repind_syb_dist => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh sybase sqwsyb_GatherIndicatorsDist.ksh sqwsyb_GenLstRepindDist.ksh NOLOG'
 +
  gen_syb => '$gvsqw_RootexpdbCentral/action/sybase/lst/sqwc_GenRefSybase.ksh'
 +
  gen_int => '$gvsqw_RootexpdbCentral/action/sybase/lst/sqwc_GenInterfaces.ksh'
 +
  menu_syb => '$gvsqw_RootexpdbCentral/menu/sqwc_MenuAction.ksh sybase'
 +
</pre>
 +
<br>
 
<br><br>
 
<br><br>
  
 
== lst ==
 
== lst ==
 +
=== sqwc_Extract_CMDB_Sybase.ksh ===
 +
List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwc_Extract_CMDB_Sybase.ksh:<br>
 +
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwc_Extract_CMDB_Sybase.ksh.<br>
 +
<br><br>
 +
Query used:
 +
<pre>
 +
select 'SYB;' || ref.DataServer || ';' || isnull(lic.Hostname,ref.Hostname)|| ';' || ref.Env || ';' || ref.Status || ';' ||
 +
from tsqw_Repository ref
 +
        on (ref.DataServer = hist.DataServer and hist.Month=convert(smalldatetime,'01'+substring(convert(char(10),getdate(),103),3,8),103))
 +
        on (hist.DataServer = inf.DataServer and hist.Gather_date = inf.Gather_date)
 +
order by 1
 +
</pre>
 +
<br>
 +
=== sqwc_GenInterfaces.ksh ===
 +
List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwc_GenInterfaces.ksh:<br>
 +
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwc_GenInterfaces.ksh.<br>
 +
<br><br>
 +
Query used:
 +
<pre>
 +
echo "# interfaces file generated by SQWareCentral (module of dbSQWare) from SQWareRepository" > $lvsqw_FicRef
 +
select '#'+Env+', '+Client+', '+Contact+', '+Comments+char(10)
 +
from tsqw_Repository
 +
where Status!='OFF'
 +
order by DataServer
 +
</pre>
 +
<br>
 
=== 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 145: Line 491:
 
</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_GenLstDataserverDist.ksh ===
 +
List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstDataserverDist.ksh:<br>
 +
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstDataserverDist.ksh.<br>
 +
Generation of the list of Sybase dataservers for distant connection (tsqw_Repository)
 +
<br><br>
 +
Query used:
 +
<pre>
 +
select convert(varchar(70),Virt_Hostname+' '+Username+' '+DataServer)
 +
from tsqw_Repository
 +
where Status in ('DIST','MIX')
 +
order by Virt_Hostname, Username
 +
</pre>
 +
<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)
 
from tsqw_Repository
 
from tsqw_Repository
where Status = 'ON'
+
where Status in ('ON','MIX')
 
order by Virt_Hostname, Username
 
order by Virt_Hostname, Username
 
</pre>
 
</pre>
 
<br>
 
<br>
=== sqwsyb_GenLstNetworker.ksh ===
+
=== sqwsyb_GenLstDataserverSsh.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_GenLstDataserverSsh.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_GenLstDataserverSsh.ksh.<br>
Generation de la liste des users unix Sybase (tsqw_Repository)
+
Generation of the list of Sybase dataservers for ssh connection
 
<br><br>
 
<br><br>
Requête utilisée:
+
Query used:
 
<pre>
 
<pre>
select distinct convert(varchar(70),Virt_Hostname+' '+Username)
+
select convert(varchar(70),ref.Virt_Hostname+' '+cust.Username+' '+ref.DataServer)
 +
from tsqw_Repository ref, tsqw_UserSsh cust
 +
where ref.Status != 'OFF'
 +
and cust.Status = 'ON'
 +
and ref.DataServer = cust.DataServer
 +
order by ref.Virt_Hostname, cust.Username
 +
</pre>
 +
<br>
 +
=== sqwsyb_GenLstDataserverSshNew.ksh ===
 +
List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstDataserverSshNew.ksh:<br>
 +
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstDataserverSshNew.ksh.<br>
 +
Generation of the list of Sybase dataservers for ssh connection
 +
<br><br>
 +
Query used:
 +
<pre>
 +
select convert(varchar(70),ref.Virt_Hostname+' '+cust.Username+' '+ref.DataServer)
 +
from tsqw_Repository ref, tsqw_UserSsh cust
 +
where ref.Status != 'OFF'
 +
and cust.Status = 'NEW'
 +
and ref.DataServer = cust.DataServer
 +
order by ref.Virt_Hostname, cust.Username
 +
</pre>
 +
<br>
 +
=== sqwsyb_GenLstNewDataserver.ksh ===
 +
List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstNewDataserver.ksh:<br>
 +
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstNewDataserver.ksh.<br>
 +
Generation of the list of Sybase new dataservers (tsqw_Repository)
 +
<br><br>
 +
Query used:
 +
<pre>
 +
select convert(varchar(70),Virt_Hostname+' '+Username+' '+DataServer)
 
from tsqw_Repository
 
from tsqw_Repository
where Status = 'ON'
+
where Status = 'NEW'
 +
order by Virt_Hostname, Username
 +
</pre>
 +
<br>
 +
=== sqwsyb_GenLstNewUnique.ksh ===
 +
List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstNewUnique.ksh:<br>
 +
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstNewUnique.ksh.<br>
 +
Generation of the new user unique list (tsqw_Repository)
 +
<br><br>
 +
Query used:
 +
<pre>
 +
select distinct Hostname||' $gvsqw_UserUniqueSybase'
 +
from tsqw_Repository
 +
where Status = 'NEW'
 +
</pre>
 +
<br>
 +
=== sqwsyb_GenLstRepindDist.ksh ===
 +
List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstRepindDist.ksh:<br>
 +
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstRepindDist.ksh.<br>
 +
Generation of the list for reprise of indicators (tsqw_Repository/tsqw_GenHisto)
 +
<br><br>
 +
Query used:
 +
<pre>
 +
select convert(varchar(70),ref.Virt_Hostname+' '+ref.Username+' '+ref.DataServer)
 +
from tsqw_Repository ref
 +
where ref.Status in ('DIST','MIX')
 +
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
 
order by Virt_Hostname, Username
 
</pre>
 
</pre>
 
<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)
 
from tsqw_Repository ref
 
from tsqw_Repository ref
where ref.Status = 'ON'
+
where ref.Status in ('ON','MIX')
 
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'
 
from tsqw_Repository
 
from tsqw_Repository
where Status != 'OFF'
+
where Status in ('ON','MIX')
 
select distinct Hostname||' $gvsqw_UserUniqueSybase'
 
select distinct Hostname||' $gvsqw_UserUniqueSybase'
 
from tsqw_RepositoryOther
 
from tsqw_RepositoryOther

Latest revision as of 22:53, 17 December 2012

auto

sqwsyb_AdddbSQWareProfile.ksh

Action script $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_AdddbSQWareProfile.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_AdddbSQWareProfile.ksh.
Add dbSQWare profile

Action:

lfsqw_Action()
{
while read lvsqw_HostName lvsqw_UserName lvsqw_Instance
do
echo "${c_info}$lvsqw_UserName@$lvsqw_HostName $lvsqw_Instance${c_normal}"
lvsqw_Instance=$(echo "$lvsqw_Instance"|cut -d':' -f1)
ssh $gvsqw_SshOptions $lvsqw_UserName@$lvsqw_HostName <<EOFSSH
if [ -r ~/.profile ]
then
	if [ \$(grep -c 'gvsqw_SybBin' ~/.profile) -eq 0 ]
	then
		cat <<EOFCAT >>~/.profile

#dbSQWare
export gvsqw_Env=''
export gvsqw_SybBin=\\\$HOME/SQWareProduction/sybase/bin
lvsqw_IsTerminal=\\\$(tty 2>&1 >/dev/null;echo \\\$?)
if [ "\\\$lvsqw_IsTerminal" = "0" ] && [ -r \\\$gvsqw_SybBin/../etc/.profile_confort ]
then
	. \\\$gvsqw_SybBin/../etc/.profile_confort
fi

EOFCAT
	fi
elif [ -r ~/.bash_profile ]
then
	if [ \$(grep -c 'gvsqw_SybBin' ~/.bash_profile) -eq 0 ]
	then
		cat <<EOFCAT >>~/.bash_profile

#dbSQWare
export gvsqw_Env=''
export gvsqw_SybBin=\\\$HOME/SQWareProduction/sybase/bin
lvsqw_IsTerminal=\\\$(tty 2>&1 >/dev/null;echo \\\$?)
if [ "\\\$lvsqw_IsTerminal" = "0" ] && [ -r \\\$gvsqw_SybBin/../etc/.profile_confort ]
then
	. \\\$gvsqw_SybBin/../etc/.profile_confort
fi

EOFCAT
	fi
fi
EOFSSH
done <$gvsqw_TmpFile.lst

}


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 $gvsqw_SshOptions $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_GatherDistFsSize.ksh

Action script $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_GatherDistFsSize.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_GatherDistFsSize.ksh.
Gather FS size

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 $gvsqw_DistSQWareProdUser_sybase <<EOFSSH &
\$gvsqw_SybBin/sqwsyb_GatherDistantFsSize.ksh -S "$lvsqw_Instance" -U "$lvsqw_UserName" -H "$lvsqw_HostName"
EOFSSH
sleep 3
done <$gvsqw_TmpFile.lst
jobs
wait
}


sqwsyb_GatherIndicatorsDist.ksh

Action script $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_GatherIndicatorsDist.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_GatherIndicatorsDist.ksh.
Sybase indicators collection in distant mode

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 $gvsqw_DistSQWareProdUser_sybase <<EOFSSH &
\$gvsqw_SybBin/sqwsyb_GatherIndicators.ksh -S "$lvsqw_Instance" -Dist
EOFSSH
sleep 1
done <$gvsqw_TmpFile.lst
jobs
wait
}


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
lvsqw_Instance=$(echo "$lvsqw_Instance"|cut -d':' -f1)
echo "${c_info}$lvsqw_UserName@$lvsqw_HostName $lvsqw_Instance${c_normal}"
ssh $gvsqw_SshOptions $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
}


sqwsyb_Gen_dbSQWare.ksh

Action script $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_Gen_dbSQWare.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_Gen_dbSQWare.ksh.
generate dbSQWare files

Action:

lfsqw_Action()
{
while read lvsqw_HostName lvsqw_UserName lvsqw_Instance
do
lvsqw_Instance=$(echo "$lvsqw_Instance"|cut -d':' -f1)
echo "${c_info}$lvsqw_UserName@$lvsqw_HostName $lvsqw_Instance${c_normal}"
ssh $gvsqw_SshOptions $lvsqw_UserName@$lvsqw_HostName <<EOFSSH
. \$gvsqw_SybBin/../tools/sqwsyb_SetEnv.ksh $lvsqw_Instance
if [ "\$DSQUERY" != "$lvsqw_Instance" ]
then
	export DSQUERY="$lvsqw_Instance"
fi
\$gvsqw_SybBin/../tools/sqwsyb_GenerateCreateDataserver.ksh -dbsOnly <<EOF
y
EOF
EOFSSH
done <$gvsqw_TmpFile.lst
}


sqwsyb_GenSshKeysInstance.ksh

Action script $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_GenSshKeysInstance.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_GenSshKeysInstance.ksh.
ssh keys deployment for Sybase

Action:

lfsqw_Action()
{

echo "#########################################################################"
echo "#Create/Retrieve key for SQWareCentral"
mkdir -p $HOME/tmp
if [ -r $HOME/.ssh/id_dsa.pub ]
then
	echo "Id DSA found:"
	ls -l $HOME/.ssh/id_dsa.pub
	lvsqw_CentralKey=$(cat $HOME/.ssh/id_dsa.pub)
elif [ -r $HOME/.ssh/id_rsa.pub ]
then
	echo "Id RSA found:"
	ls -l $HOME/.ssh/id_rsa.pub
	lvsqw_CentralKey=$(cat $HOME/.ssh/id_rsa.pub)
else
	ssh-keygen -t rsa -N '' -f $HOME/.ssh/id_rsa
	lvsqw_CentralKey=$(cat $HOME/.ssh/id_rsa.pub)
fi
#Retrieve additionnal keys if found (your windows key for exemple)
if [ -r $HOME/.ssh/id_dbSQWare.pub ]
then
	echo "Id dbSQWare found:"
	ls -l $HOME/.ssh/id_dbSQWare.pub
	lvsqw_AdditionnalKey=$(cat $HOME/.ssh/id_dbSQWare.pub)
else
	lvsqw_AdditionnalKey=""
fi
chmod go-w $HOME
touch $HOME/.ssh/authorized_keys
chmod 700 $HOME/.ssh
chmod 600 $HOME/.ssh/authorized_keys
echo "${c_menu}#########################################################################"
echo "#create key if not found and put SQWareCentral key for distant users"
echo "Enter password when necessary${c_normal}"
while read lvsqw_HostName lvsqw_UserName lvsqw_Instance
do
echo ""
echo "${c_info}$lvsqw_UserName@$lvsqw_HostName${c_normal}"
ssh -o StrictHostKeyChecking=no $lvsqw_UserName@$lvsqw_HostName <<EOFSSH
mkdir -p \$HOME/tmp
if [ -r \$HOME/.ssh/id_dsa.pub ]
then
	echo "Id DSA found:"
	ls -l \$HOME/.ssh/id_dsa.pub
	cat \$HOME/.ssh/id_dsa.pub
elif [ -r \$HOME/.ssh/id_rsa.pub ]
then
	echo "Id RSA found:"
	ls -l \$HOME/.ssh/id_rsa.pub
	cat \$HOME/.ssh/id_rsa.pub
else
	ssh-keygen -t rsa -N '' -f \$HOME/.ssh/id_rsa
	cat \$HOME/.ssh/id_rsa.pub
fi
chmod go-w \$HOME
echo "$lvsqw_CentralKey" >>\$HOME/.ssh/authorized_keys
echo "$lvsqw_AdditionnalKey" >>\$HOME/.ssh/authorized_keys
chmod 700 \$HOME/.ssh
chmod 600 \$HOME/.ssh/authorized_keys
EOFSSH

done <$gvsqw_TmpFile.lst
}


sqwsyb_GenSshKeys.ksh

Action script $gvsqw_RootexpdbCentral/action/sybase/auto/sqwsyb_GenSshKeys.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/auto_cust/sqwsyb_GenSshKeys.ksh.
ssh keys deployment for Sybase

Action:

lfsqw_Action()
{

echo "#########################################################################"
echo "#Create/Retrieve key for SQWareCentral"
mkdir -p $HOME/tmp
if [ -r $HOME/.ssh/id_dsa.pub ]
then
	echo "Id DSA found:"
	ls -l $HOME/.ssh/id_dsa.pub
	lvsqw_CentralKey=$(cat $HOME/.ssh/id_dsa.pub)
elif [ -r $HOME/.ssh/id_rsa.pub ]
then
	echo "Id RSA found:"
	ls -l $HOME/.ssh/id_rsa.pub
	lvsqw_CentralKey=$(cat $HOME/.ssh/id_rsa.pub)
else
	ssh-keygen -t rsa -N '' -f $HOME/.ssh/id_rsa
	lvsqw_CentralKey=$(cat $HOME/.ssh/id_rsa.pub)
fi
#Retrieve additionnal keys if found (your windows key for exemple)
if [ -r $HOME/.ssh/id_dbSQWare.pub ]
then
	echo "Id dbSQWare found:"
	ls -l $HOME/.ssh/id_dbSQWare.pub
	lvsqw_AdditionnalKey=$(cat $HOME/.ssh/id_dbSQWare.pub)
else
	lvsqw_AdditionnalKey=""
fi
chmod go-w $HOME
touch $HOME/.ssh/authorized_keys
chmod 700 $HOME/.ssh
chmod 600 $HOME/.ssh/authorized_keys
echo "${c_menu}#########################################################################"
echo "#create key if not found and put SQWareCentral key for distant users"
echo "Enter password when necessary${c_normal}"
while read lvsqw_HostName lvsqw_UserName
do
echo ""
echo "${c_info}$lvsqw_UserName@$lvsqw_HostName${c_normal}"
ssh -o StrictHostKeyChecking=no $lvsqw_UserName@$lvsqw_HostName <<EOFSSH
mkdir -p \$HOME/tmp
if [ -r \$HOME/.ssh/id_dsa.pub ]
then
	echo "Id DSA found:"
	ls -l \$HOME/.ssh/id_dsa.pub
	cat \$HOME/.ssh/id_dsa.pub
elif [ -r \$HOME/.ssh/id_rsa.pub ]
then
	echo "Id RSA found:"
	ls -l \$HOME/.ssh/id_rsa.pub
	cat \$HOME/.ssh/id_rsa.pub
else
	ssh-keygen -t rsa -N '' -f \$HOME/.ssh/id_rsa
	cat \$HOME/.ssh/id_rsa.pub
fi
chmod go-w \$HOME
echo "$lvsqw_CentralKey" >>\$HOME/.ssh/authorized_keys
echo "$lvsqw_AdditionnalKey" >>\$HOME/.ssh/authorized_keys
chmod 700 \$HOME/.ssh
chmod 600 \$HOME/.ssh/authorized_keys
EOFSSH

done <$gvsqw_TmpFile.lst
}




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_RootexpdbExpSybase="~$gvsqw_UserUniqueSybase/SQWareProduction/sybase"
export gvsqw_VersexpdbExpSybase='prod'
export gvsqw_VersDeplexpdbExpSybase='v3.1'
export gvsqw_Mail_sybase='dba'
export gvsqw_MailMsg_sybase='TrtSybAuto'



Variable explanation:

gvsqw_MailMsg_sybase => 
gvsqw_Mail_sybase => 
gvsqw_RootexpdbExpSybase => 
gvsqw_VersDeplexpdbExpSybase => 
gvsqw_VersexpdbExpSybase => 


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_Mail_sybase='default@dbsqware.com'
export gvsqw_MailMsg_sybase='TrtSybAuto'
export gvsqw_UserUniqueSybase='dbsqware'
export gvsqw_RootSQWareProductionSybase="~$gvsqw_UserUniqueSybase/SQWareProduction/sybase"
export gvsqw_VersSQWareProductionSybase='prod'
export gvsqw_VersDeplSQWareProductionSybase='v3.1'
export gvsqw_DistSQWareProdUser_sybase="$gvsqw_UserUniqueSybase@$gvsqw_Hostname"



Variable explanation:

gvsqw_DistSQWareProdUser_sybase => 
gvsqw_MailMsg_sybase => 
gvsqw_Mail_sybase => 
gvsqw_RootSQWareProductionSybase => 
gvsqw_UserUniqueSybase => 
gvsqw_VersDeplSQWareProductionSybase => 
gvsqw_VersSQWareProductionSybase => 


.profile_confort

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

Alias explanation:

	  act_syb => 'cd $gvsqw_RootexpdbCentral/action/sybase/prod;ls -al'
	  etc_syb => 'cd $gvsqw_RootexpdbCentral/action/sybase/etc;ls -al'
	  lst_syb => 'cd $gvsqw_RootexpdbCentral/action/sybase/lst;ls -al'
	  auto_syb => 'cd $gvsqw_RootexpdbCentral/action/sybase/auto;ls -al'
	  cetc_syb => 'cd $gvsqw_RootexpdbCentral/action/sybase/etc_cust;ls -al'
	  clst_syb => 'cd $gvsqw_RootexpdbCentral/action/sybase/lst_cust;ls -al'
	  cauto_syb => 'cd $gvsqw_RootexpdbCentral/action/sybase/auto_cust;ls -al'
	  depl_syb => '$gvsqw_RootexpdbCentral/menu/sqwc_MenuAction.ksh sybase sqwsyb_DeplScripts.ksh sqwsyb_GenLstUnique.ksh'
	  repind_syb => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh sybase sqwsyb_GatherIndicators.ksh sqwsyb_GenLstRepind.ksh NOLOG'
	  repind_syb_dist => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh sybase sqwsyb_GatherIndicatorsDist.ksh sqwsyb_GenLstRepindDist.ksh NOLOG'
	  gen_syb => '$gvsqw_RootexpdbCentral/action/sybase/lst/sqwc_GenRefSybase.ksh'
	  gen_int => '$gvsqw_RootexpdbCentral/action/sybase/lst/sqwc_GenInterfaces.ksh'
	  menu_syb => '$gvsqw_RootexpdbCentral/menu/sqwc_MenuAction.ksh sybase'




lst

sqwc_Extract_CMDB_Sybase.ksh

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


Query used:

select 'SYB;' || ref.DataServer || ';' || isnull(lic.Hostname,ref.Hostname)|| ';' || ref.Env || ';' || ref.Status || ';' ||
from tsqw_Repository ref 
        on (ref.DataServer = hist.DataServer and hist.Month=convert(smalldatetime,'01'+substring(convert(char(10),getdate(),103),3,8),103))
        on (hist.DataServer = inf.DataServer and hist.Gather_date = inf.Gather_date)
order by 1


sqwc_GenInterfaces.ksh

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


Query used:

echo "# interfaces file generated by SQWareCentral (module of dbSQWare) from SQWareRepository" > $lvsqw_FicRef
select '#'+Env+', '+Client+', '+Contact+', '+Comments+char(10)
from tsqw_Repository
where Status!='OFF'
order by DataServer


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_GenLstDataserverDist.ksh

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

Query used:

select convert(varchar(70),Virt_Hostname+' '+Username+' '+DataServer)
from tsqw_Repository
where Status in ('DIST','MIX')
order by Virt_Hostname, Username


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 in ('ON','MIX')
order by Virt_Hostname, Username


sqwsyb_GenLstDataserverSsh.ksh

List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstDataserverSsh.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstDataserverSsh.ksh.
Generation of the list of Sybase dataservers for ssh connection

Query used:

select convert(varchar(70),ref.Virt_Hostname+' '+cust.Username+' '+ref.DataServer)
from tsqw_Repository ref, tsqw_UserSsh cust
where ref.Status != 'OFF'
and cust.Status = 'ON'
and ref.DataServer = cust.DataServer
order by ref.Virt_Hostname, cust.Username


sqwsyb_GenLstDataserverSshNew.ksh

List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstDataserverSshNew.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstDataserverSshNew.ksh.
Generation of the list of Sybase dataservers for ssh connection

Query used:

select convert(varchar(70),ref.Virt_Hostname+' '+cust.Username+' '+ref.DataServer)
from tsqw_Repository ref, tsqw_UserSsh cust
where ref.Status != 'OFF'
and cust.Status = 'NEW'
and ref.DataServer = cust.DataServer
order by ref.Virt_Hostname, cust.Username


sqwsyb_GenLstNewDataserver.ksh

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

Query used:

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


sqwsyb_GenLstNewUnique.ksh

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

Query used:

select distinct Hostname||' $gvsqw_UserUniqueSybase'
from tsqw_Repository
where Status = 'NEW'


sqwsyb_GenLstRepindDist.ksh

List generator $gvsqw_RootexpdbCentral/action/sybase/lst/sqwsyb_GenLstRepindDist.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/sybase/lst_cust/sqwsyb_GenLstRepindDist.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 in ('DIST','MIX')
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_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 in ('ON','MIX')
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 in ('ON','MIX')
select distinct Hostname||' $gvsqw_UserUniqueSybase'
from tsqw_RepositoryOther
order by 1