Difference between revisions of "SQWareCentral:oracle"

From Wiki_dbSQWare
Jump to: navigation, search
m (Updated by Expdbtools)
Line 1: Line 1:
{{SQWareCentralPresSgbd|oracle}}
 
 
 
== auto ==
 
== auto ==
 
=== sqwora_CheckInstance.ksh ===
 
=== sqwora_CheckInstance.ksh ===
Script d'action $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_CheckInstance.ksh:<br>
+
Action script $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_CheckInstance.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_CheckInstance.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_CheckInstance.ksh.<br>
Verifie le parametrage et la securite
+
Check parameters and security
 
<br><br>
 
<br><br>
Requête utilisée:
+
Action:
 
<pre>
 
<pre>
 
lfsqw_Action()
 
lfsqw_Action()
Line 15: Line 13:
 
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_OraBin/../tools/sqwora_SetEnv.ksh $lvsqw_Instance
$gvsqw_RootSQWareProductionOracle/$gvsqw_VersSQWareProductionOracle/bin/sqwora_RunJob.ksh -I $lvsqw_Instance -A CheckInstance
+
\$gvsqw_OraBin/sqwora_RunJob.ksh -I $lvsqw_Instance -A CheckInstance
 
EOFSSH
 
EOFSSH
 
sleep 1
 
sleep 1
Line 26: Line 24:
 
<br>
 
<br>
 
=== sqwora_DeplScripts.ksh ===
 
=== sqwora_DeplScripts.ksh ===
Script d'action $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_DeplScripts.ksh:<br>
+
Action script $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_DeplScripts.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_DeplScripts.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_DeplScripts.ksh.<br>
Deploiement de SQWareProduction pour Oracle
+
SQWareProduction deployment for Oracle
 
<br><br>
 
<br><br>
Requête utilisée:
+
Action:
 
<pre>
 
<pre>
 
lfsqw_Action()
 
lfsqw_Action()
Line 40: Line 38:
 
mkdir -p $gvsqw_RootSQWareProductionOracle/$gvsqw_VersDeplSQWareProductionOracle
 
mkdir -p $gvsqw_RootSQWareProductionOracle/$gvsqw_VersDeplSQWareProductionOracle
 
cd $gvsqw_RootSQWareProductionOracle
 
cd $gvsqw_RootSQWareProductionOracle
ln -sf $gvsqw_VersDeplSQWareProductionOracle $gvsqw_VersSQWareProductionOracle
+
rm -f $gvsqw_VersSQWareProductionOracle
 +
ln -s $gvsqw_VersDeplSQWareProductionOracle $gvsqw_VersSQWareProductionOracle
 
EOFSSH
 
EOFSSH
 
rsync -aHv $gvsqw_RsyncPathOracle --delete $gvsqw_RootSQWareProduction/oracle/$gvsqw_VersDeplSQWareProductionOracle $lvsqw_UserName@$lvsqw_HostName:$gvsqw_RootSQWareProductionOracle/.
 
rsync -aHv $gvsqw_RsyncPathOracle --delete $gvsqw_RootSQWareProduction/oracle/$gvsqw_VersDeplSQWareProductionOracle $lvsqw_UserName@$lvsqw_HostName:$gvsqw_RootSQWareProductionOracle/.
Line 48: Line 47:
 
<br>
 
<br>
 
=== sqwora_GatherIndicators.ksh ===
 
=== sqwora_GatherIndicators.ksh ===
Script d'action $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_GatherIndicators.ksh:<br>
+
Action script $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_GatherIndicators.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_GatherIndicators.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_GatherIndicators.ksh.<br>
Collecte des indicateurs Oracle
+
Oracle gather indicators
 
<br><br>
 
<br><br>
Requête utilisée:
+
Action:
 
<pre>
 
<pre>
 
lfsqw_Action()
 
lfsqw_Action()
Line 60: Line 59:
 
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_OraBin/../tools/sqwora_SetEnv.ksh $lvsqw_Instance
$gvsqw_RootSQWareProductionOracle/$gvsqw_VersSQWareProductionOracle/bin/sqwora_RunJob.ksh -I $lvsqw_Instance -A IndicDba
+
\$gvsqw_OraBin/sqwora_RunJob.ksh -I $lvsqw_Instance -A IndicDba
 
EOFSSH
 
EOFSSH
 
sleep 1
 
sleep 1
Line 67: Line 66:
 
jobs
 
jobs
 
wait
 
wait
 +
}
 +
</pre>
 +
<br>
 +
=== sqwora_GenEdt.ksh ===
 +
Action script $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_GenEdt.ksh:<br>
 +
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_GenEdt.ksh.<br>
 +
generate EDT files
 +
<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 -T $lvsqw_UserName@$lvsqw_HostName <<EOFSSH
 +
. \$gvsqw_OraBin/../tools/sqwora_SetEnv.ksh $lvsqw_Instance
 +
\$gvsqw_OraBin/../tools/sqwora_GenerateCreateDatabase.ksh -P 1521 -edtOnly <<EOF
 +
y
 +
EOF
 +
EOFSSH
 +
done <$gvsqw_TmpFile.lst
 
}
 
}
 
</pre>
 
</pre>
 
<br>
 
<br>
 
=== sqwora_GenerateAwr.ksh ===
 
=== sqwora_GenerateAwr.ksh ===
Script d'action $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_GenerateAwr.ksh:<br>
+
Action script $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_GenerateAwr.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_GenerateAwr.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_GenerateAwr.ksh.<br>
collecte des rapports AWR
+
collection of AWR reports
 
<br><br>
 
<br><br>
Requête utilisée:
+
Action:
 
<pre>
 
<pre>
 
lfsqw_Action()
 
lfsqw_Action()
Line 83: Line 104:
 
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_OraBin/../tools/sqwora_SetEnv.ksh $lvsqw_Instance
$gvsqw_RootSQWareProductionOracle/$gvsqw_VersSQWareProductionOracle/bin/sqwora_RunJob.ksh -I $lvsqw_Instance -A GenAwr
+
\$gvsqw_OraBin/sqwora_RunJob.ksh -I $lvsqw_Instance -A GenAwr
 
