Oracle est un problème pour vous? Vous trouvez qu'Oracle est plus compliqué que prévu ? Venez faire un tour ici, peut être vous allez trouver la solution, et si non on peut la trouver pour vous.
Translate
vendredi 26 février 2016
Script IdcAnalyze par tranche
Étant donné le nombre de documents que je dois analyser je me suis créé un petit script qui pourrait m'aider à collecter l'information nécessaire sur l'état de mon index UCM
Le script va déplacer le fichier résultant vers un répertoire FIX afin de pouvoir conserver le résultat partiel contenu dans le fichier "IdcCommand.txt"
Serveur : Linux 64 bits
Exécution : nohup sh ./EVTA.sh &
Fichier: EVTA.sh
#!/usr/bin/ksh
#
#
################################################
cd /appl/oracle/product/Middleware/user_projects/domains/gedXXX/ucm/cs/bin/
################################################
###### Chaque 100000 documents
v_maxloop=100000
###### Min DBId
v_minval=390031
###### Max DBId
v_maxval=15095575
###### Compteur
v_count=0
###### Min Range
v_MinRangID=0
###### Max Range
v_MaxRangID=0
###### Nombre de loops
v_nmbloop=0
###### Date_heure
v_date=""
################################################
if [ -f ./FIX/Log_execution.log ]; then
mv ./FIX/Log_execution.log ./FIX/old_execution.log
fi
if [ -f ./logs/IdcAnalyze.log ]; then
rm ./logs/IdcAnalyze.log
fi
################################################
for ((i=$v_minval;i<=$v_maxval;i=i+$v_maxloop));
do
#########################################
## A chaque boucle
#########################################
if [ "$v_count" -eq "$v_maxloop" ]; then
echo "Break_A "$i #>> ./FIX/Log_execution.log
v_nmbloop=`expr $v_nmbloop + 1`
v_MaxRangID=$((${v_count}*$v_nmbloop))
v_MaxRangID=`expr $v_MaxRangID + $v_minval`
#########################################
## Juste le premiere boucle
#########################################
if [ "$v_nmbloop" -eq "1" ]; then
v_MinRangID=$v_minval
fi
v_date=`date +%Y%m%d_%k%M`
echo "Debut : "$v_date >> ./FIX/Log_execution.log
echo "./IdcAnalyze -index -range $v_MinRangID:$v_MaxRangID –report" >> ./FIX/Log_execution.log
./IdcAnalyze -index -range $v_MinRangID:$v_MaxRangID –report
egrep "Finished checking|Errors Found|Errors Fixed" ./logs/IdcAnalyze.log >> ./FIX/Log_execution.log
if [ -f ./logs/IdcCommand.txt ]; then
mv ./logs/IdcCommand.txt ./FIX/IdcCommand.txt_${v_MinRangID}_${v_MaxRangID}
fi
v_date=`date +%Y%m%d_%k%M`
echo "Fin : "$v_date >> ./FIX/Log_execution.log
echo "------------------------------------------------------------------" >> ./FIX/Log_execution.log
v_count=0
fi
#########################################
## Dernier boucle
#########################################
v_calcullastlopp=`expr $v_maxval - $v_minval`
v_calcullastlopp=$((${v_calcullastlopp}/$v_maxloop))
if [ "$v_nmbloop" -eq "$v_calcullastlopp" ]; then
echo "Break_B "$i #>> ./FIX/Log_execution.log
v_MaxRangID=$v_maxval
v_date=`date +%Y%m%d_%k%M`
echo "Debut : "$v_date >> ./FIX/Log_execution.log
echo "./IdcAnalyze -index -range $v_MinRangID:$v_MaxRangID –report" >> ./FIX/Log_execution.log
./IdcAnalyze -index -range $v_MinRangID:$v_MaxRangID –report
egrep "Finished checking|Errors Found|Errors Fixed" ./logs/IdcAnalyze.log >> ./FIX/Log_execution.log
if [ -f ./logs/IdcCommand.txt ]; then
mv ./logs/IdcCommand.txt ./FIX/IdcCommand.txt_${v_MinRangID}_${v_MaxRangID}
fi
v_date=`date +%Y%m%d_%k%M`
echo "Fin : "$v_date >> ./FIX/Log_execution.log
echo "------------------------------------------------------------------" >> ./FIX/Log_execution.log
fi
v_MinRangID=`expr $v_MaxRangID + 1`
v_count=`expr $v_count + $v_maxloop`
done
Un exemple partiel du résultat :
J'espère que cela vous sera utile.
jeudi 25 février 2016
Oracle WebCenter - UCM - IdcAnalyzer - Too many errors encountered XXXX. Maximum errors allowed is set to XXXX
Bonjour
Si jamais vous rencontrez ce message d'erreur au moment de lancer le IdcAnalyzer pour valider la structure de vos indexes...
"IdcAnalyzer - Too many errors encountered 5001. Maximum errors allowed is set to 5000."
...
Revision entry for dID = 394750 is not found in the search index.
Revision entry for dID = 395030 is not found in the search index.
Revision entry for dID = 394749 is not found in the search index.
Revision entry for dID = 394748 is not found in the search index.
Revision entry for dID = 394747 is not found in the search index.
Revision entry for dID = 395425 is not found in the search index.
Finished checking 5,001 entries.
Errors Found: 5001
Errors Fixed: 0
Too many errors encountered 5001. Maximum errors allowed is set to 5000.
Please address these errors and restart the test. There are 4969 out of 9970 items remaining to be checked.
Pour modifier cette limitation il faut modifier le fichier "intradoc.cfg" avec la valeur souhaitée. Vous n'avez pas besoin de rien repartir pour que la modification soit prise en considération.
Exemple :
MaxErrors=6000
Pour tester, on relance la commande :
...
Et voilà, la limitation a changé de 5000 à 6000 erreurs.
Comme dans mon cas ma bases de données a plus de 15 millions de documents et je veux m'éviter de problèmes de "out of memory" je vais le configurer à 100000 juste pour tester.
Comme à chaque exécution un fichier qui contiendra la résultant sera créé dans le répertoire "logs", donc il faut le déplacer avant de chaque exécution pour ne pas le perdre.
Exemple :
mv ./logs/IdcCommand.txt ./FIX/IdcCommand.txt_400000_600000
[ucmxxx@server FIX]$ ll
-rw-rw-r-- 1 ucmxxx prod 1196400 Feb 25 15:58 IdcCommand.txt_390031_400000
-rw-rw-r-- 1 ucmxxx prod 12000120 Feb 25 16:10 IdcCommand.txt_400000_600000
Si jamais vous rencontrez ce message d'erreur au moment de lancer le IdcAnalyzer pour valider la structure de vos indexes...
"IdcAnalyzer - Too many errors encountered 5001. Maximum errors allowed is set to 5000."
Exemple :
./IdcAnalyze -index -range 390000:400000 -report
...
Revision entry for dID = 394750 is not found in the search index.
Revision entry for dID = 395030 is not found in the search index.
Revision entry for dID = 394749 is not found in the search index.
Revision entry for dID = 394748 is not found in the search index.
Revision entry for dID = 394747 is not found in the search index.
Revision entry for dID = 395425 is not found in the search index.
Finished checking 5,001 entries.
Errors Found: 5001
Errors Fixed: 0
Too many errors encountered 5001. Maximum errors allowed is set to 5000.
Please address these errors and restart the test. There are 4969 out of 9970 items remaining to be checked.
Pour modifier cette limitation il faut modifier le fichier "intradoc.cfg" avec la valeur souhaitée. Vous n'avez pas besoin de rien repartir pour que la modification soit prise en considération.
Exemple :
MaxErrors=6000
Pour tester, on relance la commande :
./IdcAnalyze -index -range 390000:400000 -report
...
Revision entry for dID = 394750 is not found in the search index.
Revision entry for dID = 395030 is not found in the search index.
Revision entry for dID = 394749 is not found in the search index.
Revision entry for dID = 394748 is not found in the search index.
Revision entry for dID = 394747 is not found in the search index.
Revision entry for dID = 395425 is not found in the search index.
Finished checking 6,001 entries.
Errors Found: 6001
Errors Fixed: 0
Too many errors encountered 6001. Maximum errors allowed is set to 6000.
Please address these errors and restart the test. There are 3969 out
of 9970 items remaining to be checked.
Revision entry for dID = 395030 is not found in the search index.
Revision entry for dID = 394749 is not found in the search index.
Revision entry for dID = 394748 is not found in the search index.
Revision entry for dID = 394747 is not found in the search index.
Revision entry for dID = 395425 is not found in the search index.
Finished checking 6,001 entries.
Errors Found: 6001
Errors Fixed: 0
Too many errors encountered 6001. Maximum errors allowed is set to 6000.
Please address these errors and restart the test. There are 3969 out
of 9970 items remaining to be checked.
Comme dans mon cas ma bases de données a plus de 15 millions de documents et je veux m'éviter de problèmes de "out of memory" je vais le configurer à 100000 juste pour tester.
Comme à chaque exécution un fichier qui contiendra la résultant sera créé dans le répertoire "logs", donc il faut le déplacer avant de chaque exécution pour ne pas le perdre.
Exemple :
mv ./logs/IdcCommand.txt ./FIX/IdcCommand.txt_400000_600000
[ucmxxx@server FIX]$ ll
-rw-rw-r-- 1 ucmxxx prod 1196400 Feb 25 15:58 IdcCommand.txt_390031_400000
-rw-rw-r-- 1 ucmxxx prod 12000120 Feb 25 16:10 IdcCommand.txt_400000_600000
Inscription à :
Articles (Atom)