<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-956006373539157532</id><updated>2012-02-20T04:51:29.814-08:00</updated><category term='Ubuntu'/><category term='RMAN'/><category term='Android'/><category term='Oracle'/><category term='S-ASH'/><title type='text'>Alberto Blog</title><subtitle type='html'>parole....soltanto parole....</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>27</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-3678343678224254139</id><published>2012-02-17T08:15:00.000-08:00</published><updated>2012-02-17T08:15:36.491-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='S-ASH'/><title type='text'>My repository ASH (S-ASH)</title><content type='html'>Un altro breve update per segnalare la creazione di &lt;a href="https://github.com/AlbertoFro/orasash"&gt;un mio repository per il progetto S-ASH&lt;/a&gt;.&lt;br /&gt;Dopo aver fatto il fork del progetto di &lt;a href="http://oracleprof.blogspot.com/2011/11/new-release-of-s-ash-v23.html"&gt;Marcin &lt;/a&gt;ho implementato 2 nuove utili fetatures.&lt;br /&gt;&lt;br /&gt;1) creazione di una funzione di Top 10.&lt;br /&gt;Dove attraverso un job schedulato ogni 10 min, è possibile visionare nel proprio repository attraverso una tabella tutti gli sql_id utilizzati maggiormente per wait_class:User I/O, System I/O, Administrative, other, Configuration, Application, Concurrency e Network.&lt;br /&gt;&lt;br /&gt;2) creazione di OBJ_PLUS.&lt;br /&gt;Attraverso questa visualizzazione è possibile avere una situazione globale per tutte le tabella e  indici relativi, come: leaf_block, distinct_keys, blocks e clusering factor.&lt;br /&gt;E' possibile avere una panoramica globale di tutti gli oggetti (tabelle e indici) visto che è stato introdotto il campo clustering dove viene mostrato il grado di fattorizzazione dei dati di una tabella in relazione al proprio indice.&lt;br /&gt;Questo è utile per capire con il CBO di Oracle lavora e come sceglie i piani di esecuzione sempre disponibili in S-ASH.&lt;br /&gt;&lt;br /&gt;Vi consiglio di provarlo e di dare il vostro contributo perchè veramente è un tool molto potente, utile e in più è in continua evoluzione.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://github.com/AlbertoFro/orasash"&gt;Repository S-ASH: https://github.com/AlbertoFro/orasash&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-3678343678224254139?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/3678343678224254139/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2012/02/my-repository-ash-s-ash.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/3678343678224254139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/3678343678224254139'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2012/02/my-repository-ash-s-ash.html' title='My repository ASH (S-ASH)'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-218571406995470173</id><published>2012-01-25T02:51:00.000-08:00</published><updated>2012-01-25T02:53:38.996-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>ASH (S-ASH) Update</title><content type='html'>Un rapido update sull'ottimo tool S-ASH, potete scaricare la release del tool aggiornata con delle nuove features, ultima ma sempre in continua evoluzione, quella di creare nella stesso DB il repository e l'agent anche dalla versione Oracle 9i.&lt;br /&gt;E' stato aggiornato e consolidato anche per la versione Oracle XE.&lt;br /&gt;Questo è il link: &lt;br /&gt;&lt;a href="https://github.com/pioro/orasash/tree/master/sash_dev"&gt;https://github.com/pioro/orasash/tree/master/sash_dev&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Per ulteriori informazione potete sempre consultare il blog di &lt;a href="http://oracleprof.blogspot.com/2011/11/new-release-of-s-ash-v23.html"&gt;Marcin &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-218571406995470173?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/218571406995470173/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2012/01/ash-s-ash-update.html#comment-form' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/218571406995470173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/218571406995470173'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2012/01/ash-s-ash-update.html' title='ASH (S-ASH) Update'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-2209365788570373141</id><published>2011-12-28T06:40:00.000-08:00</published><updated>2011-12-28T06:40:45.319-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='S-ASH'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>ASH  (S-ASH)</title><content type='html'>Oggi vorrei parlare di uno splendido tool &lt;b&gt;S-ASH&lt;/b&gt;, visto che da sempre sono stato affascinato dall'ASH (Active Session History) di Oracle.&lt;br /&gt;S-ASH project è stato creato da &lt;a href="http://ashmasters.com/ash-tools/"&gt;Kyle Hailey&lt;/a&gt; successivamente ripreso da &lt;a href="http://oracleprof.blogspot.com/2011/11/new-release-of-s-ash-v23.html"&gt;Marcin Przepiorowski&lt;/a&gt;.&lt;br /&gt;Nel mese di Novembre, Marcin ha rilasciato un'ultima versione di questo tool, ovviamente l'ho subito scaricato per testarlo con i miei DB.&lt;br /&gt;Inizialmente ho trovato qualche difficoltà per l'implementazione nelle mie versioni Oracle 10G, in collaborazione con Marcin ho provveduto a modificare alcuni packages e procedures in modo tale che funzionasse tutto.&lt;br /&gt;S-Ash non solo simula semplicemente ASH ma crea delle tabelle e altri oggetti dove tiene una session history, lo stato dei singoli sql e gli sql plan e molto altro ancora.&lt;br /&gt;S-ASH si compone principalmente di un repository DB e degli agent installati nei DB interessati.&lt;br /&gt;Questi agent invieranno tutte le informazioni al repository semplificando notevolmente il lavoro di gestione di un DBA.&lt;br /&gt;Questo tool si può scaricare &lt;a href="http://sourceforge.net/projects/orasash/files/v2.3/"&gt;quì &lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-2209365788570373141?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/2209365788570373141/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/12/ash-s-ash.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/2209365788570373141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/2209365788570373141'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/12/ash-s-ash.html' title='ASH  (S-ASH)'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-2532536252012722704</id><published>2011-11-30T03:33:00.000-08:00</published><updated>2011-11-30T03:33:11.604-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Space log files problems</title><content type='html'>Un aspetto importante, non secondario che un DBA deve sempre tener conto è la dimensione dei file di log di Oracle, per esempio il listener.log.&lt;br /&gt;Nei database altamente transazionali questo file può raggiungere anche in pochi giorni dimensioni elevate.&lt;br /&gt;Nel log file listener si trovano moltissime informazioni riguardanti la sicurezza, chi si connette al DB e i possibili errori di connessione, anche se come tutti sappiamo non è un'attività entusiasmante tenere controllato questo file soprattutto se raggiunge una dimensione molto elevata.&lt;br /&gt;Così ho pensato di creare uno script sempre su Solaris che schedulato 1 volta al giorno oppure in base alla crescita del file, si occupi almeno di tenere monitorata la dimensione: &lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;#!/usr/bin/ksh&lt;br /&gt;MAX_SIZE="200000000" &lt;br /&gt;&lt;br /&gt;FILE="/network/log/listener.log" &lt;br /&gt;FILEO="/network/log/listener.old"&lt;br /&gt;FILEZ="/network/log/listener_`date +%Y_%m_%d`.gz"&lt;br /&gt;LOGFILE="/tmp/Sitlistener.log"&lt;br /&gt;&lt;br /&gt;SIZE="$(ls -al $ORACLE_HOME$FILE | awk '{print $5}')"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if [ "$SIZE" -gt "$MAX_SIZE" ] ; then&lt;br /&gt;echo "$SIZE"&lt;br /&gt;echo " \n$(date) Run listener space procedure, size "$SIZE" ."&gt;&gt; $LOGFILE &lt;br /&gt;lsnrctl set log_status off &gt;&gt; $LOGFILE &gt;&amp;1&lt;br /&gt;status=$?&lt;br /&gt;if [ ${status} -eq 0 ]&lt;br /&gt;then&lt;br /&gt;echo $status&lt;br /&gt;else&lt;br /&gt;echo " \n$(date) Problem listener log_status off."&gt;&gt; $LOGFILE &lt;br /&gt;mailx -s " Problem listener log_status off." alberto@abc.com &lt; $LOGFILE&lt;br /&gt;exit 1&lt;br /&gt;fi&lt;br /&gt;mv $ORACLE_HOME$FILE $ORACLE_HOME$FILEO &gt;&gt; $LOGFILE &gt;&amp;1&lt;br /&gt;status=$?&lt;br /&gt;if [ ${status} -eq 0 ]&lt;br /&gt;then&lt;br /&gt;echo $status&lt;br /&gt;else&lt;br /&gt;echo " \n$(date) Problem rename listener."&gt;&gt; $LOGFILE &lt;br /&gt;mailx -s " Problem rename listener." alberto@abc.com &lt; $LOGFILE&lt;br /&gt;exit 1&lt;br /&gt;fi&lt;br /&gt;lsnrctl set log_status on &gt;&gt; $LOGFILE &gt;&amp;1&lt;br /&gt;status=$?&lt;br /&gt;if [ ${status} -eq 0 ]&lt;br /&gt;then&lt;br /&gt;echo $status&lt;br /&gt;else&lt;br /&gt;echo " \n$(date) Problem listener log_status on."&gt;&gt; $LOGFILE &lt;br /&gt;mailx -s " Problem listener log_status on." alberto@abc.com &lt; $LOGFILE&lt;br /&gt;exit 1&lt;br /&gt;fi&lt;br /&gt;gzip -c $ORACLE_HOME$FILEO &gt; $ORACLE_HOME$FILEZ &gt;&amp;1&lt;br /&gt;status=$?&lt;br /&gt;if [ ${status} -eq 0 ]&lt;br /&gt;then&lt;br /&gt;echo $status&lt;br /&gt;else&lt;br /&gt;echo " \n$(date) Problem gzip old listener."&gt;&gt; $LOGFILE &lt;br /&gt;mailx -s " Problem gzip old listener." alberto@abc.com &lt; $LOGFILE&lt;br /&gt;exit 1&lt;br /&gt;fi&lt;br /&gt;rm $ORACLE_HOME$FILEO &gt;&gt; $LOGFILE &gt;&amp;1&lt;br /&gt;status=$?&lt;br /&gt;if [ ${status} -eq 0 ]&lt;br /&gt;then&lt;br /&gt;echo $status&lt;br /&gt;else&lt;br /&gt;echo " \n$(date) Problem delete old listener."&gt;&gt; $LOGFILE &lt;br /&gt;mailx -s " Problem delete old listener." alberto@abc.com &lt; $LOGFILE&lt;br /&gt;exit 1&lt;br /&gt;fi&lt;br /&gt;else&lt;br /&gt;echo " \n$(date) Check listener space, no Problem."&gt;&gt; $LOGFILE&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Questo script esegue in una prima fase il controllo della dimensione del listener.log e se lo trova superiore ad MAX_SIZE esegue rispettivamente:&lt;br /&gt;&lt;br /&gt;1)Imposta set log status off del file ossia il listener smette di scrivere in questo file.&lt;br /&gt;2)Rinomina il file listener in listener.old&lt;br /&gt;3)Imposta set log status on del file, il listener riprendere a scrivere su un nuovo file.&lt;br /&gt;4)La compressione del file attraverso il Gzip.&lt;br /&gt;5)Cancella il file listener.old precedentemente compresso&lt;br /&gt;&lt;br /&gt;Lo script inoltre va a popolare un log file.&lt;br /&gt;L'exit status viene sempre controllato in modo tale da terminare lo script se l'exit status non fosse uguale a 0 mandando una mail.&lt;br /&gt;Se le dimensioni del log non superano quella del MAX_SIZE ovviamente lo script non esegue niente ma viene comunque popolato il file di log dello script.&lt;br /&gt;Una volta finito lo script nel path $ORACLE_HOME/network/log si visualizza una situazione simile con il comando ls- al:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;drwxr-xrwx   2 oracle   dba            6 Nov 29 16:29 .&lt;br /&gt;drwxr-xrwx  13 oracle   dba           13 Jun 30  2010 ..&lt;br /&gt;-rw-r-----   1 oracle   dba      3165694 Nov 30 12:26 listener.log&lt;br /&gt;-rw-r--r--   1 oracle   dba      19469262 Nov 29 16:17 listener_2011_11_29.gz&lt;br /&gt;-rw-r-----   1 oracle   dba      1605299 Nov 30 06:45 sqlnet.log&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-2532536252012722704?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/2532536252012722704/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/11/space-log-files-problems.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/2532536252012722704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/2532536252012722704'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/11/space-log-files-problems.html' title='Space log files problems'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-4472000177389761266</id><published>2011-10-11T01:46:00.000-07:00</published><updated>2011-10-11T01:49:57.684-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Archiver Hung Alert Log Error - No space left on device</title><content type='html'>Questo fine settimana un DB dell'ambiente di produzione si è fermato, con il più classico degli errori: Archiver Hung Alert Log Error, No space left on device.&lt;br /&gt;&lt;br /&gt;In effetti lo spazio su disco nel path /arch_oracle/ è finito, bloccando così di fatto la transazione del DB.&lt;br /&gt;Ho lanciato lo script di backup per gli archive, e la situazione è tornata alla normalità.&lt;br /&gt;&lt;br /&gt;Dopo questa operazione ho pensato ad un programma che facesse le stesse operazioni mie ma ovviamente in automatico.&lt;br /&gt;&lt;br /&gt;L'ambiente è in Solaris quindi il tutto è facilitato:&lt;br /&gt;&lt;pre class="brush: sql"&gt;ksh&lt;br /&gt;MULTI_INSTANCE=0&lt;br /&gt;set +u&lt;br /&gt;USER=$(whoami)&lt;br /&gt;LOGFILE="/tmp/Sitarch"&lt;br /&gt;HOST=$(hostname)&lt;br /&gt;OSTYPE=$(uname)&lt;br /&gt;&lt;br /&gt;for i in 1 2 3 4 5 6 7 8 9 10 11 12&lt;br /&gt; do &lt;br /&gt; ARCH=" "&lt;br /&gt;        ARCH="$(df -k  /arch_oracle | awk '{print $4}' | tail -1)$ARCH"&lt;br /&gt; if [ "$ARCH" -le 10010283  ] ; then&lt;br /&gt; echo "$ARCH"&lt;br /&gt; echo " \n$(date) Space /arch_oracle is less of $ARCH, Archive job run, check mail."&gt;&gt; $LOGFILE&lt;br /&gt; /oracle/bckarch.sh &gt;/dev/null 2&gt;&amp;1&lt;br /&gt; mailx -s " Space /arch_oracle is less of $ARCH, Archive job run, check mail." alberto@abc.com &lt;/tmp/Sitarch&lt;br /&gt; else &lt;br /&gt; echo " \n$(date) Space /arch_oracle is $ARCH."&gt;&gt; $LOGFILE&lt;br /&gt; fi&lt;br /&gt; sleep 1710&lt;br /&gt; done&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Con questo script in Korn shell schedulato nel crontab il sistema va a verificare ogni 30 min circa se lo spazio è inferiore ad un certo valore (in questo caso a 10 GB) e va a scriverlo in un file di testo, quando trova la condizione vera ossia che il valore è inferiore fa partire lo script bckarch e manda una mail.&lt;br /&gt;&lt;br /&gt;Per esigenze il loop ovviamente cambia se volessimo farlo girare 24 * 7.&lt;br /&gt;In questo caso è attivo per 6 ore.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-4472000177389761266?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/4472000177389761266/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/10/archiver-hung-alert-log-error.html#comment-form' title='5 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/4472000177389761266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/4472000177389761266'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/10/archiver-hung-alert-log-error.html' title='Archiver Hung Alert Log Error - No space left on device'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-4235874489734534833</id><published>2011-10-04T06:47:00.000-07:00</published><updated>2011-10-14T03:20:21.972-07:00</updated><title type='text'>Clustering Factor</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;Il clustering factor è la misura di come sono allineati i dati di una tabella in relazione al proprio indice. Inolte ci fornisce l’indicazione della quantità di I/O per leggere la tabella attraverso un full table scan.&lt;br /&gt;Un valore di clustering factor vicino ai numeri di blocchi della tabella ci indica che i dati sono stati ordinati e scritti nei blocchi in modo ottimale in relazione all’indice.&lt;br /&gt;Tuttavia nei casi dove il clustering factor si allontana notevolmente dai blocchi della tabella si avvicina al totale delle righe della tabella questo significa che Oracle ha bisogno di andarsi a leggere lo stesso blocco molte volte per ottenere un valore.&lt;br /&gt;In questo ultimo caso l’indice perderà la sua efficenza incrementando il costo dello stesso per il suo utilizzo, rendendolo meno appetibile al CBO.&lt;br /&gt;Il valore del clustering factor non subisce variazione durante la rebuid dell’indice visto che durante questa operazione non è possibile cambiare l’ordine dei dati.&lt;br /&gt;Tuttavia esiste un’operazione di rebuild con clausola NOREVERSE/REVERSE che ne cambia l’ordine quindi in questo caso il valore del clustering factor viene modificato.&lt;br /&gt;Adesso facciamo un esempio analizzo una tabella per verificare sia i blocchi sia il clustering factor (CF).&lt;/div&gt;&lt;pre class="brush: sql"&gt;EXEC DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=&amp;gt;'ABE',TABNAME=&amp;gt;'ABC',CASCADE=&amp;gt;TRUE,ESTIMATE_PERCENT=&amp;gt;NULL);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;select blocks from user_tables where table_name='ABC';&lt;br /&gt;BLOCKS                 &lt;br /&gt;&lt;br /&gt;---------------------- &lt;br /&gt;&lt;br /&gt;11123    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;select clustering_factor from user_indexes where index_name='ABC_1';&lt;br /&gt;&lt;br /&gt;CLUSTERING_FACTOR      &lt;br /&gt;&lt;br /&gt;---------------------- &lt;br /&gt;&lt;br /&gt;121360  &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Dove abbiamo un indice su questa tabella ABC_1 per i campi A,B,C.&lt;br /&gt;&lt;br /&gt;Come si può notare questo è un pessimo esempio di CF essendo il valore molto lontano dai blocchi.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-43i4FCy1WeQ/To2m_9VFRnI/AAAAAAAAAGw/psiLP3QeuPo/s1600/CF_NOOK.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://3.bp.blogspot.com/-43i4FCy1WeQ/To2m_9VFRnI/AAAAAAAAAGw/psiLP3QeuPo/s320/CF_NOOK.gif" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Rifacciamo lo stesso esempio creando la stessa tabella ma avendo un occhio di riguardo all’indice.&lt;br /&gt;&lt;pre class="brush: sql"&gt;create table ABC_TEST as select * from ABC  order by A, B, C;&lt;br /&gt;&lt;br /&gt;CREATE UNIQUE INDEX ABC_TEST_1 ON ABC_TEST( "A", "B", "C"  );&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Ricalcoliamo le statistiche.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;EXEC DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=&amp;gt;'ABE',TABNAME=&amp;gt;'ABC_TEST',CASCADE&amp;gt;TRUE,ESTIMATE_PERCENT=&amp;gt;NULL); &lt;br /&gt;&lt;br /&gt;select blocks from user_tables where table_name='ABC_TEST';&lt;br /&gt;&lt;br /&gt;BLOCKS                 &lt;br /&gt;---------------------- &lt;br /&gt;11189 &lt;br /&gt;&lt;br /&gt;select clustering_factor from user_indexes where index_name='ABC_TEST_1';&lt;br /&gt;&lt;br /&gt;CLUSTERING_FACTOR      &lt;br /&gt;---------------------- &lt;br /&gt;11074  &lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;In questo caso abbiamo un buon CF essendo molto vicino ai blocchi, il CBO attribuirà un costo basso all’utilizzo di questo indice in modo table da essere molto appetibile al CBO e quindi al suo utilizzo.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-fQkkAVRSnhQ/To2nH45_Y1I/AAAAAAAAAG0/y0FPnaCA6LQ/s1600/CF_OK.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://4.bp.blogspot.com/-fQkkAVRSnhQ/To2nH45_Y1I/AAAAAAAAAG0/y0FPnaCA6LQ/s320/CF_OK.gif" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Nella maggior parti dei casi però non è così facile l’ottimizzazione del CF soprattutto se ci troviamo di fronte a sistemi di produzione con grandi mole di dati, e soprattutto con più indici per la stessa tabella, perchè l’aggiunta di un altro indice ci troveremo di fronte ad una situazione del genere:&lt;br /&gt;&lt;pre class="brush: sql"&gt;CREATE UNIQUE ABC_TEST_2 ON ABC_TEST ( "D", "E", "F"  );&lt;br /&gt;&lt;br /&gt;EXEC DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=&amp;gt;'ABE',TABNAME=&amp;gt;'ABC_TEST',CASCADE=&amp;gt;TRUE,ESTIMATE_PERCENT=&amp;gt;NULL);&lt;br /&gt;&lt;br /&gt;select blocks from user_tables where table_name='ABC_TEST';&lt;br /&gt;&lt;br /&gt;BLOCKS                 &lt;br /&gt;---------------------- &lt;br /&gt;11189 &lt;br /&gt;&lt;br /&gt;select clustering_factor from user_indexes where index_name='ABC_TEST_2';&lt;br /&gt;&lt;br /&gt;CLUSTERING_FACTOR      &lt;br /&gt;---------------------- &lt;br /&gt;139274 &lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;Arghhhh...siamo ritornati con un CF molto alto per l'indice appena creato, la complessità della problematica sta nella maggior parte dei sistemi ERP dove esistono moltissime tabelle, con numerose colonne e di conseguenza indici, quindi ci sono molte variabili da aggiungere.&lt;br /&gt;Anche se in questo esempio provassimo ad eseguire un rebuild con option NOREVERSE/REVERSE non avremo i miglioramenti desiderati:&lt;br /&gt;&lt;pre class="brush: sql"&gt;alter index ABC_TEST_2 rebuild reverse;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;EXEC DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=&amp;gt;'ABE',TABNAME=&amp;gt;'ABC_TEST',CASCADE=&amp;gt;TRUE,ESTIMATE_PERCENT=&amp;gt;NULL);&lt;br /&gt;&lt;br /&gt;select clustering_factor from user_indexes where index_name='ABC_TEST_2';&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CLUSTERING_FACTOR      &lt;br /&gt;---------------------- &lt;br /&gt;139274  &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Normalmente le righe che crescono ad ogni inserimento in modo monotòno sono inserite nell’ordine della colonna di inserimento se si parla di tablespace MSSM, il discorso cambia invece per le tabelle su tablespace in ASSM dove per freelist o gruppi di freelist multipli, le insert vengono eseguite in modo concorrente per transazione , potrebbero essere dirottate in blocchi differenti.&lt;br /&gt;In questi casi anche se i dati sono ben scritti nei blocchi potrebbero avere un CF non ottimale per il modo in cui viene calcolato dal CBO.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-aMWKRkmOUkY/To2nN7mstBI/AAAAAAAAAG4/4Q7hwztC9BI/s1600/CF_NOOK_1.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="206" src="http://4.bp.blogspot.com/-aMWKRkmOUkY/To2nN7mstBI/AAAAAAAAAG4/4Q7hwztC9BI/s320/CF_NOOK_1.gif" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Conclusioni:&lt;br /&gt;&lt;br /&gt;Il Fattore di clustering di un indice viene ottimizzato quando i dati vengono inseriti per l'ordine del proprio indice.&lt;br /&gt;Altri importanti fattori che vanno ad influire il clustering factor sono: &lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;l'ordine delle colonne nell'indice&lt;/li&gt;&lt;li&gt;Reverse Indexes&lt;/li&gt;&lt;li&gt;Freelist e/o Freelist Group&lt;/li&gt;&lt;li&gt;ASSM&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Alberto&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-4235874489734534833?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/4235874489734534833/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/10/clustering-factor.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/4235874489734534833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/4235874489734534833'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/10/clustering-factor.html' title='Clustering Factor'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-43i4FCy1WeQ/To2m_9VFRnI/AAAAAAAAAGw/psiLP3QeuPo/s72-c/CF_NOOK.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-5392197070030335475</id><published>2011-09-13T05:39:00.000-07:00</published><updated>2011-09-13T05:43:18.273-07:00</updated><title type='text'>TNS-12516: TNS:listener could not find available handler with matching protocol stack</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;br /&gt;Visionando il file trace.log per una istanza ho incontrato questo errore: TNS-12516: TNS:listener could not find available handler with matching protocol stack.&lt;br /&gt;Facendo una ricerca su Metalink esiste una nota 240710.1 che spiega la problematica.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Applies to:&lt;br /&gt;Oracle Net Services - Version: 9.2.0.1.0 to 11.2.0.2 - Release: 9.2 to 11.2&lt;br /&gt;Information in this document applies to any platform.&lt;br /&gt;Checked for relevance on 15-FEB-2007.&lt;br /&gt;------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Symptoms&lt;br /&gt;Client connections may fail intermittently with any of the following errors:&lt;br /&gt;&lt;br /&gt;TNS-12516 TNS: listener could not find instance with matching protocol stack&lt;br /&gt;ORA-12516 TNS: listener could not find instance with matching protocol stack&lt;br /&gt;&lt;br /&gt;TNS-12519 TNS: no appropriate service handler found&lt;br /&gt;ORA-12519 TNS: no appropriate service handler found&lt;br /&gt;&lt;br /&gt;Any or all of these errors might appear in the listener.log and may accompany an ORA-12520:&lt;br /&gt;&lt;br /&gt;ORA-12520 TNS:listener could not find available handler for requested type of server&lt;br /&gt;&lt;br /&gt;The output of the lsnrctl services command may show that the service handler&lt;br /&gt;is in a "blocked" state.&lt;br /&gt;&lt;br /&gt;e.g. '"DEDICATED" established:1 refused:0 state:blocked'&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Changes&lt;br /&gt;&lt;br /&gt;It is likely a significant increase in load has occurred.&lt;br /&gt;&lt;br /&gt;Cause&lt;br /&gt;By way of instance registration, PMON is responsible for updating the listener&lt;br /&gt;with information about a particular instance such as load and dispatcher&lt;br /&gt;information. Maximum load for dedicated connections is determined by the&lt;br /&gt;PROCESSES parameter. The frequency at which PMON provides SERVICE_UPDATE&lt;br /&gt;information varies according to the workload of the instance. The maximum&lt;br /&gt;interval between these service updates is 10 minutes.&lt;br /&gt;&lt;br /&gt;The listener counts the number of connections it has established to the instance&lt;br /&gt;but does not immediately get information about connections that have terminated.&lt;br /&gt;Only when PMON updates the listener via SERVICE_UPDATE is the listener&lt;br /&gt;informed of current load. Since this can take as long as 10 minutes, there can be&lt;br /&gt;a difference between the current instance load according to the listener&lt;br /&gt;and the actual instance load.&lt;br /&gt;&lt;br /&gt;When the listener believes the current number of connections has reached maximum&lt;br /&gt;load, it may set the state of the service handler for an instance to "blocked"&lt;br /&gt;and begin refusing incoming client connections with either of the following&lt;br /&gt;errors:&lt;br /&gt;&lt;br /&gt;TNS-12516 TNS:listener could not find instance with matching protocol stack&lt;br /&gt;TNS-12519 TNS:no appropriate service handler found&lt;br /&gt;&lt;br /&gt;Additionally, an ORA-12520 error may appear in the listener log.&lt;br /&gt;&lt;br /&gt;The output of the LSNRCTL services command will likely show that the service handler is "blocked".&lt;br /&gt;&lt;br /&gt;e.g. '"DEDICATED" established:1 refused:0 state:blocked'&lt;br /&gt;Increase the pfile or spfile setting for PROCESSES.&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;Increase the pfile or spfile setting for PROCESSES.&lt;br /&gt;------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Infatti eseguendo lo statement per vedere i parametri iniziali dell'istanza compare :&lt;br /&gt;&lt;br /&gt;select name, value from v$parameter where name in ('processes', 'sessions');&lt;br /&gt;&lt;br /&gt;NAME &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VALUE&lt;br /&gt;---------------------------------&lt;br /&gt;processes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 300 &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;sessions &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 335&lt;br /&gt;&lt;br /&gt;Verificando il conto totale dei processi nel DB quando questa segnalazione compare nel trace.log &amp;nbsp;con:&lt;br /&gt;&lt;br /&gt;select count(*) from v$process;&lt;br /&gt;&lt;br /&gt;COUNT(*) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;-----------&lt;br /&gt;297 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&lt;br /&gt;In effetti il sistema sta si avvicinando pericolosamente al limite previsto, quindi occorre aumentare il valore dei process quindi:&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; Alter system set processes = 350 scope=spfile;&lt;br /&gt;SQL&amp;gt; shutdown immediate&lt;br /&gt;SQL&amp;gt; startup open&lt;br /&gt;&lt;br /&gt;Ovviamente l'istanza deve essere riavviata.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-5392197070030335475?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/5392197070030335475/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/09/tns-12516-tnslistener-could-not-find.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/5392197070030335475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/5392197070030335475'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/09/tns-12516-tnslistener-could-not-find.html' title='TNS-12516: TNS:listener could not find available handler with matching protocol stack'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-1957361373096765088</id><published>2011-07-20T02:08:00.000-07:00</published><updated>2011-09-09T00:36:53.569-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>TUNING session_cached_cursor with PL/SQL procedure</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="background-color: transparent;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;Dopo aver rivisto i miei post riguardanti session_cached_cursor ho deciso di provare a mettere insieme una procedura PL/SQL che oltre a trovare gli utenti che con la loro sessione superano il 100% di hit/parse, desse informazioni aggiuntive come per esempio il nome, l’id_sql utilizzato o precedente, sql_text, event e altro in modo da dare un quadro completo e più dettagliato.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;Forse lo stesso risultato si poteva ottenere con un buon codice SQL ma ho preferito creare una procedure anche per rispolverare la mia programmazione PL/SQL.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;La procedura è la seguente:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;CREATE OR REPLACE&lt;br /&gt;PROCEDURE session_mon&lt;br /&gt;IS&lt;br /&gt;&amp;nbsp; CURSOR c1&lt;br /&gt;&amp;nbsp; IS&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT hits.sid,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hits,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parses,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ROUND(hits/parses*100)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (SELECT sid,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s.value hits&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM v$statname n,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v$sesstat s&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE s.statistic# = n.statistic#&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND n.name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'session cursor cache hits'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) hits ,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (SELECT sid,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s.value parses&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM v$statname n,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v$sesstat s&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE s.statistic# = n.statistic#&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND n.name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'parse count (total)'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) parses&lt;br /&gt;&amp;nbsp; WHERE hits.sid&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = parses.sid&lt;br /&gt;&amp;nbsp; AND parses.parses&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt; 0&lt;br /&gt;&amp;nbsp; AND ROUND(hits/parses*100)&amp;gt;=95&lt;br /&gt;&amp;nbsp; ORDER BY 1 DESC;&lt;br /&gt;&amp;nbsp; c1_sid sys.v_$sesstat.sid%TYPE;&lt;br /&gt;&amp;nbsp; c1_hits v$sesstat.value%TYPE;&lt;br /&gt;&amp;nbsp; c1_parses v$sesstat.value%type;&lt;br /&gt;&amp;nbsp; c1_hp NUMBER :=ROUND(c1_hits/c1_parses*100);&lt;br /&gt;&amp;nbsp; CURSOR c2&lt;br /&gt;&amp;nbsp; IS&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT s.sid,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; P.SPID,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S.SERIAL#,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S.OSUSER,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SA.SQL_TEXT,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SA.SQL_ID,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s.prev_sql_id,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S.STATUS,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S.USERNAME,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SW.STATE,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SW.EVENT,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S.MACHINE,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S.PROGRAM&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM V$SESSION S,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; V$PX_SESSION PX,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; V$SESSION_WAIT SW,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; V$PROCESS P,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; V$SQLAREA SA,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (SELECT * FROM V$SESSION_LONGOPS WHERE TIME_REMAINING &amp;lt;&amp;gt; 0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) SLO,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (SELECT SID FROM V$MYSTAT WHERE ROWNUM = 1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) OWNSESSION&lt;br /&gt;&amp;nbsp; WHERE s.sql_address=sa.address(+)&lt;br /&gt;&amp;nbsp; AND S.SID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = SW.SID(+)&lt;br /&gt;&amp;nbsp; AND S.PADDR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =P.ADDR&lt;br /&gt;&amp;nbsp; AND (S.SID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = SLO.SID(+)&lt;br /&gt;&amp;nbsp; AND S.SERIAL#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = SLO.SERIAL#(+))&lt;br /&gt;&amp;nbsp; AND (S.SID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = PX.SID(+)&lt;br /&gt;&amp;nbsp; AND S.SERIAL#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = PX.SERIAL#(+))&lt;br /&gt;&amp;nbsp; AND S.TYPE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'USER'&lt;br /&gt;&amp;nbsp; AND S.OSUSER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;gt; 'jdeb7333'&lt;br /&gt;&amp;nbsp; AND S.OSUSER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;gt; 'oracle'&lt;br /&gt;&amp;nbsp; ORDER BY 1 DESC;&lt;br /&gt;&amp;nbsp; c2_sid v$session.sid%type;&lt;br /&gt;&amp;nbsp; c2_spid V$PROCESS.spid%type;&lt;br /&gt;&amp;nbsp; c2_serial V$SESSION.serial#%type;&lt;br /&gt;&amp;nbsp; c2_osuser v$session.osuser%type;&lt;br /&gt;&amp;nbsp; c2_SQL_TEXT v$sqlarea.sql_text%type;&lt;br /&gt;&amp;nbsp; c2_SQL_id v$sqlarea.sql_id%type;&lt;br /&gt;&amp;nbsp; c2_prev_SQL_id V$SESSION.prev_sql_id%type;&lt;br /&gt;&amp;nbsp; c2_status v$session.status%type;&lt;br /&gt;&amp;nbsp; c2_username v$session.username%type;&lt;br /&gt;&amp;nbsp; c2_state v$session_wait.state%type;&lt;br /&gt;&amp;nbsp; c2_event v$session_wait.event%type;&lt;br /&gt;&amp;nbsp; c2_machine v$session.machine%type;&lt;br /&gt;&amp;nbsp; c2_program v$session.program%type;&lt;br /&gt;BEGIN&lt;br /&gt;&amp;nbsp; OPEN C1;&lt;br /&gt;&amp;nbsp; OPEN C2;&lt;br /&gt;&amp;nbsp; &amp;lt;&amp;lt;lp&amp;gt;&amp;gt;&lt;br /&gt;&amp;nbsp; LOOP&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FETCH C1 INTO c1_sid,c1_hits, c1_parses,c1_hp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXIT&lt;br /&gt;&amp;nbsp; WHEN C1%NOTFOUND;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOOP&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FETCH C2&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO c2_sid,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c2_spid,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c2_serial,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c2_osuser,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c2_SQL_TEXT,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c2_SQL_id,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c2_prev_SQL_id,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c2_status,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c2_username,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c2_state,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c2_event,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c2_machine,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c2_program;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF c2_sid = c1_sid THEN&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS_OUTPUT.ENABLE (buffer_size =&amp;gt; NULL);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS_OUTPUT.PUT_LINE(c1_hp||'% ;'|| c2_sid||'; '|| c2_spid||'; '|| c2_serial ||'; '|| c2_osuser||'; '||c2_SQL_TEXT ||'; '||c2_SQL_id ||'; '|| c2_prev_SQL_id||'; ' || c2_status||'; '|| c2_username||'; '|| c2_state||'; '|| c2_event||'; '|| c2_machine||'; '|| c2_program);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLOSE C2;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OPEN C2;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GOTO lp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF C2%NOTFOUND THEN&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLOSE C2;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OPEN C2;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GOTO lp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXIT&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN C1%NOTFOUND;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END IF ;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END IF ;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; END LOOP;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXIT&lt;br /&gt;&amp;nbsp; WHEN C2%NOTFOUND;&lt;br /&gt;&amp;nbsp; END LOOP;&lt;br /&gt;&amp;nbsp; CLOSE C1;&lt;br /&gt;&amp;nbsp; CLOSE C2;&lt;br /&gt;END session_mon;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt; &lt;quote&gt;&lt;br /&gt;&lt;br /&gt;&lt;/quote&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;Praticamente esegue dei loop su entrambi i cursori C1 e C2 in modo da mettere in luce solo quelle sessioni che superano il 95% di hit/parse.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;Una volta compilata dando ovviamente i grant di select di un utente che non sia SYS alle tabelle di sistema come per esempio V$SESSION,v$sqlarea ecc. si può facilemente lanciare con:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;set serveroutput on;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;exec session_mon;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;blocco anonimo completato&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt; &lt;/span&gt; &lt;class="codesnippet"&gt;&lt;br /&gt;153%    ;165; 23930;  29654;  mario.rossi;  ;  ;  7nacmhkk9c6rh;  INACTIVE;  *_D**_*I*;  WAITING;  SQL*Net message from client; domain\servername;  o*xp***e.ex*&lt;br /&gt;&lt;br /&gt;99%    ;143; 24207;  62019;  roberto.verdi;  INSERT INTO ..... ;  8x6ddxfcuwqna;  8x6ddxfcuwqna;  INACTIVE;  *_D**_*I*;  WAITING;  SQL*Net message from client; domain\servername;  o*xp***e.ex*&lt;br /&gt;&lt;br /&gt;100%    ;137; 13757;  40756;  giovanni.neri;  DELETE FROM ...... ;  2apjjpak50830;  2apjjpak50830;  INACTIVE;  *_D**_*I*;  WAITING;  SQL*Net message from client; domain\servername;  o*xp***e.ex*&lt;br /&gt;&lt;br /&gt;96%    ;89; 13484;  37497;  maria.beralda;  SELECT  *  FROM .....;  2f3a5zqx90uxc;  2f3a5zqx90uxc;  INACTIVE;  *_D**_*I*;  WAITING;  SQL*Net message from client; domain\servername;  o*xp***e.ex*&lt;br /&gt;&lt;br /&gt;167%    ;74; 26811;  11150;  guido.lavespa;  ;  ;  6cyvu230zxnx8;  INACTIVE;  *_D**_*I*;  WAITING;  SQL*Net message from client; domain\servername;  o*xp***e.ex*&lt;br /&gt;&lt;br /&gt;107%    ;44; 14366;  41924;  giovanna.coscialunga;  ;  ;  6cyvu230zxnx8;  INACTIVE;  *_D**_*I*;  WAITING;  SQL*Net message from client; domain\servername;  o*xp***e.ex*&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;Notiamo che la prima colonna, anche se la formattazione non è delle migliori è rappresentata della percentuale hit/parse del sid che supera in questo caso il 95%, le altre colonne inserite rispettivamente, spid, serial, osuser, &amp;nbsp;SQL_TEXT, SQL_id,prev_SQL_id,status,username,state,event,machine e infine il program.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;Ho diviso le colonne con il ; in modo da poter importare il risultato in un altro file software per avere una maggiore leggibilità e per eseguire ulteriori analisi.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;Questa procedura potrebbe essere un buon inizio per un tuning, mettendo in luce gli utenti che hanno un hit/parse elevato, sfuttando la Session Cursor Cache.&lt;/span&gt;&lt;br /&gt;&lt;/class="codesnippet"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="font-size: 15px; white-space: pre-wrap;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-size: 15px; white-space: pre-wrap;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;Aspetto commenti...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="background-color: transparent;"&gt;&lt;/div&gt;&lt;div style="background-color: transparent;"&gt;&lt;/div&gt;&lt;div style="background-color: transparent;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: transparent;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: transparent;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-1957361373096765088?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/1957361373096765088/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/07/tuning-sessioncachedcursor-with-plsql.html#comment-form' title='4 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/1957361373096765088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/1957361373096765088'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/07/tuning-sessioncachedcursor-with-plsql.html' title='TUNING session_cached_cursor with PL/SQL procedure'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-406545862088307149</id><published>2011-07-18T06:37:00.000-07:00</published><updated>2011-07-18T06:37:13.260-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>LISTENER GETS HUNG UP in  Oracle 10.2.5.0</title><content type='html'>Mi sono imbattuto in un altro bug 4518443 della versione 10.2.5.0, critico e abbastanza fastidioso.&lt;br /&gt;Il servizio listener va in hang (LISTENER GETS HUNG UP) causando il blocco di nuove connessioni al DB da parte dell'applicativo.&lt;br /&gt;Inizialmente quando si verifica questo problema provavo a riavviare più volte il listener senza ottenere alcun risultato.&lt;br /&gt;Dopo alcuni minuti (possono essere 2 come 20) il listener riprende a funzionare senza problemi.&lt;br /&gt;Controllando nel supporto oracle ho visto che il problema era già ben conosciuto, bug 4518443 .&lt;br /&gt;Per risolvere questo problema il supporto suggerisce di installare la relativa patch 4518443 oppure un workaround.&lt;br /&gt;&lt;br /&gt;Leggendo alcuni articoli e forum in OTN mi sono ben reso conto che la patch potrebbe essere non proprio risolutiva perchè fa&amp;nbsp;parte di un patchset molto più corposo, inoltre in ambienti non RAC suggerivano di implementare solo il workaround.&lt;br /&gt;&lt;br /&gt;Quindi ho fatto come suggerisce la nota:&lt;br /&gt;&lt;br /&gt;1. Aggiungere la riga SUBSCRIBE_FOR_NODE_DOWN_EVENT_&amp;lt;listener_name&amp;gt;=OFF nel file listener.ora&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. Rinominare il file $ORACLE_HOME/opmn/conf/ons.config in ons.config.orig con il comando nel mio caso mv ons.config ons.config.orig.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. Riavviare il listener.&lt;br /&gt;&lt;br /&gt;Facendo così il problema sembra superato, ma il buon senso mi dice di aspettare ancora un pò.....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-406545862088307149?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/406545862088307149/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/07/listener-gets-hung-up-in-oracle-10250.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/406545862088307149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/406545862088307149'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/07/listener-gets-hung-up-in-oracle-10250.html' title='LISTENER GETS HUNG UP in  Oracle 10.2.5.0'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-9130350222691708584</id><published>2011-07-08T08:19:00.000-07:00</published><updated>2011-07-08T08:20:58.591-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>ora-01882 "timezone region not found" in SqlDeveloper 3.0.04</title><content type='html'>Un breve post per descrivere e risolvere &amp;nbsp;un errore molto fastidioso in SqlDeveloper versione 3.0.04.&lt;br /&gt;Ho aggiornato la versione del SqlDeveloper alla 3.0.04 tutto bene per le connessioni ai DB con Oracle 10g, ma quando tento di collegarmi in un DB Oracle versione 9i ecco il misfatto:&lt;br /&gt;&lt;b&gt;ora-01882 "timezone region not found"&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;All'inizio non capivo realmente la situazione visto che con le versioni precedenti non avevo questo problema.&lt;br /&gt;Ho provato a verificare le impostazione del mio db, ma il problema alla fine stava in &amp;nbsp;SqlDeveloper.&lt;br /&gt;Ho verificato le impostazioni dell'applicazione ma non mi sembrava nulla di diverso dalla release precedente tale da generare questo errore.&lt;br /&gt;&lt;br /&gt;Alla fine dopo alcune ricerche è spuntato fuori il problema e la relativa risoluzione anche se non ben documentata.&lt;br /&gt;L'errore è &amp;nbsp;nel file sqldeveloper.conf dove bisogna aggiungere la seguente riga:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;AddVMOption -Duser.timezone="+02:00"&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Dove +02:00 sta indicare le ore di differenza da Greenwick ovviamente dall'Italia.&lt;br /&gt;&lt;br /&gt;Una volta impostato questo parametro e riavviato il software tutto ha ripreso a funzionare magicamente.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-9130350222691708584?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/9130350222691708584/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/07/ora-01882-timezone-region-not-found-in.html#comment-form' title='5 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/9130350222691708584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/9130350222691708584'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/07/ora-01882-timezone-region-not-found-in.html' title='ora-01882 &quot;timezone region not found&quot; in SqlDeveloper 3.0.04'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-5796259340944910738</id><published>2011-07-08T02:23:00.000-07:00</published><updated>2011-07-08T02:23:41.992-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>ORA-600 [KCBLASM_1], [103] Patchset 10.2.0.5</title><content type='html'>E' da unpò di tempo che nell'alert log di una istanza compare ORA-600 [KCBLASM_1], ho verificato nel metalink e sembra che sia un bug, &amp;nbsp;precisamente il 7612454.&lt;br /&gt;&lt;br /&gt;Sempre nel metalink ho trovato che questo bug è riportato nel documento ID 1133845.1.&lt;br /&gt;Adesso proviamo a vedere le cause e le possibili soluzioni.&lt;br /&gt;Quando eseguiamo un SQL utilizzando una selec ci compare l'errore:&lt;br /&gt;ORA-00600: internal error code, arguments: [kcblasm_1], [103], [], [], [], [], [], []&lt;br /&gt;&lt;br /&gt;L' execution plan di ORA-600 trace file mostra che una &amp;nbsp;hash join è stata utilizzata.&lt;br /&gt;Call Stack is including:&lt;br /&gt;kcblasm1 kcblasm kxhfFndFreeSlot kxhfNewBuffer qerhjGetNewBuffer ksxb1bqb kxhrPack.&lt;br /&gt;&lt;br /&gt;In realtà &amp;nbsp;questo problema era già stato visionato con il Bug 9800302 - 10.2.0.5 GETTING ORA-00600 [KCBLASM_1] chiuso perchè uguale al nostro bug 7612454 - Abstract: DSS:PERF REGRESSIONS IN SERIAL DIRECT READS fixed in 11.2.&lt;br /&gt;&lt;br /&gt;Sembra che il problema sia nell'algoritmo della funzione hash-join, il quale forza l'utilizzo un numero più esiguo di slots, mentre gli slots disponibili per le direct I/Os sono 4096, aggravando così maggiormente i dischi causando:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;direct path IO to perform worse in 10.2.0.5 than earlier releases with more "direct path read" operations or&amp;nbsp;&lt;/li&gt;&lt;li&gt;ORA-600 [kcblasm_1] errors.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Come al solito Oracle come prima soluzione consiglia di passare alla versione 11.2, quindi passiamo oltre.&lt;br /&gt;&lt;br /&gt;Come seconda opzione c'è una patch, per sistemi Windows, il Patch 3 della 10.2.0.5 o superiore mentre per il mio caso con OS Solaris si può scaricare direttamente la patch specifica.&lt;br /&gt;&lt;br /&gt;Come terza opzione c'è un &amp;nbsp;workaround settando il paramentro "_hash_join_enabled"= false.&lt;br /&gt;&lt;br /&gt;La patch in questione è di circa un anno fa e i problemi nel mio caso sono comunque sporadici quindi per non intaccare la stato del DB inizialmente proverò con il workaround e controllerò i bene risultati, nel frattempo per tenermi pronto ho scaricato la patch.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-5796259340944910738?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/5796259340944910738/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/07/ora-600-kcblasm1-103-patchset-10205.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/5796259340944910738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/5796259340944910738'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/07/ora-600-kcblasm1-103-patchset-10205.html' title='ORA-600 [KCBLASM_1], [103] Patchset 10.2.0.5'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-2945504702994419218</id><published>2011-06-28T02:35:00.000-07:00</published><updated>2011-06-28T02:36:37.169-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RMAN'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>RMAN Backup Strategies - Part 2</title><content type='html'>Una volta conclusi i backup è possibile verificare nel catalog se quest'ultimi sono effettivamente presenti&amp;nbsp;e il loro stato.&amp;nbsp;Collegandosi al catalog si può lanciare:&lt;br /&gt;LIST BACKUP RECOVERABLE;&lt;br /&gt;&lt;br /&gt;List of Backup Sets&lt;br /&gt;===================&lt;br /&gt;&lt;br /&gt;BS Key &amp;nbsp;Type LV Size &amp;nbsp; &amp;nbsp; &amp;nbsp; Device Type Elapsed Time Completion Time&lt;br /&gt;------- ---- -- ---------- ----------- ------------ ---------------&lt;br /&gt;258096 &amp;nbsp;Full &amp;nbsp; &amp;nbsp;8.44G &amp;nbsp; &amp;nbsp; &amp;nbsp;DISK &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:04:33 &amp;nbsp; &amp;nbsp; 27-JUN-11 &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BP Key: 258107 &amp;nbsp; Status: AVAILABLE &amp;nbsp;Compressed: NO &amp;nbsp;Tag: TAG20110627T160014&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Piece Name: \\xxx.yyy.zzz.100\BACKUP\RMAN\****\******20110627&lt;br /&gt;&amp;nbsp; List of Datafiles in backup set 258096&lt;br /&gt;&amp;nbsp; File LV Type Ckp SCN &amp;nbsp; &amp;nbsp;Ckp Time &amp;nbsp;Name&lt;br /&gt;&amp;nbsp; ---- -- ---- ---------- --------- ----&lt;br /&gt;&amp;nbsp; 16 &amp;nbsp; &amp;nbsp; &amp;nbsp;Full 7250999543 27-JUN-11 E:\*****\*****\*****\*****LARGE_3.DBF&lt;br /&gt;&amp;nbsp; 22 &amp;nbsp; &amp;nbsp; &amp;nbsp;Full 7250999543 27-JUN-11 E:\*****\*****\*****\*****LARGE_9.DBF&lt;br /&gt;&amp;nbsp; 28 &amp;nbsp; &amp;nbsp; &amp;nbsp;Full 7250999543 27-JUN-11 E:\*****\*****\*****\*****_15.DBF&lt;br /&gt;&amp;nbsp; 34 &amp;nbsp; &amp;nbsp; &amp;nbsp;Full 7250999543 27-JUN-11 E:\*****\*****\*****\*****_21.DBF&lt;br /&gt;&amp;nbsp; 38 &amp;nbsp; &amp;nbsp; &amp;nbsp;Full 7250999543 27-JUN-11 E:\*****\*****\*****\*****_LARGE_25.DBF&lt;br /&gt;............................. &lt;br /&gt;&lt;br /&gt;Ovviamente nel mio caso mi farà vedere solo l'ultimo backup eseguito come ho specificato&amp;nbsp;nella retention policy.&amp;nbsp;Tuttavia ogni sera mi faccio mandare un messaggio di posta per ogni DB con la situazione&amp;nbsp;nel catalog per le varie istanze, se si tratta di ambienti Windows utilizzo blat con questo script:&lt;br /&gt;&lt;br /&gt;rman target abc/abc@***T rcvcat qqqq/vvvv@*****DB log c:\rman_abc.log @c:\rmanset.rman&lt;br /&gt;blat c:\rman_abc.log -to alberto.frosi -subject "RMAN Report DB"&lt;br /&gt;&lt;br /&gt;se sono server Solaris utilizzo il classico mailx:&lt;br /&gt;su - oracle -c "rman target / rcvcat 123/123@*****DB \&lt;br /&gt;cmdfile=/oracle/app/oracle/product/bckonline.rcv &amp;gt; /DataDomain/*****/*******.log"&lt;br /&gt;mailx -s "RMAN Report DB - `uname -n` " alberto.frosi@xxxxx.com &amp;lt; /DataDomain/*****/*******.log&lt;br /&gt;&lt;br /&gt;Ho creato inoltre,seguendo un post di &lt;a href="http://arup.blogspot.com/2010/11/tool-to-present-consolidated-view-of.html"&gt;Arup Nanda&lt;/a&gt;, &amp;nbsp;dei report che mi consentono in qualsiasi momento&amp;nbsp;di verificare tutti i backup nel catalog lanciando un semplice script che mi restituisce questo output:&lt;br /&gt;&lt;br /&gt;DB Name &amp;nbsp;Start Time &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End Time &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Status &amp;nbsp; Time Tak Output Size &amp;nbsp; &amp;nbsp; Type &amp;nbsp; &amp;nbsp; BackupType&lt;br /&gt;-------- ------------------ ------------------ -------- -------- -------- -------- ----------&lt;br /&gt;ABC &amp;nbsp; &amp;nbsp; 21-06-2011 16:00 &amp;nbsp; 21-06-2011 16:35 &amp;nbsp; COMPLETE 00:34:54 &amp;nbsp; &amp;nbsp;54.57G &amp;nbsp; &amp;nbsp; &amp;nbsp; DISK &amp;nbsp; &amp;nbsp; DB FULL &lt;br /&gt;ABC &amp;nbsp; &amp;nbsp; 21-06-2011 17:00 &amp;nbsp; 21-06-2011 17:00 &amp;nbsp; COMPLETE 00:00:23 &amp;nbsp; 117.12M &amp;nbsp; &amp;nbsp; &amp;nbsp; DISK &amp;nbsp; &amp;nbsp; ARCHIVELOG&lt;br /&gt;ABC &amp;nbsp; &amp;nbsp; 21-06-2011 21:00 &amp;nbsp; 21-06-2011 21:01 &amp;nbsp; COMPLETE 00:01:02 &amp;nbsp; 753.00M &amp;nbsp; &amp;nbsp; &amp;nbsp; DISK &amp;nbsp; &amp;nbsp; ARCHIVELOG&lt;br /&gt;ABC &amp;nbsp; &amp;nbsp; 22-06-2011 01:00 &amp;nbsp; 22-06-2011 01:02 &amp;nbsp; COMPLETE 00:01:33 &amp;nbsp; 735.54M &amp;nbsp; &amp;nbsp; &amp;nbsp; DISK &amp;nbsp; &amp;nbsp; ARCHIVELOG&lt;br /&gt;...........&lt;br /&gt;ABC &amp;nbsp; &amp;nbsp; 27-06-2011 13:00 &amp;nbsp; 27-06-2011 13:01 &amp;nbsp; COMPLETE 00:01:28 &amp;nbsp;1009.84M &amp;nbsp; &amp;nbsp; &amp;nbsp; DISK &amp;nbsp; &amp;nbsp; ARCHIVELOG&lt;br /&gt;ABC &amp;nbsp; &amp;nbsp; 27-06-2011 16:00 &amp;nbsp; 27-06-2011 16:34 &amp;nbsp; COMPLETE 00:34:37 &amp;nbsp; &amp;nbsp;54.64G &amp;nbsp; &amp;nbsp; &amp;nbsp; DISK &amp;nbsp; &amp;nbsp; DB FULL &lt;br /&gt;ABC &amp;nbsp; &amp;nbsp; 27-06-2011 16:58 &amp;nbsp; 27-06-2011 17:14 &amp;nbsp; FAILED &amp;nbsp; 00:15:53 &amp;nbsp; &amp;nbsp; 0.00K &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DB FULL &lt;br /&gt;. Operation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Input &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Status &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;. -------------------- -------------------- --------------------&lt;br /&gt;. . &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DB FULL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FAILED &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;. &amp;nbsp;Level &amp;nbsp;Status &amp;nbsp; Operation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Object Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;. &amp;nbsp;------ -------- -------------------- --------------------&lt;br /&gt;. &amp;nbsp;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;COMPLETE RMAN &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; . &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;. &amp;nbsp;-&amp;gt; &amp;nbsp; &amp;nbsp; COMPLETE BACKUP VALIDATE &amp;nbsp; &amp;nbsp; &amp;nbsp;DB FULL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;. &amp;nbsp;-&amp;gt; &amp;nbsp; &amp;nbsp; FAILED &amp;nbsp; BACKUP VALIDATE &amp;nbsp; &amp;nbsp; &amp;nbsp;DB FULL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;ABC &amp;nbsp; &amp;nbsp; 27-06-2011 17:00 &amp;nbsp; 27-06-2011 17:00 &amp;nbsp; COMPLETE 00:00:31 &amp;nbsp; 112.46M &amp;nbsp; &amp;nbsp; &amp;nbsp; DISK &amp;nbsp; &amp;nbsp; ARCHIVELOG&lt;br /&gt;ABC &amp;nbsp; &amp;nbsp; 27-06-2011 21:00 &amp;nbsp; 27-06-2011 21:01 &amp;nbsp; COMPLETE 00:00:49 &amp;nbsp; 686.41M &amp;nbsp; &amp;nbsp; &amp;nbsp; DISK &amp;nbsp; &amp;nbsp; ARCHIVELOG&lt;br /&gt;ABC &amp;nbsp; &amp;nbsp; 28-06-2011 01:00 &amp;nbsp; 28-06-2011 01:01 &amp;nbsp; COMPLETE 00:01:41 &amp;nbsp; 662.65M &amp;nbsp; &amp;nbsp; &amp;nbsp; DISK &amp;nbsp; &amp;nbsp; ARCHIVELOG&lt;br /&gt;ABC &amp;nbsp; &amp;nbsp; 28-06-2011 04:00 &amp;nbsp; 28-06-2011 05:05 &amp;nbsp; COMPLETE 01:05:38 &amp;nbsp; &amp;nbsp;53.88G &amp;nbsp; &amp;nbsp; &amp;nbsp; DISK &amp;nbsp; &amp;nbsp; DB FULL &lt;br /&gt;ABC &amp;nbsp; &amp;nbsp; 28-06-2011 05:00 &amp;nbsp; 28-06-2011 05:01 &amp;nbsp; COMPLETE 00:01:14 &amp;nbsp; 721.03M &amp;nbsp; &amp;nbsp; &amp;nbsp; DISK &amp;nbsp; &amp;nbsp; ARCHIVELOG&lt;br /&gt;ABC &amp;nbsp; &amp;nbsp; 28-06-2011 09:00 &amp;nbsp; 28-06-2011 09:01 &amp;nbsp; COMPLETE 00:01:04 &amp;nbsp; 646.32M &amp;nbsp; &amp;nbsp; &amp;nbsp; DISK &amp;nbsp; &amp;nbsp; ARCHIVELOG&lt;br /&gt;XYZ 21-06-2011 13:00 &amp;nbsp; 21-06-2011 13:36 &amp;nbsp; COMPLETE 00:36:02 &amp;nbsp; 152.66G &amp;nbsp; &amp;nbsp; &amp;nbsp; DISK &amp;nbsp; &amp;nbsp; DB INCR &lt;br /&gt;XYZ 21-06-2011 19:00 &amp;nbsp; 21-06-2011 19:38 &amp;nbsp; COMPLETE 00:38:00 &amp;nbsp; 150.91G &amp;nbsp; &amp;nbsp; &amp;nbsp; DISK &amp;nbsp; &amp;nbsp; DB INCR &lt;br /&gt;XYZ 22-06-2011 04:00 &amp;nbsp; 22-06-2011 04:44 &amp;nbsp; COMPLETE 00:44:06 &amp;nbsp; 156.19G &amp;nbsp; &amp;nbsp; &amp;nbsp; DISK &amp;nbsp; &amp;nbsp; DB INCR &lt;br /&gt;........&lt;br /&gt;XYZ 27-06-2011 19:00 &amp;nbsp; 27-06-2011 19:39 &amp;nbsp; COMPLETE 00:39:23 &amp;nbsp; 150.91G &amp;nbsp; &amp;nbsp; &amp;nbsp; DISK &amp;nbsp; &amp;nbsp; DB INCR &lt;br /&gt;XYZ 28-06-2011 04:00 &amp;nbsp; 28-06-2011 04:43 &amp;nbsp; COMPLETE 00:43:41 &amp;nbsp; 156.94G &amp;nbsp; &amp;nbsp; &amp;nbsp; DISK &amp;nbsp; &amp;nbsp; DB INCR &lt;br /&gt;&lt;br /&gt;In questo output è possibile avere la situazione completa di tutto il catalog.&lt;br /&gt;&lt;br /&gt;Prima di effettuare i backup per essere sicuri, &amp;nbsp;si può eseguire un check&amp;nbsp;sulla consistenza per verificare se il db è corrotto a livello fisico e/o logico e per confermare che&amp;nbsp;tutti i datafiles esistono e sono nelle posizioni corrette.&lt;br /&gt;&lt;br /&gt;RMAN con questo comando non produce ulteriori set di backup, ma legge piuttosto i file specificati nella loro interezza,&amp;nbsp;per determinare se possono essere sottoposti a backup e non sono danneggiati.&lt;br /&gt;Se la convalida di backup scopre blocchi corrotti, &amp;nbsp;aggiorna RMAN la vista&amp;nbsp;V_$DATABASE_BLOCK_CORRUPTION con le righe che descrivono la corruzione.&lt;br /&gt;&lt;br /&gt;BACKUP VALIDATE&lt;br /&gt;DATABASE&lt;br /&gt;ARCHIVELOG ALL;&lt;br /&gt;&lt;br /&gt;e/o&lt;br /&gt;&lt;br /&gt;BACKUP VALIDATE&lt;br /&gt;CHECK LOGICAL&lt;br /&gt;DATABASE&lt;br /&gt;ARCHIVELOG ALL;&lt;br /&gt;&lt;br /&gt;Starting backup at 27-JUN-11&lt;br /&gt;using channel ORA_DISK_1&lt;br /&gt;channel ORA_DISK_1: starting full datafile backupset&lt;br /&gt;channel ORA_DISK_1: specifying datafile(s) in backupset&lt;br /&gt;input datafile fno=00046 name=/XXXX/aaaaaa1.dbf&lt;br /&gt;input datafile fno=00035 name=/XXXX/aaaaaa2.dbf&lt;br /&gt;input datafile fno=00036 name=/XXXX/aaaaaa3.dbf&lt;br /&gt;input datafile fno=00029 name=/XXXX/aaaaaa4.dbf&lt;br /&gt;......&lt;br /&gt;&lt;br /&gt;E' possibile inoltre verificare se un backupset eseguito con RMAN sia andato a buon fine ed&lt;br /&gt;è possibile quindi eseguirne il ripristino:&lt;br /&gt;&lt;br /&gt;RMAN&amp;gt; LIST BACKUP SUMMARY;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;List of Backups&lt;br /&gt;===============&lt;br /&gt;Key &amp;nbsp; &amp;nbsp; TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag&lt;br /&gt;------- -- -- - ----------- --------------- ------- ------- ---------- ---&lt;br /&gt;428019 &amp;nbsp;B &amp;nbsp;0 &amp;nbsp;A DISK &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;28-JUN-11 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; NO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TAG20110628T040007&lt;br /&gt;428020 &amp;nbsp;B &amp;nbsp;0 &amp;nbsp;A DISK &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;28-JUN-11 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; NO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TAG20110628T040007&lt;br /&gt;428021 &amp;nbsp;B &amp;nbsp;0 &amp;nbsp;A DISK &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;28-JUN-11 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; NO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TAG20110628T040007&lt;br /&gt;428022 &amp;nbsp;B &amp;nbsp;0 &amp;nbsp;A DISK &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;28-JUN-11 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; NO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TAG20110628T040007&lt;br /&gt;428023 &amp;nbsp;B &amp;nbsp;0 &amp;nbsp;A DISK &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;28-JUN-11 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; NO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TAG20110628T040007&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RMAN&amp;gt; VALIDATE BACKUPSET 428022,428023;&lt;br /&gt;&lt;br /&gt;allocated channel: ORA_DISK_1&lt;br /&gt;channel ORA_DISK_1: sid=183 devtype=DISK&lt;br /&gt;channel ORA_DISK_1: starting validation of datafile backupset&lt;br /&gt;channel ORA_DISK_1: reading from backup piece /DataDomain/*****/******_72194_754978164_1.dbf&lt;br /&gt;channel ORA_DISK_1: restored backup piece 1&lt;br /&gt;piece handle=/DataDomain/*****/*****_72194_754978164_1.dbf tag=TAG20110628T040007&lt;br /&gt;channel ORA_DISK_1: validation complete, elapsed time: 00:04:37&lt;br /&gt;channel ORA_DISK_1: starting validation of datafile backupset&lt;br /&gt;channel ORA_DISK_1: reading from backup piece /DataDomain/******/********_72196_754978766_1.dbf&lt;br /&gt;channel ORA_DISK_1: restored backup piece 1&lt;br /&gt;piece handle=/DataDomain/*****/*****_72196_754978766_1.dbf tag=TAG20110628T040007&lt;br /&gt;channel ORA_DISK_1: validation complete, elapsed time: 00:04:07&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Un'altra idea è quella di adottare una politica di Long-Term Backup ossia di tenere almeno un backup&amp;nbsp;consistente mensile. Questo andrebbe contro la mia retention policy ma c'è un workaround.&lt;br /&gt;E' possibile eseguire questo, specificando l'opzione KEEP nel comando BACKUP. Sì puo inoltre&amp;nbsp;specificare di eseguire il backup anche con &amp;nbsp;l'opzione LOGS oppure NOLOGS.&lt;br /&gt;Nel mio caso essendo un backup mensile ma soprattutto consistente sceglierò NOLOGS.&lt;br /&gt;&lt;br /&gt;RMAN&amp;gt; SHUTDOWN IMMEDIATE;&lt;br /&gt;RMAN&amp;gt; STARTUP MOUNT; &lt;br /&gt;RMAN&amp;gt; BACKUP DATABASE KEEP FOREVER NOLOGS&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TAG 'Backup Mensile';&lt;br /&gt;&lt;br /&gt;Una volta eseguito cambio il TAG per farlo "uscire" dalla retention policy e farlo diventare&amp;nbsp;permanente.&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt; &lt;br /&gt;RMAN&amp;gt; CHANGE BACKUP TAG 'Backup Mensile' UNAVAILABLE;&lt;br /&gt;RMAN&amp;gt; SQL 'ALTER DATABASE OPEN';&lt;br /&gt;&lt;br /&gt;A questo punto nmi sembra di avere eseguito una panoramica completa di tutte o quasi le&lt;br /&gt;funzionalità di RMAN più usate.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-2945504702994419218?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/2945504702994419218/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/06/rman-backup-strategies-part-2.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/2945504702994419218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/2945504702994419218'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/06/rman-backup-strategies-part-2.html' title='RMAN Backup Strategies - Part 2'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-4605621746426513134</id><published>2011-06-27T06:56:00.000-07:00</published><updated>2011-06-27T07:00:28.170-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>RMAN Backup Strategies - Part 1</title><content type='html'>In questo post vorrei trattare, almeno per punti, le varie strategie di backup&amp;nbsp;con RMAN di Oracle, ovvero le operazione quotidiane che ogni DBA dovrebbe fare per&amp;nbsp;verificare se i backup sono stati eseguiti con successo e le relative verifiche di sicurezza.&lt;br /&gt;&lt;br /&gt;Ritengo acquisito il perchè dell'utilizzo del recovery catolog di RMAN su un altro server, dove&amp;nbsp;vengono scritte a livello logico tutte le informazioni relative a tutti i backup di RMAN&amp;nbsp;di una o più istanze Oracle, anche di versioni differenti. (9i-10g)&lt;br /&gt;&lt;br /&gt;I backup possono esssere possono essere di varie tipologie, quello che prenderò in esame nel mio&amp;nbsp;caso è quello incremental level 0.&lt;br /&gt;I backup incrementali possono essere di livello 0 o livello 1.&lt;br /&gt;Il backup level 0 backup incrementale, copia tutti i blocchi che contengono dati, come un completo&amp;nbsp;set di backup, che è la inoltre la base per i successivi backup incrementali level 1.&lt;br /&gt;Infatti questa è l'unica differenza tra un level 0 di backup incrementale e un full backup, ossia quest'ultimo&amp;nbsp;non può essere mai incluso in una strategia incrementale.&lt;br /&gt;&lt;br /&gt;Nel mio caso ho optato proprio per questa strategia ossia un incremental level 0 eseguito 3 volte al giorno,&lt;br /&gt;senza utilizzare ulteriori backup incrementali di level 1.&lt;br /&gt;&lt;br /&gt;Queste considerazioni vanno prese dopo un'analisi attenta del DB, basate principalmente sulla dimensione,&lt;br /&gt;sul tempo di esecuzione di backup e sul tempo di restore&lt;br /&gt;&lt;br /&gt;Per esempio per un DB molto grande forse non sarà possibile eseguire un level 0 ogni giorno allora si procederà&amp;nbsp;con un level 0 durante in week-end e successivi level 1 durante tutta la settimana.&lt;br /&gt;&lt;br /&gt;In un db faccio eseguire questo script di RMAN per il backup:&lt;br /&gt;&lt;br /&gt;run {&lt;br /&gt;allocate channel 'dev_0' device type disk;&lt;br /&gt;allocate channel 'dev_1' device type disk;&lt;br /&gt;backup incremental level 0 filesperset 4&lt;br /&gt;format '/DataDomain/****/******_%s_%t_%p.dbf'&lt;br /&gt;database&lt;br /&gt;include current controlfile;&lt;br /&gt;sql 'alter system archive log current';&lt;br /&gt;backup filesperset 1&lt;br /&gt;format '/DataDomain/****/****ARCH_%s_%t_%p.arch'&lt;br /&gt;archivelog all delete input;}&lt;br /&gt;crosscheck backup device type disk;&lt;br /&gt;delete noprompt obsolete;&lt;br /&gt;delete noprompt expired backupset;&lt;br /&gt;&lt;br /&gt;allocated channel: dev_0&lt;br /&gt;channel dev_0: sid=142 devtype=DISK&lt;br /&gt;&lt;br /&gt;allocated channel: dev_1&lt;br /&gt;channel dev_1: sid=148 devtype=DISK&lt;br /&gt;&lt;br /&gt;Starting backup at 27-JUN-11&lt;br /&gt;channel dev_0: starting incremental level 0 datafile backupset&lt;br /&gt;channel dev_0: specifying datafile(s) in backupset&lt;br /&gt;input datafile fno=00046 name=/****/undotbs01.dbf&lt;br /&gt;input datafile fno=00035 name=/****/indici01.dbf&lt;br /&gt;............&lt;br /&gt;channel dev_1: starting piece 1 at 27-JUN-11&lt;br /&gt;channel dev_0: finished piece 1 at 27-JUN-11&lt;br /&gt;piece handle=/DataDomain/****/****_72057_754923606_1.dbf tag=TAG20110627T130004 comment=NONE&lt;br /&gt;..............&lt;br /&gt;channel dev_0: backup set complete, elapsed time: 00:00:35&lt;br /&gt;Finished backup at 27-JUN-11&lt;br /&gt;&lt;br /&gt;Starting Control File and SPFILE Autobackup at 27-JUN-11&lt;br /&gt;piece handle=/DataDomain/*****/c-1531569699-20110627-02 comment=NONE&lt;br /&gt;Finished Control File and SPFILE Autobackup at 27-JUN-11&lt;br /&gt;&lt;br /&gt;sql statement: alter system archive log current&lt;br /&gt;&lt;br /&gt;Starting backup at 27-JUN-11&lt;br /&gt;current log archived&lt;br /&gt;channel dev_0: starting archive log backupset&lt;br /&gt;channel dev_0: specifying archive log(s) in backup set&lt;br /&gt;input archive log thread=1 sequence=69375 recid=61597 stamp=754894912&lt;br /&gt;channel dev_0: starting piece 1 at 27-JUN-11&lt;br /&gt;channel dev_1: starting archive log backupset&lt;br /&gt;channel dev_1: specifying archive log(s) in backup set&lt;br /&gt;input archive log thread=1 sequence=69379 recid=61601 stamp=754894938&lt;br /&gt;channel dev_1: starting piece 1 at 27-JUN-11&lt;br /&gt;channel dev_0: finished piece 1 at 27-JUN-11&lt;br /&gt;piece handle=/DataDomain/*****/*****ARCH_72071_754925704_1.arch tag=TAG20110627T133503 comment=NONE&lt;br /&gt;channel dev_0: backup set complete, elapsed time: 00:00:04&lt;br /&gt;channel dev_0: deleting archive log(s)&lt;br /&gt;..............&lt;br /&gt;Starting Control File and SPFILE Autobackup at 27-JUN-11&lt;br /&gt;piece handle=/DataDomain/******/c-1531569699-20110627-03 comment=NONE&lt;br /&gt;Finished Control File and SPFILE Autobackup at 27-JUN-11&lt;br /&gt;released channel: dev_0&lt;br /&gt;released channel: dev_1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Con questo script mi assicuro che tutto il DB e gli archive log relativi vengano inclusi nel backupset.&lt;br /&gt;Controllando i vari parametri di configuazione di RMAN mi soffermo per due in &amp;nbsp;particolare;&lt;br /&gt;&lt;br /&gt;CONFIGURE RETENTION POLICY TO REDUNDANCY 1;&lt;br /&gt;CONFIGURE BACKUP OPTIMIZATION ON;&lt;br /&gt;&lt;br /&gt;Per RETENTION POLICY TO REDUNDANCY 1 specifico che voglio tenere esclusivamente l'ultimo backup effettuato,visto che nell'arco della giornata ne eseguo 3, questo è per una strategia legata allo disk space utilizzatodal backup.&lt;br /&gt;Per BACKUP OPTIMIZATION ON il comando BACKUP salta il backup di alcuni datafiles per esempio quando vede che è già stato eseguito il backup,attraverso questi 3 controlli:&lt;br /&gt;1) RMAN datafiles confronta DBID, SCN checkpoint, SCN creazione e SCN RESETLOGS, quindi se sono identici salta l'esecuzione.&lt;br /&gt;2) Archived redo log RMAN verifica il thread, il sequence number, RESETLOGS SCN e datetime.&lt;br /&gt;3) Per i backupset RMAN verifica recid e stamp.&lt;br /&gt;&lt;br /&gt;Andando avanti con lo script di RMAN per il backup troviamo questi 2 comandi,crosscheck e delete noprompt obsolete.&lt;br /&gt;Il crosscheck esegue una verifica tra i backupset presenti nel recovery catalog e quelli presenti fisicamente su disco, se non&amp;nbsp;trova corrispondenza vengono segnati cosa "EXPIRED" all'interno del catalog, se trova invece corrispondenza ma non viene soddisfatta&amp;nbsp;la retention policy vengono segnati come "OBSOLETE".&lt;br /&gt;&lt;br /&gt;Con il delete noprompt cancello quelli "OBSOLETE" da disco, quelli che non corrispondono alla retention policy,&amp;nbsp;inoltre rimuove quelli in stato "EXPIRED" dal catalog e quelli che ci sono ancora nel catalog ma che non si trovano&amp;nbsp;fisicamente nel disco.&lt;br /&gt;Con questo comando eseguo una sorta di pulizia del catalog tenendo solo quelli in stato "AVAILABLE".&lt;br /&gt;Nell'esecuzione dello script possiamo trovare:&lt;br /&gt;allocated channel: ORA_DISK_1&lt;br /&gt;channel ORA_DISK_1: sid=142 devtype=DISK&lt;br /&gt;crosschecked backup piece: found to be 'AVAILABLE'&lt;br /&gt;backup piece handle=/DataDomain/****/*_71674_754891210_1.dbf recid=71617 stamp=754891210&lt;br /&gt;crosschecked backup piece: found to be 'AVAILABLE'&lt;br /&gt;backup piece handle=/DataDomain/****/*_71673_754891209_1.dbf recid=71618 stamp=754891210&lt;br /&gt;crosschecked backup piece: found to be 'AVAILABLE'&lt;br /&gt;backup piece handle=/DataDomain/****/*__71676_754891742_1.dbf recid=71619 stamp=754891743&lt;br /&gt;.............&lt;br /&gt;RMAN retention policy will be applied to the command&lt;br /&gt;RMAN retention policy is set to redundancy 1&lt;br /&gt;using channel ORA_DISK_1&lt;br /&gt;Deleting the following obsolete backups and copies:&lt;br /&gt;Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key &amp;nbsp; &amp;nbsp;Completion Time &amp;nbsp; &amp;nbsp;Filename/Handle&lt;br /&gt;-------------------- ------ ------------------ --------------------&lt;br /&gt;Backup Set &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 425324 27-JUN-11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;Backup Piece &amp;nbsp; &amp;nbsp; &amp;nbsp; 425339 27-JUN-11 &amp;nbsp; &amp;nbsp;/DataDomain/****/*_71674_754891210_1.dbf&lt;br /&gt;Backup Set &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 425325 27-JUN-11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;Backup Piece &amp;nbsp; &amp;nbsp; &amp;nbsp; 425340 27-JUN-11 &amp;nbsp; &amp;nbsp;/DataDomain/******/*_71673_754891209_1.dbf&lt;br /&gt;Backup Set &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 425326 27-JUN-11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;Backup Piece &amp;nbsp; &amp;nbsp; &amp;nbsp; 425341 27-JUN-11 &amp;nbsp; &amp;nbsp;/DataDomain/*****/*_71676_754891742_1.dbf&lt;br /&gt;Backup Set &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 425327 27-JUN-11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;Backup Piece &amp;nbsp; &amp;nbsp; &amp;nbsp; 425342 27-JUN-11 &amp;nbsp; &amp;nbsp;/DataDomain/*****/*_71675_754891735_1.dbf&lt;br /&gt;.........&lt;br /&gt;backup piece handle=/DataDomain/******/*ARCH_72126_754925794_1.arch recid=72057 stamp=754925794&lt;br /&gt;deleted backup piece&lt;br /&gt;backup piece handle=/DataDomain/******/*ARCH_72127_754925797_1.arch recid=72058 stamp=754925797&lt;br /&gt;deleted backup piece&lt;br /&gt;backup piece handle=/DataDomain/******/*ARCH_72128_754925797_1.arch recid=72059 stamp=754925797&lt;br /&gt;deleted backup piece&lt;br /&gt;backup piece handle=/DataDomain/******/*ARCH_72129_754925800_1.arch recid=72060 stamp=754925800&lt;br /&gt;deleted backup piece&lt;br /&gt;backup piece handle=/DataDomain/******/*ARCH_72130_754925800_1.arch recid=72061 stamp=754925800&lt;br /&gt;deleted backup piece&lt;br /&gt;.....&lt;br /&gt;Deleted 86 objects&lt;br /&gt;&lt;br /&gt;Recovery Manager complete.&lt;br /&gt;&lt;br /&gt;Nella seconda parte tratterò altre operazioni sempre con RMAN come, la reportistica e come&amp;nbsp;validare un backup.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-4605621746426513134?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/4605621746426513134/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/06/rman-backup-strategies-part-1.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/4605621746426513134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/4605621746426513134'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/06/rman-backup-strategies-part-1.html' title='RMAN Backup Strategies - Part 1'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-360854975521270085</id><published>2011-06-08T07:06:00.000-07:00</published><updated>2011-06-08T07:06:34.038-07:00</updated><title type='text'>TUNE SESSION_CACHED_CURSORS UPDATE</title><content type='html'>Visto l'interesse per l'impostazione e il tuning di questo parametro,&lt;br /&gt;ho fatto delle ulteriori ricerche.&lt;br /&gt;Mi sono messo in contatto con &lt;a href="http://oratips-ddf.blogspot.com/"&gt;David Fitzjarrell &lt;/a&gt;per chiedere un approfondimento dell'argomento,&lt;br /&gt;così mi ha fornito un statement SQL per aiutare a gestire questo parametro e il&lt;br /&gt;parametro open_cursor.&lt;br /&gt;&lt;br /&gt;--&lt;br /&gt;-- sess_cached_cursors.sql&lt;br /&gt;--&lt;br /&gt;-- Retrieve current cursor settings, current cursor allocation and&lt;br /&gt;-- compute percent usage&lt;br /&gt;--&lt;br /&gt;-- Calculate adjusted values where necessary&lt;br /&gt;--&lt;br /&gt;--&lt;br /&gt;-- ddf&lt;br /&gt;--&lt;br /&gt;&lt;br /&gt;set linesize 132&lt;br /&gt;column parameter format a30&lt;br /&gt;&lt;br /&gt;select parameter, value, usage||'%',&lt;br /&gt;case when to_number(usage) &amp;gt;= 100 then (to_number(usage)+10)*value/100 else to_number(value) end new_setting&lt;br /&gt;from&lt;br /&gt;(select&lt;br /&gt;&amp;nbsp; parameter,&lt;br /&gt;&amp;nbsp; lpad(value, 5) &amp;nbsp;value,&lt;br /&gt;&amp;nbsp; case when value=0 then '0' else to_char(100 * used / value, '990') end &amp;nbsp;usage&lt;br /&gt;from&lt;br /&gt;&amp;nbsp; ( select&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; max(s.value) &amp;nbsp;used&lt;br /&gt;&amp;nbsp; &amp;nbsp; from&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; sys.v_$statname &amp;nbsp;n,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; sys.v_$sesstat &amp;nbsp;s&lt;br /&gt;&amp;nbsp; &amp;nbsp; where&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; n.name = 'session cursor cache count' and&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; s.statistic# = n.statistic#&lt;br /&gt;&amp;nbsp; ),&lt;br /&gt;&amp;nbsp; ( select&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; name parameter, value&lt;br /&gt;&amp;nbsp; &amp;nbsp; from&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; sys.v_$parameter&lt;br /&gt;&amp;nbsp; &amp;nbsp; where&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; name = 'session_cached_cursors'&lt;br /&gt;&amp;nbsp; )&lt;br /&gt;union all&lt;br /&gt;select&lt;br /&gt;&amp;nbsp; parameter,&lt;br /&gt;&amp;nbsp; lpad(value, 5) value,&lt;br /&gt;&amp;nbsp; to_char(100 * used / value, &amp;nbsp;'990') usage&lt;br /&gt;from&lt;br /&gt;&amp;nbsp; ( select&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; max(sum(s.value)) &amp;nbsp;used&lt;br /&gt;&amp;nbsp; &amp;nbsp; from&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; sys.v_$statname &amp;nbsp;n,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; sys.v_$sesstat &amp;nbsp;s&lt;br /&gt;&amp;nbsp; &amp;nbsp; where&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; n.name in ('opened cursors current', 'session cursor cache count') and&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; s.statistic# = n.statistic#&lt;br /&gt;&amp;nbsp; &amp;nbsp; group by&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; s.sid&lt;br /&gt;&amp;nbsp; ),&lt;br /&gt;&amp;nbsp; ( select&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; name parameter, value&lt;br /&gt;&amp;nbsp; &amp;nbsp; from&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; sys.v_$parameter&lt;br /&gt;&amp;nbsp; &amp;nbsp; where&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; name = 'open_cursors'&lt;br /&gt;&amp;nbsp; )&lt;br /&gt;)&lt;br /&gt;/&lt;br /&gt;Parameter&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;value &amp;nbsp; &amp;nbsp;usage% &amp;nbsp; &amp;nbsp; &amp;nbsp;NEW_SETTING&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;session_cached_cursors&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; 20&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;100% &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;22&lt;br /&gt;open_cursors&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 900 &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;16%&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;900&lt;br /&gt;&lt;br /&gt;Questo è l'ouput dello script che ottengo in una istanza, si può facilmente&lt;br /&gt;vedere che il parametro open_cursor è stato sopravvalutato, perchè solo il&lt;br /&gt;16% ossia 144 cursori sono aperti, l'altro 84% rimane inutilizzato consumando però risorse.&lt;br /&gt;Il session_cached_cursors è utilizzato al 100% quindi si dovrebbe aumentare&lt;br /&gt;questo valore. Il campo new_setting viene valorizzato solo se il value dei&lt;br /&gt;parametri è maggiore o uguale a 100.&lt;br /&gt;In questo caso per esempio, si potrebbe pensare di diminuire open_cursors e di&lt;br /&gt;aumentare session_cached_cursors per un migliore bilanciamento delle risorse.&lt;br /&gt;Viene calcolato nel campo new_setting il nuovo valore che è praticamente il 10%.&lt;br /&gt;Il 10% è stato messo come test, si potrebbe modificare lo script facendo aggiungere&lt;br /&gt;anche il 50%, però per un tuning più equilibrato si deve procedere a piccoli passi,&lt;br /&gt;finchè l'utilizzo non è uguale o inferiore al 100%.&lt;br /&gt;Tutti i commenti sono benvenuti.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-360854975521270085?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/360854975521270085/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/06/tune-sessioncachedcursors-update.html#comment-form' title='13 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/360854975521270085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/360854975521270085'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/06/tune-sessioncachedcursors-update.html' title='TUNE SESSION_CACHED_CURSORS UPDATE'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-618837007874632897</id><published>2011-05-31T01:04:00.000-07:00</published><updated>2011-05-31T01:04:26.191-07:00</updated><title type='text'>SESSION_CACHED_CURSORS</title><content type='html'>Dopo aver raccolto i miei appunti sparsi in un pò di documenti vorrei riuscire a scrivere&lt;br /&gt;un articolo sulla parametro di SESSION_CACHED_CURSORS.&lt;br /&gt;&lt;br /&gt;Quando una applicazione chiude un cursore, Oracle imposta lo stato di questo cursore come "closeable". Tuttavia questo non sarà effettivamente chiuso finchè Oracle non avrà&lt;br /&gt;bisogno di spazio per aprirne un altro.&lt;br /&gt;Quindi sebbene un applicazione chiuda tutti i propri cursori bene, (fatto alquanto raro, dipende dallo sviluppatore) quest'ultimi rimarranno aperti consumando risorse.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Come punto di partenza per potere eseguire un'analisi eseguiamo uno Statepack del sistema, ci focalizziamo sul Execute to Parse %.&lt;br /&gt;Se il numero di parse calls si avvicina al numero di execute calls, allora questa percentuale si avvicinerà allo 0.Se il numero di execute calls aumenterà, la percentuale tenderà ad avvicinarsi al 100, il che significa che uno statement SQL il DB lo carica una volta sola (parse) e l'esegue molte volte (executes), ossia la situazione ottimale.&lt;br /&gt;&lt;br /&gt;Dobbiamo prendere questa percentuale come un indicatore, nel mio caso per esempio ho un Execute to Parse di 54,87 calcolato con la seguente formula:&lt;br /&gt;100*(executions - parses) / executions ossia &amp;nbsp;100 * (371,14 &amp;nbsp;- 167,48) / 371,14.&lt;br /&gt;&lt;br /&gt;Vediamo come sono impostati alcuni parametri nel DB:&lt;br /&gt;&lt;br /&gt;open_cursors=900&lt;br /&gt;cursor_sharing=Exact&lt;br /&gt;session_cached_cursors=20&lt;br /&gt;&lt;br /&gt;Adesso lanciamo&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;select a.value, s.username, s.sid, s.serial#&lt;br /&gt;from v$sesstat a, v$statname b, v$session s&lt;br /&gt;where a.statistic# = b.statistic# and s.sid=a.sid&lt;br /&gt;and b.name = 'opened cursors current'&lt;br /&gt;order by a.value desc;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;VALUE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;USERNAME &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SERIAL# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;---------------------- ------------------------------ ---------------------- ----------------------&lt;br /&gt;92 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; XXXXXX &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 189 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;47764 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;90 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AAAAAA &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 243 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4188 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;82 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BBBBBBBBB &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;196 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;35102 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;82 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CCCCCCCCC &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;142 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;41252 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;81 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DDDDDDDDD &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;257 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;29099 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;80 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EEEEEEEEE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 227 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2522 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;......&lt;br /&gt;&lt;br /&gt;possiamo notare che il SID 189 ha 92 open_cursor, quindi ben sotto al 900 impostato.&lt;br /&gt;&lt;br /&gt;Adesso verifichiamo se il parametro SESSION_CACHED_CURSORS potrà aiutarci.&lt;br /&gt;&lt;br /&gt;select cach.value cache_hits, prs.value all_parses,&lt;br /&gt;prs.value-cach.value sess_cur_cache_not_used&lt;br /&gt;from v$sesstat cach, v$sesstat prs, v$statname nm1, v$statname nm2&lt;br /&gt;where cach.statistic# = nm1.statistic# &lt;br /&gt;and nm1.name = 'session cursor cache hits'&lt;br /&gt;and prs.statistic#=nm2.statistic#&lt;br /&gt;and nm2.name= 'parse count (total)'&lt;br /&gt;and cach.sid= &amp;amp;sid and prs.sid= cach.sid ;&lt;br /&gt;&lt;br /&gt;SID=189&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CACHE_HITS &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ALL_PARSES &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SESS_CUR_CACHE_NOT_USED&lt;br /&gt;---------------------- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ---------------------- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -----------------------&lt;br /&gt;5460 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5680 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 220 &amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Il valore "session cursor cache hits" è il numero di volte che uno statemet SQL viene trovato in session cursor cache, quindi non ha bisogno di essere reparsed, adesso se raffrontiamo i valori "parse count (total)" meno "session cursor cache hits" otteniamo "parse count (total)" vedremo il numero di parse di cui abbiamo bisogno.&lt;br /&gt;&lt;br /&gt;Procediamo con&lt;br /&gt;&lt;br /&gt;select a.value curr_cached, p.value max_cached, s.username, s.sid, s.serial#&lt;br /&gt;from v$sesstat a, v$statname b, v$session s, v$parameter2 p&lt;br /&gt;where a.statistic# = b.statistic# &amp;nbsp;and s.sid=a.sid and a.sid=&amp;amp;sid&lt;br /&gt;and p.name='session_cached_cursors'&lt;br /&gt;and b.name = 'session cursor cache count' ;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;SID=189&lt;br /&gt;&lt;br /&gt;CURR_CACHE&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;MAX_CACHED&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;USERNAME &amp;nbsp;&amp;nbsp;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;SID &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;SERIAL#&lt;br /&gt;--------------&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;--------------&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;--------------&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;------ &amp;nbsp;&amp;nbsp;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;--------------&lt;br /&gt;20&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;XXX&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;189&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;47764&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Se session cursor cache count ha raggiunto il valore massimo e session_cursor_cache_hits è più basso comparato con all parses, potrebbe nascere il sospetto che l'applicazione in questo caso riesegue gli stessi SQL in modo ripetitivo, potremo quindi scegliere di aumentare SESSION_CURSOR_CACHE per aiutarci con latch contention.&lt;br /&gt;Tuttavia se l'applicazione non riesegue gli stessi SQL, quindi session_cursor_cache_hits &amp;nbsp;sarà più basso dei parses e il session cursor cache raggiunge il valore massimo, anche aumentando il tale valore non si otterranno i risultati sperati, questo significa che l'applicazione utilizzerà SQL non condivisi.&lt;br /&gt;&lt;br /&gt;Ovviamente questo è un esempio della sessione con il sid 189.&lt;br /&gt;&lt;br /&gt;In questo caso si potrebbe inizialmente impostare il valore session_cached_cursors a 100 per poter arrivare ad un buon compromesso.&lt;br /&gt;Questo articolo ha lo scopo di analizzare e di gestire al meglio il parametro SESSION_CURSOR_CACHE tutti i commenti sono benvenuti.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-618837007874632897?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/618837007874632897/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/05/sessioncachedcursors.html#comment-form' title='4 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/618837007874632897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/618837007874632897'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/05/sessioncachedcursors.html' title='SESSION_CACHED_CURSORS'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-207673696836880505</id><published>2011-05-03T05:29:00.000-07:00</published><updated>2011-05-03T05:32:59.447-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>WARNING: inbound connection timed out (ORA-3136)</title><content type='html'>Nel log file di alert del DB Oracle è possibile trovare questa segnalazione:&lt;br /&gt;&lt;br /&gt;WARNING: inbound connection timed out (ORA-3136)&lt;br /&gt;&lt;br /&gt;Significa che un tentativo di connessione è stato fatto, ma la sessione di autenticazione non è stata fornita prima del parametro impostato in SQLNET.INBOUND_CONNECT_TIMEOUT.&lt;br /&gt;Questo parametro si trova nel file sqlnet.ora in $ORACLE_HOME/network/admin/ ed è impostato a 60 secondi.&lt;br /&gt;&lt;br /&gt;La segnalazione può essere trascurata se si verifica sporadicamente ma se dovesse essere una costante quotidiana l'Oracle doc prevede 2 action per questa anomalia:&lt;br /&gt;&lt;br /&gt;1) Check SQL*NET and RDBMS log for trace of suspicious connections.&lt;br /&gt;2) Configure SQL*NET with a proper inbound connect timeout value if necessary.&lt;br /&gt;&lt;br /&gt;Bisogna quindi analizzare bene la situazione soprattutto se si sospetta qualche connessione strana come al punto 1 prima ovviamente di apporre qualsiasi modifica.&lt;br /&gt;Tuttavia si può procedere a impostare il parametro SQLNET.INBOUND_CONNECT_TIMEOUT con un valore appropriato nel file $ORACLE_HOME/network/admin/sqlnet.ora come richiesto nel punto 2.&lt;br /&gt;&lt;br /&gt;Ma se non il file non ci fosse nel percorso indicato e ci fosse solo il tnsnames.ora?&lt;br /&gt;Il listener in questo caso ci darebbe un grosso aiuto con:&lt;br /&gt;&lt;br /&gt;$ lsnrctl&lt;br /&gt;&lt;br /&gt;LSNRCTL for Solaris: Version 10.2.0.5.0 - Production xxxxxxxxxxxxxxx&lt;br /&gt;&lt;br /&gt;Copyright (c) 1991, 2010, Oracle. &amp;nbsp;All rights reserved.&lt;br /&gt;&lt;br /&gt;Welcome to LSNRCTL, type "help" for information.&lt;br /&gt;&lt;br /&gt;LSNRCTL&amp;gt; set help&lt;br /&gt;The following operations are available after set&lt;br /&gt;An asterisk (*) denotes a modifier or extended command:&lt;br /&gt;&lt;br /&gt;password &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rawmode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;displaymode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trc_file &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;trc_directory &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trc_level &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;log_file &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log_directory &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;log_status &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;current_listener &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;inbound_connect_timeout &amp;nbsp; &amp;nbsp; startup_waittime &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;save_config_on_stop &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dynamic_registration &lt;br /&gt;&lt;br /&gt;LSNRCTL&amp;gt;set inbound_connect_timeout 3 (per esempio)&lt;br /&gt;&lt;br /&gt;Impostando per noi il nuovo parametro.....&lt;br /&gt;&lt;br /&gt;Senza questo parametro, una connessione client/server può rimanere aperta all'infinito senza autenticazione. Le connessioni senza autenticazione possono introdurre possibili attacchi di tipo denial-of-service, per cui dei client malintenzionati possono tentare di tempestare il server DB con richieste di connessioni che ovviamente consumano risorse.&lt;br /&gt;&lt;br /&gt;Ci sono 2 link molto utili tratti dai documenti Oracle che spiegano molto bene i vari scenari, anche perchè per una protezione totale è posibile anche impostare un secondo parametro INBOUND_CONNECT_TIMEOUT_listener_name nel file listener.ora.&lt;br /&gt;&lt;br /&gt;Bisogna fare attenzione perchè il parametro &amp;nbsp;SQLNET.INBOUND_CONNECT_TIMEOUT non richiede riavvio del DB visto che viene letto quando una connessione viene richiesta mentre il INBOUND_CONNECT_TIMEOUT_listener_name viene letto quando viene avviato il servizio listener quindi per poter attivare il parametro con i nuovi settaggi bisogna riavviarlo.&lt;br /&gt;&lt;br /&gt;I settaggi dei parametri di networking di Oracle sono fondamentali per costruire delle connessioni client/server affidabili e performanti, tuttavia certe volte questi &amp;nbsp;vengono sottovalutati creando non pochi problemi.&lt;br /&gt;&lt;br /&gt;Di seguito i links della documentazione Oracle e un doc id di Metalink (per chi ha accesso):&lt;br /&gt;&lt;br /&gt;http://download.oracle.com/docs/cd/B19306_01/network.102/b14213/listener.htm#sthref833&lt;br /&gt;http://download.oracle.com/docs/cd/B19306_01/network.102/b14213/sqlnet.htm#sthref481&lt;br /&gt;&lt;br /&gt;Metalink doc Id #465043.1&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-207673696836880505?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/207673696836880505/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/05/warning-inbound-connection-timed-out.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/207673696836880505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/207673696836880505'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/05/warning-inbound-connection-timed-out.html' title='WARNING: inbound connection timed out (ORA-3136)'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-3535158197795356032</id><published>2011-04-29T08:51:00.000-07:00</published><updated>2011-04-29T08:53:08.867-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Failed to shutdown DBConsole Gracefully</title><content type='html'>Oggi tratterò un argomento importante che riguarda Enterprise Manager Console nella versione 10G.&lt;br /&gt;Stamattina dopo un &lt;span style="font-family: inherit;"&gt;riavvio&lt;/span&gt; del server di produzione non riuscivo più ad entrare nella console di EM.&lt;br /&gt;Mi sono collegato al server e ho digitato:&lt;br /&gt;&lt;br /&gt;&lt;span id="internal-source-marker_0.01280012697574251" style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;$ emctl stop dbconsole&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0 &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Copyright (c) 1996, 2010 Oracle Corporation. &amp;nbsp;All rights reserved.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;https://jdesun:1158/em/console/aboutApplication&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Stopping Oracle Enterprise Manager 10g Database Control ... &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;--- Failed to shutdown DBConsole Gracefully ---&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Subito sono rimasto un pò stupito, sono andato a vedermi il log nel file emagent.trc nel path /oracle/app/oracle/product/10.2.0/..../sysman/log:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span id="internal-source-marker_0.01280012697574251" style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;2011-04-29  14:23:30 Thread-1049 ERROR pingManager: nmepm_pingReposURL: Cannot  connect to https://jdesun:1158/em/upload/: retStatus=-1&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;2011-04-29 14:23:30 Thread-1049 ERROR ssl: nzos_Handshake failed, ret=29024&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;2011-04-29 14:23:30 Thread-1049 ERROR http: 257: Unable to initialize ssl connection with server, aborting connection attempt&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;2011-04-29  14:23:30 Thread-1049 ERROR pingManager: nmepm_pingReposURL: Cannot  connect to https://jdesun:1158/em/upload/: retStatus=-1&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Ho notato in questa sezione la segnalazione&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;u&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Thread-1049 ERROR http: 257: Unable to initialize ssl connection with server, aborting connection attempt&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Si tratta di un errore http riguardante la connessione SSL con il server.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Con il comando &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ps -fe | grep oracle|more&lt;/span&gt; ho verificato se c'era qualcosa rimasto in "hang"&amp;nbsp; che potesse bloccare tutte le nuove connessioni per poter gestire EM console.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span id="internal-source-marker_0.01280012697574251" style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;oracle 24044 &amp;nbsp;&amp;nbsp;&amp;nbsp;56 &amp;nbsp;&amp;nbsp;0 14:31:07 pts/1 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0:05 /oracle/app/oracle/product/10.2.0/jdk/bin/java -server -Xmx256M -XX:MaxPermSize&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;oracle 24761 24382 &amp;nbsp;&amp;nbsp;0 14:35:54 pts/1 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0:01 /oracle/app/oracle/product/10.2.0/bin/emagent&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;in effetti ho trovato due processi interessanti e che potrebbero essere i responsabili di questo errore.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Con il comando kill li ho terminati. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Ho riprovato quindi a rilanciare:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span id="internal-source-marker_0.01280012697574251" style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;$ emctl stop dbconsole&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0 &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Copyright (c) 1996, 2010 Oracle Corporation. &amp;nbsp;All rights reserved.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;https://jdesun:1158/em/console/aboutApplication&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Stopping Oracle Enterprise Manager 10g Database Control ... &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; ... &amp;nbsp;Stopped.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;e questa volta senza problemi ;-)&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Vedendo che si trattava di un errore SSL ho deciso di rigenerare un nuovo certificato di connessione per il server con l'apposito comando:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span id="internal-source-marker_0.01280012697574251" style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;$emctl secure dbconsole&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0 &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Copyright (c) 1996, 2010 Oracle Corporation. &amp;nbsp;All rights reserved.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;https://jdesun:1158/em/console/aboutApplication&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Enter Enterprise Manager Root password : &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Enter a Hostname for this OMS : server_name&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;DBCONSOLE already stopped... &amp;nbsp;&amp;nbsp;Done.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Agent is already stopped... &amp;nbsp;&amp;nbsp;Done.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Securing dbconsole... &amp;nbsp;&amp;nbsp;Started.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Checking Repository... &amp;nbsp;&amp;nbsp;Done.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Checking Em Key... &amp;nbsp;&amp;nbsp;Done.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Checking Repository for an existing Enterprise Manager Root Key... &amp;nbsp;&amp;nbsp;Done.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Fetching Root Certificate from the Repository... &amp;nbsp;&amp;nbsp;Done.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Updating HTTPS port in emoms.properties file... &amp;nbsp;&amp;nbsp;Done.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Generating Java Keystore... &amp;nbsp;&amp;nbsp;Done.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Securing OMS ... &amp;nbsp;&amp;nbsp;Done.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Generating Oracle Wallet Password for Agent.... &amp;nbsp;&amp;nbsp;Done.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Generating wallet for Agent ... &amp;nbsp;&amp;nbsp;&amp;nbsp;Done.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Copying the wallet for agent use... &amp;nbsp;&amp;nbsp;&amp;nbsp;Done.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Storing agent key in repository... &amp;nbsp;&amp;nbsp;Done.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Storing agent key for agent ... &amp;nbsp;&amp;nbsp;Done.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Configuring Agent... &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Configuring Agent for HTTPS in DBCONSOLE mode... &amp;nbsp;&amp;nbsp;Done.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;EMD_URL set in /oracle/app/oracle/product/10.2.0/...../sysman/config/emd.properties&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;Done.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Configuring Key store.. &amp;nbsp;&amp;nbsp;Done.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Securing dbconsole... &amp;nbsp;&amp;nbsp;Sucessful.&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Il nuovo certificato è stato creato con successo allora perchè non provare subito.....&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span id="internal-source-marker_0.01280012697574251" style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;$ emctl start dbconsole&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0 &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Copyright (c) 1996, 2010 Oracle Corporation. &amp;nbsp;All rights reserved.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;https://jdesun:1158/em/console/aboutApplication&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Starting Oracle Enterprise Manager 10g Database Control ........................... started. &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Logs are generated in directory /oracle/app/oracle/product/10.2.0/...../sysman/log &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;Wow...adesso tutto è ripartito ;-)...&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;Dovrò aspettarmi fra un paio di mesi lo stesso errore ??&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;Probabilmente sì,&amp;nbsp; ma per adesso tutto funziona....&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;:-) &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Courier New; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-3535158197795356032?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/3535158197795356032/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/04/failed-to-shutdown-dbconsole-gracefully.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/3535158197795356032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/3535158197795356032'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/04/failed-to-shutdown-dbconsole-gracefully.html' title='Failed to shutdown DBConsole Gracefully'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-8216279428496128227</id><published>2011-04-19T02:11:00.000-07:00</published><updated>2011-04-19T08:00:22.328-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Ubuntu Party</title><content type='html'>Nelle giornate del 30 Aprile e 1 Maggio 2011 si svolgerà a Schio in provincia di Vicenza,l'Ubuntu Party.&lt;br /&gt;Sono giornate dedicate alla presentazione e divulgazione del concetto di software libero, oltre che ovviamente dimostrazioni sulle potenzialità di Ubuntu, tra l'altro è il weekend sucessivo dopo il rilascio della nuova release Natty Narval, un motivo in più per non perdere l'evento.&lt;br /&gt;Ci saranno numerosi talk, vi allego il&lt;br /&gt;link per maggiori info&amp;nbsp;&lt;a href="http://www.ubuntu-party.it/"&gt;ubuntu party&lt;/a&gt;&lt;br /&gt;Un appuntamento da non perdere....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-8216279428496128227?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/8216279428496128227/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/04/ubuntu-party.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/8216279428496128227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/8216279428496128227'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/04/ubuntu-party.html' title='Ubuntu Party'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-1030974571615614468</id><published>2011-04-08T03:48:00.000-07:00</published><updated>2011-04-11T00:56:38.949-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Oracle Statistics.....</title><content type='html'>Oggi tratterò un argomento di particolare interesse in ambito DBA:raccolta delle statistiche di un DB.&lt;br /&gt;La raccolta delle statistiche è un'operazione di vitale importantanza per tutto il database e serve per poter dare al CBO (Cost Based Optimizer)&lt;br /&gt;tutte le informazioni per poter eseguire al meglio, ossia al costo più basso tutte le operazioni del DB.&lt;br /&gt;Avere le statistiche sempre aggiornate è molto importante, tuttavia la frequenza di questa operazione è molto soggettiva, può essere una&lt;br /&gt;volta alla settimana, una al mese oppure anche quotidianamente in relazione anche alla dimensione del database.&lt;br /&gt;&lt;br /&gt;La procedura corretta imporrebbe di esportare le vecchie statistiche prima di prenderne delle nuove questo è molto&lt;br /&gt;importante per prevenire possibili variazioni dei piani di esecuzioni degli statement SQL, in quanto il costo calcolato potrebbe subire delle modifiche e&lt;br /&gt;quindi indurre al CBO per esempio di utilizzare un indice al posto di un altro e non solo, aumentando così il costo e la durata dello statement.&lt;br /&gt;&lt;br /&gt;Caso tipico il giorno prima un batch, una query o un altro statement SQL, impiega magari 1 min e il giorno&lt;br /&gt;successivo (dopo aver aggiornato le statistiche) 5 min, avendo le vecchie statistiche esportate è possibile ripristinarle&lt;br /&gt;&lt;br /&gt;Tuttavia questa operazione va seriamente valutata.&lt;br /&gt;&lt;br /&gt;Nel tempo ho cercato di rendere più facile la consultazione di questa operazione ossia ho cercato di rispondere principalmente a queste domande:&lt;br /&gt;1) Quanto impiega a raccogliere le statistiche (magari anche per SCHEMA) ?&lt;br /&gt;2) Come faccio a verificare il buon esito dell'operazione?&lt;br /&gt;3) Posso creare un file di log oppure altro per tenere uno storico dell'operazione?&lt;br /&gt;&lt;br /&gt;Ho creato così nel db un Package,una Procedure e una sequence che vanno a scrivere in un tabella del DB una serie di informazioni molto utili in modo tale che&lt;br /&gt;anche un utente, non DBA con accessi ridotti, può andare a consultare i risultati, oltre a centralizzare per chi gestisce più di un DB questo genere&lt;br /&gt;di informazioni&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Cominciamo dal package con relativo body:&lt;br /&gt;&lt;br /&gt;create or replace&lt;br /&gt;PACKAGE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"STATISTICS_LOG" as&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;procedure log(&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;p_APP&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;IN&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;varchar2,&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;p_MSG&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;IN&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;varchar2,&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;p_CODE&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;IN&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;varchar2 &lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;:= '',&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;p_MOD&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;IN&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;varchar2 &lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;:= '',&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;p_SECTION&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;IN&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;varchar2 &lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;:= '');&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;create or replace&lt;br /&gt;package body STATISTICS_LOG as&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;procedure log(&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;p_APP&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;IN&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;varchar2,&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;p_MSG&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;IN&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;varchar2,&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;p_CODE&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;IN&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;varchar2 &lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;:= '',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;p_MOD&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;IN&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;varchar2 &lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;:= '',&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;p_SECTION&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;IN&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;varchar2 &lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;:= '')&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;is&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;PRAGMA AUTONOMOUS_TRANSACTION;&lt;br /&gt;&lt;br /&gt;begin&lt;br /&gt;&lt;br /&gt;insert into HSTATISTICS_TAB (&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;ID,&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;APP_KEY,&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;MOD_KEY,&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;SECTION_KEY,&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;MSG_CODE,&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;MSG_TEXT,&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;TIME_STAMP)&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;select&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;seq_stat_id.nextval,&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;p_APP,&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;p_MOD,&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;p_SECTION,&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;p_CODE,&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;p_MSG,&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;sysdate&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;from&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;dual;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;commit;&lt;br /&gt;&lt;br /&gt;exception&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;when others then&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;commit;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;raise;&lt;br /&gt;end log;&lt;br /&gt;&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;e la sequence relativa:&lt;br /&gt;&lt;br /&gt;CREATE SEQUENCE "SEQ_STAT_ID" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 15859 CACHE 20 NOORDER NOCYCLE ;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Con questo package imposto delle variabili che richiamerò durante la procedura di raccolta statistiche per andare ad inserirle in un tabella HSTATISTICS_TAB che&lt;br /&gt;creo così:&lt;br /&gt;&lt;br /&gt;CREATE TABLE HSTATISTICS_TAB&lt;br /&gt;&amp;nbsp;&amp;nbsp;(&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;"ID" &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NUMBER,&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;"APP_KEY" &amp;nbsp; &amp;nbsp; VARCHAR2(255 BYTE) NOT NULL ENABLE,&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;"MOD_KEY" &amp;nbsp;VARCHAR2(255 BYTE),&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;"SECTION_KEY" VARCHAR2(255 BYTE),&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;"MSG_CODE" &amp;nbsp; &amp;nbsp;NUMBER,&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;"MSG_TEXT" &amp;nbsp; &amp;nbsp;VARCHAR2(4000 BYTE) NOT NULL ENABLE,&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;"TIME_STAMP" &amp;nbsp;DATE NOT NULL ENABLE&lt;br /&gt;&amp;nbsp;&amp;nbsp;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;La sequence la utilizzo per generare un ID progressivo.&lt;br /&gt;&lt;br /&gt;A questo punto non ci resta di scrivere &amp;nbsp;la procedure che esegue la raccolta delle statistiche:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;create or replace&lt;br /&gt;procedure analyze_job is&lt;br /&gt;v_owner &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;varchar2(10);&lt;br /&gt;&lt;br /&gt;begin&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; select &amp;nbsp;DISTINCT owner into v_owner from all_all_tables&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; where owner='123'&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; GROUP BY owner;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dbms_stats.gather_schema_stats (ownname =&amp;gt; '123',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;estimate_percent=&amp;gt;dbms_stats.auto_sample_size,&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;method_opt =&amp;gt; 'FOR ALL INDEXED COLUMNS SIZE 1',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; granularity =&amp;gt; 'ALL',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cascade =&amp;gt; TRUE,&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; degree =&amp;gt; 7);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;STATISTICS_LOG.log(p_APP &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Your app name',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p_MOD &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;'DBA',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p_SECTION &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;'ANALYZE',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p_MSG &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Analyzing tables/indexes '|| to_char(v_owner)||' ...');&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;STATISTICS_LOG.log(p_APP &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Your app name',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p_MOD &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;'DBA',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p_SECTION &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;'ANALYZE',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p_MSG &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;'End Daily Analyze: Successfully executed '|| to_char(v_owner)||'!');&lt;br /&gt;&lt;br /&gt;exception&lt;br /&gt;when others then&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;STATISTICS_LOG.log( p_APP &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Your app name',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p_MOD &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;'DBA',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p_SECTION &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;'ANALYZE',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p_CODE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;SQLCODE,&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p_MSG &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Abort Daily Analyze: Error "' || SQLERRM || '" ocured '|| to_char(v_owner)||'!');&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;end ANALYZE_JOB;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Una volta eseguita, scriverà nella tabella HSTATISTICS_TAB delle informazioni molti utili vediamo adesso se sono riuscito a&lt;br /&gt;rispondere alle domande precedenti:&lt;br /&gt;&lt;br /&gt;1)Attraverso la colonna time_stamp è possibile verificare la durata dell'operazione anche per singolo SCHEMA.&lt;br /&gt;2)Attraverso la colonna MSG_TEXT e MSG_CODE posso verificarne l'esito, in caso di errore inserirà nella colonna MSG_CODE un ORA:.&lt;br /&gt;3)Creando la tabella HSTATISTICS_TAB posso far consultare anche un utente non DBA, con appositi permessi e soprattutto tenere&lt;br /&gt;uno storico per la raccolta delle statistiche.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-1030974571615614468?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/1030974571615614468/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/04/statistics.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/1030974571615614468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/1030974571615614468'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/04/statistics.html' title='Oracle Statistics.....'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-5958987845645001012</id><published>2011-03-25T06:32:00.000-07:00</published><updated>2011-03-30T13:37:51.702-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Complex_view_merging - DataPump</title><content type='html'>Un paio di giorni fa mi sono imbattuto in un bug Oracle precisamente il 5879865 presente nel mia 10.2.0.3.&lt;br /&gt;Dopo delle ricerche in internet ho pensato di sfruttare il Metalink e in effetti il bug è ben noto e viene presentata la risoluzione finale applicando la patch oppure un accrocchio (workaround) finchè la patch non fosse uscita, questo documento veniva scritto nel Gennaio 2008 e modificato a settembre 2010.&lt;br /&gt;Ad oggi ho verificato, &amp;nbsp;la patch è stato rilasciata ma non ovviamente per tutti gli OS, infatti per Windows non c'è ancora.&lt;br /&gt;Allora sono intervenuto come descritto nel workaround.&lt;br /&gt;In pratica l'errore che si verificava era questo usando DataPump nel mio caso:&lt;br /&gt;&lt;br /&gt;ORA-39014: One or more workers have prematurely exited.&lt;br /&gt;ORA-39029: worker 1 with process name "DW01" prematurely terminated&lt;br /&gt;ORA-31672: Worker process DW01 died unexpectedly.&lt;br /&gt;The alert log shows a core dump:&lt;br /&gt;ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [_evaopn2+578]&lt;br /&gt;&lt;br /&gt;Il problema è che se una sub-query utilizza l'EXISTS e va ad intterogare una vista non-mergeable si verifica questo errore.&lt;br /&gt;&lt;br /&gt;La soluzione proposta in assenza di patch è quella di modificare principalmente 3 parametri:&lt;br /&gt;&lt;br /&gt;_complex_view_merging&lt;br /&gt;event&lt;br /&gt;_optimizer_cost_based_transformation&lt;br /&gt;&lt;br /&gt;in&lt;br /&gt;&lt;br /&gt;alter system set event= '38066 trace name context forever, level 2' scope=spfile;&lt;br /&gt;alter system set "_complex_view_merging" = false scope=spfile;&lt;br /&gt;alter system set "_optimizer_cost_based_transformation"=off scope=spfile;&lt;br /&gt;&lt;br /&gt;Ho preferito farlo utilizzando anche scope=spfile anche se dopo l'istanza andava riavviata, tuttavia si poteva fare anche a livello solo di system eliminando il parametro scope.&lt;br /&gt;&lt;br /&gt;In effetti dopo questa modifica il Data Pump ha ripreso a funzionare.&lt;br /&gt;&lt;br /&gt;L'unica cosa che mi stupisce è che in un altro database sempre Oracle 10.2.0.3 però nella versione Enterprise, &amp;nbsp;questo errore non è mai avvenuto.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-5958987845645001012?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/5958987845645001012/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/03/complexviewmerging-datapump.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/5958987845645001012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/5958987845645001012'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/03/complexviewmerging-datapump.html' title='Complex_view_merging - DataPump'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-7143308811004697487</id><published>2011-03-16T07:13:00.000-07:00</published><updated>2011-03-16T07:17:17.496-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>ASH Point</title><content type='html'>In oracle 10G OEM Grid&amp;nbsp; è stata introdotta una nuova funzionalità a livello grafico chiamata ASH.&lt;br /&gt;Sinceramente sono stato sempre affascinato da questa nuova feature, perchè permette di controllare quello che gli utenti eseguono in tempo reale nel database.&lt;br /&gt;Oltre ad avere una funzione ovviamente di Tuning, in caso di bottleneck è uno dei primi check che ogni DBA dovrebbe eseguire.&lt;br /&gt;&lt;br /&gt;Tendo a sottilineare che non tutti i problemi si possono identificare tramite ASH ma è un primo passo per verificare in tempo reale cosa sta accadendo all'interno del DB.&lt;br /&gt;&lt;br /&gt;Sapere che statement sta eseguendo un utente aiuta, e non poco, a scoprire che cosa non funziona in una singola istruzione SQL.&lt;br /&gt;Caso comune: squilla il telefono e un utente domanda come mai l'operazione che sta eseguendo ci impiega un "troppo" tempo o per utilizzare un'espressione più appropriata, un tempo maggiore diverso dalle aspettative o dallo standard.&lt;br /&gt;Lasciando un attimo da parte la infrastruttura di rete e le relazioni tra client server, anch'esse molto importanti per determinare la causa, ci focalizziamo all'interno del db.&lt;br /&gt;&lt;br /&gt;Collegandosi con OEM è possibile verificare che cosa sta facendo l'utente in questione ossia lo statement SQL, gli eventi di attesa e tanto altro ancora.&lt;br /&gt;Tutto molto bello con grafici e altro ovviamente stiamo utilizzando un'interfaccia grafica.&lt;br /&gt;Ma se volessi eseguire tutto ciò con un script sql sarebbe possibile?&lt;br /&gt;Ovviamente sì, ci sono molti script che fanno questo tipo di analisi ma io per comodità e per capire di più dell'argomento ne ho creato uno.&lt;br /&gt;&lt;br /&gt;select V$SQL_PLAN.child_number,&lt;br /&gt;V$SQL_PLAN.OPERATION,OBJECT_NAME,OPTIONS, CARDINALITY as ROWS_,(bytes)/1024 as KByte,COST,(V$SQL_PLAN.TIME) as TIME_SEC, CPU_COST,io_cost,V$SQL_PLAN.PLAN_HASH_VALUE,&lt;br /&gt;sid,serial#,status,osuser,machine, terminal, program,sql_text,executions,first_load_time,COMMAND_TYPE,state,OPTIMIZER_MODE,OPTIMIZER_COST, event,buffer_gets, &lt;br /&gt;logon_time, blocking_session_status from v$session,v$sql,V$SQL_PLAN&lt;br /&gt;where v$sql.sql_id = V$session.sql_id&lt;br /&gt;and v$sql.CHILD_NUMBER=v$session.sql_child_number&lt;br /&gt;and V$SQL_PLAN.SQL_ID = V$SQL.SQL_ID&lt;br /&gt;order by SID;&lt;br /&gt;&lt;br /&gt;Con questo script è possibile identificare tutto ciò che un utente sta facendo all'interno del DB. Inoltre ho aggiunto altri funzionalità per esempio l'execution plan di uno statement con i relativi costi, in base all'optimizer, di CPU e IO e il numero di righe che restituisce.&lt;br /&gt;Lo script mostra inoltre l'event di attesa ed eventuali lock oltre il sid e tante informazioni utili.&lt;br /&gt;&lt;br /&gt;Per un uso corretto si potrebbe aggiungere anche&amp;nbsp; status &amp;lt;&amp;gt; 'INACTIVE' per vedere solo quelli attivi ed eventualmente bloccati o bloccanti e poi magari inserire un filtro in machine, terminal e program per scartare alcuni server, client o addirittura applicativi.&lt;br /&gt;&lt;br /&gt;Con questo script si riesce ad avere tutte le informazioni nel caso di una telefonata di uno o più utenti, per vericare dove quello statement SQL rimane in HANG.&lt;br /&gt;Poi nel caso si possono eseguire controlli diversi con altri strumenti tipo AWR, ADDM ecc, che collezionano una serie di statistiche in una determinata forbice di tempo.&lt;br /&gt;&lt;br /&gt;Inoltre aggiungo degli utilissimi link al sito di Kyle Hailey vero fautore dell'ASH per comprenderne meglio le potenzialità.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ashmasters.com/"&gt;http://ashmasters.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://sites.google.com/site/oraclemonitor/kyle-hailey"&gt;http://sites.google.com/site/oraclemonitor/kyle-hailey&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-7143308811004697487?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/7143308811004697487/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/03/ash-point.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/7143308811004697487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/7143308811004697487'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/03/ash-point.html' title='ASH Point'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-1504696826035726749</id><published>2011-03-10T03:16:00.000-08:00</published><updated>2011-03-10T03:16:17.659-08:00</updated><title type='text'>Script Maintenance e Tuning per OS Solaris - Oracle</title><content type='html'>Oggi vorrei scrivere un post descrivendo alcuni miei script che sono molto utili quando si deve effettuare del tuning di un DB Oracle in ambiente OS Solaris.&lt;br /&gt;Quando si parla di tuning di sistema è sempre meglio suddividere l'analisi in 2 punti:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;OS che in che questo post si parlerà di Solaris&lt;/li&gt;&lt;li&gt;DB Oracle&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Questo articolo si sviluppa intorno al primo punto, magari in un secondo momento si potrà descrivere un approccio di tuning (almeno il mio) per il secondo.&lt;/div&gt;&lt;div&gt;Il primo script chiamato mem.sh esegue un controllo della memoria attraverso il comando&amp;nbsp;iostat messo in loop con la pecurialità, che accompagna tra l'altro tutti gli script successivi di mandare, una mail qualora si verifichino delle condizioni, in questo caso quanto la CPU Idle è inferiore a 5%.&lt;/div&gt;&lt;div&gt;Questo significa che il sistema sta lavorando a pieno regime e quindi è necessario eseguire un check per verificare che processi stiano utilizzando la cpu correttamente.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;mem.sh&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;MULTI_INSTANCE=0&lt;/div&gt;&lt;div&gt;set +u&lt;/div&gt;&lt;div&gt;USER=$(whoami)&lt;/div&gt;&lt;div&gt;LOGFILE="/tmp/LogMEM"&lt;/div&gt;&lt;div&gt;HOST=$(hostname)&lt;/div&gt;&lt;div&gt;OSTYPE=$(uname)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;for i in 1 2 3 4 5 6 7 8 9 10 11 12&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;do&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MEM=" "&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MEM="$(iostat -c 5 8 |sort -nr | head -n1 | awk '{print $4}')$MEM"&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if [ "$MEM" -le 5 &amp;nbsp;] ; then&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;echo " \n$(date) La CPU idle del sistema è $MEM%" . ATTENZIONE &amp;gt;&amp;gt; $LOGFILE&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iostat -c 5 8 |sort -nr | head -n1 | awk '{print $4}' &amp;gt; /tmp/log_mem&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mailx -s "La CPU idle del sistema è $MEM%. ATTENZIONE " mail@domain.com&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;echo "\n$(date) La CPU idle del sistema è $MEM%" &amp;gt;&amp;gt; $LOGFILE&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;fi&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sleep 285&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;done&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Il secondo script si chiama&amp;nbsp;statcpu.sh, molto simile al primo ma con la caratteristica di inserire i dati campionati sempre con il comando iostat in loop, in una tabella Oracle.&lt;/div&gt;&lt;div&gt;Questo potrebbe essere utile in caso di analisi e statistiche in un periodo di tempo medio/lungo per poterli poi eleborare e presentare con grafici ed altro.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;statcpu.sh&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;SERVER_NAME=`uname -a|awk '{print $2}'`&lt;/div&gt;&lt;div&gt;typeset -u SERVER_NAME&lt;/div&gt;&lt;div&gt;export SERVER_NAME&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;for i in 1 2 3 4 5 6 7 8 9 10 11 12&lt;/div&gt;&lt;div&gt;do&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; CPUUSR=" " &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; CPUIDLE=" "&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; CPUSYS=" "&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; CPUWAY=" "&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; CPUUSR="$(iostat -c 1 2 |sort -nr | head -n1 | awk '{print $1}')$CPUUSR"&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; CPUSYS="$(iostat -c 1 2 |sort -nr | head -n1 | awk '{print $2}')$CPUSYS"&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; CPUWAY="$(iostat -c 1 2 |sort -nr | head -n1 | awk '{print $3}')$CPUWAY"&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; CPUIDLE="$(iostat -c 1 2 |sort -nr | head -n1 | awk '{print $4}')$CPUIDLE"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;$ORACLE_HOME/bin/sqlplus -s &amp;nbsp;scott/tiger &amp;lt;&amp;lt;EOF&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;insert into cpu_stat values (&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SYSDATE,&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $CPUUSR,&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $CPUSYS,&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $CPUWAY,&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $CPUIDLE,&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '$SERVER_NAME');&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;commit; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;EXIT&lt;/div&gt;&lt;div&gt;EOF&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sleep 285&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; done&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Il terzo e ultimo script serve per controllare sempre in tempo reale con il comando ps quali processi che superano un certa soglia di cpu in questo caso il 15% .&lt;/div&gt;&lt;div&gt;Questo potrebbe essere utile se stiamo effettuando un tuning attivo.&lt;/div&gt;&lt;div&gt;Quando la condizione si verifica, cpu per un processo cha va oltre il 15% il sistema manda un mail.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;cpu_new.sh&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;MULTI_INSTANCE=0&lt;/div&gt;&lt;div&gt;set +u&lt;/div&gt;&lt;div&gt;USER=$(whoami)&lt;/div&gt;&lt;div&gt;LOGFILE="/tmp/LogCPU"&lt;/div&gt;&lt;div&gt;HOST=$(hostname)&lt;/div&gt;&lt;div&gt;OSTYPE=$(uname)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;for i in 1 2 3 4 5 6 7 8 9 10 11 12&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;do&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CPU=" "&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CPU="$(ps -efo pcpu,pid,args | sort -nr | head -n 1|awk '{print $1}')$CPU"&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if [ "$CPU" -ge 15.0 &amp;nbsp;] ; then&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;echo " \n$(date) Trovato processo maggiore del 15% di CPU. Massimo utilizzo di CPU è di $CPU%" &amp;gt;&amp;gt; $LOGFILE&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ps -efo pcpu,pid,args | sort -nr | head -n 1 &amp;gt; /tmp/log&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ps -efo pcpu,pid,args | sort -nr | head -n 1 &amp;gt;&amp;gt; $LOGFILE&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mailx -s " Trovato processo maggiore di 15% di CPU in `uname -n`. Massimo utilizzo di CPU è di $CPU% " nome@domain.com &amp;lt; /tmp/log&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;echo "\n$(date) Non è stato trovato nussun processo maggiore del 15% di CPU. Massimo utilizzo di CPU è di $CPU%" &amp;gt;&amp;gt; $LOGFILE&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ps -efo pcpu,pid,args | sort -nr | head -n 1 &amp;gt;&amp;gt; $LOGFILE&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;fi&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sleep 285&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;done&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Tutti questi script, in realtà ne ho altri, sono stati scritti in Korn Shell in principio, ma si possono benissimo adattare anche ad una shell più friendly come la Bourne.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Utilizzando questi script e parallelamente gli strumenti che il db Oracle ci mette a disposizione, tipo AWR, Statepack, ADDM e altri, abbiamo tutti i dati per poter al meglio effettuare un analisi completa sul nostro sistema.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;HTH&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-1504696826035726749?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/1504696826035726749/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/03/script-maintenance-e-tuning-per-os.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/1504696826035726749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/1504696826035726749'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/03/script-maintenance-e-tuning-per-os.html' title='Script Maintenance e Tuning per OS Solaris - Oracle'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-6423691358243578781</id><published>2011-02-24T02:39:00.000-08:00</published><updated>2011-02-24T08:45:57.335-08:00</updated><title type='text'>EXP-00091</title><content type='html'>Stamattina controllando i files di log delle varie operazioni notturne di Oracle mi sono imbattuto in un EXP-0091: Exporting questionable statistics, durante un exp non full di un DB ver&amp;nbsp;9.2.0.1.0 in un server Windows 2003.&lt;br /&gt;&lt;br /&gt;Ho provato ad esportare solo la tabella interessata per verificare meglio il tutto ma ovviamente l'errore si ripresentava:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Username: XXXX&lt;br /&gt;Password:&lt;br /&gt;&lt;br /&gt;Connected to: Oracle9i Release 9.2.0.1.0 - Production&lt;br /&gt;JServer Release 9.2.0.1.0 - Production&lt;br /&gt;Enter array fetch buffer size: 4096 &amp;gt;&lt;br /&gt;&lt;br /&gt;Export file: EXPDAT.DMP &amp;gt;&lt;br /&gt;&lt;br /&gt;(2)U(sers), or (3)T(ables): (2)U &amp;gt; 3&lt;br /&gt;&lt;br /&gt;Export table data (yes/no): yes &amp;gt;&lt;br /&gt;&lt;br /&gt;Compress extents (yes/no): yes &amp;gt;&lt;br /&gt;&lt;br /&gt;Export done in &lt;b&gt;WE8MSWIN1252&lt;/b&gt; character set and AL16UTF16 NCHAR character set&lt;br /&gt;server uses &lt;b&gt;WE8ISO8859P1&lt;/b&gt; character set (possible charset conversion)&lt;br /&gt;&lt;br /&gt;About to export specified tables via Conventional Path ...&lt;br /&gt;Table(T) or Partition(T:P) to be exported: (RETURN to quit) &amp;gt; AAAA&lt;br /&gt;&lt;br /&gt;. . exporting table                      AAAA      48668 rows exported&lt;br /&gt;EXP-00091: Exporting questionable statistics.&lt;br /&gt;EXP-00091: Exporting questionable statistics.&lt;br /&gt;Table(T) or Partition(T:P) to be exported: (RETURN to quit) &amp;gt;&lt;br /&gt;&lt;br /&gt;Export terminated successfully with warnings.&lt;br /&gt;&lt;br /&gt;Verificando meglio ho visto che era un'errore di conversione del character set.&lt;br /&gt;Allora lo imposto manualmente dalla sessione in uso uguale a quello del server come suggerisce un post nel forum OTN &lt;a href="http://forums.oracle.com/forums/thread.jspa?threadID=339093"&gt;http://forums.oracle.com/forums/thread.jspa?threadID=339093&lt;/a&gt;&amp;nbsp;:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;C:\Documents and Settings\Admin&amp;gt;SET NLS_LANG=&lt;b&gt;.WE8ISO8859P1&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;C:\Documents and Settings\Admin&amp;gt;exp&lt;br /&gt;&lt;br /&gt;Export: Release 9.2.0.1.0 - Production on Thu Feb 24 10:40:06 2011&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Username: XXXX&lt;br /&gt;Password:&lt;br /&gt;&lt;br /&gt;Connected to: Oracle9i Release 9.2.0.1.0 - Production&lt;br /&gt;JServer Release 9.2.0.1.0 - Production&lt;br /&gt;Enter array fetch buffer size: 4096 &amp;gt;&lt;br /&gt;&lt;br /&gt;Export file: EXPDAT.DMP &amp;gt;&lt;br /&gt;&lt;br /&gt;(2)U(sers), or (3)T(ables): (2)U &amp;gt; 3&lt;br /&gt;&lt;br /&gt;Export table data (yes/no): yes &amp;gt;&lt;br /&gt;&lt;br /&gt;Compress extents (yes/no): yes &amp;gt;&lt;br /&gt;&lt;br /&gt;Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set&lt;br /&gt;&lt;br /&gt;About to export specified tables via Conventional Path ...&lt;br /&gt;Table(T) or Partition(T:P) to be exported: (RETURN to quit) &amp;gt; AAAA&lt;br /&gt;&lt;br /&gt;. . exporting table                      AAAA      48668 rows exported&lt;br /&gt;Table(T) or Partition(T:P) to be exported: (RETURN to quit) &amp;gt;&lt;br /&gt;&lt;br /&gt;Export terminated successfully without warnings.&lt;br /&gt;&lt;br /&gt;Adesso lanciandolo manualmente tutto va bene, ma non mi riesco a spiegare il perchè di questa variazione,&amp;nbsp;negli export precedenti benchè il problema del character set ci sia sempre stato, l'operazione si concludeva con successo.&lt;br /&gt;&lt;br /&gt;Nel DB server non è stata fatta nessuna variazione e tra l'altro nelle specifiche dell'export imposto l'opzione STATISTICS=NONE, quindi non mi dovrebbe esportare nessuna statistica.&lt;br /&gt;L'errore poi è solo per questa tabella mentre nelle altre che esporto di questo problema non c'è traccia.&lt;br /&gt;Provo ad indagare meglio....&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;AGGIORNAMENTO&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;La tabella in questione è una tabella che ogni 30 min viene cancellata e ricreata.&lt;br /&gt;Questa operazione dura pochi secondi ma se nel durante viene eseguito l'export può generale questo errore.&lt;br /&gt;Ci sono altre tabelle che vengono cancellate e ricreate ma non hanno presentato mai questo errore.&lt;br /&gt;Stasera riviene eseguito l'export alla stessa ora e vediamo cosa succede.&lt;br /&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-6423691358243578781?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/6423691358243578781/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/02/exp-00091.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/6423691358243578781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/6423691358243578781'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/02/exp-00091.html' title='EXP-00091'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-7376205855033818685</id><published>2011-02-10T08:51:00.000-08:00</published><updated>2011-02-10T08:55:06.553-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Android Market.....</title><content type='html'>Circa 20 giorni fa mi sono preso un tablet con Android versione 2.2 installata, tutto contento per l'acquisto l'ho messo alla prova e verificato tutte le funzionalità.&lt;br /&gt;Mi sono detto...Wow...perfetto adesso provo a scaricare delle nuove Apps, fiore all'occhiello di tutti i sistemi basati su Android.&lt;br /&gt;Lancio l'applicazione dal mio tablet e vedo delle applicazioni ma però non mi soddisfano, allora provo a cercarle...non mi trova praticamente nulla o quasi....&lt;br /&gt;Allora provo ad andare direttamente nel sito ufficiale &lt;a href="http://market.android.com/" id="link_1296865134641_21" target="_blank"&gt;http://market.android.com&lt;/a&gt;, ovviamente visto che ho Gmail il login è semiautomatico e accedo al sito.&lt;br /&gt;&lt;br /&gt;Cerco un'applicazione per scaricarla ma mi compare l'errore...&lt;span style="font-size: small;"&gt;"&lt;span class="wpcpspCSS"&gt;there are no android phones associated with this account".&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;span class="wpcpspCSS"&gt;Sono rimasto molto sorpreso.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;span class="wpcpspCSS"&gt;Credendo che sia l'unico (come sempre) a cui compaiono questi errori, visto che possiedo un tablet,ho guardato un pò in giro in internet ed ho scoperto che non solo quelli che hanno i tablet come me rimangono a bocca asciutta di app ma anche quelli che hanno alcuni smartphone.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;span class="wpcpspCSS"&gt;Google ha instituito un forum dove raccoglie tutte le problematiche relative a questo ed altri errori simili...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;span class="wpcpspCSS"&gt;&lt;a href="http://www.google.com/support/forum/p/Android+Market/thread?fid=2ef0ea226c27a0fd00049b61590415ee&amp;amp;hl=en%20"&gt;http://www.google.com/support/forum/p/Android+Market/thread?fid=2ef0ea226c27a0fd00049b61590415ee&amp;amp;hl=en &lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;span class="wpcpspCSS"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;span class="wpcpspCSS"&gt;All'inizio di questa settimana ho scoperto un altro sito dove dichiarava SOLVED questo problema, ho dato un'occhiata, ho provato ad eseguire step by step la risoluzione ma niente da fare, a me non funziona...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;span class="wpcpspCSS"&gt;Questo è il sito&amp;nbsp;&lt;a href="http://phandroid.com/2011/02/04/solved-android-market-website-says-there-are-no-android-phones-associated-with-this-account/"&gt;http://phandroid.com/2011/02/04/solved-android-market-website-says-there-are-no-android-phones-associated-with-this-account/&lt;/a&gt; dove ho scoperto nei commenti,che ad alcuni funziona ed altri no, spero vivamente che&amp;nbsp; Google metta a posto questo assurdo problema.....in tempi anche abbastanza rapidi....&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;span class="wpcpspCSS"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-7376205855033818685?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/7376205855033818685/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/02/android-market.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/7376205855033818685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/7376205855033818685'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/02/android-market.html' title='Android Market.....'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-8147290706183326621</id><published>2011-02-04T00:35:00.001-08:00</published><updated>2011-02-10T09:02:22.562-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Oracle Partitioning</title><content type='html'>Da un po' i tempo sto facendo dei test con il Partitioning di Oracle 10g.&lt;br /&gt;Questa feature si trova solo nella versione Enterprise ed è molto  utile oltre ad ottimizzare le performance anche solo per "archiviare"&amp;nbsp;  dei dati.&lt;br /&gt;In certe&amp;nbsp; aziende o per ragione legali o per ragioni di qualifica ISO  o per altri motivi non si esegue una archiviazione dati, alcune tabelle  contengono milioni di dati e questo potrebbe sfociare in un problema di  performance.&lt;br /&gt;Anche se si continua a implementare hardware / server sicuramente più  veloci e&amp;nbsp; performanti questo problema nel tempo va affrontato perchè  tutti i nodi vengono al pettine, ve lo dice uno che di capelli ne ha  veramente molti.....&lt;br /&gt;Per implementare il partitioning occorre fare una analisi molto  accurata dell'applicativo e il modo di accesso&amp;nbsp; che quest'ultimo fa alle  tabelle Oracle, quì ci vengono incontro due tool: Partitioning,&lt;br /&gt;Tuning Pack che ovviamente non sono gratuiti.&lt;br /&gt;Per natura sono un pò scettico per questi tools che vengono venduti  come risolutori di problemi ma penso che possano essere almeno di aiuto.&lt;br /&gt;Partizionare le tabelle per "archiviare" (lo scrivo tra doppi apici  perchè non è una vera a propria archiviazione) risulta essere molto  utile perchè con dei campi data si possono creare delle partition key  suddivise molto semplicemente per anno per far sì che Oracle esegua il  partition pruning, accendendo di fatto solo alla partizione interessata.&lt;br /&gt;Facendo così il CBO ( però le statistiche devono sempre essere  aggiornate) capisce e accede solo alla partizione interessata facendo  risparmiare moltissimo tempo, pensando a tabelle con milioni di  records.Questo risparmio può essere visto eseguendo l'explain plan e il  trace dello statement sql interessato.&lt;br /&gt;Questo è ovviamente è un esempio molto semplice di partitioning di  tipo range ma c'è&amp;nbsp; ne sono altri, Hash, List e questi possono essere  composite o single level.&lt;br /&gt;Vi rimando a questo sito&amp;nbsp;&lt;a _mce_href="http://www.filibeto.org/sun/lib/nonsun/oracle/11.1.0.6.0/B28359_01/server.111/b32024/partition.htm#i460833" href="http://www.filibeto.org/sun/lib/nonsun/oracle/11.1.0.6.0/B28359_01/server.111/b32024/partition.htm#i460833"&gt; (in inglese)&amp;nbsp; che è molto esplicativo come concepts del Partitioning.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-8147290706183326621?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/8147290706183326621/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/02/oracle-partitioning.html#comment-form' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/8147290706183326621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/8147290706183326621'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/02/oracle-partitioning.html' title='Oracle Partitioning'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-1283076291535201649</id><published>2011-02-04T00:33:00.001-08:00</published><updated>2011-02-10T09:03:11.045-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Mail Evolution in Ubuntu - Update</title><content type='html'>Come promesso ho provato nella versione di Evolution 2.28.3 con  Ubuntu 10.04 come descritto nei workaround dei link e....funziona :-)&lt;br /&gt;Il problema è della libreria liborg-gnome-exchange-operations.so che va sostitutita.&lt;br /&gt;I passi sono molto semplici:&lt;br /&gt;1) Si scarica da questo indirizzo &lt;a _mce_href="http://packages.debian.org/sid/i386/evolution-exchange/download" href="http://packages.debian.org/sid/i386/evolution-exchange/download" rel="nofollow"&gt;http://packages.debian.org/sid/i386/evolution-exchange/download &lt;/a&gt;il pacchetto&lt;kbd&gt; evolution-exchange_2.30.3-1_i386.deb.&lt;/kbd&gt;&lt;br /&gt;2) Poi si apre il .deb con l'applicazione Gestore archivi e si va&amp;nbsp; in  /./usr/lib/evolution/2.30/plugins/ a questo punto si estrae solo la  libreria liborg-gnome-exchange-operations.so&lt;br /&gt;3) Si apre una console e si va nel percorso  /usr/lib/evolution/2.28/plugins (attenzione io ho la 2.28 ma la ver nel  vostro potrebbe essere diversa) poi:&lt;br /&gt;-&amp;nbsp; eseguo il comando sudo cp liborg-gnome-exchange-operations.so  OLD_liborg-gnome-exchange-operations.old così rinomino la vecchia  libreria poi la cancello l'originale con il comando&amp;nbsp; rm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  liborg-gnome-exchange-operations.so .&lt;br /&gt;-&amp;nbsp; eseguo il comando sudo cp dal percorso dove&amp;nbsp; avete estratto la  nuova libreria dall'archivio liborg-gnome-exchange-operations.so in  /usr/lib/evolution/2.28/plugins&lt;br /&gt;4) Rilanciate Evolution ed il gioco è fatto.&lt;br /&gt;Nel mio caso ha funzionato inoltre&amp;nbsp; ho provato a chiudere più volte  l'applicazione e riaprirla ma non si blocca più, anzi è molto più veloce  nella connessione con MSExchange.... ;-)&lt;br /&gt;A presto&lt;br /&gt;Ciao&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-1283076291535201649?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/1283076291535201649/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/02/mail-evolution-in-ubuntu-update.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/1283076291535201649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/1283076291535201649'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/02/mail-evolution-in-ubuntu-update.html' title='Mail Evolution in Ubuntu - Update'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-956006373539157532.post-1865380181193364853</id><published>2011-02-04T00:32:00.000-08:00</published><updated>2011-02-10T09:03:38.640-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Mail Evolution in Ubuntu</title><content type='html'>Questo post tratterà di Evolution 2.28.3,&amp;nbsp; software di posta elettronica, calendar in Ubuntu.&lt;br /&gt;Sono già parecchi mesi da quando è uscita la rel di ubuntu 10.04 che  utilizzo questo software e in ufficio l'ho collegato con Exchange server  ma mi sta facendo tribolare .&lt;br /&gt;Il demone evolution-exchange-storage che ha la funzione di collegarsi  al server exchange e di trasferire i messaggi nel client locale è  lentissimo a sincronizzarsi, inoltre alla mattina quando lancio il  software non si collega mai al primo colpo ma devo più volte farlo  ripartire prima che finalmente si colleghi al server visto che questo  demone va in crash molto spesso .&lt;br /&gt;Ci sono diversi siti ufficiali che parlono di questo visto che si tratta di un Bug eccone alcuni:&lt;br /&gt;&lt;a _mce_href="https://bugs.launchpad.net/ubuntu/+source/evolution-exchange/+bug/557120" href="https://bugs.launchpad.net/ubuntu/+source/evolution-exchange/+bug/557120"&gt;https://bugs.launchpad.net/ubuntu/+source/evolution-exchange/+bug/557120&lt;/a&gt;&lt;br /&gt;&lt;a _mce_href="https://bugs.launchpad.net/ubuntu/+source/evolution-exchange/+bug/548570" href="https://bugs.launchpad.net/ubuntu/+source/evolution-exchange/+bug/548570"&gt;https://bugs.launchpad.net/ubuntu/+source/evolution-exchange/+bug/548570&lt;/a&gt;&lt;br /&gt;Spererei che nell'ultima Rel. Ubuntu la 10.10 le cose foessero cambiate con questo demone ma invece come per magia...&lt;br /&gt;&lt;a _mce_href="https://bugs.launchpad.net/ubuntu/+source/evolution-exchange/+bug/631395" href="https://bugs.launchpad.net/ubuntu/+source/evolution-exchange/+bug/631395" target="_blank"&gt;https://bugs.launchpad.net/ubuntu/+source/evolution-exchange/+bug/631395&lt;/a&gt;&lt;br /&gt;Stesso problema...stesso bug...&lt;br /&gt;...ma per fortuna c'è già un workaround, io non l'ho ancora provato  visto che ho ancora la 10.04 ma in questi link&amp;nbsp; è descritta molto bene  come fare:&lt;br /&gt;&lt;a _mce_href="http://jaub.wordpress.com/2010/10/12/ubuntu-10-10-evolution-exchange-bug-e-workaround/" href="http://jaub.wordpress.com/2010/10/12/ubuntu-10-10-evolution-exchange-bug-e-workaround/" target="_blank"&gt;http://jaub.wordpress.com/2010/10/12/ubuntu-10-10-evolution-exchange-bug-e-workaround/&lt;/a&gt;&lt;br /&gt;&lt;a _mce_href="http://blog.dinel.org.uk/?p=200" href="http://blog.dinel.org.uk/?p=200"&gt;http://blog.dinel.org.uk/?p=200&lt;/a&gt;&lt;br /&gt;e sembra funzionare...&lt;br /&gt;A presto...&lt;br /&gt;P.S.: Quasi quasi provo questo workaround anche con la 10.04...non si sa mai... ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/956006373539157532-1865380181193364853?l=albertofrosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://albertofrosi.blogspot.com/feeds/1865380181193364853/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://albertofrosi.blogspot.com/2011/02/mail-evolution-in-ubuntu.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/1865380181193364853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/956006373539157532/posts/default/1865380181193364853'/><link rel='alternate' type='text/html' href='http://albertofrosi.blogspot.com/2011/02/mail-evolution-in-ubuntu.html' title='Mail Evolution in Ubuntu'/><author><name>Alberto</name><uri>http://www.blogger.com/profile/01805632595255042258</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rvs5Fpwu2-s/TNvwusXsziI/AAAAAAAAADg/BQH1UtCstcA/S220/foto_io1.png'/></author><thr:total>0</thr:total></entry></feed>