EOFSSH
 
EOFSSH
 
sleep 10
 
sleep 10
Line 90: Line 111:
 
jobs
 
jobs
 
wait
 
wait
 +
}
 +
</pre>
 +
<br>
 +
=== sqwora_RetrieveHash.ksh ===
 +
Action script $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_RetrieveHash.ksh:<br>
 +
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_RetrieveHash.ksh.<br>
 +
retrieve hashs for Oracle users
 +
<br><br>
 +
Action:
 +
<pre>
 +
lfsqw_Action()
 +
{
 +
lvsqw_FicRef=$gvsqw_RootexpdbCentral/etc_cust/Hash_oracle.csv
 +
> $lvsqw_FicRef
 +
chmod 600 $lvsqw_FicRef
 +
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>$lvsqw_FicRef.tmp
 +
. \$gvsqw_OraBin/../tools/sqwora_SetEnv.ksh $lvsqw_Instance
 +
\$gvsqw_OraBin/../tools/sqwora_BackupPasswd.ksh -I $lvsqw_Instance -T hash
 +
EOFSSH
 +
cat $lvsqw_FicRef.tmp|grep "^$lvsqw_Instance;" >>$lvsqw_FicRef
 +
done <$gvsqw_TmpFile.lst
 +
 
}
 
}
 
</pre>
 
</pre>
 
<br>
 
<br>
 
=== sqwora_RmanFull.ksh ===
 
=== sqwora_RmanFull.ksh ===
Script d'action $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_RmanFull.ksh:<br>
+
Action script $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_RmanFull.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_RmanFull.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_RmanFull.ksh.<br>
Backup full avec RMAN (incremental level 0)
+
Backup full with RMAN (incremental level 0)
 
<br><br>
 
<br><br>
Requête utilisée:
+
Action:
 
<pre>
 
<pre>
 
lfsqw_Action()
 
lfsqw_Action()
Line 106: Line 152:
 
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_OraBin/../tools/sqwora_SetEnv.ksh $lvsqw_Instance
$gvsqw_RootSQWareProductionOracle/$gvsqw_VersSQWareProductionOracle/bin/sqwora_RunJob.ksh -I $lvsqw_Instance -A RmanFull
+
\$gvsqw_OraBin/sqwora_RunJob.ksh -I $lvsqw_Instance -A RmanFull
 
EOFSSH
 
EOFSSH
 
sleep 30
 
sleep 30
Line 117: Line 163:
 
<br>
 
<br>
 
=== sqwora_RmanInc.ksh ===
 
=== sqwora_RmanInc.ksh ===
Script d'action $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_RmanInc.ksh:<br>
+
Action script $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_RmanInc.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_RmanInc.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_RmanInc.ksh.<br>
Backup inc avec RMAN (incremental level 2)
+
Backup inc with RMAN (incremental level 2)
 
<br><br>
 
<br><br>
Requête utilisée:
+
Action:
 
<pre>
 
<pre>
 
lfsqw_Action()
 
lfsqw_Action()
Line 129: Line 175:
 
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_OraBin/../tools/sqwora_SetEnv.ksh $lvsqw_Instance
$gvsqw_RootSQWareProductionOracle/$gvsqw_VersSQWareProductionOracle/bin/sqwora_RunJob.ksh -I $lvsqw_Instance -A RmanInc
+
\$gvsqw_OraBin/sqwora_RunJob.ksh -I $lvsqw_Instance -A RmanInc
 
EOFSSH
 
EOFSSH
 
sleep 30
 
sleep 30
Line 140: Line 186:
 
<br>
 
<br>
 
=== sqwora_StartedInstances.ksh ===
 
=== sqwora_StartedInstances.ksh ===
Script d'action $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_StartedInstances.ksh:<br>
+
Action script $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_StartedInstances.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_StartedInstances.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_StartedInstances.ksh.<br>
collecte des instances actives
+
collection of active instances
 
<br><br>
 
<br><br>
Requête utilisée:
+
Action:
 
<pre>
 
<pre>
 
lfsqw_Action()
 
lfsqw_Action()
Line 175: Line 221:
  
 
== etc ==
 
== etc ==
 +
=== CrontabRef.cfg ===
 +
Configuration file $gvsqw_RootexpdbCentral/action/oracle/etc/CrontabRef.cfg:<br>
 +
It contains the operating variables of SQWareCentral for oracle.<br>
 +
If you want to overload default variables,<br>
 +
put in $gvsqw_RootexpdbCentral/action/oracle/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/oracle/etc/sqwc_DbRefVar.cfg:<br>
+
Configuration file $gvsqw_RootexpdbCentral/action/oracle/etc/sqwc_DbRefVar.cfg:<br>
Il contient les variables de fonctionnement de SQWareCentral pour le SGBD oracle.<br>
+
It contains the operating variables of SQWareCentral for oracle.<br>
Les variables que l'on veut modifier sont à placer dans $gvsqw_RootexpdbCentral/action/oracle/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/oracle/etc_cust/sqwc_DbRefVar.cfg<br>
gvsqw_DbRefDatabase_oracle => Database du referentiel [par défaut: 'DatabaseInstanceNameForOracle']
+
your modifications (only variables you want to modify).<br>
gvsqw_DbRefInstance_oracle => Instance du referentiel [par défaut: 'InstanceNameForOracle']
+
<br>
gvsqw_DbRefPass_oracle => Mot de passe de connexion au referentiel [par défaut: 'ConnexionPassForOracle']
+
File content:
gvsqw_DbRefPort_oracle => Port du referentiel [par défaut: 'InstancePortForOracle']
+
<pre>
gvsqw_DbRefType_oracle => Type de referentiel [par défaut: 'oracle']
+
export gvsqw_DbRefType_oracle='oracle'
gvsqw_DbRefUser_oracle => User de connexion au referentiel [par défaut: 'ConnexionUserForOracle']
+
export gvsqw_DbRefPort_oracle='InstancePortForOracle'
 +
export gvsqw_DbRefInstance_oracle='InstanceNameForOracle'
 +
export gvsqw_DbRefDatabase_oracle='DatabaseInstanceNameForOracle'
 +
export gvsqw_DbRefUser_oracle='ConnexionUserForOracle'
 +
export gvsqw_DbRefPass_oracle='ConnexionPassForOracle'
 +
</pre>
 +
<br>
 +
<br>
 +
Variable explanation:
 +
<pre>
 +
gvsqw_DbRefDatabase_oracle =>
 +
gvsqw_DbRefInstance_oracle =>
 +
gvsqw_DbRefPass_oracle =>
 +
gvsqw_DbRefPort_oracle =>  
 +
gvsqw_DbRefType_oracle =>  
 +
gvsqw_DbRefUser_oracle =>  
 +
</pre>
 
<br>
 
<br>
 
 
=== sqwc_ExpVar.cfg ===
 
=== sqwc_ExpVar.cfg ===
Fichier de configuration $gvsqw_RootexpdbCentral/action/oracle/etc/sqwc_ExpVar.cfg:<br>
+
Configuration file $gvsqw_RootexpdbCentral/action/oracle/etc/sqwc_ExpVar.cfg:<br>
Il contient les variables de fonctionnement de SQWareCentral pour le SGBD oracle.<br>
+
It contains the operating variables of SQWareCentral for oracle.<br>
Les variables que l'on veut modifier sont à placer dans $gvsqw_RootexpdbCentral/action/oracle/etc_cust/sqwc_ExpVar.cfg.<br>
+
If you want to overload default variables,<br>
gvsqw_MailMsg_oracle => message de début de sujet de mail [par défaut: 'TrtOraAuto']
+
put in $gvsqw_RootexpdbCentral/action/oracle/etc_cust/sqwc_ExpVar.cfg<br>
gvsqw_Mail_oracle => adresse pour envoi des mails [par défaut: 'dba']
+
your modifications (only variables you want to modify).<br>
gvsqw_RootSQWareProductionOracle => Répertoire de déploiement de SQWareProduction [par défaut: "~$gvsqw_UserUniqueOracle/SQWareProduction/oracle"]
+
<br>
gvsqw_VersDeplSQWareProductionOracle => Version de SQWareProduction à déployer  [par défaut: 'v1.1']
+
File content:
gvsqw_VersSQWareProductionOracle => Lien utilisé pour la version courante [par défaut: 'prod']
+
<pre>
 +
export gvsqw_RootSQWareProductionOracle="~$gvsqw_UserUniqueOracle/SQWareProduction/oracle"
 +
export gvsqw_VersSQWareProductionOracle='prod'
 +
export gvsqw_VersDeplSQWareProductionOracle='v1.2'
 +
export gvsqw_Mail_oracle='dba'
 +
export gvsqw_MailMsg_oracle='TrtOraAuto'
 +
</pre>
 +
<br>
 +
<br>
 +
Variable explanation:
 +
<pre>
 +
gvsqw_MailMsg_oracle =>
 +
gvsqw_Mail_oracle =>
 +
gvsqw_RootSQWareProductionOracle =>
 +
gvsqw_VersDeplSQWareProductionOracle =>
 +
gvsqw_VersSQWareProductionOracle =>  
 +
</pre>
 
<br>
 
<br>
 
 
=== sqwc_GlobalVar.cfg ===
 
=== sqwc_GlobalVar.cfg ===
Fichier de configuration $gvsqw_RootexpdbCentral/action/oracle/etc/sqwc_GlobalVar.cfg:<br>
+
Configuration file $gvsqw_RootexpdbCentral/action/oracle/etc/sqwc_GlobalVar.cfg:<br>
Il contient les variables de fonctionnement de SQWareCentral pour le SGBD oracle.<br>
+
It contains the operating variables of SQWareCentral for oracle.<br>
Les variables que l'on veut modifier sont à placer dans $gvsqw_RootexpdbCentral/action/oracle/etc_cust/sqwc_GlobalVar.cfg.<br>
+
If you want to overload default variables,<br>
gvsqw_UserUniqueOracle => User Unix generique (unique) de deploiement [par défaut: 'sysdba']
+
put in $gvsqw_RootexpdbCentral/action/oracle/etc_cust/sqwc_GlobalVar.cfg<br>
 +
your modifications (only variables you want to modify).<br>
 +
<br>
 +
File content:
 +
<pre>
 +
export gvsqw_UserUniqueOracle='sysdba'
 +
export gvsqw_NbDaysInc=3
 +
export gvsqw_NbDaysInc=2
 +
export gvsqw_NbDaysFull=7
 +
</pre>
 +
<br>
 
<br>
 
<br>
 +
Variable explanation:
 +
<pre>
 +
gvsqw_NbDaysFull =>
 +
gvsqw_NbDaysInc =>
 +
gvsqw_NbDaysInc =>
 +
gvsqw_UserUniqueOracle =>
 +
</pre>
 +
<br>
 +
=== tnsnames.ora ===
 +
Configuration file $gvsqw_RootexpdbCentral/action/oracle/etc/tnsnames.ora:<br>
 +
It contains the operating variables of SQWareCentral for oracle.<br>
 +
If you want to overload default variables,<br>
 +
put in $gvsqw_RootexpdbCentral/action/oracle/etc_cust/tnsnames.ora<br>
 +
your modifications (only variables you want to modify).<br>
 +
<br>
 +
File content:
 +
<pre>
 +
</pre>
 +
<br>
 +
<br>
 +
Variable explanation:
 +
<pre>
 +
</pre>
 +
<br>
 +
=== .profile_confort ===
 +
File to put aliases $gvsqw_RootexpdbCentral/action/oracle/etc/.profile_confort:<br>
 +
File to put aliases $gvsqw_RootexpdbCentral/action/oracle/etc/.profile_confort:<br>
 +
Contains confort aliases of SQWareCentral for RDBMS oracle.<br>
 +
Contains confort aliases of SQWareCentral for RDBMS oracle.<br>
 +
<br>
 +
Alias explanation:
 +
<pre>
 +
  act_ora => 'cd $gvsqw_RootexpdbCentral/action/oracle/prod;ls -al'
 +
  depl_ora => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh oracle sqwora_DeplScripts.ksh sqwora_GenLstUnique.ksh NOLOG CONFIRM'
 +
  repind_ora => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh oracle sqwora_GatherIndicators.ksh sqwora_GenLstRepind.ksh NOLOG'
 +
  gen_ora => '$gvsqw_RootexpdbCentral/action/oracle/lst/sqwc_GenRefOracle.ksh'
 +
</pre>
 +
<br>
 +
<br><br>
  
=== .profile_confort ===
+
== generate_tnsnames_ora.ksh ==
Fichier de positionnement d'alias $gvsqw_RootexpdbCentral/action/oracle/etc/.profile_confort:<br>
+
=== generate_tnsnames_ora.ksh ===
Il contient les alias de confort de SQWareCentral pour le SGBD oracle.<br>
 
Peut-être surchargé par $gvsqw_RootexpdbCentral/action/oracle/etc_cust/.profile_confort.<br>
 
act_ora => 'cd $gvsqw_RootexpdbCentral/action/oracle/prod;ls -al'
 
depl_ora => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh oracle sqwora_DeplScripts.ksh sqwora_GenLstUnique.ksh NOLOG CONFIRM'
 
gen_ora => '$gvsqw_RootexpdbCentral/action/oracle/lst/sqwc_GenRefOracle.ksh'
 
repind_ora => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh oracle sqwora_GatherIndicators.ksh sqwora_GenLstRepind.ksh NOLOG'
 
 
<br><br>
 
<br><br>
  
 
== lst ==
 
== lst ==
 
=== sqwc_GenRefDbOracle.ksh ===
 
=== sqwc_GenRefDbOracle.ksh ===
Script de génération de liste $gvsqw_RootexpdbCentral/action/oracle/lst/sqwc_GenRefDbOracle.ksh:<br>
+
List generator $gvsqw_RootexpdbCentral/action/oracle/lst/sqwc_GenRefDbOracle.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwc_GenRefDbOracle.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwc_GenRefDbOracle.ksh.<br>
Génére le fichier de référence ''schéma'' Oracle automatiquement à partir du référentiel contenu en bdd.<br>
 
[[SQWareRepository:general|En savoir plus sur le référentiel dbb.]]<br>
 
[[SQWareRepository:oracle|En savoir plus sur le référentiel dbb oracle.]]<br>
 
Le fichier de référence se trouvent dans $gvsqw_RootexpdbCentral/etc_cust/RefDb_oracle.txt.
 
 
<br><br>
 
<br><br>
Requête utilisée:
+
Query used:
 
<pre>
 
<pre>
 
select 'ORA;' || vol.ORACLE_SID || ';' || vol.OWNER || ';' || ref.Env || ';' ||
 
select 'ORA;' || vol.ORACLE_SID || ';' || vol.OWNER || ';' || ref.Env || ';' ||
  hist.Version || ';' || hist.maj_version || ';' || to_char(round(vol.size_sch/1024,0)) || ';' ||
 
  ref.Comments || ';' || ref.VIRT_HOST_NAME || ';' || ref.HOST_NAME || ';' || to_char(vol.GATHER_DATE,'DD/MM/YYYY')
 
 
from tsqw_Repository ref, tsqw_VolSchema vol, tsqw_GenHisto hist
 
from tsqw_Repository ref, tsqw_VolSchema vol, tsqw_GenHisto hist
 
where hist.MONTH=trunc(sysdate,'MM')
 
where hist.MONTH=trunc(sysdate,'MM')
Line 239: Line 368:
 
     and vol.OWNER not like 'OPS$%'
 
     and vol.OWNER not like 'OPS$%'
 
order by vol.OWNER, vol.ORACLE_SID
 
order by vol.OWNER, vol.ORACLE_SID
;
 
 
</pre>
 
</pre>
 
<br>
 
<br>
 
 
=== sqwc_GenRefOracle.ksh ===
 
=== sqwc_GenRefOracle.ksh ===
Script de génération de liste $gvsqw_RootexpdbCentral/action/oracle/lst/sqwc_GenRefOracle.ksh:<br>
+
List generator $gvsqw_RootexpdbCentral/action/oracle/lst/sqwc_GenRefOracle.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwc_GenRefOracle.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwc_GenRefOracle.ksh.<br>
Génére le fichier de référence Oracle automatiquement à partir du référentiel contenu en bdd.<br>
 
[[SQWareRepository:general|En savoir plus sur le référentiel dbb.]]<br>
 
[[SQWareRepository:oracle|En savoir plus sur le référentiel dbb oracle.]]<br>
 
Le fichier de référence se trouvent dans $gvsqw_RootexpdbCentral/etc_cust/Ref_oracle.txt.
 
 
<br><br>
 
<br><br>
Requête utilisée:
+
Query used:
 
<pre>
 
<pre>
col vip_ for a22              head "VirtHost" trunc
 
col uni_ for a12        head "Host"    trunc
 
col usr_ for a12        head "User"    trunc
 
col bas_ for a8        head "Base"    trunc
 
col pot_ for 9999      head "Port"
 
col sta_ for a5        head "Stat"    trunc
 
col env_ for a3        head "Env"      trunc
 
col com_ for a30        head "Description"      trunc
 
col con_ for a20        head "Contact"  trunc
 
col cli_ for a8        head "Client"  trunc
 
 
select virt_host_name vip_, host_name uni_, username usr_, oracle_sid bas_,
 
select virt_host_name vip_, host_name uni_, username usr_, oracle_sid bas_,
port pot_, status sta_, env env_, comments com_, contact con_, client cli_
 
 
from tsqw_Repository r
 
from tsqw_Repository r
union
 
 
select virt_host_name vip_, host_name uni_, username usr_, oracle_sid bas_,
 
select virt_host_name vip_, host_name uni_, username usr_, oracle_sid bas_,
port pot_, status sta_, env env_, comments com_, contact con_, client cli_
 
 
from tsqw_RepositoryOther r
 
from tsqw_RepositoryOther r
 
order by 2,1,3,4;
 
order by 2,1,3,4;
 
</pre>
 
</pre>
 
<br>
 
<br>
 
 
=== sqwora_GenLstAwr.ksh ===
 
=== sqwora_GenLstAwr.ksh ===
Script de génération de liste $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstAwr.ksh:<br>
+
List generator $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstAwr.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_GenLstAwr.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_GenLstAwr.ksh.<br>
Generation de la liste des instances Oracle >= 10g (tsqw_Repository/tsqw_GenHisto)
+
Generation of the list of Oracle instances >= 10g (tsqw_Repository/tsqw_GenHisto)
 
<br><br>
 
<br><br>
Requête utilisée:
+
Query used:
 
<pre>
 
<pre>
 
select ref.VIRT_HOST_NAME||' '||ref.USERNAME||' '||ref.ORACLE_SID
 
select ref.VIRT_HOST_NAME||' '||ref.USERNAME||' '||ref.ORACLE_SID
Line 286: Line 395:
 
and exists ( select 1 from tsqw_GenHisto inf
 
and exists ( select 1 from tsqw_GenHisto inf
 
where inf.GATHER_DATE = trunc(sysdate)
 
where inf.GATHER_DATE = trunc(sysdate)
 +
and ref.ORACLE_SID = inf.ORACLE_SID
 +
and to_number(substr(inf.VERSION,0,instr(inf.VERSION,'.')-1)||substr(inf.VERSION,instr(inf.VERSION,'.')+1,1)) >= 102)
 
order by 1;
 
order by 1;
 
</pre>
 
</pre>
 
<br>
 
<br>
 
=== sqwora_GenLstInstance.ksh ===
 
=== sqwora_GenLstInstance.ksh ===
Script de génération de liste $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstInstance.ksh:<br>
+
List generator $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstInstance.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_GenLstInstance.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_GenLstInstance.ksh.<br>
Generation de la liste des instances Oracle (tsqw_Repository)
+
Generation of the list of Oracle instances (tsqw_Repository)
 +
<br><br>
 +
Query used:
 +
<pre>
 +
select VIRT_HOST_NAME||' '||USERNAME||' '||ORACLE_SID
 +
from tsqw_Repository
 +
where STATUS = 'ON'
 +
order by VIRT_HOST_NAME, USERNAME;
 +
</pre>
 +
<br>
 +
=== sqwora_GenLstInstanceNoProd.ksh ===
 +
List generator $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstInstanceNoProd.ksh:<br>
 +
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_GenLstInstanceNoProd.ksh.<br>
 +
Generation of the list of Oracle no production instances (tsqw_Repository)
 +
<br><br>
 +
Query used:
 +
<pre>
 +
select VIRT_HOST_NAME||' '||USERNAME||' '||ORACLE_SID
 +
from tsqw_Repository
 +
where STATUS = 'ON'
 +
and ENV != 'PRD'
 +
order by VIRT_HOST_NAME, USERNAME;
 +
</pre>
 +
<br>
 +
=== sqwora_GenLstInstanceProd.ksh ===
 +
List generator $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstInstanceProd.ksh:<br>
 +
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_GenLstInstanceProd.ksh.<br>
 +
Generation of the list of Oracle production instances (tsqw_Repository)
 
<br><br>
 
<br><br>
Requête utilisée:
+
Query used:
 
<pre>
 
<pre>
 
select VIRT_HOST_NAME||' '||USERNAME||' '||ORACLE_SID
 
select VIRT_HOST_NAME||' '||USERNAME||' '||ORACLE_SID
 
from tsqw_Repository
 
from tsqw_Repository
 
where STATUS = 'ON'
 
where STATUS = 'ON'
 +
and ENV = 'PRD'
 
order by VIRT_HOST_NAME, USERNAME;
 
order by VIRT_HOST_NAME, USERNAME;
 
</pre>
 
</pre>
 
<br>
 
<br>
 
=== sqwora_GenLstRepBckFull.ksh ===
 
=== sqwora_GenLstRepBckFull.ksh ===
Script de génération de liste $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstRepBckFull.ksh:<br>
+
List generator $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstRepBckFull.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_GenLstRepBckFull.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_GenLstRepBckFull.ksh.<br>
Generation de la liste pour reprise des backups full (tsqw_Repository/tsqw_VolBackups)
+
Generation of the list for reprise of full backups (tsqw_Repository/tsqw_VolBackups)
 
<br><br>
 
<br><br>
Requête utilisée:
+
Query used:
 
<pre>
 
<pre>
 
select ref.VIRT_HOST_NAME||' '||ref.USERNAME||' '||ref.ORACLE_SID
 
select ref.VIRT_HOST_NAME||' '||ref.USERNAME||' '||ref.ORACLE_SID
Line 313: Line 452:
 
where not exists ( select 1 from tsqw_VolBackups inf
 
where not exists ( select 1 from tsqw_VolBackups inf
 
                     where inf.BEGINNING >= sysdate-$gvsqw_NbDaysFull
 
                     where inf.BEGINNING >= sysdate-$gvsqw_NbDaysFull
 +
                    and ref.ORACLE_SID = inf.ORACLE_SID
 +
                    and inf.BCK_TYPE like '%incremental level 0%'
 +
                    and inf.STATUS = 0
 
and not exists ( select 1 from tsqw_VolBackupsExclude ecl
 
and not exists ( select 1 from tsqw_VolBackupsExclude ecl
 
                     where ref.ORACLE_SID = ecl.ORACLE_SID)
 
                     where ref.ORACLE_SID = ecl.ORACLE_SID)
 +
and ref.STATUS='ON'
 
order by 1;
 
order by 1;
 
</pre>
 
</pre>
 
<br>
 
<br>
 
=== sqwora_GenLstRepBckInc.ksh ===
 
=== sqwora_GenLstRepBckInc.ksh ===
Script de génération de liste $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstRepBckInc.ksh:<br>
+
List generator $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstRepBckInc.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_GenLstRepBckInc.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_GenLstRepBckInc.ksh.<br>
Generation de la liste pour reprise des backups inc (tsqw_Repository/tsqw_VolBackups)
+
Generation of the list for reprise of inc backups (tsqw_Repository/tsqw_VolBackups)
 
<br><br>
 
<br><br>
Requête utilisée:
+
Query used:
 
<pre>
 
<pre>
 
select ref.VIRT_HOST_NAME||' '||ref.USERNAME||' '||ref.ORACLE_SID
 
select ref.VIRT_HOST_NAME||' '||ref.USERNAME||' '||ref.ORACLE_SID
Line 329: Line 472:
 
where not exists ( select 1 from tsqw_VolBackups inf
 
where not exists ( select 1 from tsqw_VolBackups inf
 
                     where inf.BEGINNING >= sysdate-$gvsqw_NbDaysInc
 
                     where inf.BEGINNING >= sysdate-$gvsqw_NbDaysInc
 +
                    and ref.ORACLE_SID = inf.ORACLE_SID
 +
                    and inf.BCK_TYPE like '%incremental level%'
 +
                    and inf.STATUS = 0
 
and not exists ( select 1 from tsqw_VolBackupsExclude ecl
 
and not exists ( select 1 from tsqw_VolBackupsExclude ecl
 
                     where ref.ORACLE_SID = ecl.ORACLE_SID)
 
                     where ref.ORACLE_SID = ecl.ORACLE_SID)
 +
and ref.STATUS='ON'
 
order by 1;
 
order by 1;
 
</pre>
 
</pre>
 
<br>
 
<br>
 
=== sqwora_GenLstRepind.ksh ===
 
=== sqwora_GenLstRepind.ksh ===
Script de génération de liste $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstRepind.ksh:<br>
+
List generator $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstRepind.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_GenLstRepind.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_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 ref.VIRT_HOST_NAME||' '||ref.USERNAME||' '||ref.ORACLE_SID
 
select ref.VIRT_HOST_NAME||' '||ref.USERNAME||' '||ref.ORACLE_SID
Line 346: Line 493:
 
and not exists ( select 1 from tsqw_GenHisto inf
 
and not exists ( select 1 from tsqw_GenHisto inf
 
where inf.GATHER_DATE = trunc(sysdate)
 
where inf.GATHER_DATE = trunc(sysdate)
 +
and ref.ORACLE_SID = inf.ORACLE_SID)
 
order by VIRT_HOST_NAME, ref.USERNAME;
 
order by VIRT_HOST_NAME, ref.USERNAME;
 
</pre>
 
</pre>
 
<br>
 
<br>
 
=== sqwora_GenLstUnique.ksh ===
 
=== sqwora_GenLstUnique.ksh ===
Script de génération de liste $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstUnique.ksh:<br>
+
List generator $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstUnique.ksh:<br>
Peut-être remplacé par $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_GenLstUnique.ksh.<br>
+
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_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 HOST_NAME||' $gvsqw_UserUniqueOracle'
 
select distinct HOST_NAME||' $gvsqw_UserUniqueOracle'

Revision as of 21:48, 22 December 2010

auto

sqwora_CheckInstance.ksh

Action script $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_CheckInstance.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_CheckInstance.ksh.
Check parameters and security

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_OraBin/../tools/sqwora_SetEnv.ksh $lvsqw_Instance
\$gvsqw_OraBin/sqwora_RunJob.ksh -I $lvsqw_Instance -A CheckInstance
EOFSSH
sleep 1
done <$gvsqw_TmpFile.lst
jobs
wait
}


sqwora_DeplScripts.ksh

Action script $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_DeplScripts.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_DeplScripts.ksh.
SQWareProduction deployment for Oracle

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_RootSQWareProductionOracle/$gvsqw_VersDeplSQWareProductionOracle
cd $gvsqw_RootSQWareProductionOracle
rm -f $gvsqw_VersSQWareProductionOracle
ln -s $gvsqw_VersDeplSQWareProductionOracle $gvsqw_VersSQWareProductionOracle
EOFSSH
rsync -aHv $gvsqw_RsyncPathOracle --delete $gvsqw_RootSQWareProduction/oracle/$gvsqw_VersDeplSQWareProductionOracle $lvsqw_UserName@$lvsqw_HostName:$gvsqw_RootSQWareProductionOracle/.
done <$gvsqw_TmpFile.lst
}


sqwora_GatherIndicators.ksh

Action script $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_GatherIndicators.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_GatherIndicators.ksh.
Oracle 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_OraBin/../tools/sqwora_SetEnv.ksh $lvsqw_Instance
\$gvsqw_OraBin/sqwora_RunJob.ksh -I $lvsqw_Instance -A IndicDba
EOFSSH
sleep 1
done <$gvsqw_TmpFile.lst
jobs
wait
}


sqwora_GenEdt.ksh

Action script $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_GenEdt.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_GenEdt.ksh.
generate EDT files

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_OraBin/../tools/sqwora_SetEnv.ksh $lvsqw_Instance
\$gvsqw_OraBin/../tools/sqwora_GenerateCreateDatabase.ksh -P 1521 -edtOnly <<EOF
y
EOF
EOFSSH
done <$gvsqw_TmpFile.lst
}


sqwora_GenerateAwr.ksh

Action script $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_GenerateAwr.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_GenerateAwr.ksh.
collection of AWR reports

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_OraBin/../tools/sqwora_SetEnv.ksh $lvsqw_Instance
\$gvsqw_OraBin/sqwora_RunJob.ksh -I $lvsqw_Instance -A GenAwr
EOFSSH
sleep 10
done <$gvsqw_TmpFile.lst
jobs
wait
}


sqwora_RetrieveHash.ksh

Action script $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_RetrieveHash.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_RetrieveHash.ksh.
retrieve hashs for Oracle users

Action:

lfsqw_Action()
{
lvsqw_FicRef=$gvsqw_RootexpdbCentral/etc_cust/Hash_oracle.csv
> $lvsqw_FicRef
chmod 600 $lvsqw_FicRef
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>$lvsqw_FicRef.tmp
. \$gvsqw_OraBin/../tools/sqwora_SetEnv.ksh $lvsqw_Instance
\$gvsqw_OraBin/../tools/sqwora_BackupPasswd.ksh -I $lvsqw_Instance -T hash
EOFSSH
cat $lvsqw_FicRef.tmp|grep "^$lvsqw_Instance;" >>$lvsqw_FicRef
done <$gvsqw_TmpFile.lst

}


sqwora_RmanFull.ksh

Action script $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_RmanFull.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_RmanFull.ksh.
Backup full with RMAN (incremental level 0)

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_OraBin/../tools/sqwora_SetEnv.ksh $lvsqw_Instance
\$gvsqw_OraBin/sqwora_RunJob.ksh -I $lvsqw_Instance -A RmanFull
EOFSSH
sleep 30
done <$gvsqw_TmpFile.lst
jobs
wait
}


sqwora_RmanInc.ksh

Action script $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_RmanInc.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_RmanInc.ksh.
Backup inc with RMAN (incremental level 2)

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_OraBin/../tools/sqwora_SetEnv.ksh $lvsqw_Instance
\$gvsqw_OraBin/sqwora_RunJob.ksh -I $lvsqw_Instance -A RmanInc
EOFSSH
sleep 30
done <$gvsqw_TmpFile.lst
jobs
wait
}


sqwora_StartedInstances.ksh

Action script $gvsqw_RootexpdbCentral/action/oracle/auto/sqwora_StartedInstances.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/auto_cust/sqwora_StartedInstances.ksh.
collection of active instances

Action:

lfsqw_Action()
{
>$gvsqw_TmpFile
while read lvsqw_HostName lvsqw_UserName
do
echo "${c_info}$lvsqw_UserName@$lvsqw_HostName${c_normal}"
ssh -T $lvsqw_UserName@$lvsqw_HostName <<EOFSSH>>$gvsqw_TmpFile
ps -edf |grep 'pmon_[a-zA-Z][a-zA-Z]*'|grep -v grep|awk '{print "indic $lvsqw_HostName",\$1,\$NF}'|sed 's,ora_pmon_,,'
EOFSSH
done <$gvsqw_TmpFile.lst

grep '^indic ' $gvsqw_TmpFile >$gvsqw_TmpFile.bis
echo "delete tsqw_StartedInstances;">$gvsqw_TmpFile.sql
while read lvsqw_Tmp lvsqw_Host lvsqw_User lvsqw_Instance
do
	echo "insert into tsqw_StartedInstances (ORACLE_SID,GATHER_DATE,HOST_NAME,USERNAME) values ('$lvsqw_Instance',trunc(sysdate),'$lvsqw_Host','$lvsqw_User');">>$gvsqw_TmpFile.sql
done <$gvsqw_TmpFile.bis
echo "commit;" >>$gvsqw_TmpFile.sql
sqlplus -s -L /nolog <<EOFSQL|grep -iv 'Connected'
conn $gvsqw_DbRefUser_oracle/$gvsqw_DbRefPass_oracle@$gvsqw_DbRefInstance_oracle
@$gvsqw_TmpFile.sql
EOFSQL
}




etc

CrontabRef.cfg

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

File content:




Variable explanation:



sqwc_DbRefVar.cfg

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

File content:

export gvsqw_DbRefType_oracle='oracle'
export gvsqw_DbRefPort_oracle='InstancePortForOracle'
export gvsqw_DbRefInstance_oracle='InstanceNameForOracle'
export gvsqw_DbRefDatabase_oracle='DatabaseInstanceNameForOracle'
export gvsqw_DbRefUser_oracle='ConnexionUserForOracle'
export gvsqw_DbRefPass_oracle='ConnexionPassForOracle'



Variable explanation:

gvsqw_DbRefDatabase_oracle => 
gvsqw_DbRefInstance_oracle => 
gvsqw_DbRefPass_oracle => 
gvsqw_DbRefPort_oracle => 
gvsqw_DbRefType_oracle => 
gvsqw_DbRefUser_oracle => 


sqwc_ExpVar.cfg

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

File content:

export gvsqw_RootSQWareProductionOracle="~$gvsqw_UserUniqueOracle/SQWareProduction/oracle"
export gvsqw_VersSQWareProductionOracle='prod'
export gvsqw_VersDeplSQWareProductionOracle='v1.2'
export gvsqw_Mail_oracle='dba'
export gvsqw_MailMsg_oracle='TrtOraAuto'



Variable explanation:

gvsqw_MailMsg_oracle => 
gvsqw_Mail_oracle => 
gvsqw_RootSQWareProductionOracle => 
gvsqw_VersDeplSQWareProductionOracle => 
gvsqw_VersSQWareProductionOracle => 


sqwc_GlobalVar.cfg

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

File content:

export gvsqw_UserUniqueOracle='sysdba'
	export gvsqw_NbDaysInc=3
	export gvsqw_NbDaysInc=2
export gvsqw_NbDaysFull=7



Variable explanation:

gvsqw_NbDaysFull => 
	gvsqw_NbDaysInc => 
	gvsqw_NbDaysInc => 
gvsqw_UserUniqueOracle => 


tnsnames.ora

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

File content:




Variable explanation:



.profile_confort

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

Alias explanation:

	  act_ora => 'cd $gvsqw_RootexpdbCentral/action/oracle/prod;ls -al'
	  depl_ora => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh oracle sqwora_DeplScripts.ksh sqwora_GenLstUnique.ksh NOLOG CONFIRM'
	  repind_ora => '$gvsqw_RootexpdbCentral/bin/sqwc_TrtAuto.ksh oracle sqwora_GatherIndicators.ksh sqwora_GenLstRepind.ksh NOLOG'
	  gen_ora => '$gvsqw_RootexpdbCentral/action/oracle/lst/sqwc_GenRefOracle.ksh'




generate_tnsnames_ora.ksh

generate_tnsnames_ora.ksh



lst

sqwc_GenRefDbOracle.ksh

List generator $gvsqw_RootexpdbCentral/action/oracle/lst/sqwc_GenRefDbOracle.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwc_GenRefDbOracle.ksh.


Query used:

select 'ORA;' || vol.ORACLE_SID || ';' || vol.OWNER || ';' || ref.Env || ';' ||
from tsqw_Repository ref, tsqw_VolSchema vol, tsqw_GenHisto hist
where hist.MONTH=trunc(sysdate,'MM')
    and ref.ORACLE_SID = hist.ORACLE_SID
    and hist.ORACLE_SID = vol.ORACLE_SID
    and hist.GATHER_DATE = vol.GATHER_DATE
    and ref.STATUS!='OFF'
    and vol.OWNER not in ('SYSTEM','SYSMAN','OTLN')
    and vol.OWNER not like 'OPS$%'
order by vol.OWNER, vol.ORACLE_SID


sqwc_GenRefOracle.ksh

List generator $gvsqw_RootexpdbCentral/action/oracle/lst/sqwc_GenRefOracle.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwc_GenRefOracle.ksh.


Query used:

select virt_host_name vip_, host_name uni_, username usr_, oracle_sid bas_,
from tsqw_Repository r
select virt_host_name vip_, host_name uni_, username usr_, oracle_sid bas_,
from tsqw_RepositoryOther r
order by 2,1,3,4;


sqwora_GenLstAwr.ksh

List generator $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstAwr.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_GenLstAwr.ksh.
Generation of the list of Oracle instances >= 10g (tsqw_Repository/tsqw_GenHisto)

Query used:

select ref.VIRT_HOST_NAME||' '||ref.USERNAME||' '||ref.ORACLE_SID
from tsqw_Repository ref
where ref.STATUS = 'ON'
and exists ( select 1 from tsqw_GenHisto inf
where inf.GATHER_DATE = trunc(sysdate)
and ref.ORACLE_SID = inf.ORACLE_SID
and to_number(substr(inf.VERSION,0,instr(inf.VERSION,'.')-1)||substr(inf.VERSION,instr(inf.VERSION,'.')+1,1)) >= 102)
order by 1;


sqwora_GenLstInstance.ksh

List generator $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstInstance.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_GenLstInstance.ksh.
Generation of the list of Oracle instances (tsqw_Repository)

Query used:

select VIRT_HOST_NAME||' '||USERNAME||' '||ORACLE_SID
from tsqw_Repository
where STATUS = 'ON'
order by VIRT_HOST_NAME, USERNAME;


sqwora_GenLstInstanceNoProd.ksh

List generator $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstInstanceNoProd.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_GenLstInstanceNoProd.ksh.
Generation of the list of Oracle no production instances (tsqw_Repository)

Query used:

select VIRT_HOST_NAME||' '||USERNAME||' '||ORACLE_SID
from tsqw_Repository
where STATUS = 'ON'
and ENV != 'PRD'
order by VIRT_HOST_NAME, USERNAME;


sqwora_GenLstInstanceProd.ksh

List generator $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstInstanceProd.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_GenLstInstanceProd.ksh.
Generation of the list of Oracle production instances (tsqw_Repository)

Query used:

select VIRT_HOST_NAME||' '||USERNAME||' '||ORACLE_SID
from tsqw_Repository
where STATUS = 'ON'
and ENV = 'PRD'
order by VIRT_HOST_NAME, USERNAME;


sqwora_GenLstRepBckFull.ksh

List generator $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstRepBckFull.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_GenLstRepBckFull.ksh.
Generation of the list for reprise of full backups (tsqw_Repository/tsqw_VolBackups)

Query used:

select ref.VIRT_HOST_NAME||' '||ref.USERNAME||' '||ref.ORACLE_SID
from tsqw_Repository ref
where not exists ( select 1 from tsqw_VolBackups inf
                    where inf.BEGINNING >= sysdate-$gvsqw_NbDaysFull
                    and ref.ORACLE_SID = inf.ORACLE_SID
                    and inf.BCK_TYPE like '%incremental level 0%'
                    and inf.STATUS = 0
and not exists ( select 1 from tsqw_VolBackupsExclude ecl
                    where ref.ORACLE_SID = ecl.ORACLE_SID)
and ref.STATUS='ON'
order by 1;


sqwora_GenLstRepBckInc.ksh

List generator $gvsqw_RootexpdbCentral/action/oracle/lst/sqwora_GenLstRepBckInc.ksh:
Can be replaced by $gvsqw_RootexpdbCentral/action/oracle/lst_cust/sqwora_GenLstRepBckInc.ksh.
Generation of the list for reprise of inc backups (tsqw_Repository/tsqw_VolBackups)

Query used:

select ref.VIRT_HOST_NAME||' '||ref.USERNAME||' '||ref.ORACLE_SID
from tsqw_Repository ref
where not exists ( select 1 from tsqw_VolBackups inf
                    where inf.BEGINNING >= sysdate-$gvsqw_NbDaysInc
                    and ref.ORACLE_SID = inf.ORACLE_SID
                    and inf.BCK_TYPE like '%incremental level%'
                    and inf.STATUS = 0
and not exists ( select 1 from tsqw_VolBackupsExclude ecl
                    where ref.ORACLE_SID = ecl.ORACLE_SID)
and ref.STATUS='ON'
order by 1;


sqwora_GenLstRepind.ksh

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

Query used:

select ref.VIRT_HOST_NAME||' '||ref.USERNAME||' '||ref.ORACLE_SID
from tsqw_Repository ref
where ref.STATUS = 'ON'
and not exists ( select 1 from tsqw_GenHisto inf
where inf.GATHER_DATE = trunc(sysdate)
and ref.ORACLE_SID = inf.ORACLE_SID)
order by VIRT_HOST_NAME, ref.USERNAME;


sqwora_GenLstUnique.ksh

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

Query used:

select distinct HOST_NAME||' $gvsqw_UserUniqueOracle'
from tsqw_Repository
where STATUS = 'ON'
select distinct HOST_NAME||' $gvsqw_UserUniqueOracle'
from tsqw_RepositoryOther
order by 1;