<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-6061714</atom:id><lastBuildDate>Fri, 27 Feb 2026 11:32:08 +0000</lastBuildDate><category>Data Guard</category><category>script</category><category>asm</category><category>Linux</category><category>unix</category><category>installation</category><category>rman</category><category>trace</category><category>utilities</category><category>oracle</category><category>Far Sync</category><category>sql</category><category>datapump</category><category>errors</category><category>managment</category><category>12c</category><category>Active Data Guard</category><category>alert.log</category><category>recover</category><category>Grid Infrastructure</category><category>RAC</category><category>archivelog</category><category>awr</category><category>init.ora</category><category>network</category><category>plsql</category><category>12.2</category><category>19c</category><category>BEQ</category><category>Bequeath</category><category>OEM</category><category>ORACLE_HOME</category><category>Oracle OpenWorld</category><category>StandBy</category><category>Ubuntu</category><category>bash</category><category>benchmark</category><category>broker</category><category>bypass listener</category><category>crsctl</category><category>dgmgrl</category><category>find ORACLE_HOME</category><category>function</category><category>inventory</category><category>listener</category><category>observer</category><category>performance</category><category>pl/sql</category><category>snmp</category><category>sqlnet.ora</category><category>ssh</category><category>tuning</category><category>ACE</category><category>CRS-0222</category><category>CRS-2730</category><category>CRS-4000</category><category>Capture</category><category>DBA</category><category>DBMS_LOGMNR</category><category>DBMS_PRIVILEGE_CAPTURE</category><category>DBMS_TNS.RESOLVE_TNSNAME</category><category>DBMS_UMF</category><category>DBMS_WORKLOAD_REPOSITORY</category><category>DB_ULTRA_SAFE</category><category>DML Redirection</category><category>DNS</category><category>FETCH</category><category>Failover</category><category>FlashBack</category><category>Grid Control</category><category>KVM</category><category>LDAP</category><category>LogMiner</category><category>OOW</category><category>OOW17</category><category>ORA-03113</category><category>OpenWorld</category><category>Oracle Internet Directory</category><category>Oracle OpenWorld 2017</category><category>Orphan</category><category>PRCA-1002</category><category>PRCR-1028</category><category>PRCR-1072</category><category>PXE</category><category>Privilege</category><category>Python</category><category>RDS</category><category>REGEXP_REPLACE</category><category>RESOLVE_TNSNAME</category><category>Usage</category><category>announcment</category><category>auto discovery</category><category>auto_start</category><category>backup</category><category>backup size</category><category>bastion</category><category>change port</category><category>clone</category><category>cloud</category><category>colors</category><category>compatability</category><category>connection manager</category><category>dNFS</category><category>database</category><category>discover</category><category>discovery</category><category>diskgroup</category><category>docker</category><category>exadata</category><category>export</category><category>fast start failver</category><category>finding instance</category><category>findint instance name</category><category>fsfo</category><category>glogin</category><category>hidden</category><category>identify</category><category>import</category><category>java</category><category>jdbc</category><category>kfod</category><category>ldap.ora</category><category>log miner</category><category>logon trigger</category><category>mail</category><category>monitoring</category><category>oid</category><category>oraInst.loc</category><category>oraclecloud</category><category>parameter</category><category>password</category><category>plug-in</category><category>port</category><category>portainer</category><category>recipe</category><category>regexp</category><category>release 2</category><category>restart</category><category>restart.srvctl</category><category>rlwrap</category><category>scan</category><category>service</category><category>slob</category><category>solaris</category><category>spfile</category><category>sqlplus</category><category>srvctl</category><category>swingbench</category><category>tns</category><category>tnsping</category><category>trigger</category><category>tunnel</category><category>v$rman_output</category><category>vpn</category><category>wallet</category><title>Oracle DBA Place</title><description></description><link>https://oracledba.blogspot.com/</link><managingEditor>noreply@blogger.com (Yossi Nixon)</managingEditor><generator>Blogger</generator><openSearch:totalResults>109</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><language>en-us</language><itunes:explicit>yes</itunes:explicit><itunes:subtitle/><itunes:category text="Technology"><itunes:category text="Software How-To"/></itunes:category><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-18466996454424803</guid><pubDate>Mon, 06 Jan 2020 15:00:00 +0000</pubDate><atom:updated>2020-01-06T17:00:02.429+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">alert.log</category><category domain="http://www.blogger.com/atom/ns#">RDS</category><category domain="http://www.blogger.com/atom/ns#">trace</category><title>Creating trace file, writing to alert.log and retrieve using Amazon RDS for Oracle</title><description>&lt;div class="separator tr_bq" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3C4ariVJ8yTFZpS6cUrrdjc1pM8UPOD1-LRNac_l2in5LAVoJHZo-pjdFW91mfF0oQtnp50xTBtxGuLDO6j5AvCB6MfL6foxwbtqGe6EFw76x3xdT4ImgLf1NxuVEccWHgR9W/s1600/logfile.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="711" data-original-width="683" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3C4ariVJ8yTFZpS6cUrrdjc1pM8UPOD1-LRNac_l2in5LAVoJHZo-pjdFW91mfF0oQtnp50xTBtxGuLDO6j5AvCB6MfL6foxwbtqGe6EFw76x3xdT4ImgLf1NxuVEccWHgR9W/s320/logfile.png" width="307" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
Since in Oracle RDS environment, we don't have a direct access to the operating system&lt;br /&gt;
I have recently been asked to provide a workaround from the database.&lt;br /&gt;
A procedure that:&lt;br /&gt;
&lt;br /&gt;
1. Write to the alertlog&lt;br /&gt;
2. Generate a trace file (no matter its content).&lt;br /&gt;
3. Let the user know how to query&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;a. The alertlog&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;b. The trace file&lt;br /&gt;
Oracle RDS implementation enable us this functionality without a need to create objects or have a special grants.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
SET SERVEROUTPUT ON VERIFY OFF FEED OFF LINES 300 PAGES 200&lt;br /&gt;
DECLARE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; full_file_name&amp;nbsp; &amp;nbsp;VARCHAR2 (512);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; file_name&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VARCHAR2 (512);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; MESSAGE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VARCHAR2 (1024);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ALERT_TABLE&amp;nbsp; &amp;nbsp; &amp;nbsp; VARCHAR2 (30);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; rds_exists&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NUMBER;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; TABLE_MISSING&amp;nbsp; &amp;nbsp; EXCEPTION;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; PRAGMA EXCEPTION_INIT (TABLE_MISSING, -942);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FUNCTION FIND_VIEW (object_name VARCHAR2)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RETURN NUMBER&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EXECUTE IMMEDIATE 'select count(1) from ' || object_name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RETURN 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; EXCEPTION&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN TABLE_MISSING&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RETURN 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; END FIND_VIEW;&lt;br /&gt;
BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SELECT COUNT (1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; INTO rds_exists&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; FROM all_users&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE username = 'RDSADMIN';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IF FIND_VIEW ('X$DBGALERTEXT') = 1&lt;br /&gt;
&amp;nbsp; &amp;nbsp; THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ALERT_TABLE := 'X$DBGALERTEXT';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ELSE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF FIND_VIEW ('ALERTLOG') = 1&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ALERT_TABLE := 'ALERTLOG';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ELSE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ALERT_TABLE := '/* no acess to alert table X$DBGALERTEXT or ALERTLOG */';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END IF;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; END IF;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; EXECUTE IMMEDIATE 'ALTER SESSION SET max_dump_file_size = unlimited';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; EXECUTE IMMEDIATE 'ALTER SESSION SET tracefile_identifier = ''&amp;amp;&amp;amp;identifier''';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; EXECUTE IMMEDIATE 'ALTER SESSION SET statistics_level = ALL';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; EXECUTE IMMEDIATE 'ALTER SESSION SET events ''10046 trace name context forever, level 12''';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; EXECUTE IMMEDIATE 'select 1 from dual';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SELECT VALUE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; INTO full_file_name&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; FROM V$DIAG_INFO&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE NAME = 'Default Trace File';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; MESSAGE := 'Errors in file ' || full_file_name || ':';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; file_name :=&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SUBSTR (full_file_name,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&amp;nbsp; INSTR (full_file_name,&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; '/',&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; -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; 1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ 1),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LENGTH (full_file_name));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sys.DBMS_SYSTEM.ksdind (10);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sys.DBMS_SYSTEM.ksdwrt (sys.DBMS_SYSTEM.alert_file, MESSAGE);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sys.DBMS_SYSTEM.ksdfls;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DBMS_OUTPUT.put_line (CHR (10));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DBMS_OUTPUT.put_line (' ---------- Line will added to alert log -------------------------');&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DBMS_OUTPUT.put_line (MESSAGE);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DBMS_OUTPUT.put_line (CHR (10));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DBMS_OUTPUT.put_line ('Query alert.log file using the following command:');&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DBMS_OUTPUT.put_line ('------------------------------------------------');&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DBMS_OUTPUT.put_line ('&amp;nbsp; SELECT TO_CHAR (ORIGINATING_TIMESTAMP, ''YYYY-MM-DD HH24:MI:SS'') AS ORIGINATING_TIMESTAMP, MESSAGE_TEXT');&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DBMS_OUTPUT.put_line ('&amp;nbsp; &amp;nbsp; FROM ' || ALERT_TABLE);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DBMS_OUTPUT.put_line ('&amp;nbsp; &amp;nbsp;WHERE originating_timestamp &amp;gt; (SYSDATE - 5 / 1440)');&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DBMS_OUTPUT.put_line ('ORDER BY RECORD_ID;');&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DBMS_OUTPUT.put_line (CHR (10));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IF rds_exists = 1&lt;br /&gt;
&amp;nbsp; &amp;nbsp; THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DBMS_OUTPUT.put_line ('Retrieving the generated trace file (on RDS) using the following command:');&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DBMS_OUTPUT.put_line ('----------------------------------------------------------------');&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DBMS_OUTPUT.put_line ('SELECT text FROM table(rdsadmin.rds_file_util.read_text_file(''BDUMP'',''' || file_name || ''')) where rownum &amp;lt; 20;');&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DBMS_OUTPUT.put_line (CHR (10));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; END IF;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; EXECUTE IMMEDIATE 'ALTER SESSION SET EVENTS ''10046 trace name context off''';&lt;br /&gt;
END;&lt;br /&gt;
/&lt;br /&gt;
EXIT&lt;/blockquote&gt;
</description><link>https://oracledba.blogspot.com/2020/01/creating-trace-file-writing-to-alertlog.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3C4ariVJ8yTFZpS6cUrrdjc1pM8UPOD1-LRNac_l2in5LAVoJHZo-pjdFW91mfF0oQtnp50xTBtxGuLDO6j5AvCB6MfL6foxwbtqGe6EFw76x3xdT4ImgLf1NxuVEccWHgR9W/s72-c/logfile.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-2178459274762267592</guid><pubDate>Mon, 28 Oct 2019 15:00:00 +0000</pubDate><atom:updated>2019-10-28T17:17:58.483+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">network</category><category domain="http://www.blogger.com/atom/ns#">oracle</category><category domain="http://www.blogger.com/atom/ns#">ssh</category><category domain="http://www.blogger.com/atom/ns#">tns</category><category domain="http://www.blogger.com/atom/ns#">tunnel</category><category domain="http://www.blogger.com/atom/ns#">vpn</category><title>Connect to Oracle Database server through ssh tunnel</title><description>Last week I needed to connect a database from remote using VPN.&lt;br /&gt;
The VPN is connected to a secured network, so I couldn’t connect directly to the database.&lt;br /&gt;
Since I am using Toad for Oracle which is based on oracle client – I needed a transparent solution for that connection.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCagd2qGJfDM7V-qsfZ_wMHXOBVvT-urmZrPyYxdcBjQEgpuhHk5LalcbCpxulv7_ebroTDrYBRjVusuYGnxWIaC7Azi7Jmm01jdkDKUpyexKORAOKvLk86W8Y72c-VGcJT1MP/s1600/tunnel.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="514" data-original-width="1065" height="307" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCagd2qGJfDM7V-qsfZ_wMHXOBVvT-urmZrPyYxdcBjQEgpuhHk5LalcbCpxulv7_ebroTDrYBRjVusuYGnxWIaC7Azi7Jmm01jdkDKUpyexKORAOKvLk86W8Y72c-VGcJT1MP/s640/tunnel.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
At the past I wrote a post about &lt;a href="https://oracledba.blogspot.com/2019/10/using-ssh-x11-tunnel-through-bastion.html"&gt;Using ssh X11 tunnel through a bastion host to connect to a database server&lt;/a&gt;&amp;nbsp;, at that post I described how to forward SSH and X11.&lt;br /&gt;
Now I will describe a way to connect to the database using SQL*Net (usually port 1521) on Windows.&lt;br /&gt;
&lt;br /&gt;
Download &lt;b&gt;plink&lt;/b&gt; from &lt;a href="https://www.putty.org/"&gt;https://www.putty.org&lt;/a&gt; , you can download putty package or just standalone plink.&lt;br /&gt;
Run the following command line:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
plink -N -L localport:dbserver:dbport getwayuser@getwayserver&lt;/blockquote&gt;
Do this on both machines (REMOTE PC Windows machine and the server you have access to - Gateway) to chain the SSH tunnels.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Example:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Gateway server (assuming Linux):&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiROy70iEc-1pDxe0BH11TKPKylMc8IQGhhEVpKdKmKMOWFGYrUmE2KyVtd7NN6ytG_9HGkKpzAcxcavaYwaWiAGEXph9qmmFifR9UrGo8pC5ipO_Ty8q3UGoUWPt1PDOEyQLoi/s1600/gateway.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="65" data-original-width="60" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiROy70iEc-1pDxe0BH11TKPKylMc8IQGhhEVpKdKmKMOWFGYrUmE2KyVtd7NN6ytG_9HGkKpzAcxcavaYwaWiAGEXph9qmmFifR9UrGo8pC5ipO_Ty8q3UGoUWPt1PDOEyQLoi/s1600/gateway.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;blockquote class="tr_bq"&gt;
ssh -N -L1521:dbserver:1521 dbserveruser@dbserver&lt;/blockquote&gt;
Your PC:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglr2UX401cwE5Zn20d4yoLPyee_LoyIPMDuIQ5h718TQzths-v7kQCsxMdCJ11w46kvGBfn8ya9XTRsjEisCfSZnnIplJU2BXKnB1Wby9VLJEfIWeY1SYl2QKgRin2J0fUgcz4/s1600/pc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="55" data-original-width="44" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglr2UX401cwE5Zn20d4yoLPyee_LoyIPMDuIQ5h718TQzths-v7kQCsxMdCJ11w46kvGBfn8ya9XTRsjEisCfSZnnIplJU2BXKnB1Wby9VLJEfIWeY1SYl2QKgRin2J0fUgcz4/s1600/pc.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;blockquote class="tr_bq"&gt;
plink -N -L 1521:getwayserver:1521 getwayuser@getwayserver&lt;/blockquote&gt;
The tnsnames.ora entry must look like you are running a local database, e.g.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
dboverssh =&lt;br /&gt;
&amp;nbsp; (DESCRIPTION =&lt;br /&gt;
&amp;nbsp; &amp;nbsp; (ADDRESS_LIST =&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; (CONNECT_DATA =&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; (SERVICE_NAME = crm)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; )&lt;br /&gt;
&amp;nbsp; )&lt;/blockquote&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>https://oracledba.blogspot.com/2019/10/connect-to-oracle-database-server.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCagd2qGJfDM7V-qsfZ_wMHXOBVvT-urmZrPyYxdcBjQEgpuhHk5LalcbCpxulv7_ebroTDrYBRjVusuYGnxWIaC7Azi7Jmm01jdkDKUpyexKORAOKvLk86W8Y72c-VGcJT1MP/s72-c/tunnel.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-2530192837784019580</guid><pubDate>Tue, 01 Oct 2019 16:00:00 +0000</pubDate><atom:updated>2019-10-01T19:00:00.137+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">bastion</category><category domain="http://www.blogger.com/atom/ns#">Linux</category><category domain="http://www.blogger.com/atom/ns#">ssh</category><title>Using ssh X11 tunnel through a bastion host to connect to a database server</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM8IMF-_gGPBOuAPAAqypNkvNerJ1eKskNoPaTYH7Ll9-7zMM3aYI-cKFqPNIvx-Z2Wzz-egHUoRIqJzaemfcVqp3i1-cWD4oZSZ4tNz_EfYaOUchhsBSVZpV6rOK86cPDlR8i/s1600/bastion.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="433" data-original-width="1002" height="172" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM8IMF-_gGPBOuAPAAqypNkvNerJ1eKskNoPaTYH7Ll9-7zMM3aYI-cKFqPNIvx-Z2Wzz-egHUoRIqJzaemfcVqp3i1-cWD4oZSZ4tNz_EfYaOUchhsBSVZpV6rOK86cPDlR8i/s400/bastion.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
I succeeded running Oracle dbca, xclock &amp;amp; virt-viewer using Bastion over VPN (with root) &#128522;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Theoretical Steps:&lt;/h2&gt;
First, connect to machine B and forward [localPort] to C:22 through B&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
A$ ssh -L [localPort]:C:22 B&lt;/blockquote&gt;
Next, connect to C from A through this newly-created tunnel using [localPort], forwarding X11&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
A$ ssh -X -p [localPort] localhost&lt;/blockquote&gt;
Now we can run X11 programs on C and have them display on A&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
C$ xclock&lt;/blockquote&gt;
[localPort] can be any port that you are not already listening to on A, I often use 2222 for simplicity.&lt;br /&gt;
X11Forwarding should be enabled on server C&lt;br /&gt;
AllowTcpForwarding should be enabled on server B&lt;br /&gt;
&lt;h2&gt;
Actual Steps&lt;/h2&gt;
First, connect to machine B and forward [localPort] to C:22 through B&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
A$ ssh -L [localPort]:C:22 B&lt;/blockquote&gt;
Next, connect to C from A through this newly-created tunnel using [localPort], forwarding X11&lt;br /&gt;
&lt;b&gt;From A using putty to localhost using [localPort] enable X11 forwarding to localhost:0.0&lt;/b&gt;&lt;br /&gt;
Now we can run X11 programs on C and have them display on A&lt;br /&gt;
C using putty:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
C$ export DISPLAY=127.0.0.1:10.0&lt;br /&gt;
C$&amp;nbsp;xclock&lt;/blockquote&gt;
</description><link>https://oracledba.blogspot.com/2019/10/using-ssh-x11-tunnel-through-bastion.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM8IMF-_gGPBOuAPAAqypNkvNerJ1eKskNoPaTYH7Ll9-7zMM3aYI-cKFqPNIvx-Z2Wzz-egHUoRIqJzaemfcVqp3i1-cWD4oZSZ4tNz_EfYaOUchhsBSVZpV6rOK86cPDlR8i/s72-c/bastion.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-5331383898502236660</guid><pubDate>Tue, 24 Sep 2019 16:00:00 +0000</pubDate><atom:updated>2019-09-24T19:00:01.381+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">KVM</category><category domain="http://www.blogger.com/atom/ns#">Linux</category><category domain="http://www.blogger.com/atom/ns#">PXE</category><title>How to install Oracle Linux in kvm without a need to X server</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8I2wq2ksvlwimsyiMAAoDs6eVR3DkNaE_AFnv4AuYQhRm9m3KF9ZxYc5CoagDwfQ7IZqQaqKdqyODYyKOZfBdztcAIVUjTtTGffiahL65K0h4tpWP8Dhk6b8-3jMK4N6AiKiN/s1600/KVM-VPS-Hosting2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="322" data-original-width="470" height="136" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8I2wq2ksvlwimsyiMAAoDs6eVR3DkNaE_AFnv4AuYQhRm9m3KF9ZxYc5CoagDwfQ7IZqQaqKdqyODYyKOZfBdztcAIVUjTtTGffiahL65K0h4tpWP8Dhk6b8-3jMK4N6AiKiN/s200/KVM-VPS-Hosting2.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
I managed to install Oracle Linux on kvm guest without a need to X console (no GUI, vnc or X11)&lt;br /&gt;
1.&lt;span style="white-space: pre;"&gt; &lt;/span&gt;We can see the PXE menu&lt;br /&gt;
2.&lt;span style="white-space: pre;"&gt; &lt;/span&gt;We can select image to install&lt;br /&gt;
3.&lt;span style="white-space: pre;"&gt; &lt;/span&gt;We need to add &lt;b&gt;&lt;span style="color: red;"&gt;console=ttyS0&lt;/span&gt;&lt;/b&gt; to the PXE (cobbler is supporting this feature the same way as grub enable you to add parameter to the boot)&lt;br /&gt;
&lt;br /&gt;
Disclaimer:&lt;br /&gt;
I tested this on Oracle Linux 7.5 using libvirt 1.5&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# virt-install --hvm --connect qemu:///system --network=bridge:virbr0 --pxe --graphics none --name Oracle_Linux_7.4-x86_64 --ram=756 --vcpus=1 --os-type=linux --os-variant=rhel7 --disk path=/tmp/rhel7-machine.img,size=5 --console pty,target_type=serial --boot 'menu=on,useserial=on'&lt;br /&gt;
Starting install...&lt;br /&gt;
Allocating 'rhel7-machine.img'&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; &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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 5.0 GB&amp;nbsp; 00:00:00&amp;nbsp; &amp;nbsp; &lt;br /&gt;
Connected to domain Oracle_Linux_7.4-x86_64&lt;br /&gt;
Escape character is ^]&lt;br /&gt;
Google, Inc.&lt;br /&gt;
Serial Graphics Adapter 04/30/14&lt;br /&gt;
SGABIOS $Id: sgabios.S 8 2010-04-22 00:03:40Z nlaredo $ (mockbuild@) Wed Apr 30 12:14:33 UTC 2014&lt;br /&gt;
Term: 80x24&lt;br /&gt;
4 0&lt;br /&gt;
SeaBIOS (version 1.11.0-2.el7)&lt;br /&gt;
Machine UUID 705ffc3b-a5ee-41e3-b380-2c0407f74bc2&lt;br /&gt;
iPXE (http://ipxe.org) 00:03.0 C100 PCI2.10 PnP PMM+2F394490+2F2F4490 C100&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; &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; &amp;nbsp; &lt;br /&gt;
Press ESC for boot menu.&lt;br /&gt;
Booting from ROM...&lt;br /&gt;
iPXE (PCI 00:03.0) starting execution...ok&lt;br /&gt;
iPXE initialising devices...ok&lt;br /&gt;
iPXE 1.0.0+ (4e85b27) -- Open Source Network Boot Firmware -- http://ipxe.org&lt;br /&gt;
Features: DNS HTTP iSCSI TFTP AoE ELF MBOOT PXE bzImage Menu PXEXT&lt;br /&gt;
net0: 52:54:00:dd:23:6f using virtio-net on 0000:00:03.0 (open)&lt;br /&gt;
&amp;nbsp; [Link:up, TX:0 TXE:0 RX:0 RXE:0]&lt;br /&gt;
Configuring (net0 52:54:00:dd:23:6f)............................... ok&lt;br /&gt;
net0: 10.20.2.14/255.255.255.0 gw 10.20.2.254&lt;br /&gt;
Next server: 192.168.1.47&lt;br /&gt;
Filename: pxelinux.0&lt;br /&gt;
tftp://192.168.1.47/pxelinux.0... ok&lt;br /&gt;
pxelinux.0 : 16794 bytes [PXE-NBP]&lt;br /&gt;
PXELINUX 3.86 2010-04-01&amp;nbsp; Copyright (C) 1994-2010 H. Peter Anvin et al&lt;br /&gt;
!PXE entry point found (we hope) at 9C2C:0160 via plan A&lt;br /&gt;
UNDI code segment at 9C2C len 0802&lt;br /&gt;
UNDI data segment at 9CB0 len 2CE0&lt;br /&gt;
Getting cached packet 01 02 03&lt;br /&gt;
My IP address seems to be 0A14020E 10.20.2.14&lt;br /&gt;
ip=10.20.2.14:192.168.1.47:10.20.2.254:255.255.255.0&lt;br /&gt;
TFTP prefix:&lt;br /&gt;
Trying to load: pxelinux.cfg/3bfc5f70-eea5-e341-b380-2c0407f74bc2&lt;br /&gt;
Trying to load: pxelinux.cfg/01-52-54-00-dd-23-6f&lt;br /&gt;
Trying to load: pxelinux.cfg/0A14020E&lt;br /&gt;
Trying to load: pxelinux.cfg/0A14020&lt;br /&gt;
Trying to load: pxelinux.cfg/0A1402&lt;br /&gt;
Trying to load: pxelinux.cfg/0A140&lt;br /&gt;
Trying to load: pxelinux.cfg/0A14&lt;br /&gt;
Trying to load: pxelinux.cfg/0A1&lt;br /&gt;
Trying to load: pxelinux.cfg/0A&lt;br /&gt;
Trying to load: pxelinux.cfg/0&lt;br /&gt;
Trying to load: pxelinux.cfg/default&lt;/blockquote&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaEqMOR8OwAuYmILo3oXSTBtuPlm1KMyolLuHjE0D4Fdkul3o-fIR4aFK6b_IOdfslH3khiBDClDAOW9Itklp-KHsiS7E8mJEQVWerC6fr-3XKx8rVen0LH58TkHxS-pHoX1yS/s1600/cobbler.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="426" data-original-width="782" height="174" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaEqMOR8OwAuYmILo3oXSTBtuPlm1KMyolLuHjE0D4Fdkul3o-fIR4aFK6b_IOdfslH3khiBDClDAOW9Itklp-KHsiS7E8mJEQVWerC6fr-3XKx8rVen0LH58TkHxS-pHoX1yS/s320/cobbler.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
PRESS Tab and add &lt;b&gt;&lt;span style="color: red;"&gt;console=ttyS0&lt;/span&gt;&lt;/b&gt; at the end&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;gt; /images/Oracle_Linux_7.4-x86_64/vmlinuz initrd=/images/Oracle_Linux_7.4-x86_64&lt;br /&gt;
/initrd.img ksdevice=bootif lang=&amp;nbsp; kssendmac text&amp;nbsp; ks=http://192.168.1.47/cblr/s&lt;br /&gt;
vc/op/ks/profile/Oracle_Linux_7.4-x86_64 BOOTIF=01-52-54-00-56-f5-ff &lt;b&gt;&lt;span style="color: red;"&gt;console=tty&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;S0&lt;/span&gt;&lt;/b&gt;&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; Automatic boot in 19 seconds...&lt;br /&gt;
&lt;br /&gt;
Loading /images/Oracle_Linux_6.9-x86_64/vmlinuz.................................&lt;br /&gt;
..................................&lt;br /&gt;
Loading /images/Oracle_Linux_6.9-x86_64/initrd.img..............................&lt;br /&gt;
................................................................................&lt;br /&gt;
................................................................................&lt;br /&gt;
................................................................................&lt;br /&gt;
................................................................................&lt;br /&gt;
................................................................................&lt;br /&gt;
................................................................................&lt;br /&gt;
................................................................................&lt;br /&gt;
..................................................ready.&lt;br /&gt;
Probing EDD (edd=off to disable)... ok&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
[&amp;nbsp; OK&amp;nbsp; ] Reached target Network is Online.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Starting Notify NFS peers of a restart...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Starting OpenSSH server daemon...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Starting Postfix Mail Transport Agent...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Starting Logout off all iSCSI sessions on shutdown...&lt;br /&gt;
[&amp;nbsp; OK&amp;nbsp; ] Started Notify NFS peers of a restart.&lt;br /&gt;
[&amp;nbsp; OK&amp;nbsp; ] Started Logout off all iSCSI sessions on shutdown.&lt;br /&gt;
[&amp;nbsp; OK&amp;nbsp; ] Started OpenSSH server daemon.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Starting Availability of block devices...&lt;br /&gt;
[&amp;nbsp; OK&amp;nbsp; ] Started Availability of block devices.&lt;br /&gt;
[&amp;nbsp; OK&amp;nbsp; ] Started Dynamic System Tuning Daemon.&lt;br /&gt;
[&amp;nbsp; OK&amp;nbsp; ] Started Postfix Mail Transport Agent.&lt;br /&gt;
[&amp;nbsp; OK&amp;nbsp; ] Started GSSAPI Proxy Daemon.&lt;br /&gt;
[&amp;nbsp; OK&amp;nbsp; ] Reached target NFS client services.&lt;br /&gt;
[&amp;nbsp; OK&amp;nbsp; ] Reached target Remote File Systems (Pre).&lt;br /&gt;
[&amp;nbsp; OK&amp;nbsp; ] Reached target Remote File Systems.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Starting Permit User Sessions...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Starting LSB: Starts the Spacewalk Daemon...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Starting Crash recovery kernel arming...&lt;br /&gt;
[&amp;nbsp; OK&amp;nbsp; ] Started Permit User Sessions.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Starting Terminate Plymouth Boot Screen...&lt;br /&gt;
[&amp;nbsp; OK&amp;nbsp; ] Started Command Scheduler.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Starting Command Scheduler...&lt;br /&gt;
[&amp;nbsp; OK&amp;nbsp; ] Started Job spooling tools.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Starting Job spooling tools...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Starting Wait for Plymouth Boot Screen to Quit...&lt;br /&gt;
Oracle Linux Server 7.4&lt;br /&gt;
Kernel 4.1.12-94.3.9.el7uek.x86_64 on an x86_64&lt;br /&gt;
localhost login:&amp;nbsp;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;</description><link>https://oracledba.blogspot.com/2019/09/how-to-install-oracle-linux-in-kvm.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8I2wq2ksvlwimsyiMAAoDs6eVR3DkNaE_AFnv4AuYQhRm9m3KF9ZxYc5CoagDwfQ7IZqQaqKdqyODYyKOZfBdztcAIVUjTtTGffiahL65K0h4tpWP8Dhk6b8-3jMK4N6AiKiN/s72-c/KVM-VPS-Hosting2.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-8049997167628507276</guid><pubDate>Wed, 18 Sep 2019 16:00:00 +0000</pubDate><atom:updated>2019-09-18T19:00:04.394+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">rlwrap</category><category domain="http://www.blogger.com/atom/ns#">sqlplus</category><title>rlwrap and auto completion in sqlplus</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://draft.blogger.com/null" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="583" data-original-width="931" height="125" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVPUJuIzlil225nkvWAkUViwIIQ2hygC0XhqvMBeLbp9944YoitFXHaTMmaW9ZBTeY843XfDUtEIlDdY_o-qp1ZjIdIQiutbX4Q9rXBzGSeljQDYy1GZmpGz2KT1Xp1bzGzLSl/s200/rlwrap.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
It is a while I am following the blog of &lt;a href="https://dba010.com/"&gt;Mariami Kupatadze&lt;/a&gt;, it seems that our background and daily work is around the same area and interest as mine.&lt;br /&gt;
This week she posted a simple Linux adjustment (&lt;a href="https://dba010.com/2019/09/16/sqlplus-backspace-h-delete-d-add-command-history/"&gt;sqlplus backspace – ^H, delete – [[D^, add command history&lt;/a&gt;) for better way of using sqlplus.&lt;br /&gt;
Since I am also a geek of environment improvements that can ease daily work, I want to add a nice variation.&lt;br /&gt;
&lt;br /&gt;
An example of basic rlwrap usage:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
rlwrap sqlplus / as sysdba&lt;/blockquote&gt;
or use sqlplus as alias with rlwrap:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
alias sqlplus='rlwrap sqlplus'&lt;/blockquote&gt;
After some usage you will notice that default history file is created here&amp;nbsp;~/.sqlplus_history&lt;br /&gt;
I usually copy this file to ~/sqlplus.wordlist and edit it with wanted completion word.&lt;br /&gt;
&lt;br /&gt;
My personal file looks this way:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
abort&lt;br /&gt;
active&lt;br /&gt;
affirm&lt;br /&gt;
all_roles&lt;br /&gt;
alter&lt;br /&gt;
alternate&lt;br /&gt;
applied&lt;br /&gt;
applied_seq#&lt;br /&gt;
applied_thread#&lt;br /&gt;
apply&lt;br /&gt;
apply_finish&lt;br /&gt;
apply_lag&lt;br /&gt;
archived&lt;br /&gt;
archived_seq#&lt;br /&gt;
archived_thread#&lt;br /&gt;
archiver&lt;br /&gt;
async_blocks&lt;br /&gt;
attribute&lt;br /&gt;
availability&lt;br /&gt;
begin&lt;br /&gt;
binding&lt;br /&gt;
block#&lt;br /&gt;
blocks&lt;br /&gt;
blocksize&lt;br /&gt;
both&lt;br /&gt;
bytes&lt;br /&gt;
cancel&lt;br /&gt;
checkpoint&lt;br /&gt;
clear&lt;br /&gt;
clob&lt;br /&gt;
close&lt;br /&gt;
columns&lt;br /&gt;
compression&lt;br /&gt;
computed&lt;br /&gt;
connect&lt;br /&gt;
connectdb&lt;br /&gt;
convert&lt;br /&gt;
count(*)&lt;br /&gt;
create&lt;br /&gt;
creator&lt;br /&gt;
+DATA&lt;br /&gt;
database&lt;br /&gt;
database_role&lt;br /&gt;
datum_time&lt;br /&gt;
dba_registry&lt;br /&gt;
db_create_file_dest&lt;br /&gt;
db_create_online_log_des&lt;br /&gt;
dbms_output&lt;br /&gt;
db_recovery_file_dest&lt;br /&gt;
db_unique_name&lt;br /&gt;
declare&lt;br /&gt;
decode&lt;br /&gt;
delay&lt;br /&gt;
delay_mins&lt;br /&gt;
desc&lt;br /&gt;
descr&lt;br /&gt;
dest_id&lt;br /&gt;
destination&lt;br /&gt;
dest_name&lt;br /&gt;
dict&lt;br /&gt;
disable&lt;br /&gt;
disconnect&lt;br /&gt;
distinct&lt;br /&gt;
drop&lt;br /&gt;
dual&lt;br /&gt;
error&lt;br /&gt;
escape&lt;br /&gt;
estimated&lt;br /&gt;
exception&lt;br /&gt;
execute&lt;br /&gt;
exit&lt;br /&gt;
fail_block&lt;br /&gt;
fail_date&lt;br /&gt;
fail_sequence&lt;br /&gt;
failure_count&lt;br /&gt;
fal_server&lt;br /&gt;
finish&lt;br /&gt;
first_change#&lt;br /&gt;
flush&lt;br /&gt;
force&lt;br /&gt;
from&lt;br /&gt;
group&lt;br /&gt;
group#&lt;br /&gt;
gv$instance&lt;br /&gt;
gv$log&lt;br /&gt;
gv$standby_log&lt;br /&gt;
immediate&lt;br /&gt;
in-memory&lt;br /&gt;
inner&lt;br /&gt;
instance_name&lt;br /&gt;
instance_role&lt;br /&gt;
instanceval&lt;br /&gt;
inst_id&lt;br /&gt;
into&lt;br /&gt;
is_recovery_dest_file&lt;br /&gt;
isspecified&lt;br /&gt;
join&lt;br /&gt;
lag&lt;br /&gt;
last_change#&lt;br /&gt;
last_time&lt;br /&gt;
level&lt;br /&gt;
lgwr&lt;br /&gt;
like&lt;br /&gt;
log_archive_dest&lt;br /&gt;
log_archive_max_processes&lt;br /&gt;
logfile&lt;br /&gt;
log_num_standby&lt;br /&gt;
log_size&lt;br /&gt;
loop&lt;br /&gt;
lpad&lt;br /&gt;
managed&lt;br /&gt;
max_connections&lt;br /&gt;
max_failure&lt;br /&gt;
maximize&lt;br /&gt;
member&lt;br /&gt;
members&lt;br /&gt;
message&lt;br /&gt;
mount&lt;br /&gt;
MRP0&lt;br /&gt;
name&lt;br /&gt;
net_timeout&lt;br /&gt;
next_change#&lt;br /&gt;
no_data_found&lt;br /&gt;
nomount&lt;br /&gt;
null&lt;br /&gt;
number&lt;br /&gt;
onlinelog&lt;br /&gt;
online_logfile&lt;br /&gt;
open&lt;br /&gt;
open_mode&lt;br /&gt;
optional&lt;br /&gt;
order&lt;br /&gt;
pages&lt;br /&gt;
param&lt;br /&gt;
parameter&lt;br /&gt;
parent_dbun&lt;br /&gt;
parent_instance&lt;br /&gt;
parent_instancedest_role&lt;br /&gt;
pga_aggregate_target&lt;br /&gt;
prior&lt;br /&gt;
process&lt;br /&gt;
protection_level&lt;br /&gt;
protection_mode&lt;br /&gt;
put_line&lt;br /&gt;
recover&lt;br /&gt;
redo&lt;br /&gt;
register&lt;br /&gt;
registrar&lt;br /&gt;
reopen&lt;br /&gt;
reopen_secs&lt;br /&gt;
reset&lt;br /&gt;
resetlogs_change#&lt;br /&gt;
schedule&lt;br /&gt;
scope&lt;br /&gt;
select&lt;br /&gt;
sequence#&lt;br /&gt;
serveroutput&lt;br /&gt;
session&lt;br /&gt;
sessionval&lt;br /&gt;
sga_target&lt;br /&gt;
show&lt;br /&gt;
shutdown&lt;br /&gt;
sid='*'&lt;br /&gt;
size&lt;br /&gt;
spfile&lt;br /&gt;
spool&lt;br /&gt;
standby&lt;br /&gt;
standby_archive_dest&lt;br /&gt;
standby_file_management&lt;br /&gt;
standby_file_management='AUTO'&lt;br /&gt;
standby_file_management='MANUAL'&lt;br /&gt;
start&lt;br /&gt;
startup&lt;br /&gt;
startup_time&lt;br /&gt;
status&lt;br /&gt;
stopped&lt;br /&gt;
substr&lt;br /&gt;
switch&lt;br /&gt;
sync&lt;br /&gt;
sys_connect_by_path&lt;br /&gt;
sysdba&lt;br /&gt;
system&lt;br /&gt;
table&lt;br /&gt;
table_name&lt;br /&gt;
target&lt;br /&gt;
term&lt;br /&gt;
then&lt;br /&gt;
thread#&lt;br /&gt;
time_computed&lt;br /&gt;
timestamp&lt;br /&gt;
to_char&lt;br /&gt;
to_number&lt;br /&gt;
transmit_mode&lt;br /&gt;
transport_lag&lt;br /&gt;
true&lt;br /&gt;
truncate&lt;br /&gt;
type&lt;br /&gt;
union&lt;br /&gt;
unit&lt;br /&gt;
used&lt;br /&gt;
utl_raw.cast_to_varchar2(hextoraw(value_raw))&lt;br /&gt;
valid_for&lt;br /&gt;
valid_for=(online_logfile,all_roles)&lt;br /&gt;
valid_now&lt;br /&gt;
valid_role&lt;br /&gt;
valid_type&lt;br /&gt;
value&lt;br /&gt;
varchar2&lt;br /&gt;
v$archive_dest&lt;br /&gt;
v$archive_dest_status&lt;br /&gt;
v$archived_log&lt;br /&gt;
v$archive_gap&lt;br /&gt;
v$archive_processes&lt;br /&gt;
v$archive_status&lt;br /&gt;
v$database&lt;br /&gt;
v$dataguard_config&lt;br /&gt;
v$dataguard_stats&lt;br /&gt;
v$dataguard_status&lt;br /&gt;
verify&lt;br /&gt;
v$log&lt;br /&gt;
v$logfile&lt;br /&gt;
v$log_history&lt;br /&gt;
v$managed_standby&lt;br /&gt;
v$parameter&lt;br /&gt;
v$spparameter&lt;br /&gt;
v$standby_log&lt;br /&gt;
where&lt;br /&gt;
while&lt;br /&gt;
with&lt;br /&gt;
v$dnfs_files&lt;br /&gt;
v$dnfs_servers&lt;br /&gt;
v$dnfs_channels&lt;br /&gt;
@archive_dest&lt;br /&gt;
@archived_log&lt;br /&gt;
@backup&lt;br /&gt;
@dataguard_process&lt;br /&gt;
@space&lt;br /&gt;
@database&lt;br /&gt;
@dataguard_stats&lt;br /&gt;
@dataguard_status&lt;br /&gt;
@disks&lt;br /&gt;
@gap&lt;br /&gt;
@managed_standby&lt;br /&gt;
@recovery_area_usage&lt;br /&gt;
@recovery_progress&lt;br /&gt;
@help&lt;br /&gt;
@instance&lt;br /&gt;
@resize_logs&lt;br /&gt;
@asm_orphans&lt;br /&gt;
@resize_srls&lt;br /&gt;
@resize_logs&lt;/blockquote&gt;
&lt;div&gt;
Please notice that at the end I added some of my personal scripts.&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
Next step is to define the sqlplus alias with the created wordlist file and some more options:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
alias sqlplus="rlwrap -pBlue -i -b '()=\!&amp;lt;&amp;gt;&amp;amp;+-*|:;,' -f ~/sqlplus.wordlist sqlplus"&lt;/blockquote&gt;
&lt;b&gt;-p&lt;/b&gt; prompt color (a&amp;nbsp; different color then my bash prompt)&lt;br /&gt;
&lt;b&gt;-i&lt;/b&gt; Ignore case when completing&lt;br /&gt;
&lt;b&gt;-b&lt;/b&gt; Consider the specified characters as word-breaking&lt;br /&gt;
&lt;b&gt;-f&lt;/b&gt; completion word list&lt;br /&gt;
&lt;br /&gt;
Now you can enjoy a prompt with its own color, and the most important - your own words for tab completion.&lt;br /&gt;
&lt;br /&gt;
Bye the way, &lt;a href="https://www.oracle.com/database/technologies/appdev/sqlcl.html"&gt;SQLcl&lt;/a&gt; has also "auto-complete object names or keywords using the tab key" and it solves history, backspace and delete problems, but I am not sure about your own words :)&lt;br /&gt;
&lt;br /&gt;
One of the benefits of using &lt;i&gt;rlwrap&lt;/i&gt;, is that it enables searching via historical commands using Ctrl+R this way:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;At the &lt;i&gt;sqlplus &lt;/i&gt;prompt, hold down the &lt;b&gt;Ctrl &lt;/b&gt;key and push &lt;b&gt;R&lt;/b&gt;. You’ll receive a message that reads &lt;i&gt;(reverse-i-search)`’:&lt;/i&gt; followed by the cursor. Type the first letter of a command that you issued before to find it. For instance, if you’ve used the &lt;i&gt;select &lt;/i&gt;command, then push &lt;i&gt;s&lt;/i&gt;. If you’ve used &lt;i&gt;shutdown&lt;/i&gt;, then this might come up as well.&lt;/li&gt;
&lt;li&gt;Push&lt;b&gt; Ctrl+R &lt;/b&gt;again to cycle through similarly named commands. If you have a long history, then you might find a number of commands with similar names. Once you find the command that you want to run, push the enter key and your prompt will look like you’ve just typed it in and ran it. You won’t have to type the full command but instead only a letter or two.&lt;/li&gt;
&lt;li&gt;You can type a few letters to find a longer command that you might have issued in the past and it too will come up right away on the command line, and you can then push enter to run it like normal. It makes the process of finding something in your history much easier. Once a command is on the line you can also use the arrow keys and edit it before running it.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
Sources:&lt;br /&gt;
&lt;a href="https://oracle-base.com/articles/linux/rlwrap"&gt;Installing rlwrap&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://appuals.com/how-to-use-ctrl-r-in-linux/"&gt;How to Use CTRL R in Linux&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://www.oracle.com/database/technologies/appdev/sqlcl.html"&gt;Oracle SQLcl&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://linux.die.net/man/1/rlwrap"&gt;rlwrap - Linux man page&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://dba010.com/"&gt;DBA-010&lt;/a&gt;</description><link>https://oracledba.blogspot.com/2019/09/rlwrap-and-auto-completion-in-sqlplus.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVPUJuIzlil225nkvWAkUViwIIQ2hygC0XhqvMBeLbp9944YoitFXHaTMmaW9ZBTeY843XfDUtEIlDdY_o-qp1ZjIdIQiutbX4Q9rXBzGSeljQDYy1GZmpGz2KT1Xp1bzGzLSl/s72-c/rlwrap.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-3076804952962773861</guid><pubDate>Sun, 17 Feb 2019 07:38:00 +0000</pubDate><atom:updated>2019-02-17T09:38:36.595+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">19c</category><category domain="http://www.blogger.com/atom/ns#">Active Data Guard</category><category domain="http://www.blogger.com/atom/ns#">Data Guard</category><category domain="http://www.blogger.com/atom/ns#">DML Redirection</category><category domain="http://www.blogger.com/atom/ns#">oracle</category><category domain="http://www.blogger.com/atom/ns#">StandBy</category><title>Oracle 19c Updates on Active Data Guard using DML Redirection</title><description>&lt;div class="tr_bq"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHu253Cg5qiJKxhpPxjqEmIE1xRtYfUmTqOYg9zOJ1rCis5mRHIJ_Prqwh5n77hBEU8RT0Rzh4Bct_UYkA69GaXobT0Wdwe8N6BT97izhdM87chN6eF2FsdSAiQKhx_Mru44jT/s1600/Dml+redirect+.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="895" data-original-width="1074" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHu253Cg5qiJKxhpPxjqEmIE1xRtYfUmTqOYg9zOJ1rCis5mRHIJ_Prqwh5n77hBEU8RT0Rzh4Bct_UYkA69GaXobT0Wdwe8N6BT97izhdM87chN6eF2FsdSAiQKhx_Mru44jT/s320/Dml+redirect+.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
Previously, you could &lt;b&gt;only &lt;/b&gt;update Global Temp Tables on Active Data Guard standby database. From Oracle&amp;nbsp;&lt;b&gt;&lt;span style="color: red;"&gt;19c&lt;/span&gt;&lt;/b&gt;, you can also update regular tables.&lt;/div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Updates on Active Data Guard:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Update will be redirected to the primary&lt;/li&gt;
&lt;li&gt;Primary makes update, generates &amp;amp; sends redo for that update to all standbys&lt;/li&gt;
&lt;li&gt;Active Data Guard session sees the update in redo apply and resumes&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Preserves ACID properties for ADG session&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Redirected update only visible to session before commit; visible to all sessions after commit&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;For “Mostly Read, &lt;span style="color: red;"&gt;Occasional Updates&lt;/span&gt;” applications – for example, recording user logins for auditing purposes&lt;/li&gt;
&lt;li&gt;Enabled by &lt;b&gt;ADG_REDIRECT_DML&lt;/b&gt; at system or session level&lt;/li&gt;
&lt;/ul&gt;
The following setup is based on Active Data guard configuration is MaxAvailability, but the behavior is the same when configuring MaxPerformance&lt;br /&gt;
&lt;br /&gt;
A step by step guide to demonstrate this feature:&lt;br /&gt;
&lt;h2&gt;
Current configuration&lt;/h2&gt;
&lt;h3&gt;
Basic setup&amp;nbsp;&lt;/h3&gt;
The setup is primary database sends its redo logfiles through a far sync instance to a remote standby database.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
DGMGRL&amp;gt; show configuration&lt;br /&gt;
&lt;br /&gt;
Configuration - PRODCONF&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; Protection Mode: MaxAvailability&lt;br /&gt;
&amp;nbsp; Members:&lt;br /&gt;
&amp;nbsp; orcl - Primary database&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fdb&amp;nbsp; - Far sync instance&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; sdb&amp;nbsp; - Physical standby database&lt;br /&gt;
&lt;br /&gt;
Fast-Start Failover:&amp;nbsp; Disabled&lt;br /&gt;
&lt;br /&gt;
Configuration Status:&lt;br /&gt;
SUCCESS&amp;nbsp; &amp;nbsp;(status updated 49 seconds ago)&lt;/blockquote&gt;
&lt;h3&gt;
Redo Route configuration&lt;/h3&gt;
&lt;h4&gt;
Primary&lt;/h4&gt;
The redo log files are transferred to the far sync instance, if the latter will not be available, the transport will be done to the standby as second priority.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
DGMGRL&amp;gt; show database orcl RedoRoutes&lt;br /&gt;
&amp;nbsp; RedoRoutes = '(LOCAL : ( FDB PRIORITY=1, SDB PRIORITY=2 ) )'&lt;/blockquote&gt;
&lt;h4&gt;
Far Sync&lt;/h4&gt;
Far sync receives the redo logfiles and transfers them to the standby asynchronously&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
DGMGRL&amp;gt; show far_sync fdb RedoRoutes&lt;br /&gt;
&amp;nbsp; RedoRoutes = '( ORCL : SDB ASYNC)'&lt;/blockquote&gt;
&lt;h3&gt;
LogXptMode configuration&lt;/h3&gt;
&lt;h4&gt;
Far sync&amp;nbsp;&lt;/h4&gt;
Far sync instance receives the redo logfiles synchronously&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
DGMGRL&amp;gt; show far_sync fdb LogXptMode&lt;br /&gt;
&amp;nbsp; LogXptMode = 'SYNC'&lt;/blockquote&gt;
&lt;h4&gt;
Standby&lt;/h4&gt;
Standby database receives the redo logfiles asynchronously&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
DGMGRL&amp;gt; show database sdb LogXptMode&lt;br /&gt;
&amp;nbsp; LogXptMode = 'ASYNC'&lt;/blockquote&gt;
The standby is in sync and there is no lag&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
DGMGRL&amp;gt; show database sdb&lt;br /&gt;
&lt;br /&gt;
Database - sdb&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; Role:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PHYSICAL STANDBY&lt;br /&gt;
&amp;nbsp; Intended State:&amp;nbsp; &amp;nbsp; &amp;nbsp;APPLY-ON&lt;br /&gt;
&amp;nbsp; Transport Lag:&amp;nbsp; &amp;nbsp; &amp;nbsp; 0 seconds (computed 1 second ago)&lt;br /&gt;
&amp;nbsp; Apply Lag:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 seconds (computed 1 second ago)&lt;br /&gt;
&amp;nbsp; Average Apply Rate: 4.00 KByte/s&lt;br /&gt;
&amp;nbsp; Real Time Query:&amp;nbsp; &amp;nbsp; ON&lt;br /&gt;
&amp;nbsp; Instance(s):&lt;br /&gt;
&amp;nbsp; &amp;nbsp; orcl&lt;br /&gt;
&lt;br /&gt;
Database Status:&lt;br /&gt;
SUCCESS&lt;/blockquote&gt;
&lt;h2&gt;
Prepare the primary database&lt;/h2&gt;
&lt;h3&gt;
Connect as sys&lt;/h3&gt;
&lt;blockquote class="tr_bq"&gt;
$ sqlplus / as sysdba&lt;br /&gt;
&lt;br /&gt;
SQL*Plus: Release 19.0.0.0.0 - Production on Thu Dec 27 13:15:51 2018&lt;br /&gt;
Version 19.1.0.0.0&lt;br /&gt;
&lt;br /&gt;
Copyright (c) 1982, 2018, Oracle.&amp;nbsp; All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Connected to:&lt;br /&gt;
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Beta&lt;br /&gt;
Version 19.1.0.0.0&lt;/blockquote&gt;
&lt;h3&gt;
Enable the feature ADG_REDIRECT_DML&lt;/h3&gt;
&lt;blockquote class="tr_bq"&gt;
SYS@orcl:SQL&amp;gt; alter system set ADG_REDIRECT_DML=TRUE scope=both;&lt;br /&gt;
&lt;br /&gt;
System altered.&lt;/blockquote&gt;
&lt;h3&gt;
Connect to pluggable database&lt;/h3&gt;
&lt;blockquote class="tr_bq"&gt;
SYS@orcl:SQL&amp;gt; show pdbs&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CON_ID CON_NAME&lt;span style="white-space: pre;"&gt;   &lt;/span&gt;&amp;nbsp; OPEN MODE&amp;nbsp; RESTRICTED&lt;br /&gt;
---------- ------------------------------ ---------- ----------&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt; 2 PDB$SEED&lt;span style="white-space: pre;"&gt;   &lt;/span&gt;&amp;nbsp; READ ONLY&amp;nbsp; NO&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt; 3 PDB&lt;span style="white-space: pre;"&gt;    &lt;/span&gt;&amp;nbsp; READ WRITE NO&lt;br /&gt;
SYS@orcl:SQL&amp;gt; alter session set container=pdb;&lt;br /&gt;
&lt;br /&gt;
Session altered.&lt;/blockquote&gt;
&lt;h3&gt;
Create a test user&lt;/h3&gt;
&lt;blockquote class="tr_bq"&gt;
SYS@orcl:SQL&amp;gt; create user test_user identified by test_user;&lt;br /&gt;
&lt;br /&gt;
User created.&lt;br /&gt;
SYS@orcl:SQL&amp;gt; grant connect, create session, create table to test_user;&lt;br /&gt;
Grant succeeded.&lt;br /&gt;
SYS@orcl:SQL&amp;gt; alter user test_user quota unlimited on users;&lt;br /&gt;
&lt;br /&gt;
User altered.&lt;/blockquote&gt;
&lt;h3&gt;
Connect to the test user&lt;/h3&gt;
&lt;blockquote class="tr_bq"&gt;
SYS@orcl:SQL&amp;gt; connect test_user/test_user@pdb_svc&lt;br /&gt;
Connected.&lt;br /&gt;
Create sample tables&lt;br /&gt;
TEST_USER@primary_host/pdb_svc:SQL&amp;gt; create table regular_table(col1 number);&lt;br /&gt;
&lt;br /&gt;
Table created.&lt;br /&gt;
TEST_USER@primary_host/pdb_svc:SQL&amp;gt; create global temporary table global_tt1(col1 number);&lt;br /&gt;
&lt;br /&gt;
Table created.&lt;/blockquote&gt;
&lt;h2&gt;
Connect to the standby database&lt;/h2&gt;
&lt;h3&gt;
Connect as sys&lt;/h3&gt;
&lt;blockquote class="tr_bq"&gt;
$ sqlplus / as sysdba&lt;br /&gt;
&lt;br /&gt;
SQL*Plus: Release 19.0.0.0.0 - Production on Thu Dec 27 13:15:51 2018&lt;br /&gt;
Version 19.1.0.0.0&lt;br /&gt;
&lt;br /&gt;
Copyright (c) 1982, 2018, Oracle.&amp;nbsp; All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Connected to:&lt;br /&gt;
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Beta&lt;br /&gt;
Version 19.1.0.0.0&lt;/blockquote&gt;
&lt;h3&gt;
Enable the feature ADG_REDIRECT_DML&lt;/h3&gt;
&lt;blockquote class="tr_bq"&gt;
SYS@sdb:SQL&amp;gt; alter system set ADG_REDIRECT_DML=TRUE scope=both;&lt;br /&gt;
&lt;br /&gt;
System altered.&lt;/blockquote&gt;
&lt;h3&gt;
Connect to the test user&lt;/h3&gt;
&lt;blockquote class="tr_bq"&gt;
$ sqlplus test_user/test_user@standby_host:1521/pdb_svc&lt;br /&gt;
&lt;br /&gt;
SQL*Plus: Release 19.0.0.0.0 - Production on Thu Dec 27 13:24:28 2018&lt;br /&gt;
Version 19.1.0.0.0&lt;br /&gt;
&lt;br /&gt;
Copyright (c) 1982, 2018, Oracle.&amp;nbsp; All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Last Successful login time: Thu Dec 27 2018 13:20:05 +02:00&lt;br /&gt;
&lt;br /&gt;
Connected to:&lt;br /&gt;
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Beta&lt;br /&gt;
Version 19.1.0.0.0&lt;/blockquote&gt;
&lt;h3&gt;
Do the magic &#128522;&lt;/h3&gt;
&lt;blockquote class="tr_bq"&gt;
TEST_USER@standby_host:1521/pdb_svc:SQL&amp;gt; set timing on&lt;/blockquote&gt;
&lt;h4&gt;
Check that inserting to a regular table is working on the standby database&lt;/h4&gt;
&lt;blockquote class="tr_bq"&gt;
TEST_USER@standby_host:1521/pdb_svc:SQL&amp;gt; insert into regular_table(col1) values(1);&lt;br /&gt;
&lt;br /&gt;
1 row created.&lt;br /&gt;
&lt;br /&gt;
Elapsed: 00:00:01.23&lt;/blockquote&gt;
Look above at the elapsed time of the insert – this is the time in my environment that the standby asked from the primary to perform the insert and then the updated blocks are transferred from the primary to the standby.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
TEST_USER@standby_host:1521/pdb_svc:SQL&amp;gt; select * from regular_table;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; COL1&lt;br /&gt;
----------&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt; 1&lt;br /&gt;
&lt;br /&gt;
Elapsed: 00:00:00.03&lt;br /&gt;
TEST_USER@standby_host:1521/pdb_svc:SQL&amp;gt; commit;&lt;br /&gt;
&lt;br /&gt;
Commit complete.&lt;br /&gt;
&lt;br /&gt;
Elapsed: 00:00:01.06&lt;/blockquote&gt;
Look above at the elapsed time of the commit&lt;br /&gt;
&lt;h4&gt;
Check that inserting to a global temporary table is working on the standby database&lt;/h4&gt;
&lt;blockquote class="tr_bq"&gt;
TEST_USER@standby_host:1521/pdb_svc:SQL&amp;gt;&amp;nbsp; insert into global_tt1(col1) values(1);&lt;br /&gt;
&lt;br /&gt;
1 row created.&lt;br /&gt;
&lt;br /&gt;
Elapsed: 00:00:00.02&lt;/blockquote&gt;
Look above at the elapsed time of the insert – much faster then working with a normal table.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
TEST_USER@standby_host:1521/pdb_svc:SQL&amp;gt; commit;&lt;br /&gt;
&lt;br /&gt;
Commit complete.&lt;br /&gt;
&lt;br /&gt;
Elapsed: 00:00:00.00&lt;/blockquote&gt;
Look above at the elapsed time of the commit – look like it didn’t take time at all&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
TEST_USER@standby_host:1521/pdb_svc:SQL&amp;gt; select * from global_tt1;&lt;br /&gt;
&lt;br /&gt;
no rows selected&lt;br /&gt;
&lt;br /&gt;
Elapsed: 00:00:00.00&lt;/blockquote&gt;
Check that we can create global temporary table on the standby database&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
TEST_USER@standby_host:1521/pdb_svc:SQL&amp;gt; create global temporary table global_tt2(col1 number);&lt;br /&gt;
&lt;br /&gt;
Table created.&lt;br /&gt;
&lt;br /&gt;
Elapsed: 00:00:01.07&lt;br /&gt;
TEST_USER@standby_host:1521/pdb_svc:SQL&amp;gt;&amp;nbsp; insert into global_tt2(col1) values(1);&lt;br /&gt;
&lt;br /&gt;
1 row created.&lt;br /&gt;
&lt;br /&gt;
Elapsed: 00:00:00.01&lt;/blockquote&gt;
&lt;h2&gt;
Check if &lt;u&gt;primary&lt;/u&gt; database is updated&lt;/h2&gt;
&lt;blockquote&gt;
TEST_USER@primary_host/pdb_svc:SQL&amp;gt; select * from regular_table;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; COL1&lt;br /&gt;
----------&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt; 1&lt;br /&gt;
TEST_USER@primary_host/pdb_svc:SQL&amp;gt; desc global_tt2&lt;br /&gt;
&amp;nbsp;Name&lt;span style="white-space: pre;"&gt;            &lt;/span&gt; Null?&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; Type&lt;br /&gt;
&amp;nbsp;----------------------------------------------------------------------------------------------- -------- ----------------------------------------------------------------&lt;br /&gt;
&amp;nbsp;COL1&lt;span style="white-space: pre;"&gt;             &lt;/span&gt;&amp;nbsp; NUMBER&lt;/blockquote&gt;
Yossi</description><link>https://oracledba.blogspot.com/2019/02/oracle-19c-updates-on-active-data-guard.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHu253Cg5qiJKxhpPxjqEmIE1xRtYfUmTqOYg9zOJ1rCis5mRHIJ_Prqwh5n77hBEU8RT0Rzh4Bct_UYkA69GaXobT0Wdwe8N6BT97izhdM87chN6eF2FsdSAiQKhx_Mru44jT/s72-c/Dml+redirect+.jpg" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-549939160362070730</guid><pubDate>Mon, 07 Jan 2019 15:00:00 +0000</pubDate><atom:updated>2019-01-07T17:00:06.811+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">auto discovery</category><category domain="http://www.blogger.com/atom/ns#">database</category><category domain="http://www.blogger.com/atom/ns#">discover</category><category domain="http://www.blogger.com/atom/ns#">discovery</category><category domain="http://www.blogger.com/atom/ns#">find ORACLE_HOME</category><category domain="http://www.blogger.com/atom/ns#">identify</category><category domain="http://www.blogger.com/atom/ns#">Linux</category><category domain="http://www.blogger.com/atom/ns#">ORACLE_HOME</category><title>Oracle Database Auto Discovery</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmQG-U6__Hygj4-0G6iE3ypPe6TkbMeHiyfyeqzqAEPW93Tu4g0R9wPyqTr7aqaIa-Rdz3j1Kn7xpJBiB8ufpLI_pmvnyDWimYPi4qOJZW9YM8UonR6sy8nQskOEmCm-Lczqsd/s1600/1Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="208" data-original-width="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmQG-U6__Hygj4-0G6iE3ypPe6TkbMeHiyfyeqzqAEPW93Tu4g0R9wPyqTr7aqaIa-Rdz3j1Kn7xpJBiB8ufpLI_pmvnyDWimYPi4qOJZW9YM8UonR6sy8nQskOEmCm-Lczqsd/s1600/1Untitled.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;div&gt;
I was asked by our development team to provide the best way to identify database parameters from database host, I was surprised to find so many options.&lt;/div&gt;
&lt;h2&gt;
Identifying all instances on the current machine&lt;/h2&gt;
&lt;h3&gt;
Option 1:&amp;nbsp;&lt;/h3&gt;
&lt;blockquote class="tr_bq"&gt;
$ ps -ef |grep smon&amp;nbsp;| grep -v grep&lt;br /&gt;
oracle&amp;nbsp; &amp;nbsp; 3025&amp;nbsp; 1&amp;nbsp; 0&amp;nbsp; 2016 ?&amp;nbsp; &amp;nbsp;00:00:48 asm_smon_+ASM&lt;br /&gt;
oracle&amp;nbsp; &amp;nbsp;&lt;span style="color: red;"&gt;11459&amp;nbsp; &lt;/span&gt;1&amp;nbsp; 0 17:24 ?&amp;nbsp; 00:00:00 ora_smon_&lt;span style="color: red;"&gt;fdb&lt;/span&gt;&lt;/blockquote&gt;
oracle SID is&amp;nbsp;&lt;b&gt;fdb &lt;/b&gt;and process id is&amp;nbsp;&lt;b&gt;11459&lt;/b&gt;&lt;br /&gt;
&lt;h3&gt;
Option 2:&amp;nbsp;&lt;/h3&gt;
&lt;blockquote class="tr_bq"&gt;
$ pgrep&amp;nbsp; -lf _pmon_&lt;br /&gt;
3025 asm_pmon_+asm&lt;br /&gt;
&lt;span style="color: red;"&gt;11459 &lt;/span&gt;ora_pmon_&lt;span style="color: red;"&gt;fdb&lt;/span&gt;&lt;/blockquote&gt;
&lt;h3&gt;
&lt;div style="font-size: medium; font-weight: 400;"&gt;
oracle SID is&amp;nbsp;&lt;b&gt;fdb&amp;nbsp;&lt;/b&gt;and process id is&amp;nbsp;&lt;b&gt;11459&lt;/b&gt;&lt;/div&gt;
&lt;/h3&gt;
&lt;h3&gt;
Option 3:&amp;nbsp;&lt;/h3&gt;
cleaner way for sid:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ ps -ef |grep 'ora_smon_.*$' | grep -v grep | awk -F_ '/ora_smon/{print $NF}'&lt;br /&gt;
&lt;span style="color: red;"&gt;fdb&lt;/span&gt;&lt;/blockquote&gt;
oracle SID is&amp;nbsp;&lt;b&gt;fdb&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;h3&gt;
Option 4:&amp;nbsp;&lt;/h3&gt;
When we already know ASM home (grid infrastructure) we can use the cluster commands:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ /oracle/product/12.1.0.2/grid/bin/crsctl stat res -t -w "TYPE = ora.database.type"|awk '/^ora./ {l=$0;} !/^ora./ { if ( l &amp;gt; "" ) l=l " " $0; print l;l="";}'|grep&amp;nbsp; ${HOSTNAME%%.*}&lt;br /&gt;
&amp;nbsp;ora.&lt;span style="color: red;"&gt;pdb&lt;/span&gt;.db&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ONLINE&amp;nbsp; ONLINE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;primary_host&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Open,STABLE&lt;/blockquote&gt;
&lt;h3&gt;
Option 5:&lt;/h3&gt;
$ cat /etc/oratab | grep -v ^'#' | grep -v ^$ | awk -F ":" ' { print $1 }' | grep -v ASM | uniq&lt;br /&gt;
&lt;span style="color: red;"&gt;fdb&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;h2&gt;
Identify oracle_home&lt;/h2&gt;
&lt;h3&gt;
Option 1:&lt;/h3&gt;
&lt;div&gt;
Using process id we already found in the previous run (look above for &lt;b&gt;option 1 &lt;/b&gt;or&lt;b&gt; 2&lt;/b&gt;)&lt;/div&gt;
&lt;blockquote class="tr_bq"&gt;
$ grep -z ^ORACLE_HOME&amp;nbsp; /proc/11459/environ&lt;br /&gt;
ORACLE_HOME=&lt;span style="color: red;"&gt;/oracle/product/12.1.0.2/dbhome_1&lt;/span&gt;&lt;/blockquote&gt;
&lt;h3&gt;
&amp;nbsp;option 2:&lt;/h3&gt;
&lt;blockquote class="tr_bq"&gt;
$ pwdx &lt;b&gt;11459&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;11459&lt;/b&gt;: &lt;span style="color: red;"&gt;/oracle/product/12.1.0.2/dbhome_1/dbs&lt;/span&gt;&lt;/blockquote&gt;
&lt;h3&gt;
&amp;nbsp;option 3:&lt;/h3&gt;
&lt;blockquote class="tr_bq"&gt;
$ strings /proc/&lt;b&gt;11459&lt;/b&gt;/environ | grep ORACLE_HOME&lt;br /&gt;
ORACLE_HOME_LISTNER=&lt;span style="color: red;"&gt;/oracle/product/12.1.0.2/grid&lt;/span&gt;&lt;br /&gt;
ORACLE_HOME=&lt;span style="color: red;"&gt;/oracle/product/12.1.0.2/dbhome_1&lt;/span&gt;&lt;/blockquote&gt;
&lt;h3&gt;
option 4:&lt;/h3&gt;
&lt;blockquote class="tr_bq"&gt;
$ cat /etc/oratab | grep -v ^'#' | grep -v ^$ | awk -F ":" ' { print $2 }' | grep -v ASM | uniq&lt;br /&gt;
&lt;span style="color: red;"&gt;/oracle/product/12.1.0.2/grid&lt;/span&gt;&lt;span style="color: red;"&gt;/oracle/product/12.1.0.2/dbhome_1&lt;/span&gt;&lt;/blockquote&gt;
If needed more information than connection to the remote instances should be created via SQL*Net for this we should have sys password&lt;br /&gt;
&lt;h2&gt;
Checking from the Far sync - What is the name of the Primary Database&amp;nbsp;&lt;/h2&gt;
&lt;blockquote class="tr_bq"&gt;
select INST_ID,SOURCE_DB_UNIQUE_NAME from&amp;nbsp; gv$dataguard_stats where NAME='transport lag';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;SOURCE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;DB&lt;br /&gt;
INST UNIQUE&lt;br /&gt;
&amp;nbsp; ID NAME&lt;br /&gt;
---- -------&lt;br /&gt;
&amp;nbsp; &amp;nbsp;1 &lt;span style="color: red;"&gt;pdb&lt;/span&gt;&amp;nbsp;&lt;/blockquote&gt;
&lt;h2&gt;
Checking from the Far sync - What is the name of the Standby Database&amp;nbsp;&lt;/h2&gt;
&lt;h2&gt;
&lt;div style="font-size: medium; font-weight: 400;"&gt;
SQL&amp;gt; SELECT db_unique_name FROM v$archive_dest WHERE destination IS NOT NULL and TARGET not in ('LOCAL','PRIMARY');&lt;/div&gt;
&lt;div style="font-size: medium; font-weight: 400;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-size: medium; font-weight: 400;"&gt;
DB&lt;/div&gt;
&lt;div style="font-size: medium; font-weight: 400;"&gt;
UNIQUE&lt;/div&gt;
&lt;div style="font-size: medium; font-weight: 400;"&gt;
NAME&lt;/div&gt;
&lt;div style="font-size: medium; font-weight: 400;"&gt;
-------&lt;/div&gt;
&lt;div style="font-size: medium; font-weight: 400;"&gt;
&lt;span style="color: red;"&gt;sdb&lt;/span&gt;&lt;/div&gt;
&lt;/h2&gt;
&lt;h2&gt;
Identifying primary and standby database hosts and ports via tnsping (from previous results)&lt;/h2&gt;
&lt;blockquote class="tr_bq"&gt;
$ tnsping pdb&lt;br /&gt;
&lt;br /&gt;
TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 06-FEB-2017 18:04:00&lt;br /&gt;
&lt;br /&gt;
Copyright (c) 1997, 2014, Oracle.&amp;nbsp; All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Used parameter files:&lt;br /&gt;
/oracle/product/12.1.0.2/dbhome_1/network/admin/sqlnet.ora&lt;br /&gt;
&lt;br /&gt;
Used TNSNAMES adapter to resolve the alias&lt;br /&gt;
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =&lt;span style="color: red;"&gt;primary_host&lt;/span&gt;)(PORT = &lt;span style="color: red;"&gt;1521&lt;/span&gt;))) (CONNECT_DATA = (SERVICE_NAME = &lt;span style="color: red;"&gt;pdb&lt;/span&gt;)))&lt;br /&gt;
OK (0 msec)&lt;/blockquote&gt;
Please let me know if you have some other tricks</description><link>https://oracledba.blogspot.com/2019/01/oracle-database-auto-discovery.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmQG-U6__Hygj4-0G6iE3ypPe6TkbMeHiyfyeqzqAEPW93Tu4g0R9wPyqTr7aqaIa-Rdz3j1Kn7xpJBiB8ufpLI_pmvnyDWimYPi4qOJZW9YM8UonR6sy8nQskOEmCm-Lczqsd/s72-c/1Untitled.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-8111897927463446960</guid><pubDate>Mon, 31 Dec 2018 15:00:00 +0000</pubDate><atom:updated>2018-12-31T17:00:10.706+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">OEM</category><category domain="http://www.blogger.com/atom/ns#">plug-in</category><category domain="http://www.blogger.com/atom/ns#">snmp</category><title>Creating SNMP Plug-In for Enterprise Manager Cloud Control</title><description>&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIXPvf_ZtIYjvwGHnE_yguQI0c7KkxQJ20tOtjzG4C-HosNqq2mrEOl6IgINYrpkyLIzyBTNd6bgRUrVyuqVYKScdFpa7tfe7brDvnbzuCrDHYlrVsfA3i-m3c8qjeB6pgBXRC/s1600/snmp2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="256" data-original-width="618" height="132" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIXPvf_ZtIYjvwGHnE_yguQI0c7KkxQJ20tOtjzG4C-HosNqq2mrEOl6IgINYrpkyLIzyBTNd6bgRUrVyuqVYKScdFpa7tfe7brDvnbzuCrDHYlrVsfA3i-m3c8qjeB6pgBXRC/s320/snmp2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Putting it In my previous blog (&lt;a href="https://oracledba.blogspot.com/2018/12/enterprise-manager-cloud-control-snmp.html"&gt;Enterprise Manager Cloud Control, SNMP, and Plug-Ins –&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://oracledba.blogspot.com/2018/12/enterprise-manager-cloud-control-snmp.html"&gt;The Background&lt;/a&gt;), I shared my frustration in trying to create&lt;br /&gt;
a plug-in in OEM. Here are the technical steps for a very simple plug-in.&lt;br /&gt;
&lt;h2&gt;
    Preparing Plug-in&lt;br /&gt;
&lt;/h2&gt;
To build your own plug-in, you need to download a development kit:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;To download EDK using UI, from the &lt;strong&gt;Setup&lt;/strong&gt; menu, select&lt;strong&gt;Extensibility,&lt;/strong&gt; and then select    &lt;b&gt;Development Kit.&lt;/b&gt;OR&lt;br /&gt;To download EDK using EMCLI, run the following steps:&lt;/li&gt;
&lt;h3&gt;
&lt;ul&gt;
&lt;li&gt;Log in to OEM:&lt;/li&gt;
&lt;/ul&gt;
&lt;/h3&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;code&gt;$ /oracle/em/middleware/bin/emcli login -username=sysman&lt;/code&gt;&lt;code&gt;Enter password :&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;Login successful&lt;/code&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;ol&gt;&lt;h3&gt;
&lt;ul&gt;
&lt;li&gt;Download the EDK zip archive:&lt;/li&gt;
&lt;/ul&gt;
&lt;/h3&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;code&gt;$ emcli get_ext_dev_kit&lt;/code&gt;&lt;code&gt;Downloading edk.zip&lt;/code&gt;&lt;code&gt;File saved as edk.zip&lt;/code&gt;&lt;code&gt;File(s) downloaded successfully&lt;/code&gt;&lt;/blockquote&gt;
&lt;/div&gt;
Unpack the downloaded EDK ZIP archive to a directory on your local&lt;br /&gt;
system. For example:&lt;br /&gt;
&lt;div&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;code&gt;$ &lt;/code&gt;&lt;code&gt;unzip 13.3.0.0.0_edk_partner.zip&lt;/code&gt;&lt;/blockquote&gt;
&lt;/div&gt;
There are several restrictions and guidelines you should know&amp;nbsp;before you create your plug-in.&lt;br /&gt;
Most of them can be found at the following link:&amp;nbsp;&lt;a href="https://docs.oracle.com/cd/E73210_01/EMPRF/GUID-B80B66E6-D07B-4890-A4CE-A7ECF7874946.htm#GUID-CDEA82AB-C80F-4F0A-AEC0-A49AB2D12D6C"&gt;About Plug-in Metadata&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;
    Restrictions and Guidelines&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Each plug-in must be assigned a version. The plug-in versioning syntax is as follows: a.b.c.d.e, where:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;a.b = The version of the Enterprise Manager Extensibility Development Kit (EDK) used for development (13.1, 13.2, and so on)&lt;/li&gt;
&lt;ul&gt;&lt;/ul&gt;
&lt;li&gt;c = The developer-assigned plug-in version; this value must be incremented with each plug-in release on the same Enterprise Manager Cloud Control release&lt;/li&gt;
&lt;li&gt;d = Indicates whether the plug-in is a beta version or a production version; the value 0 indicates beta and 1 or later indicates production&lt;/li&gt;
&lt;li&gt;e = For future use; the default value is 0&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;&lt;/ul&gt;
&lt;ul&gt;Putting it all together, the following example shows the first version of a plug-in created for Enterprise Manager Cloud Control 13c: 13.1.1.1.0&lt;/ul&gt;
&lt;ul&gt;&lt;/ul&gt;
&lt;li&gt;Each time you deploy a new plug-in version, you must increase the version number.&lt;br /&gt;I created a script using the&amp;nbsp;&lt;em&gt;sed&lt;/em&gt; command to increase the number:&lt;/li&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td valign="top" width="553"&gt;sed -i "s/13.3.0.${PREV_VER}.0/13.3.0.${CURR_VER}.0/g" plugin.xml agent/plugin_registry.xml&lt;br /&gt;
find ${STAGE_DIR} -type f -name "*xml"|xargs grep -l META_VER | xargs sed -i "s/META_VER=\"13.${PREV_VER}/META_VER=\"13.${CURR_VER}/g"&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/blockquote&gt;
&lt;li&gt;Plug-ins are identified by a unique plug-in identifier (ID). The plug-in ID has three parts:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Vendor ID (8 characters). For example: test&lt;/li&gt;
&lt;li&gt;Product ID (8 characters). For example: switch&lt;/li&gt;
&lt;li&gt;Plug-in Tag (4 characters). For example: xkey.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;The content in the following files should be identical with each other:&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;&lt;ul&gt;
&lt;li&gt;agent/default_collection/test_switch_xkey.xml    oms/metadata/default_collection/test_switch_xkey.xml&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;agent/metadata/test_switch_xkey.xml&lt;br /&gt;
oms/metadata/test_switch_xkey.xml&lt;br /&gt;
oms/metadata/targetType/test_switch_xkey.xml&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;ol&gt;&lt;/ol&gt;
&lt;h3&gt;
    Folder Structure &lt;/h3&gt;
The structure of the folders and files should be like this:  &lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;
&lt;span lang="en-IL" style="font-family: &amp;quot;courier new&amp;quot;;"&gt;├── agent&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;
&lt;span lang="en-IL" style="font-family: &amp;quot;courier new&amp;quot;;"&gt;│&amp;nbsp;&amp;nbsp; ├── default_collection&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;
&lt;span lang="en-IL" style="font-family: &amp;quot;courier new&amp;quot;;"&gt;│&amp;nbsp;&amp;nbsp; │&amp;nbsp;&amp;nbsp; └── test_switch_xkey.xml&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;
&lt;span lang="en-IL" style="font-family: &amp;quot;courier new&amp;quot;;"&gt;│&amp;nbsp;&amp;nbsp; ├── metadata&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;
&lt;span lang="en-IL" style="font-family: &amp;quot;courier new&amp;quot;;"&gt;│&amp;nbsp;&amp;nbsp; │&amp;nbsp;&amp;nbsp; └── test_switch_xkey.xml&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;
&lt;span lang="en-IL" style="font-family: &amp;quot;courier new&amp;quot;;"&gt;│&amp;nbsp;&amp;nbsp; └── plugin_registry.xml&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;
&lt;span lang="en-IL" style="font-family: &amp;quot;courier new&amp;quot;;"&gt;├── discovery&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;
&lt;span lang="en-IL" style="font-family: &amp;quot;courier new&amp;quot;;"&gt;│&amp;nbsp;&amp;nbsp; ├── test_switch_xkey_snmp_discovery.pl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;
&lt;span lang="en-IL" style="font-family: &amp;quot;courier new&amp;quot;;"&gt;│&amp;nbsp;&amp;nbsp; └── test_switch_xkey_snmp_discovery.xml&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;
&lt;span lang="en-IL" style="font-family: &amp;quot;courier new&amp;quot;;"&gt;├── oms&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;
&lt;span lang="en-IL" style="font-family: &amp;quot;courier new&amp;quot;;"&gt;│&amp;nbsp;&amp;nbsp; └── metadata&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;
&lt;span lang="en-IL" style="font-family: &amp;quot;courier new&amp;quot;;"&gt;│&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ├── test_switch_xkey.xml&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;
&lt;span lang="en-IL" style="font-family: &amp;quot;courier new&amp;quot;;"&gt;│&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ├── default_collection&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;
&lt;span lang="en-IL" style="font-family: &amp;quot;courier new&amp;quot;;"&gt;│&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; │&amp;nbsp;&amp;nbsp; └── test_switch_xkey.xml&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;
&lt;span lang="en-IL" style="font-family: &amp;quot;courier new&amp;quot;;"&gt;│&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ├── discovery&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;
&lt;span lang="en-IL" style="font-family: &amp;quot;courier new&amp;quot;;"&gt;│&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; └── targetType&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;
&lt;span lang="en-IL" style="font-family: &amp;quot;courier new&amp;quot;;"&gt;│&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; └── test_switch_xkey.xml&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;a href="https://draft.blogger.com/blogger.g?blogID=6061714" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;a href="https://draft.blogger.com/blogger.g?blogID=6061714" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;
&lt;span lang="en-IL" style="font-family: &amp;quot;courier new&amp;quot;;"&gt;└── plugin.xml&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3&gt;
    Metadata File &lt;/h3&gt;
A basic plug-in requires metadata for the plug-in itself, including information such as the name and version that is used by Oracle Management Service and Management Agents, definition of a metric indicating whether the monitored target is up, and definition of the frequency at which metric data should be collected.  Metadata file example:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;
&amp;lt;TargetMetadata META_VER="13.73" TYPE="test_switch_xkey"&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;Display&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;Label NLSID="hs_displayname"&amp;gt;SNMP Plugin&amp;lt;/Label&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;/Display&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;Metric NAME="SnmpTrap" TYPE="TABLE"&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;Display&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;Label NLSID="MY_threshold"&amp;gt;Snmp Trap&amp;lt;/Label&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;/Display&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;CategoryValue CLASS="Default" CATEGORY_NAME="Fault"/&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;TableDescriptor&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;ColumnDescriptor NAME="TimeOfEvent" TYPE="STRING" &lt;span style="color: red;"&gt;IS_KEY&lt;/span&gt;="TRUE"&amp;gt;&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;lt;Display&amp;gt;&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;lt;Label NLSID="timeOfEvent_1"&amp;gt;Name&amp;lt;/Label&amp;gt;&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;lt;Description NLSID="timeOfEvent"&amp;gt;Time Of Event&amp;lt;/Description&amp;gt;&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; &amp;nbsp;&amp;nbsp;&amp;lt;Unit NLSID="EM_SYS_STANDARD_NA_NA"&amp;gt;NA&amp;lt;/Unit&amp;gt;&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;lt;UnitCategory&amp;gt;NA&amp;lt;/UnitCategory&amp;gt;&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;lt;/Display&amp;gt;&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;lt;/ColumnDescriptor&amp;gt;&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;lt;ColumnDescriptor NAME="EventDetails" TYPE="STRING" IS_KEY="FALSE"&amp;gt;&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;lt;Display&amp;gt;&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; &amp;nbsp;&amp;nbsp;&amp;lt;Label NLSID="eventDetails_1"&amp;gt;EventDetails&amp;lt;/Label&amp;gt;&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;Description NLSID="eventDetails"&amp;gt;Trap Event Details&amp;lt;/Description&amp;gt;&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; &amp;nbsp;&amp;nbsp;&amp;lt;Unit NLSID="EM_SYS_STANDARD_NA_NA"&amp;gt;NA&amp;lt;/Unit&amp;gt;&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; &amp;nbsp;&amp;nbsp;&amp;lt;UnitCategory&amp;gt;NA&amp;lt;/UnitCategory&amp;gt;&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;lt;/Display&amp;gt;&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;lt;/ColumnDescriptor&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;/TableDescriptor&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;PushDescriptor RECVLET_ID="SNMPTrap"&amp;gt;&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;lt;Property NAME="MatchTrapOID" SCOPE="GLOBAL"&amp;gt;1.3.6.1.4.1.29284.1.1.5.3&amp;lt;/Property&amp;gt;&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;lt;Property NAME="MatchAgentAddr" SCOPE="INSTANCE"&amp;gt;&lt;span style="color: red;"&gt;ipaddress&lt;/span&gt;&amp;lt;/Property&amp;gt;&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;lt;Property NAME="KeyTimeOfEventOID" SCOPE="GLOBAL"&amp;gt;1.3.6.1.4.1.29284.1.1.1.11.0&amp;lt;/Property&amp;gt;&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;lt;Property NAME="ContextTimeOfEventOID" SCOPE="GLOBAL"&amp;gt;1.3.6.1.4.1.29284.1.1.1.11.0&amp;lt;/Property&amp;gt;&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;lt;Property NAME="DataEventDetailsOID" SCOPE="GLOBAL"&amp;gt;1.3.6.1.4.1.29284.1.1.1.13.0&amp;lt;/Property&amp;gt;&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;lt;Property NAME="ContextStatusOID" SCOPE="GLOBAL"&amp;gt;1.3.6.1.4.1.29284.1.1.1.3.0&amp;lt;/Property&amp;gt;&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;lt;Property NAME="SeverityCodeOID" SCOPE="GLOBAL"&amp;gt;1.3.6.1.4.1.29284.1.1.1.3.0;&lt;span style="color: red;"&gt;0=CLEAR&lt;/span&gt;,4=WARNING,5=CRITICAL,6=CRITICAL&amp;lt;/Property&amp;gt;&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;lt;CredentialRef NAME="monCreds"&amp;gt;&lt;span style="color: red;"&gt;monCredentials&lt;/span&gt;&amp;lt;/CredentialRef&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;/PushDescriptor&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;/Metric&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;CredentialInfo&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;CredentialSet NAME="&lt;span style="color: red;"&gt;monCredentials&lt;/span&gt;" USAGE="MONITORING"&amp;gt;&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;lt;Display&amp;gt;&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;lt;Label NLSID="hs_monCredentials"&amp;gt;Credentials&amp;lt;/Label&amp;gt;&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;lt;/Display&amp;gt;&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;lt;AllowedCredType TYPE="SNMPV1Creds" /&amp;gt;&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;lt;/CredentialSet&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;/CredentialInfo&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;InstanceProperties&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;InstanceProperty NAME="&lt;span style="color: red;"&gt;ipaddress&lt;/span&gt;" CREDENTIAL="FALSE" OPTIONAL="TRUE"&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;Display&amp;gt;&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;lt;Label NLSID="hs_ipaddress"&amp;gt;Sender’s IP Address&amp;lt;/Label&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;/Display&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;/InstanceProperty&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;/InstanceProperties&amp;gt;&lt;br /&gt;
&amp;lt;/TargetMetadata&amp;gt;&lt;/blockquote&gt;
&lt;h4&gt;
A few points:&amp;nbsp;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;A key column will be updated when there is a new trap with the same key.&lt;/li&gt;
&lt;li&gt;MatchAgentAddr is dynamic. That is, it is not hard coded. When you deploy the plug-in, you can enter the sender IP address.&lt;/li&gt;
&lt;li&gt;The credential (community) is also dynamic and can be set when deploying the plug-in.&lt;/li&gt;
&lt;li&gt;If all of your traps have a default trap ID and you have the same fields in all of your traps, you can have only one PushDescriptor. Otherwise, you will need to define for each of the traps an XML section of PushDescriptor.&lt;/li&gt;
&lt;li&gt;A severity level that is set to CLEAR the alert is recommended.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Default Collection &lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;The default collection metadata file for a target type defines the following:&lt;/li&gt;
&lt;li&gt;The metric data (including configuration collection metric data) to be collected from targets and written to the Management Repository.&lt;/li&gt;
&lt;li&gt;The frequency at which this metric data is collected.&lt;/li&gt;
&lt;li&gt;Thresholds that, when exceeded, will cause a Metric Alert event to be raised.&lt;/li&gt;
&lt;li&gt;An optional message to display when a threshold is exceeded&lt;/li&gt;
&lt;/ul&gt;
Default collection example:&lt;br /&gt;
&lt;div&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;
&amp;lt;TargetCollection TYPE="test_switch_xkey" META_VER="13.73"&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;CollectionItem NAME="SnmpTrap"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;MetricColl NAME="SnmpTrap"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Condition PUSH="TRUE"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COLUMN_NAME="EventDetails"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CRITICAL="NONE" OPERATOR="NE"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MESSAGE="SNMP Trap - The value for %columnName% is %value%%%. - Alert"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLEAR_MESSAGE="SNMP Trap - The value for %columnName% is %value%%%. - Cleared"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MESSAGE_NLSID="snmp_trap_alert" /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/MetricColl&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;/CollectionItem&amp;gt;&lt;br /&gt;
&amp;lt;/TargetCollection&amp;gt;&lt;/blockquote&gt;
Note that the value of the &lt;code&gt;TYPE&lt;/code&gt; attribute and the&lt;code&gt;META_VER&lt;/code&gt; attribute in the default collection metadata file    &lt;em&gt;must&lt;/em&gt; match the &lt;code&gt;TYPE&lt;/code&gt; and the &lt;code&gt;META_VER&lt;/code&gt; values defined in the target type metadata file to create an association between them.&lt;/div&gt;
&lt;h2&gt;
    Plug-in Deployment &lt;/h2&gt;
Creating the plug-in is done via several commands. Importing and deploying the plug-in can be done via the command line or by web interface. It is handy and easy to use a script to deploy automatically - this is the way I chose.  &lt;br /&gt;
&lt;h3&gt;
    Set Your Environment &lt;/h3&gt;
&lt;blockquote class="tr_bq"&gt;
I used the Java from OMS database home:&lt;br /&gt;
$ export JAVA_HOME=/oracle/product/12.2.0.1/dbhome_1/jdk  $ export PATH=/oracle/product/12.2.0.1/dbhome_1/jdk/bin:$PATH&lt;/blockquote&gt;
&lt;h3&gt;
    Validate that the plug-in files are valid:&lt;/h3&gt;
&lt;div&gt;
&lt;blockquote class="tr_bq"&gt;
$ /oracle/em/middleware/sysman/edk/bin/empdk validate_plugin -stage_dir /home/oracle/stage -format text -tmp_dir /tmp -out_dir /tmp&lt;/blockquote&gt;
&lt;/div&gt;
&lt;h3&gt;
    Create the plug-in:&lt;/h3&gt;
&lt;div&gt;
&lt;blockquote class="tr_bq"&gt;
/oracle/em/middleware/sysman/edk/bin/empdk create_plugin -stage_dir /home/oracle/stage -conn_desc &amp;lt;oms_database&amp;gt;:&amp;lt;oms_database port&amp;gt;:&amp;lt;oms_service_name&amp;gt; -repos_user sysman -out_dir /tmp&lt;/blockquote&gt;
&lt;/div&gt;
&lt;h3&gt;
    Import the plug-in to OEM:&lt;/h3&gt;
&lt;div&gt;
&lt;blockquote class="tr_bq"&gt;
/oracle/em/middleware/bin/emcli import_update -file=/tmp/13.3.0.73.0_test.switch.xkey_2000_0.opar -omslocal&lt;/blockquote&gt;
&lt;/div&gt;
&lt;h3&gt;
    Deploy the plug-in to the OMS:&lt;/h3&gt;
&lt;div&gt;
&lt;blockquote class="tr_bq"&gt;
/oracle/em/middleware/bin/emcli deploy_plugin_on_server -plugin=test.switch.xkey:13.3.0.73.0 -sys_password=&amp;lt;change_on_install&amp;gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;h3&gt;
    Verify the deployment progress of the plug-in:&lt;/h3&gt;
&lt;div&gt;
&lt;blockquote class="tr_bq"&gt;
$ /oracle/em/middleware/bin/emcli get_plugin_deployment_status -plugin=test.switch.xkey&lt;/blockquote&gt;
&lt;/div&gt;
Wait for “Status“ to be: Success  &lt;br /&gt;
&lt;h3&gt;
    Deploy the plug-in to the agent:&lt;/h3&gt;
&lt;div&gt;
&lt;blockquote class="tr_bq"&gt;
/oracle/em/middleware/bin/emcli deploy_plugin_on_agent -agent_names="        &amp;lt;monitoring server&amp;gt;:3872" -plugin="test.switch.xkey"&lt;/blockquote&gt;
&lt;/div&gt;
&lt;h3&gt;
    Verify the deployment progress of the plug-in:&lt;/h3&gt;
&lt;div&gt;
&lt;blockquote class="tr_bq"&gt;
$ /oracle/em/middleware/bin/emcli get_plugin_deployment_status -plugin=test.switch.xkey&lt;/blockquote&gt;
&lt;/div&gt;
Wait for “Status“ to be: Success  &lt;br /&gt;
&lt;h2&gt;
    Plug-in Undeployment &lt;/h2&gt;
&lt;h3&gt;
    Undeploy plug-in from the agent:&lt;/h3&gt;
&lt;div&gt;
&lt;blockquote class="tr_bq"&gt;
$ /oracle/em/middleware/bin/emcli undeploy_plugin_from_agent -plugin="test.switch.xkey:13.3.0.73.0" -agent_names="&amp;lt;monitoring server&amp;gt;:3872" -delete_targets&lt;/blockquote&gt;
&lt;/div&gt;
&lt;h3&gt;
    Verify the Undeployment progress of the plug-in:&lt;/h3&gt;
&lt;div&gt;
&lt;blockquote class="tr_bq"&gt;
$ /oracle/em/middleware/bin/emcli get_plugin_deployment_status -plugin=test.switch.xkey&lt;/blockquote&gt;
&lt;/div&gt;
Wait for “Status“ to be: Success  &lt;br /&gt;
&lt;h3&gt;
    Undeploy the plug-in from the OMS:&lt;/h3&gt;
&lt;div&gt;
&lt;blockquote class="tr_bq"&gt;
$ /oracle/em/middleware/bin/emcli undeploy_plugin_from_server -plugin="test.switch.xkey:13.3.0.73.0" -sys_password=&amp;lt;change_on_install&amp;gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;h3&gt;
    Verify the UNdeployment progress of the OMS &lt;/h3&gt;
&lt;div&gt;
&lt;blockquote class="tr_bq"&gt;
$ /oracle/em/middleware/bin/emcli get_plugin_deployment_status -plugin=test.switch.xkey&lt;/blockquote&gt;
&lt;/div&gt;
Wait for “Status“ to be: Success  &lt;strong&gt; &lt;br clear="all" /&gt; &lt;/strong&gt; &lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;  &lt;br /&gt;
&lt;h3&gt;
&lt;strong&gt;Adding Targets&lt;/strong&gt;&lt;/h3&gt;
The last step in plug-in deployment is to add a target.&amp;nbsp;To add a target on a managed host by specifying the target monitoring properties, follow these steps:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;From the &lt;strong&gt;Setup&lt;/strong&gt; menu, select &lt;strong&gt;Add Target&lt;/strong&gt; , then select &lt;strong&gt;Add Targets Manually&lt;/strong&gt;. Cloud Control displays the Add Targets Manually page.&lt;/li&gt;
&lt;li&gt;On the Add Targets Manually page, select &lt;strong&gt; Add Targets Declaratively by Specifying Target Monitoring Properties.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;Add Target Name&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Community is usually: &lt;em&gt;public&lt;/em&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Enter the IP address of the sender&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;a href="https://draft.blogger.com/blogger.g?blogID=6061714" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;/a&gt;&lt;a href="https://draft.blogger.com/blogger.g?blogID=6061714" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;/a&gt;Example:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_JWaUrlcNS9g0KEJbd13KXLyoTXgRTqEtNAXVkm5uZFfkn1Iy3jn9OiBnP_jOzQnQl9LlsCXwb58K2HLSLPa0ScGxuyHAwLIMJpfkKkdj0WGHO66Sn7pxMJizvkhEjGvAJT0e/s1600/plugin.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="538" data-original-width="536" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_JWaUrlcNS9g0KEJbd13KXLyoTXgRTqEtNAXVkm5uZFfkn1Iy3jn9OiBnP_jOzQnQl9LlsCXwb58K2HLSLPa0ScGxuyHAwLIMJpfkKkdj0WGHO66Sn7pxMJizvkhEjGvAJT0e/s400/plugin.png" width="397" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2 style="clear: both; text-align: left;"&gt;
Testing and Debugging&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Send SNMP trap to the agent&lt;/li&gt;
&lt;li&gt;Check if the agent received the trap, and filter the matching metric.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote class="tr_bq"&gt;
$ tailf -100 /oracle/em/agent/agent_inst/sysman/log/gcagent_sdk.trc&lt;br /&gt;
&lt;br /&gt;
2018-12-14 21:01:36,449 [151:F60C8AF1] INFO - =====SNMPRecvlt received V2 notification=====:&lt;br /&gt;
&lt;br /&gt;
2018-12-14 21:01:36,449 [151:F60C8AF1] INFO - SNMPV2 notification from host 10.14.1.50&lt;br /&gt;
2018-12-14 21:01:36,449 [151:F60C8AF1] INFO - Notification Details:&lt;br /&gt;
2018-12-14 21:01:36,449 [151:F60C8AF1] INFO - CommandResponderEvent[securityModel=2, securityLevel=1, maxSizeResponsePDU=65535, pduHandle=PduHandle[0], stateReference=StateReference[msgID=0,pduHandle=PduHandle[0],securityEngineID=null,securityModel=null,securityName=public,securityLevel=1,contextEngineID=null,contextName=null,retryMsgIDs=null], pdu=TRAP[requestID=0, errorStatus=Success(0), errorIndex=0, VBS[1.3.6.1.2.1.1.3.0 = 1:02:47.22; 1.3.6.1.6.3.1.1.4.1.0 = 1.3.6.1.4.1.29284.1.1.2.1.47; 1.3.6.1.4.1.29284.1.1.1.11.0 = 07:e2:0c:0e:12:3b:24:00; 1.3.6.1.4.1.29284.1.1.1.18.0 = Axxana; 1.3.6.1.4.1.29284.1.1.1.19.0 = env14; 1.3.6.1.4.1.29284.1.1.1.20.0 = collector; 1.3.6.1.4.1.29284.1.1.1.13.0 = Black Box external power recovered. trace id: 0x7fe898004a00; 1.3.6.1.4.1.29284.1.1.1.4.0 = 5; 1.3.6.1.4.1.29284.1.1.1.3.0 = 3; 1.3.6.1.4.1.29284.1.1.1.12.0 = 10.14.1.50]], messageProcessingModel=1, securityName=public, processed=false, peerAddress=10.14.1.50/36940, transportMapping=org.snmp4j.transport.DefaultUdpTransportMapping@71d78ff, tmStateReference=null]AF1] INFO - oid 3: 1.3.6.1.4.1.29284.1.1.1.18.0 val : Axxana&lt;br /&gt;
2018-12-14 21:01:36,450 [151:F60C8AF1] INFO - oid 4: 1.3.6.1.4.1.29284.1.1.1.19.0 val : env14&lt;br /&gt;
2018-12-14 21:01:36,450 [151:F60C8AF1] INFO - oid 5: 1.3.6.1.4.1.29284.1.1.1.20.0 val : collector&lt;br /&gt;
2018-12-14 21:01:36,450 [151:F60C8AF1] INFO - oid 6: 1.3.6.1.4.1.29284.1.1.1.13.0 val : Black Box external power recovered. trace id: 0x7fe898004a00&lt;br /&gt;
2018-12-14 21:01:36,450 [151:F60C8AF1] INFO - oid 7: 1.3.6.1.4.1.29284.1.1.1.4.0 val : 5&lt;br /&gt;
2018-12-14 21:01:36,450 [151:F60C8AF1] INFO - oid 8: 1.3.6.1.4.1.29284.1.1.1.3.0 val : 3&lt;br /&gt;
2018-12-14 21:01:36,450 [151:F60C8AF1] INFO - oid 9: 1.3.6.1.4.1.29284.1.1.1.12.0 val : 10.14.1.50&lt;br /&gt;
2018-12-14 21:01:36,451 [151:F60C8AF1] INFO - Matching metric found ...&lt;br /&gt;
&amp;nbsp;metric name : SnmpTrap MatchTrapOID:&amp;nbsp; 1.3.6.1.4.1.29284.1.1.2.1.47 MatchAgentAddress : 10.14.1.50&lt;br /&gt;
2018-12-14 21:01:36,451 [151:F60C8AF1] INFO - Trap received is for sending Data&lt;br /&gt;
2018-12-14 21:01:36,451 [151:F60C8AF1] INFO - Sending datapoint for metric , test_switch_xkey.cc_snmp,SnmpTrap&lt;/blockquote&gt;
Sample output in the web interface:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;img border="0" data-original-height="604" data-original-width="1411" height="170" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz7b0ry3LemP3lIBIBU0YTGzRUMohdpJDZVGjQobAFyVY_ufmFWww75UJXDeOUxdGdg6ok9W71T8aNCdhWUWkPu5ZnbKTVamuXE1-CWg1U0Mk4-zSJNPg-qhdWMKxdykgs8yuh/s400/gui.png" width="400" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="https://draft.blogger.com/blogger.g?blogID=6061714" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;a href="https://draft.blogger.com/blogger.g?blogID=6061714" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/h2&gt;
Enterprise Manager Cloud Control Extensibility Programmer's Reference&lt;br /&gt;
&lt;a href="https://docs.oracle.com/cd/E73210_01/EMPRF/title.htm"&gt;https://docs.oracle.com/cd/E73210_01/EMPRF/title.htm&lt;/a&gt;&lt;br /&gt;
Defining the Plug-in&lt;br /&gt;
&lt;a href="https://docs.oracle.com/cd/E73210_01/EMPRF/GUID-B80B66E6-D07B-4890-A4CE-A7ECF7874946.htm#EMPRF11232"&gt;https://docs.oracle.com/cd/E73210_01/EMPRF/GUID-B80B66E6-D07B-4890-A4CE-A7ECF7874946.htm#EMPRF11232&lt;/a&gt;&lt;br /&gt;
Creating Target Metadata Files&lt;br /&gt;
&lt;a href="https://docs.oracle.com/cd/E73210_01/EMPRF/GUID-C6918D3A-B696-4EAC-8C8F-0DCD17773346.htm#EMPRF11253"&gt;https://docs.oracle.com/cd/E73210_01/EMPRF/GUID-C6918D3A-B696-4EAC-8C8F-0DCD17773346.htm#EMPRF11253&lt;/a&gt;&lt;br /&gt;
Plug-in Builder&lt;br /&gt;
&lt;a href="https://docs.oracle.com/cd/E73210_01/EMPRF/GUID-6A94EE77-D7AA-4A30-83AA-B627C41D7264.htm#EMPRF12910"&gt;https://docs.oracle.com/cd/E73210_01/EMPRF/GUID-6A94EE77-D7AA-4A30-83AA-B627C41D7264.htm#EMPRF12910&lt;/a&gt;&lt;br /&gt;
Using Receivelets&lt;br /&gt;
&lt;a href="https://docs.oracle.com/cd/E73210_01/EMPRF/GUID-39F8E13B-387A-4DA2-A3BD-DEB2BF339683.htm#EMPRF12663"&gt;https://docs.oracle.com/cd/E73210_01/EMPRF/GUID-39F8E13B-387A-4DA2-A3BD-DEB2BF339683.htm#EMPRF12663&lt;/a&gt;&lt;br /&gt;
Enterprise Manager Troubleshooting Guide for Third-Party Database Plug-ins&lt;br /&gt;
&lt;a href="https://docs.oracle.com/cd/E26854_01/em.121/e35212/ch1_common_issues.htm#EMPTG106"&gt;https://docs.oracle.com/cd/E26854_01/em.121/e35212/ch1_common_issues.htm#EMPTG106&lt;/a&gt;</description><link>https://oracledba.blogspot.com/2018/12/creating-snmp-plug-in-for-enterprise.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIXPvf_ZtIYjvwGHnE_yguQI0c7KkxQJ20tOtjzG4C-HosNqq2mrEOl6IgINYrpkyLIzyBTNd6bgRUrVyuqVYKScdFpa7tfe7brDvnbzuCrDHYlrVsfA3i-m3c8qjeB6pgBXRC/s72-c/snmp2.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-7061577618333547823</guid><pubDate>Mon, 24 Dec 2018 15:00:00 +0000</pubDate><atom:updated>2018-12-24T17:04:50.744+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">OEM</category><category domain="http://www.blogger.com/atom/ns#">snmp</category><title>Enterprise Manager Cloud Control, SNMP, and Plug-Ins – The Background</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://draft.blogger.com/blogger.g?blogID=6061714" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;a href="https://draft.blogger.com/blogger.g?blogID=6061714" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;a href="https://draft.blogger.com/blogger.g?blogID=6061714" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;a href="https://draft.blogger.com/blogger.g?blogID=6061714" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq5BorIC7J9BeRq3A7j3x1jrmH8yms6hpL3yCeAY1ANvdaclIUPqCkGiZ3E0-bS-C47bHl7DUI-qmsvPVe72FH1qSBICk9uhbuZjhbyHIjwS2pVwZnu_jLu4TMD57AUdGvx9rO/s1600/snmp2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="256" data-original-width="618" height="132" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq5BorIC7J9BeRq3A7j3x1jrmH8yms6hpL3yCeAY1ANvdaclIUPqCkGiZ3E0-bS-C47bHl7DUI-qmsvPVe72FH1qSBICk9uhbuZjhbyHIjwS2pVwZnu_jLu4TMD57AUdGvx9rO/s320/snmp2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
I have been using Oracle Enterprise Manager (OEM or Cloud Control) since it was a client application. (I’m not sure whether it was in the era of Oracle 7 or Oracle 8). In the early stages, OEM was compared to other central monitoring systems (at the time, it was HP OpenView, CA Unicenter, and the like). As a DBA who was responsible for dozens of Oracle databases, I needed a main system like this. Since we had the OEM for "free" as part of a site license, we used it heavily. The problem was that the main IT monitoring tool in our company was another system that already monitored appliances, networks, and applications. So, we decided to keep the OEM to the DBAs and send notifications to this system. (It was monitored 24/7 by a control center.) Like today, we could send alerts by email, run an external script, or send an SNMP trap. We chose the SNMP trap since it is in the core of most monitoring systems and simple to define.&lt;br /&gt;
&lt;br /&gt;
OEM needed a lot of attention and maintenance, and most DBAs didn’t want to waste time setting this tool. Over&amp;nbsp; &amp;nbsp;the years I worked as an OEM integrator and specialist for installing and defining metrics and reports for other companies.&lt;br /&gt;
&lt;br /&gt;
In my current company, we have an appliance that can send SNMP traps to a central monitoring system. Usually we are being asked to send an SNMP trap to a "normal" system, which does not need any adjustments or development for receiving the events. Recently, a customer asked us to send the traps to OEM. I thought it should be just to set up a target IP and port and maybe to load the MIB file (a translation of the ID of the traps to messages).&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
Oracle has enhanced the OEM significantly in each version, and now it is lighter and simpler and has connectivity to many systems. I believe that now it can replace other systems. For connecting external systems, you can use plug-ins like Microsoft SQL Server, Apache Tomcat, and Juniper Netscreen Firewall. (A full list can be found here: &lt;a href="https://www.oracle.com/technetwork/oem/grid-control/system-monitoring-connectors-082031.html"&gt;https://www.oracle.com/technetwork/oem/grid-control/system-monitoring-connectors-082031.html&lt;/a&gt;). And if you don’t have it, build your own plug-in. Receiving SNMP from an external system can be defined as part of a plug-in definition.&lt;br /&gt;
&lt;br /&gt;
I tried to follow the latest documentation. I realized that there are separate sections for a plug-in and for SNMP receivelets (the part that receives the SNMP and maps it into OEM columns) that are not correlated.&amp;nbsp; I used the &lt;b&gt;same&lt;/b&gt; examples from the documentation and couldn’t make it work.&amp;nbsp; The most detailed document, with all information in one place, was published by Oracle for version 9!!&amp;nbsp; &amp;nbsp;I looked for a cookbook where maybe someone already documented the steps, and I found nothing. I’ve posted some questions in several forums and have not gotten a response. I opened an SR, and the support representative could not find anybody to help me ☹. Is nobody using this feature???&lt;br /&gt;
&lt;br /&gt;
Fortunately, at the last OpenWorld, I met the product manager of OEM, who helped me and guided me with several of his employees and colleagues.&lt;br /&gt;
&lt;br /&gt;
On this adventure I learned the world of SNMP, traps, MIB files, and of course the OEM plug-in development environment.&lt;br /&gt;
&lt;br /&gt;
These days I am working on writing all the steps on how to receive SNMP to OEM. I hope I will make others’ experience simpler.&lt;br /&gt;
&lt;br /&gt;
Stay tuned.&lt;br /&gt;
Yossi Nixon&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>https://oracledba.blogspot.com/2018/12/enterprise-manager-cloud-control-snmp.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq5BorIC7J9BeRq3A7j3x1jrmH8yms6hpL3yCeAY1ANvdaclIUPqCkGiZ3E0-bS-C47bHl7DUI-qmsvPVe72FH1qSBICk9uhbuZjhbyHIjwS2pVwZnu_jLu4TMD57AUdGvx9rO/s72-c/snmp2.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-5390322832759744669</guid><pubDate>Mon, 17 Dec 2018 15:00:00 +0000</pubDate><atom:updated>2018-12-17T18:58:41.270+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">DNS</category><category domain="http://www.blogger.com/atom/ns#">Linux</category><category domain="http://www.blogger.com/atom/ns#">scan</category><title>Setup additional local DNS - to add scan addresses </title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="242" data-original-width="247" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfqnutmaM3iGeFMVmLthtNj2MLTZugNlByKKZ-RdChSQD2sXhTgXUjrrUGOHyq_hbMxL-SN7expZyzsF-lA_6C8NkZqJkhW1gfTiquxseZ0COe62WXbI7CQA-AhVMunI7Tlc6A/s1600/Untitled.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
In this document I demonstrate how to add local DNS server to be added additionally to an existing DNS, I had this need for creating some additional IP addresses in the DNS for Real Application Cluster (VIP and SCAN)&lt;br /&gt;
&lt;h2&gt;My Testing Environment&lt;/h2&gt;&lt;h3&gt;My Private DNS Server&lt;/h3&gt;IP Address: 10.20.2.100&lt;br /&gt;
Host Name: localdns&lt;br /&gt;
OS: Oracle Linux Server release 7.5&lt;br /&gt;
&lt;h3&gt;Client Machine to use DNS&lt;/h3&gt;IP Address: 10.33.1.120&lt;br /&gt;
Host Name: dbhost&lt;br /&gt;
OS: Oracle Linux Server release 7.4&lt;br /&gt;
&lt;h3&gt;Current Domain DNS&lt;/h3&gt;Primary: 192.168.1.10&lt;br /&gt;
Secondary: 192.168.1.1 1&lt;br /&gt;
&lt;h3&gt;DNS entry to add&lt;/h3&gt;IP Address: 10.33.1.123&lt;br /&gt;
Host Name: dbhost-scan&lt;br /&gt;
&lt;br /&gt;
Verify that the above &lt;span lang="EN-US"&gt;IP&lt;/span&gt;&amp;nbsp;address is not being used via ping command&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;$ ping 10.33.1.123 -c1 -w 1 &amp;gt;/dev/null 2&amp;gt;&amp;amp;1 ; if [ $? -eq 1 ]; then echo "This IP is Not used"; else echo "This IP is used"; fi&lt;br /&gt;
This IP is Not used&lt;/blockquote&gt;&lt;h3&gt;Install required packages&lt;/h3&gt;&lt;blockquote class="tr_bq"&gt;$ sudo yum install bind* -y&lt;/blockquote&gt;&lt;h3&gt;Define zone files in master configuration ‘named.conf‘ file&lt;/h3&gt;&lt;blockquote class="tr_bq"&gt;$ sudo vim /etc/named.conf&lt;/blockquote&gt;&lt;div&gt;Change &lt;strong&gt;127.0.01&lt;/strong&gt; to &lt;strong&gt;any&lt;/strong&gt; and at the end zone sections.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Add the zone section at the end, pay attention for the prefix of&amp;nbsp;&lt;em&gt;&lt;strong&gt;in-addr.arpa&amp;nbsp;&lt;/strong&gt;&lt;/em&gt;(it is the reverse of the first 3 numbers of the DNS entry we want to add - important for reverse lookup)&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;//&lt;br /&gt;
// named.conf&lt;br /&gt;
//&lt;br /&gt;
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS&lt;br /&gt;
// server as a caching only nameserver (as a localhost DNS resolver only).&lt;br /&gt;
//&lt;br /&gt;
// See /usr/share/doc/bind*/sample/ for example named configuration files.&lt;br /&gt;
//&lt;br /&gt;
// See the BIND Administrator's Reference Manual (ARM) for details about the&lt;br /&gt;
// configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html&lt;br /&gt;
&lt;br /&gt;
options {&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;listen-on port 53 { &lt;span style="color: red;"&gt;any&lt;/span&gt;; };&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;listen-on-v6 port 53 { ::1; };&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;directory &lt;span style="white-space: pre;"&gt; &lt;/span&gt;"/var/named";&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;dump-file &lt;span style="white-space: pre;"&gt; &lt;/span&gt;"/var/named/data/cache_dump.db";&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;statistics-file "/var/named/data/named_stats.txt";&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;memstatistics-file "/var/named/data/named_mem_stats.txt";&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;allow-query&amp;nbsp; &amp;nbsp; &amp;nbsp;{ &lt;span style="color: red;"&gt;any&lt;/span&gt;; };&lt;br /&gt;
&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;/*&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt; - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt; - If you are building a RECURSIVE (caching) DNS server, you need to enable&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;recursion.&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt; - If your recursive DNS server has a public IP address, you MUST enable access&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;control to limit queries to your legitimate users. Failing to do so will&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;cause your server to become part of large scale DNS amplification&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;attacks. Implementing BCP38 within your network would greatly&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;reduce such attack surface&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;*/&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;recursion no;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;dnssec-enable yes;&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;dnssec-validation yes;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;/* Path to ISC DLV key */&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;bindkeys-file "/etc/named.iscdlv.key";&lt;br /&gt;
&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;managed-keys-directory "/var/named/dynamic";&lt;br /&gt;
&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;pid-file "/run/named/named.pid";&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;session-keyfile "/run/named/session.key";&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
logging {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; channel default_debug {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; file "data/named.run";&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; severity dynamic;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone "mydomain.local" IN {&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;type master;&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;file "named.mydomain.fwd";&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; allow-update { none; };&lt;br /&gt;
};&lt;br /&gt;
zone"1.33.10.in-addr.arpa" IN {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type master;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; file "named.mydomain.rev";&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; allow-update { none; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
include "/etc/named.rfc1912.zones";&lt;br /&gt;
include "/etc/named.root.key";&lt;/blockquote&gt;&lt;h3&gt;Create Zone Files&lt;/h3&gt;&lt;blockquote class="tr_bq"&gt;$ sudo cp /var/named/named.localhost /var/named/named.mydomain.fwd&lt;br /&gt;
$ sudo cp /var/named/named.loopback /var/named/named.mydomain.rev&lt;/blockquote&gt;&lt;h3&gt;Edit these zones files&lt;/h3&gt;&lt;h4&gt;Forward zone configuration&lt;/h4&gt;&lt;blockquote class="tr_bq"&gt;$ sudo vi /var/named/named.mydomain.fwd&lt;/blockquote&gt;Make changes as per your need.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;@ IN SOA &lt;span style="color: red;"&gt;&lt;b&gt;localdns&lt;/b&gt;.mydomain.local. root.mydomain.local&lt;/span&gt;. (&lt;br /&gt;
2014090401 ; serial&lt;br /&gt;
3600 ; refresh&lt;br /&gt;
1800 ; retry&lt;br /&gt;
604800 ; expire&lt;br /&gt;
86400 ) ; minimum&lt;br /&gt;
; Name server's&lt;br /&gt;
@ IN NS &lt;span style="color: red;"&gt;&lt;b&gt;localdns&lt;/b&gt;.mydomain.local&lt;/span&gt;.&lt;br /&gt;
; Name server hostname to IP resolve.&lt;br /&gt;
@ IN A&lt;b&gt; &lt;span style="color: red;"&gt;10.20.2.100&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
; Hosts in this Domain&lt;br /&gt;
@ IN A&lt;b&gt; &lt;span style="color: red;"&gt;10.33.1.123&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style="color: red;"&gt;&lt;b&gt;dbhost-scan&lt;/b&gt;&lt;/span&gt; IN A &lt;span style="color: red;"&gt;&lt;b&gt;10.33.1.123&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: red;"&gt;&lt;b&gt;localdns &lt;/b&gt;&lt;/span&gt;IN A &lt;span style="color: red;"&gt;&lt;b&gt;10.20.2.100&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;h3&gt;Reverse zone configuration&lt;/h3&gt;&lt;blockquote class="tr_bq"&gt;$ sudo vi /var/named/named.mydomain.rev&lt;/blockquote&gt;Make changes as per your need.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;$TTL 86400&lt;br /&gt;
@ IN SOA &lt;span style="color: red;"&gt;localdns.mydomain.local. root.mydomain.local&lt;/span&gt;. (&lt;br /&gt;
2014090402 ; serial&lt;br /&gt;
3600 ; refresh&lt;br /&gt;
1800 ; retry&lt;br /&gt;
604800 ; expire&lt;br /&gt;
86400 ) ; minimum&lt;br /&gt;
; Name server's&lt;br /&gt;
@ IN NS &lt;span style="color: red;"&gt;&lt;b&gt;localdns&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
@ IN PTR &lt;span style="color: red;"&gt;mydomain.local&lt;/span&gt;.&lt;br /&gt;
; Name server hostname to IP resolve.&lt;br /&gt;
localdns IN A &lt;span style="color: red;"&gt;&lt;b&gt;10.20.2.100&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
;Hosts in Domain&lt;br /&gt;
&lt;span style="color: red;"&gt;&lt;b&gt;dbhost-scan&lt;/b&gt;&lt;/span&gt; IN A &lt;span style="color: red;"&gt;10.33.1.123&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: red;"&gt;&lt;b&gt;123 &lt;/b&gt;&lt;/span&gt;IN PTR &lt;span style="color: red;"&gt;&lt;b&gt;dbhost-scan&lt;/b&gt;.mydomain.local&lt;/span&gt;.&lt;br /&gt;
&lt;span style="color: red;"&gt;&lt;b&gt;100 &lt;/b&gt;&lt;/span&gt;IN PTR &lt;span style="color: red;"&gt;&lt;b&gt;localdns&lt;/b&gt;.mydomain.local&lt;/span&gt;.&lt;/blockquote&gt;&lt;div&gt;Change the group to named&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;$ sudo chgrp named /var/named/named.mydomain.fwd&lt;br /&gt;
$ sudo chgrp named /var/named/named.mydomain.rev&lt;/blockquote&gt;check for the errors in zone files&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;$ sudo named-checkconf /etc/named.conf&lt;br /&gt;
$ sudo named-checkzone localdns.mydomain.local /var/named/named.mydomain.fwd&lt;br /&gt;
$ sudo named-checkzone localdns.mydomain.local /var/named/named.mydomain.rev&lt;/blockquote&gt;run,enable and check &lt;strong&gt;&lt;em&gt;named&lt;/em&gt;&lt;/strong&gt; service&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;$ sudo chkconfig named on&lt;br /&gt;
$ sudo service named start&lt;br /&gt;
$ sudo service named status&lt;/blockquote&gt;Add new dns to be resolved on client machine (dbhost)&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;$ sudo vi /etc/resolv.conf&lt;/blockquote&gt;Add the red entry to the file&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;# Generated by NetworkManager&lt;br /&gt;
search mydomain.local&lt;br /&gt;
nameserver 192.168.1.10&lt;br /&gt;
nameserver 192.168.1.11&lt;br /&gt;
&lt;span style="color: red;"&gt;nameserver &lt;b&gt;10.20.2.100&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
options timeout:1&lt;br /&gt;
options attempts:2&lt;/blockquote&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;Check our new DNS&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;$ nslookup &lt;span style="color: red;"&gt;10.33.1.123&lt;/span&gt;&lt;br /&gt;
Server: 10.20.2.100&lt;br /&gt;
Address: 10.20.2.100#53&lt;br /&gt;
&lt;br /&gt;
123.1.33.10.in-addr.arpa name = &lt;span style="color: red;"&gt;&lt;b&gt;dbhost-scan&lt;/b&gt;.mydomain.local&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
$ nslookup &lt;span style="color: red;"&gt;&lt;b&gt;dbhost-scan&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Server: 10.20.2.100&lt;br /&gt;
Address: 10.20.2.100#53&lt;br /&gt;
&lt;br /&gt;
Name: &lt;span style="color: red;"&gt;&lt;b&gt;dbhost-scan&lt;/b&gt;.mydomain.local&lt;/span&gt;&lt;br /&gt;
Address: &lt;span style="color: red;"&gt;10.33.1.123&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
$ nslookup &lt;span style="color: red;"&gt;&lt;b&gt;dbhost-scan&lt;/b&gt;.mydomain.local&lt;/span&gt;&lt;br /&gt;
Server: 10.20.2.100&lt;br /&gt;
Address: 10.20.2.100#53&lt;br /&gt;
&lt;br /&gt;
Name: &lt;span style="color: red;"&gt;&lt;b&gt;dbhost-scan&lt;/b&gt;.mydomain.local&lt;/span&gt;&lt;br /&gt;
Address: &lt;span style="color: red;"&gt;10.33.1.123&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;a href="https://twitter.com/YossiNixon"&gt;Yossi&lt;/a&gt;</description><link>https://oracledba.blogspot.com/2018/12/setup-additional-local-dns-to-add-scan.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfqnutmaM3iGeFMVmLthtNj2MLTZugNlByKKZ-RdChSQD2sXhTgXUjrrUGOHyq_hbMxL-SN7expZyzsF-lA_6C8NkZqJkhW1gfTiquxseZ0COe62WXbI7CQA-AhVMunI7Tlc6A/s72-c/Untitled.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-8551611619062256694</guid><pubDate>Wed, 12 Dec 2018 09:07:00 +0000</pubDate><atom:updated>2018-12-12T11:07:46.326+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">OOW</category><category domain="http://www.blogger.com/atom/ns#">OOW17</category><category domain="http://www.blogger.com/atom/ns#">Oracle OpenWorld</category><category domain="http://www.blogger.com/atom/ns#">Oracle OpenWorld 2017</category><title>Oracle open world 2017 short summary</title><description>&lt;div align="left" style="font-family: sans-serif;"&gt;
&lt;div dir="ltr"&gt;
Hi,&lt;/div&gt;
&lt;/div&gt;
&lt;div align="left" style="font-family: sans-serif;"&gt;
&lt;div dir="ltr"&gt;
The main subject in this conference was Autonomous Database, it's engine is used by another buzzword called: Machine Learning.&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div align="left" style="font-family: sans-serif;"&gt;
&lt;div dir="ltr"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr"&gt;
Oracle&amp;nbsp;&lt;u&gt;&lt;b&gt;claim&lt;/b&gt;&lt;/u&gt;&amp;nbsp;they are investing in autonomous to prevent data theft, but it seems&amp;nbsp;as convenience for handling only one version in the cloud.&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div align="left" style="font-family: sans-serif;"&gt;
&lt;div dir="ltr"&gt;
They will use the same "Machine Learning" engine that they used for the optimizer and memory management decisions (This engine is well known for&amp;nbsp;bad decisions).&lt;/div&gt;
&lt;/div&gt;
&lt;div align="left" style="font-family: sans-serif;"&gt;
&lt;div dir="ltr"&gt;
18c is an alias for 12.2.0&lt;span style="background-color: yellow;"&gt;.2&lt;/span&gt;&amp;nbsp;and planned to be available:&lt;/div&gt;
&lt;/div&gt;
&lt;div align="left" style="font-family: sans-serif;"&gt;
&lt;div dir="ltr"&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Autonomous Database for&amp;nbsp;&lt;b&gt;Data Warehouses -&lt;/b&gt;&amp;nbsp;by December 2017&lt;/li&gt;
&lt;li&gt;Autonomous Database for&amp;nbsp;&lt;b&gt;OLTP&lt;/b&gt;&amp;nbsp;– by June 2018&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div align="left" style="font-family: sans-serif;"&gt;
&lt;div dir="ltr"&gt;
A companion solution for the "Machine Learning" will be used via the OEM (Cloud Control) to gather:&lt;/div&gt;
&lt;/div&gt;
&lt;div align="left" style="font-family: sans-serif;"&gt;
&lt;div dir="ltr"&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Infrastructure logs: Network, Server, Storage, VM, OS&lt;/li&gt;
&lt;li&gt;Platform logs: Database, Java, Analytics, etc.&lt;/li&gt;
&lt;li&gt;Application logs: ERP, CX, HCM, Custom, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div align="left" style="font-family: sans-serif;"&gt;
&lt;div dir="ltr"&gt;
The logs will be gathered to detect and connect anomalous&amp;nbsp;&lt;u&gt;events.&lt;/u&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div align="left" style="font-family: sans-serif;"&gt;
&lt;div dir="ltr"&gt;
SLA Guarantees 99.995% reliability and availability (&lt;b&gt;less than 30 minutes a year&lt;/b&gt;) – i.e:&amp;nbsp;online patching, upgrade, tuning and maintenance.&amp;nbsp;&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr"&gt;
See my post about new features in Oracle 18c&amp;nbsp; &lt;a href="https://oracledba.blogspot.com/2017/10/oracle-18c-new-features-for-active-data.html"&gt;https://oracledba.blogspot.com/2017/10/oracle-18c-new-features-for-active-data.html&lt;/a&gt;&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr"&gt;
Yossi Nixon&amp;nbsp;&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi53qx9YHoxxck5G3jC8u4EsuOggMOECwMDbNc7byx_lXHK2So1J0fjmA3WdS_vxM7zvlng0N_Ur7Q8AVtJc5e9exYuftpphyAesk_OQbxLooXie3EeLxgMyTJuIixhk4ft0PmW/s1600/IMG_20171001_111543.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="900" data-original-width="1600" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi53qx9YHoxxck5G3jC8u4EsuOggMOECwMDbNc7byx_lXHK2So1J0fjmA3WdS_vxM7zvlng0N_Ur7Q8AVtJc5e9exYuftpphyAesk_OQbxLooXie3EeLxgMyTJuIixhk4ft0PmW/s320/IMG_20171001_111543.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div dir="ltr"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>https://oracledba.blogspot.com/2017/10/oracle-open-world-2017-short-summary.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi53qx9YHoxxck5G3jC8u4EsuOggMOECwMDbNc7byx_lXHK2So1J0fjmA3WdS_vxM7zvlng0N_Ur7Q8AVtJc5e9exYuftpphyAesk_OQbxLooXie3EeLxgMyTJuIixhk4ft0PmW/s72-c/IMG_20171001_111543.jpg" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-1041830637358785684</guid><pubDate>Mon, 10 Dec 2018 15:00:00 +0000</pubDate><atom:updated>2018-12-10T18:22:39.267+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">asm</category><category domain="http://www.blogger.com/atom/ns#">docker</category><category domain="http://www.blogger.com/atom/ns#">Linux</category><category domain="http://www.blogger.com/atom/ns#">portainer</category><category domain="http://www.blogger.com/atom/ns#">recipe</category><title>Oracle Linux ASM docker recipe</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://draft.blogger.com/null" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="800" data-original-width="800" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3UqUqTIbgKwZBefqZhyphenhyphenvokR0LtBC204B0W5JrPJoy-gPvG5ulNSKQy5PtzPFECX9zXEQKy5Re32ybgYPl1QsKTe5EVBnrqvtCuHrsCTfuMwgdTlFFN-BZWYji6rNy6U8r15s-/s320/EGH_NodeDocker_1000.png" width="320"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2&gt;
General information&lt;/h2&gt;
In this setup we are:&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;Installing docker&lt;/li&gt;
&lt;li&gt;Creating Non-root user (ynixon) with sudo and docker privileges&lt;/li&gt;
&lt;li&gt;ASM device:&lt;span style="color: red;"&gt; /dev/sdb1&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Enabling sqlnet + ssh to the container&lt;/li&gt;
&lt;li&gt;Default ASM port is 1521&lt;/li&gt;
&lt;li&gt;ssh port 2222&lt;/li&gt;
&lt;li&gt;Passwords for root + grid os users in the container are “ynixon”&lt;/li&gt;
&lt;li&gt;Password for sys ASM user is “ynixon”&lt;/li&gt;
&lt;li&gt;Grid software is 12.2 without any patches&lt;/li&gt;
&lt;li&gt;Container Operating system is Oracle Linux 7.5&lt;/li&gt;
&lt;li&gt;Within the container, there is no use of UDEV / ASMLIB or ASMFD – the asm_diskstring='/dev/asm*' ,'/dev/*'&lt;/li&gt;
&lt;li&gt;All test done on regular Ubuntu 14.04&lt;/li&gt;
&lt;li&gt;There is a crontab job to keep 15 days of trace files + remove audit files.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Prepare host for ASM device&lt;/h2&gt;
&lt;h4&gt;
Make sure the device has permissions of the same container ids by applying UDEV rules&lt;/h4&gt;
&lt;blockquote class="tr_bq"&gt;
$ vi /etc/udev/rules.d/100-asm.rules&lt;br&gt;
KERNEL=="sdb1", NAME="ASM_DISK", OWNER="54421", GROUP="54421", MODE="0660"&lt;br&gt;
&lt;br&gt;
udevadm trigger --sysname-match=sdb1 --verbose&lt;/blockquote&gt;
&lt;h4&gt;
Verify the device has ASM lables&lt;/h4&gt;
&lt;blockquote class="tr_bq"&gt;
DISK_GROUP=$( blkid | grep oracleasm | sed 's/.*LABEL=\"\([^\"]*\)\" TYPE=\"oracleasm\"/\1/')&lt;br&gt;
if [ -z "$DISK_GROUP" ]&lt;br&gt;
then&lt;br&gt;
&amp;nbsp; &amp;nbsp; echo "device &lt;span style="color: red;"&gt;/dev/sdb1&lt;/span&gt; has not asm metadata"&lt;br&gt;
else&lt;br&gt;
&amp;nbsp; &amp;nbsp; echo "device &lt;span style="color: red;"&gt;/dev/sdb1&lt;/span&gt; has diskgroup $DISK_GROUP"&lt;br&gt;
fi&lt;/blockquote&gt;
&lt;h2&gt;
Install Docker&lt;/h2&gt;
As root&lt;br&gt;
&lt;blockquote class="tr_bq"&gt;
$ curl -fsSL https://get.docker.com/ | sh&lt;/blockquote&gt;
Or&lt;br&gt;
&lt;blockquote class="tr_bq"&gt;
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -&lt;br&gt;
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"&lt;br&gt;
$ apt-get update&lt;br&gt;
$ apt-cache policy docker-ce&lt;br&gt;
$ apt-get install -y docker-ce&lt;br&gt;
&lt;br&gt;
$ service docker status&lt;/blockquote&gt;
&lt;h2&gt;
Add users&lt;/h2&gt;
As root&lt;br&gt;
Equivalent user ids to the docker to follow (will be identified from outside)&lt;br&gt;
&lt;blockquote class="tr_bq"&gt;
$ groupadd -g 54422 asmadmin&lt;br&gt;
$ useradd -u 54421 -g 54422 grid&lt;/blockquote&gt;
A dedicated user to manage the docker&lt;br&gt;
&lt;blockquote class="tr_bq"&gt;
$ adduser ynixon -g 54422&lt;br&gt;
$ echo "ynixon:ynixon" | chpasswd&lt;br&gt;
$ usermod -aG docker ynixon&lt;br&gt;
$ usermod -aG sudo ynixon&lt;br&gt;
$ sed -i '/PasswordAuthentication/d' /etc/ssh/sshd_config ; echo "PasswordAuthentication no" &amp;gt;&amp;gt; /etc/ssh/sshd_config&lt;br&gt;
sed -i '/PubkeyAuthentication/d' /etc/ssh/sshd_config ; echo "PubkeyAuthentication yes" &amp;gt;&amp;gt; /etc/ssh/sshd_config&lt;br&gt;
sed -i '/ChallengeResponseAuthentication/d' /etc/ssh/sshd_config ; echo "ChallengeResponseAuthentication no" &amp;gt;&amp;gt; /etc/ssh/sshd_config&lt;br&gt;
$ service ssh reload&lt;/blockquote&gt;
&lt;h2&gt;
Building a new image&lt;/h2&gt;
If you already have an image file skip to &lt;b&gt;Load image&lt;/b&gt;.&lt;br&gt;
In this step we will create a new image from scratch, and pack it at the end.&lt;br&gt;
You can run /depo/build.sh + /depo/export.sh or run the following manual steps:&lt;br&gt;
&lt;h4&gt;
Prepare the files&lt;/h4&gt;
As root&lt;br&gt;
&lt;blockquote class="tr_bq"&gt;
$ mkdir /depo/&lt;br&gt;
$ chown -R root:54422 /depo/&lt;br&gt;
$ chmod 775 /depo&lt;br&gt;
$ git clone https://github.com/ynixon/OracleASMdocker.git /depo/&lt;/blockquote&gt;
Ensure you download the file linuxx64_12201_grid_home.zip and copy it to /depo/ folder&lt;br&gt;
&lt;div&gt;
&lt;br&gt;&lt;/div&gt;
List of the files&lt;br&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;&lt;br&gt;
&lt;strong&gt;Script&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;br&gt;
&lt;strong&gt;Description&lt;/strong&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br&gt;
&lt;strong&gt;adrci_script.sh&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;br&gt;
A script to that will run for crontab to delete trace files periodically&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;strong&gt;build.sh&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;A script to build a docker image&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;strong&gt;clean.sh&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;A script to clean all docker containers and an image&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;strong&gt;crontab.setup&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;A cronjob script for grid user that will delete trace files periodically&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;strong&gt;disks.sql&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;An SQL script for listing disks&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;strong&gt;docker_descendants.py&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;A script to check docker images dependencies&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;strong&gt;docker_folder/Dockerfile&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;Build instruction for docker image&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;strong&gt;export.sh&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;Export a docker image and compress it&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;strong&gt;glogin.sql&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;setting SQL*Plus prettier output&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;strong&gt;grants.sql&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;grants for the build process&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;strong&gt;init+ASM.ora&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;The initialization file for ASM instance&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;strong&gt;install_grid.sh&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;Install script for grid&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;strong&gt;linuxx64_12201_grid_home.zip&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;Oracle 12.2 Grid software (no patches) download it separately&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;strong&gt;listener.ora&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;Listener file&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;strong&gt;oracle_asm&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;Logrotate for oracle logfiles&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;strong&gt;rlwrap-0.42-1.el7.x86_64.rpm&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;Handy tool to enable history in SQL*Plus, asmcmd&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;strong&gt;run.sh&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;Start a container&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;strong&gt;status.sh&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;Images and Container status&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;
&lt;h4&gt;
Run build image&lt;/h4&gt;
As root/ynixon&lt;br&gt;
&lt;blockquote class="tr_bq"&gt;
$ cd /depo/docker_folder&lt;br&gt;
$ docker build -t ynixon/docker_grid_asm .&lt;/blockquote&gt;
&lt;h4&gt;
Run image detached (at background)&lt;/h4&gt;
&lt;blockquote class="tr_bq"&gt;
$ docker run --rm --privileged --detach --name asm_grid_build -h gridserver -p 1521:1521 -p 2222:22 --shm-size 2048m -e TZ=&lt;span style="color: red;"&gt;UTC &lt;/span&gt;-v /sys/fs/cgroup:/sys/fs/cgroup:ro --volume /depo:/software --volume /boot:/boot --device=&lt;span style="color: red;"&gt;/dev/sdb1 &lt;/span&gt;ynixon/docker_grid_asm&lt;/blockquote&gt;
&lt;h4&gt;
Install grid software&lt;/h4&gt;
&lt;blockquote class="tr_bq"&gt;
$ docker exec -it asm_grid_build su - grid -c '/software/install_grid.sh'&lt;/blockquote&gt;
&lt;h4&gt;
Save the image with the grid&lt;/h4&gt;
&lt;blockquote class="tr_bq"&gt;
$ docker commit -m "oracle linux 7.5 standalone grid infrastructure with ASM" -a "Yossi Nixon&lt;ynixon gmail.com=""&gt;" `docker ps -lq` ynixon/ynixon_asm_server&lt;/ynixon&gt;&lt;/blockquote&gt;
&lt;h4&gt;
Remove intermediate image (without the grid)&lt;/h4&gt;
&lt;blockquote class="tr_bq"&gt;
$ docker rm -f asm_grid_build&lt;/blockquote&gt;
&lt;h4&gt;
Optional – check the the new image&lt;/h4&gt;
Run the container at the background&lt;br&gt;
&lt;blockquote class="tr_bq"&gt;
$ docker run --privileged --detach --name asm_grid -h gridserver -p 1521:1521 -p 2222:22 --shm-size 2048m -e TZ=UTC -v /sys/fs/cgroup:/sys/fs/cgroup:ro --volume /depo:/software --volume /boot:/boot --device=/dev/sdb1 --restart always ynixon/ynixon_asm_server&lt;/blockquote&gt;
Connect to the new container to verify the environment&lt;br&gt;
&lt;blockquote class="tr_bq"&gt;
$ docker exec -it --user grid asm_grid bash -l&lt;/blockquote&gt;
&lt;h4&gt;
Export the image and compress it&lt;/h4&gt;
&lt;blockquote class="tr_bq"&gt;
$ docker save -o /depo/export/docker_ynixon_asm_server.tar ynixon/ynixon_asm_server:latest&lt;br&gt;
$ gzip docker_ynixon_asm_server.tar&lt;/blockquote&gt;
&lt;h2&gt;
Load image&lt;/h2&gt;
Copy the file docker_ynixon_asm_server.tar.gz to /tmp&lt;br&gt;
&lt;h4&gt;
Uncompress the file&lt;/h4&gt;
&lt;blockquote class="tr_bq"&gt;
$ gunzip /tmp/docker_ynixon_asm_server.tar.gz&lt;/blockquote&gt;
&lt;h4&gt;
Load the file into the local container repository&lt;/h4&gt;
&lt;blockquote class="tr_bq"&gt;
$ docker load -i /depo/export/docker_ynixon_asm_server.tar&lt;/blockquote&gt;
&lt;h4&gt;
Run a container based on the loaded image&lt;/h4&gt;
&lt;blockquote class="tr_bq"&gt;
$ docker run --privileged --detach --name asm_grid -h gridserver -p 1521:1521 -p 2222:22 --shm-size 2048m -e TZ=&lt;span style="color: red;"&gt;UTC &lt;/span&gt;-v /sys/fs/cgroup:/sys/fs/cgroup:ro --volume /boot:/boot --device=&lt;span style="color: red;"&gt;/dev/sdb1 &lt;/span&gt;--restart always ynixon/ynixon_asm_server&lt;/blockquote&gt;
&lt;h2&gt;
Test Connection from remote machines:&lt;/h2&gt;
&lt;blockquote class="tr_bq"&gt;
$ ssh root@&lt;black box="" ip=""&gt; -p 2222&lt;/black&gt;$ sqlplus sys/ynixon@&lt;black box="" ip=""&gt;:1521/+ASM as sysasm&lt;/black&gt;&lt;/blockquote&gt;
&lt;h2&gt;
Deploy Web Interface – Portainer&lt;/h2&gt;
&lt;blockquote class="tr_bq"&gt;
$ docker volume create portainer_data&lt;br&gt;
$ docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer&lt;/blockquote&gt;
Open browser at: http://&amp;lt;docker server&amp;gt;:9000/&lt;br&gt;
&lt;br&gt;
&lt;a href="https://twitter.com/YossiNixon"&gt;Yossi&lt;/a&gt;&lt;br&gt;
&lt;br&gt;</description><link>https://oracledba.blogspot.com/2018/12/oracle-linux-asm-docker-recipe.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3UqUqTIbgKwZBefqZhyphenhyphenvokR0LtBC204B0W5JrPJoy-gPvG5ulNSKQy5PtzPFECX9zXEQKy5Re32ybgYPl1QsKTe5EVBnrqvtCuHrsCTfuMwgdTlFFN-BZWYji6rNy6U8r15s-/s72-c/EGH_NodeDocker_1000.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-1300267749029063916</guid><pubDate>Mon, 03 Dec 2018 15:00:00 +0000</pubDate><atom:updated>2018-12-03T17:00:01.810+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">asm</category><category domain="http://www.blogger.com/atom/ns#">BEQ</category><category domain="http://www.blogger.com/atom/ns#">Bequeath</category><category domain="http://www.blogger.com/atom/ns#">bypass listener</category><category domain="http://www.blogger.com/atom/ns#">java</category><category domain="http://www.blogger.com/atom/ns#">listener</category><title>Bypassing the Listener and Connecting the Instance without a Password from Java Code</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://draft.blogger.com/null" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="214" data-original-width="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK5DmNbyqq27mvCZerZDlBJA0yNXNJaDWEFNwU2f5ixrkzjhtJuh69iahZMpzaH1j2EbJgnzbikjGJU3qPfYCv6ewP76fKLp6I0h8V89-6Kju3tzERzey4JfF2eK40_bmV9Ro-/s1600/bypass-300x214.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
In the past I wrote a post about&amp;nbsp;&lt;a href="https://oracledba.blogspot.com/2017/12/bypassing-listener-and-connecting-to.html"&gt;Bypassing the listener and connecting to ASM without a password from Python code&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Now, I've been asked to prove that it can be done in Java. The solution is almost the same.&lt;br /&gt;
&lt;br /&gt;
Java sample code using OCI:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ vi OracleCon.java&lt;br /&gt;
import java.sql.*;&lt;br /&gt;
class OracleCon {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public static void main(String args[]) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Class.forName("oracle.jdbc.driver.OracleDriver");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Connection con = DriverManager.getConnection(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "jdbc:oracle:oci:@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL=BEQ) (PROGRAM=oracle) (ARGV0=oracle+ASM) (ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))') (ENVS = 'ORACLE_HOME=/oracle/product/12.1.0.2/grid,ORACLE_SID=+ASM'))) (CONNECT_DATA= (SID=+ASM)))", "sys as sysdba", "change on install");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Statement stmt = con.createStatement();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ResultSet rs = stmt.executeQuery("select * from v$instance");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (rs.next())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(rs.getInt(1) + "&amp;nbsp; " + rs.getString(2) + "&amp;nbsp; " + rs.getString(3));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; con.close();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (Exception e) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(e);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;/blockquote&gt;
&lt;br /&gt;
I used Java for Oracle software (1.6):&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ export PATH=$ORACLE_HOME/jdk/jre/bin:$ORACLE_HOME/jdk/bin:$PATH&lt;br /&gt;
$ export CLASSPATH=.:$ORACLE_HOME/jdbc/lib/ojdbc6.jar&lt;br /&gt;
$ javac OracleCon.java&lt;br /&gt;
$ java OracleCon&lt;br /&gt;
1&amp;nbsp; +ASM&amp;nbsp; myhost&lt;/blockquote&gt;
Yep... it is working&amp;nbsp; :)&lt;br /&gt;
&lt;a href="https://twitter.com/YossiNixon"&gt;Yossi&lt;/a&gt;</description><link>https://oracledba.blogspot.com/2018/12/bypassing-listener-and-connecting.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK5DmNbyqq27mvCZerZDlBJA0yNXNJaDWEFNwU2f5ixrkzjhtJuh69iahZMpzaH1j2EbJgnzbikjGJU3qPfYCv6ewP76fKLp6I0h8V89-6Kju3tzERzey4JfF2eK40_bmV9Ro-/s72-c/bypass-300x214.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-3847591219270856193</guid><pubDate>Mon, 26 Nov 2018 15:00:00 +0000</pubDate><atom:updated>2018-11-26T17:00:08.038+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">crsctl</category><category domain="http://www.blogger.com/atom/ns#">Far Sync</category><category domain="http://www.blogger.com/atom/ns#">Grid Infrastructure</category><category domain="http://www.blogger.com/atom/ns#">restart</category><category domain="http://www.blogger.com/atom/ns#">srvctl</category><title>Automatic restart in Grid Infrastructure for Far Sync</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://draft.blogger.com/null" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="393" data-original-width="382" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje4yHXI-dzHvqoIPdYX5CfwbqazKv1QAierLDP3yzuzTgznMUmIh1qeIJuL9uDItRRnzCkYAc_r8QWFVB4E7pCFPYpieOLZfqwl94_4j0_EqO7DIj3ckRY2HqT2T9EA7-_VnVp/s320/restart.png" width="311" /&gt;&lt;/a&gt;&lt;/div&gt;
Hi,&lt;br /&gt;
Checking if the Far Sync instance is configured to restart automatically after reboot / shutdown of the host / cluster:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ crsctl stat res ora.fdb1.db -f |grep AUTO_START&lt;br /&gt;
AUTO_START=&lt;span style="color: red;"&gt;restore&lt;/span&gt;&lt;/blockquote&gt;
"restore" means that after restart, the database will remain at the previous state it was before.&lt;br /&gt;
Changing the cluster to startup the database in any case.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ crsctl stat res ora.fdb1.db -f |grep AUTO_START&lt;br /&gt;
AUTO_START=&lt;span style="color: red;"&gt;always&lt;/span&gt;&lt;/blockquote&gt;
Changing database to start always after reboot&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ crsctl modify resource ora.fdb1.db -attr&amp;nbsp; AUTO_START=&lt;span style="color: red;"&gt;always&lt;/span&gt; -unsupported&lt;/blockquote&gt;
Modify the startup state:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ srvctl modify database -o &lt;span style="color: red;"&gt;mount&lt;/span&gt;&lt;/blockquote&gt;
View modified configuration&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ srvctl config database -d fdb1 -all&lt;br /&gt;
Database unique name: fdb1&lt;br /&gt;
Database name: fdb1&lt;br /&gt;
Oracle home: /oracle/product/12.1.0.2/dbhome_1&lt;br /&gt;
Oracle user: oracle&lt;br /&gt;
Spfile:&lt;br /&gt;
Password file:&lt;br /&gt;
Domain:&lt;br /&gt;
&lt;span style="color: red;"&gt;Start options: mount&lt;/span&gt;&lt;br /&gt;
Stop options: &lt;span style="color: red;"&gt;immediate&lt;/span&gt;&lt;br /&gt;
Database role: FAR_SYNC&lt;br /&gt;
Management policy: &lt;span style="color: red;"&gt;AUTOMATIC&lt;/span&gt;&lt;br /&gt;
Disk Groups: DATA&lt;br /&gt;
Services:&lt;br /&gt;
Database is enabled&lt;br /&gt;
OSDBA group:&lt;br /&gt;
OSOPER group:&lt;br /&gt;
Database instance: fdb1&lt;/blockquote&gt;
&lt;div&gt;
For understanding the differences between&amp;nbsp;&lt;b&gt;srvctl&lt;/b&gt;&amp;nbsp;and&amp;nbsp;&lt;b&gt;crsctl&lt;/b&gt; see:&amp;nbsp;&lt;a href="https://oracledba.blogspot.com/2018/01/oracle-srvctl-management-policy-vs.html"&gt;Oracle srvctl: Management policy Vs crsctl: AUTO_START (in Oracle Restart)&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://twitter.com/YossiNixon"&gt;Yossi&lt;/a&gt;&lt;/div&gt;
</description><link>https://oracledba.blogspot.com/2018/11/automatic-restart-in-grid.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje4yHXI-dzHvqoIPdYX5CfwbqazKv1QAierLDP3yzuzTgznMUmIh1qeIJuL9uDItRRnzCkYAc_r8QWFVB4E7pCFPYpieOLZfqwl94_4j0_EqO7DIj3ckRY2HqT2T9EA7-_VnVp/s72-c/restart.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-6093659824800206913</guid><pubDate>Mon, 19 Nov 2018 15:00:00 +0000</pubDate><atom:updated>2018-11-19T17:00:01.693+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">rman</category><category domain="http://www.blogger.com/atom/ns#">v$rman_output</category><title>Query Historical messages of RMAN</title><description>&lt;div class="tr_bq"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://draft.blogger.com/null" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="367" data-original-width="454" height="258" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkjiA7tPfxqz6rjE9LQIPYPTeAmHeJ6ckgbKB-FjpkKhbboCTwnRIuyV4ZYToA1pCOaF-nrOD1Jyz9eVlmUjTjwJWqYL3lFNB0BAgcbx-JJ62VVKPqj9ZnNWs0dEGzlVkTKhfh/s320/rman.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Hi,&lt;/div&gt;
Recently I realized that this very small and useful feature of RMAN is not known to many of us.&lt;br /&gt;
I have just learned about this option just two years ago.&lt;br /&gt;
I am talking about the ability to query from database (in-memory view) 32768 lines of RMAN output, even if it was used by crontab or any 3rd-party vendor.&lt;br /&gt;
So it is a sample sql command from v$rman_output, in the following example I filter just the last 7 days.&lt;br /&gt;
&lt;blockquote&gt;
SQL&amp;gt;&amp;nbsp; col OUTPUT for a135 trunc&lt;br /&gt;
SQL&amp;gt; set pages 0&lt;br /&gt;
SQL&amp;gt; &lt;b&gt;select output from gv$rman_output where session_recid in (select session_recid from v$rman_status where start_time &amp;gt; sysdate-7) order by recid ;&lt;/b&gt;&lt;br /&gt;
connected to target database: PDB11 (DBID=3890652951, not open)&lt;br /&gt;
&lt;br /&gt;
crosscheck archivelog all;&lt;br /&gt;
delete noprompt archivelog like '+DATA%';&lt;br /&gt;
delete noprompt archivelog like '+RECO%';&lt;br /&gt;
delete noprompt archivelog like '/DB%';&lt;br /&gt;
delete noprompt obsolete;&lt;br /&gt;
crosscheck copy;&lt;br /&gt;
delete noprompt expired copy;&lt;br /&gt;
exit;&lt;br /&gt;
&lt;br /&gt;
using target database control file instead of recovery catalog&lt;br /&gt;
allocated channel: ORA_DISK_1&lt;br /&gt;
channel ORA_DISK_1: SID=695 device type=DISK&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_06/thread_1_seq_13056.843.927192449 RECID=26052 STAMP=927192449&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_06/thread_1_seq_13057.826.927192453 RECID=26055 STAMP=927192453&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_06/thread_1_seq_13058.841.927193943 RECID=26056 STAMP=927193943&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_17/thread_1_seq_13059.783.928188033 RECID=26057 STAMP=928188041&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_20/thread_1_seq_13060.846.928423541 RECID=26058 STAMP=928423543&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_20/thread_1_seq_13061.825.928423543 RECID=26059 STAMP=928423544&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13062.689.928577549 RECID=26060 STAMP=928577549&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13063.1457.928579241 RECID=26061 STAMP=928579241&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13064.543.928579251 RECID=26067 STAMP=928579250&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13065.1502.928579257 RECID=26071 STAMP=928579256&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13066.1269.928579751 RECID=26073 STAMP=928579751&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13067.634.928579887 RECID=26074 STAMP=928579887&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13068.627.928579891 RECID=26078 STAMP=928579890&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13069.659.928580081 RECID=26080 STAMP=928580080&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13070.610.928581933 RECID=26081 STAMP=928581933&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13071.308.928581937 RECID=26083 STAMP=928581936&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13072.649.928581943 RECID=26086 STAMP=928581943&lt;br /&gt;
Crosschecked 17 objects&lt;br /&gt;
&lt;br /&gt;
released channel: ORA_DISK_1&lt;br /&gt;
allocated channel: ORA_DISK_1&lt;br /&gt;
channel ORA_DISK_1: SID=695 device type=DISK&lt;br /&gt;
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13070.610.928581933 thread=1 sequence=13070&lt;br /&gt;
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13071.308.928581937 thread=1 sequence=13071&lt;br /&gt;
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13072.649.928581943 thread=1 sequence=13072&lt;br /&gt;
deleted archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_06/thread_1_seq_13056.843.927192449 RECID=26052 STAMP=927192449&lt;br /&gt;
deleted archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_06/thread_1_seq_13057.826.927192453 RECID=26055 STAMP=927192453&lt;br /&gt;
deleted archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_06/thread_1_seq_13058.841.927193943 RECID=26056 STAMP=927193943&lt;br /&gt;
deleted archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_17/thread_1_seq_13059.783.928188033 RECID=26057 STAMP=928188041&lt;br /&gt;
deleted archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_20/thread_1_seq_13060.846.928423541 RECID=26058 STAMP=928423543&lt;br /&gt;
deleted archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_20/thread_1_seq_13061.825.928423543 RECID=26059 STAMP=928423544&lt;br /&gt;
deleted archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13062.689.928577549 RECID=26060 STAMP=928577549&lt;br /&gt;
deleted archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13063.1457.928579241 RECID=26061 STAMP=928579241&lt;br /&gt;
deleted archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13064.543.928579251 RECID=26067 STAMP=928579250&lt;br /&gt;
deleted archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13065.1502.928579257 RECID=26071 STAMP=928579256&lt;br /&gt;
deleted archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13066.1269.928579751 RECID=26073 STAMP=928579751&lt;br /&gt;
deleted archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13067.634.928579887 RECID=26074 STAMP=928579887&lt;br /&gt;
deleted archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13068.627.928579891 RECID=26078 STAMP=928579890&lt;br /&gt;
deleted archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13069.659.928580081 RECID=26080 STAMP=928580080&lt;br /&gt;
Deleted 14 objects&lt;br /&gt;
&lt;br /&gt;
released channel: ORA_DISK_1&lt;br /&gt;
allocated channel: ORA_DISK_1&lt;br /&gt;
channel ORA_DISK_1: SID=695 device type=DISK&lt;br /&gt;
specification does not match any archived log in the repository&lt;br /&gt;
released channel: ORA_DISK_1&lt;br /&gt;
allocated channel: ORA_DISK_1&lt;br /&gt;
channel ORA_DISK_1: SID=695 device type=DISK&lt;br /&gt;
specification does not match any archived log in the repository&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;
no obsolete backups found&lt;br /&gt;
released channel: ORA_DISK_1&lt;br /&gt;
allocated channel: ORA_DISK_1&lt;br /&gt;
channel ORA_DISK_1: SID=695 device type=DISK&lt;br /&gt;
specification does not match any datafile copy in the repository&lt;br /&gt;
validation failed for control file copy&lt;br /&gt;
control file copy file name=/tmp/farsync_control.ctl RECID=15 STAMP=928579660&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13070.610.928581933 RECID=26081 STAMP=928581933&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13071.308.928581937 RECID=26083 STAMP=928581936&lt;br /&gt;
validation succeeded for archived log&lt;br /&gt;
archived log file name=+DATA/PDB11/ARCHIVELOG/2018_10_22/thread_1_seq_13072.649.928581943 RECID=26086 STAMP=928581943&lt;br /&gt;
Crosschecked 4 objects&lt;br /&gt;
&lt;br /&gt;
released channel: ORA_DISK_1&lt;br /&gt;
allocated channel: ORA_DISK_1&lt;br /&gt;
channel ORA_DISK_1: SID=695 device type=DISK&lt;br /&gt;
specification does not match any datafile copy in the repository&lt;br /&gt;
specification does not match any archived log in the repository&lt;br /&gt;
deleted control file copy&lt;br /&gt;
control file copy file name=/tmp/farsync_control.ctl RECID=15 STAMP=928579660&lt;br /&gt;
Deleted 1 EXPIRED objects&lt;/blockquote&gt;
&lt;div&gt;
Remember, that if your database was just bounced, this view will be empty.&lt;br /&gt;
In the above example you can see the cron job that we run on our lab (crosscheck and deletes)&lt;/div&gt;
</description><link>https://oracledba.blogspot.com/2018/11/query-historical-messages-of-rman.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkjiA7tPfxqz6rjE9LQIPYPTeAmHeJ6ckgbKB-FjpkKhbboCTwnRIuyV4ZYToA1pCOaF-nrOD1Jyz9eVlmUjTjwJWqYL3lFNB0BAgcbx-JJ62VVKPqj9ZnNWs0dEGzlVkTKhfh/s72-c/rman.jpg" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-7685473669763028469</guid><pubDate>Mon, 12 Nov 2018 15:00:00 +0000</pubDate><atom:updated>2018-11-25T10:36:50.882+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ACE</category><category domain="http://www.blogger.com/atom/ns#">OpenWorld</category><category domain="http://www.blogger.com/atom/ns#">Oracle OpenWorld</category><title>My impressions from Oracle OpenWorld 2018</title><description>&lt;br /&gt;
&lt;div class="MsoNormal" style="text-align: justify;"&gt;
Hi,&lt;/div&gt;
&lt;div class="MsoNormal" style="text-align: justify;"&gt;
This was my third time at Oracle OpenWorld, and still I was thrilled like the first time. Howard Street was dressed in big, red banners everywhere—just take a picture and share it in a social network.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp7luDe4l6if863gWWixm3ca1f7-ftmmTIvbmd8akSEIzkk8TdXbbJja7TSa6_ScklemIcQ-YcA1QzPlRkloZ6TVyFmV_Ajkg-KwnPzHGN5k0QrSVtblXcESMRh08GcbTkzF08/s1600/ooo18_1.jpg" imageanchor="1"&gt;&lt;img border="0" data-original-height="387" data-original-width="689" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp7luDe4l6if863gWWixm3ca1f7-ftmmTIvbmd8akSEIzkk8TdXbbJja7TSa6_ScklemIcQ-YcA1QzPlRkloZ6TVyFmV_Ajkg-KwnPzHGN5k0QrSVtblXcESMRh08GcbTkzF08/s320/ooo18_1.jpg" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7D0FLxzsgc4BdXlsFS87lRvo-Yf8q6AKp2p5jwD4c4gQSGUTnWmodFk2yDp1owUOumW1OeaymC9C-JC7uxgreosg1gspTyyJcgfhlO10XNzDuKdv_5Z0h553jCFUaZPacBi0q/s1600/ooo18_2.jpg" imageanchor="1"&gt;&lt;img border="0" data-original-height="387" data-original-width="689" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7D0FLxzsgc4BdXlsFS87lRvo-Yf8q6AKp2p5jwD4c4gQSGUTnWmodFk2yDp1owUOumW1OeaymC9C-JC7uxgreosg1gspTyyJcgfhlO10XNzDuKdv_5Z0h553jCFUaZPacBi0q/s320/ooo18_2.jpg" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIEu7uXeLfMoVfJlJwr69oDWEm3aZGoh0GZsjcw04sf4xyb7USpa_1OlJ_qxObX-mtEcpvXyvsxxtxYk_dxXAB-A-FeIc7Di_0_W3b5KkO-0ySSyz6ISy7WQCYZl3cSEna7dJL/s1600/ooo18_3.jpg" imageanchor="1"&gt;&lt;img border="0" data-original-height="387" data-original-width="689" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIEu7uXeLfMoVfJlJwr69oDWEm3aZGoh0GZsjcw04sf4xyb7USpa_1OlJ_qxObX-mtEcpvXyvsxxtxYk_dxXAB-A-FeIc7Di_0_W3b5KkO-0ySSyz6ISy7WQCYZl3cSEna7dJL/s320/ooo18_3.jpg" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="text-align: justify;"&gt;
This time I was also there as part of the &lt;a href="https://www.oracle.com/technetwork/community/oracle-ace/index.html"&gt;Oracle ACE program&lt;/a&gt;, a community of Oracle experts and advocates. We all met on several occasions during the conference, giving me the opportunity to meet in person with the people I follow and whose sessions I attend.&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class="MsoNormal" style="text-align: justify;"&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="text-align: justify;"&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHmvLkAFn_dWkrLz5iAEPVj_uS2ldowN5eGzuSsaV84M8qO9ypHpbriMAvMKE0JDHk8bXOz1EaUhOKe3QYSww8J9LlQ8bpsJbrD6i9Uqc5Fdl-MCNCpo9DUfXa1mcoUF-9d0fy/s1600/larry.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" data-original-height="387" data-original-width="689" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHmvLkAFn_dWkrLz5iAEPVj_uS2ldowN5eGzuSsaV84M8qO9ypHpbriMAvMKE0JDHk8bXOz1EaUhOKe3QYSww8J9LlQ8bpsJbrD6i9Uqc5Fdl-MCNCpo9DUfXa1mcoUF-9d0fy/s400/larry.jpg" width="400" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style="text-align: left;"&gt;
This year’s main keynote by Larry Ellison was about Oracle Generation 2 Cloud, which was built from the ground up for better performance, pricing, and security. I assume that Oracle’s architecture is indeed better than the competitors, as Larry kept saying, because Oracle hired the best minds in the industry - people with deep experience in cloud technology - to build Generation 2. I just hope that Oracle’s implementation will be as good as its design. Oracle announced that version 18c, and later 19c, will be fully independent and autonomous, while in the past they’ve used other words like Automatic…. and Dynamic… Even though Oracle continues to add more automatic features in each version, we DBAs still have much more work to do.&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="text-align: justify;"&gt;
A good opportunity in this kind of conference was to ask Oracle's Senior Directors questions about software, bugs, and even future releases.&amp;nbsp; I made several contacts who are helping me currently.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="text-align: justify;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb5msq-4XMwBfwrgmbVim_xcE5I7YkpL4fKEnq9C4K4Xw82nb-UnjwMbNhEpsDNTu3PMz3NcnrCE0JZvKYLJKIn2YMxCzPRfkQ3xdo06QLfJjxQ7zXNrWtwXbwow2qypkChEIq/s1600/axxana.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="491" data-original-width="704" height="138" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb5msq-4XMwBfwrgmbVim_xcE5I7YkpL4fKEnq9C4K4Xw82nb-UnjwMbNhEpsDNTu3PMz3NcnrCE0JZvKYLJKIn2YMxCzPRfkQ3xdo06QLfJjxQ7zXNrWtwXbwow2qypkChEIq/s200/axxana.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="text-align: justify;"&gt;
Beyond being in many useful technical sessions, I also joined my company’s booth - Axxana. We shared our Phoenix product, which ensures zero data loss and rapid recovery at any distance and in any topology - at a fraction of the cost of traditional disaster recovery solutions.&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class="MsoNormal" style="text-align: justify;"&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="text-align: justify;"&gt;
An integral part of OpenWorld is the night of festivities at AT&amp;amp;T Park, which was called this year CloudFest.18. I enjoyed the company, food, one song of the band Portugal The Man, and one song of Beck.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="text-align: justify;"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTOhmE4mYtJ3G0DbUkiHyaiLBH0P5VVBDzpCGTbmGSQU_uepLn11znTpyrlOWtYVtZBi3nzFTmVFLaSIqP9BCbJm1iJ34YRevBRMQRiXi9ExhVX297BWSQRSEsW6-oc_WFuhqd/s1600/fest.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="387" data-original-width="689" height="356" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTOhmE4mYtJ3G0DbUkiHyaiLBH0P5VVBDzpCGTbmGSQU_uepLn11znTpyrlOWtYVtZBi3nzFTmVFLaSIqP9BCbJm1iJ34YRevBRMQRiXi9ExhVX297BWSQRSEsW6-oc_WFuhqd/s640/fest.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="text-align: justify;"&gt;
Yossi Nixon&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>https://oracledba.blogspot.com/2018/11/my-impressions-from-oracle-openworld.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp7luDe4l6if863gWWixm3ca1f7-ftmmTIvbmd8akSEIzkk8TdXbbJja7TSa6_ScklemIcQ-YcA1QzPlRkloZ6TVyFmV_Ajkg-KwnPzHGN5k0QrSVtblXcESMRh08GcbTkzF08/s72-c/ooo18_1.jpg" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-8519947262075480455</guid><pubDate>Tue, 06 Nov 2018 15:00:00 +0000</pubDate><atom:updated>2018-11-07T12:07:41.976+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">asm</category><category domain="http://www.blogger.com/atom/ns#">Orphan</category><category domain="http://www.blogger.com/atom/ns#">sql</category><title>Orphaned Files in ASM</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="315" data-original-width="477" height="211" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb1IBws7NdKbhhZ-FmbGiXZfEuxX4huJlui8pcCkzOGlHC0pxe0lK91hiZPF4wsAPcvyfm1m38ZP7ZaXyc1KnXYO4mhwP1FF6tcevI5DfD8WiNLdt9isVQodBN8HH70S9_81xF/s320/orphaned.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Hi,&lt;br /&gt;
In our lab environments we test Data Guard on a daily basis, and we frequently “play” with failover, switchover, and flashback . The output of this playground is that we have some leftovers in the ASM; we call these leftovers &lt;b&gt;orphan files&lt;/b&gt;.&lt;br /&gt;
To solve this, I created SQL to query ASM views against database views.&lt;br /&gt;
This query should run on the database (not ASM).&lt;br /&gt;
&lt;blockquote&gt;SET VERIFY OFF&lt;br /&gt;
&lt;br /&gt;
SET LINESIZE 200&lt;br /&gt;
SET SERVEROUTPUT ON&lt;br /&gt;
SET PAGESIZE 50000&lt;br /&gt;
&lt;br /&gt;
DECLARE&lt;br /&gt;
&amp;nbsp; &amp;nbsp;cmd&amp;nbsp; &amp;nbsp;CLOB;&lt;br /&gt;
BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp;FOR c IN (SELECT name Diskgroup&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FROM V$ASM_DISKGROUP)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;LOOP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; FOR l&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IN (SELECT 'rm ' || files files&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FROM&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (SELECT '+' || c.Diskgroup || files files, TYPE&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;FROM (&amp;nbsp; &amp;nbsp; SELECT UPPER&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; &amp;nbsp; (&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; &amp;nbsp; &amp;nbsp; &amp;nbsp;SYS_CONNECT_BY_PATH (aa.name, '/')&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; &amp;nbsp; )&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; &amp;nbsp; &amp;nbsp; &amp;nbsp;files&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; , aa.reference_index&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; , b.TYPE&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;FROM (SELECT file_number&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , alias_directory&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , name&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , reference_index&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , parent_index&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; &amp;nbsp; &amp;nbsp; &amp;nbsp;FROM v$asm_alias) aa&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; , (SELECT parent_index&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; &amp;nbsp; &amp;nbsp; &amp;nbsp;FROM (SELECT parent_index&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FROM v$asm_alias&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHERE&amp;nbsp; &amp;nbsp; &amp;nbsp;group_number =&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; &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;(SELECT group_number&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; &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; FROM v$asm_diskgroup&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; &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;WHERE name =&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; &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; c.Diskgroup)&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AND alias_index = 0)) a&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; , (SELECT file_number, TYPE&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; &amp;nbsp; &amp;nbsp; &amp;nbsp;FROM (SELECT file_number, TYPE&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FROM v$asm_file&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHERE group_number =&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(SELECT group_number&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM v$asm_diskgroup&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE name =&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; &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; c.Diskgroup)))&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; &amp;nbsp; b&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; WHERE&amp;nbsp; &amp;nbsp; &amp;nbsp;aa.file_number = b.file_number(+)&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; &amp;nbsp; AND aa.alias_directory = 'N'&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; &amp;nbsp; AND b.TYPE IN&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;('DATAFILE'&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , 'ONLINELOG'&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , 'CONTROLFILE'&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , 'TEMPFILE')&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;START WITH aa.PARENT_INDEX = a.parent_index&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;CONNECT BY PRIOR aa.reference_index =&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; &amp;nbsp; &amp;nbsp; &amp;nbsp;aa.parent_index)&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; WHERE SUBSTR&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; (&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;files&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;, INSTR (files, '/', 1, 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; &amp;nbsp;INSTR (files, '/', 1, 2)&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;- INSTR (files, '/', 1, 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;+ 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; ) =&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;(SELECT dbname&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; FROM (SELECT&amp;nbsp; &amp;nbsp; '/'&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|| UPPER (db_unique_name)&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|| '/'&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dbname&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; &amp;nbsp; &amp;nbsp; FROM v$database))&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;MINUS&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;(SELECT UPPER (name) files, 'DATAFILE' TYPE&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; FROM v$datafile&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; UNION 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; SELECT UPPER (name) files, 'TEMPFILE' TYPE&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; FROM v$tempfile&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; UNION 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; SELECT UPPER (name) files, 'CONTROLFILE' TYPE&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; FROM v$controlfile&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;WHERE name LIKE '+' || c.Diskgroup || '%'&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; UNION 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; SELECT UPPER (name), 'CONTROLFILE' TYPE&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; FROM v$datafile_copy&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;WHERE deleted = 'NO'&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; UNION 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; SELECT UPPER (MEMBER) files, 'ONLINELOG' TYPE&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; FROM v$logfile&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;WHERE MEMBER LIKE '+' || c.Diskgroup || '%')))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; LOOP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DBMS_OUTPUT.put_line (l.files);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; END LOOP;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;END LOOP;&lt;br /&gt;
END;&lt;br /&gt;
/&lt;/blockquote&gt;Sample output:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;rm +DATA/MYDB/CONTROLFILE/BACKUP.11645.952252647&lt;/blockquote&gt;Personally, I am not running this script automatically. I consider it as a report of deletion candidates.&lt;br /&gt;
Run the commands in the ASM instance using asmcmd, for example:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;ASMCMD&amp;gt; rm +DATA/MYDB/CONTROLFILE/BACKUP.11645.952252647&lt;/blockquote&gt;&lt;br /&gt;
Disclaimer: &lt;span style="color: red;"&gt;&lt;b&gt;Use at your own risk&lt;/b&gt;&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
Yossi&lt;br /&gt;
&lt;br /&gt;
</description><link>https://oracledba.blogspot.com/2018/11/orphaned-files-in-asm.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb1IBws7NdKbhhZ-FmbGiXZfEuxX4huJlui8pcCkzOGlHC0pxe0lK91hiZPF4wsAPcvyfm1m38ZP7ZaXyc1KnXYO4mhwP1FF6tcevI5DfD8WiNLdt9isVQodBN8HH70S9_81xF/s72-c/orphaned.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-3828926972354891292</guid><pubDate>Thu, 01 Nov 2018 13:56:00 +0000</pubDate><atom:updated>2018-11-22T13:38:01.628+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">19c</category><category domain="http://www.blogger.com/atom/ns#">broker</category><category domain="http://www.blogger.com/atom/ns#">Data Guard</category><category domain="http://www.blogger.com/atom/ns#">export</category><category domain="http://www.blogger.com/atom/ns#">import</category><category domain="http://www.blogger.com/atom/ns#">oracle</category><title>Data Guard Broker 19c</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://draft.blogger.com/null" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" data-original-height="208" data-original-width="236" height="176" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXvzuS0ctfZHhI0lePE3mUqc0QGFphivC9W5p5rl6x_rbQ5d6Zq2GbO2KmhsPhEJDPaGny_OClRSiwi-gJ6PiCwQl25iQRp4OuAtydNUBMWz-PVGfh2i7syOLrN8R33jGPgiVG/s200/Untitled.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
Hi,&lt;br /&gt;
In an earlier version of Data Guard, when the broker had problems, one of the automatic answers I got from support was to recreate the broker configuration.&lt;br /&gt;
In other words:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Drop the configuration.&lt;/li&gt;
&lt;li&gt;&amp;nbsp;Create the configuration.&lt;/li&gt;
&lt;/ol&gt;
If your broker is simple, this is not a huge request. Actually, you could follow &lt;a href="https://support.oracle.com/knowledge/Oracle%20Database%20Products/808783_1.html"&gt;Step By Step How to Recreate Data Guard Broker Configuration (Doc ID 808783.1)&lt;/a&gt;.&lt;br /&gt;
But in my case, using Active Data Guard with Far Sync, with many fine-tuned configurations, it was not so convenient. I had a number of ways I tried to be efficient:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;I could write down all broker commands - to be able to run them again next time.&lt;/li&gt;
&lt;li&gt;For versions 11.2.0.4 and 12.1.0.2, I found a way to query the broker and re-create a current configuration creation script (&lt;a href="https://oracledba.blogspot.com/2016/05/extract-data-guard-commands.html"&gt;Extract Data Guard Commands&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;I also had some issues trying to &lt;a href="https://oracledba.blogspot.com/2016/10/dropremove-far-sync-configurations-from.html"&gt;Drop/remove Far-Sync Configurations from broker 12.1&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;On version 12.2.0.1, I found out that the broker metadata was changed, so I had to update my previous script for&amp;nbsp;&lt;a href="https://oracledba.blogspot.com/2018/02/extract-data-guard-commands-on-oracle.html"&gt;Extract Data Guard Commands on Oracle 12.2&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Finally on Oracle 19c, there will be new commands to export and import a broker configuration &#128522;&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote class="tr_bq"&gt;
dgmgrl&amp;gt; export configuration to ‘meta.xml’&lt;br /&gt;
dgmgrl&amp;gt; import configuration from ‘meta.xml’&lt;/blockquote&gt;
Here is a full listing, shown at Oracle OpenWorld 2018, of new features promised to be in Oracle 19c:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://draft.blogger.com/null" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="815" data-original-width="1600" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF47JxR1cCLkvThxNEi2JmgDoAq6rk9Qfh8ACrOIR2WS2mK6GOnh4zkE7Qg_EV8SdmKLFmT62Igknp4GvvwtZFB2g1g9p3oIWKiDr1QcyeCI0svTqOdPjaAYZDZU-XyY0QD5pR/s1600/Untitled2.png" /&gt;&lt;/a&gt;&lt;/div&gt;
</description><link>https://oracledba.blogspot.com/2018/11/data-guard-broker-19c.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXvzuS0ctfZHhI0lePE3mUqc0QGFphivC9W5p5rl6x_rbQ5d6Zq2GbO2KmhsPhEJDPaGny_OClRSiwi-gJ6PiCwQl25iQRp4OuAtydNUBMWz-PVGfh2i7syOLrN8R33jGPgiVG/s72-c/Untitled.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-4321192045897033292</guid><pubDate>Tue, 07 Aug 2018 14:30:00 +0000</pubDate><atom:updated>2018-08-07T17:30:17.344+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">benchmark</category><category domain="http://www.blogger.com/atom/ns#">performance</category><category domain="http://www.blogger.com/atom/ns#">slob</category><title>SLOB</title><description>SLOB is an Oracle I/O workload generation tool kit, supports testing extreme REDO logging I/O (minimal amount of CPU overhead)&lt;br /&gt;
The SLOB package can be downloaded from&amp;nbsp;&lt;a href="https://kevinclosson.net/slob/"&gt;Kevin Closson's Blog: SLOB Resources&lt;/a&gt;&lt;br /&gt;
SLOB 2.4.2 requires Linux with Oracle Client&lt;br /&gt;
&lt;h2&gt;Installation&lt;/h2&gt;Unzip the SLOB tar.gz file in the desired directory ($SLOB).&lt;br /&gt;
Create tablespace for SLOB data (the script creates IOPS)&lt;br /&gt;
&lt;blockquote&gt;$ cd $SLOB&lt;br /&gt;
$ sqlplus / as sysdba @ misc/ts&lt;/blockquote&gt;Load SLOB data by running setup.sh script located in the $SLOB directory. Using two mandatory parameters:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Tablespace into which SLOB will create and load the test schemas&lt;/li&gt;
&lt;li&gt;The number of schemas to create and load&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote&gt;$ ./setup.sh IOPS 8&lt;/blockquote&gt;&lt;h2&gt;configuration&lt;/h2&gt;One time compilation&lt;br /&gt;
&lt;blockquote&gt;$ cd $SLOB/wait_kit&lt;br /&gt;
$ make&lt;/blockquote&gt;Edit runtime parameter in slob.conf configuration file&lt;br /&gt;
&lt;blockquote&gt;$ cd $SLOB&lt;br /&gt;
$ vi slob.conf&lt;/blockquote&gt;Execute slob using number of SLOB schemas&lt;br /&gt;
&lt;blockquote&gt;$ cd $SLOB&lt;br /&gt;
$ ./runit.sh 8&lt;/blockquote&gt;We can edit the slob.conf file to modify some parameters.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;UPDATE_PCT - Percentage of SLOB update operations&lt;/li&gt;
&lt;li&gt;SCAN_PCT - percentage of short scan SELECT operations on a short scan table&lt;/li&gt;
&lt;li&gt;RUN_TIME - Wall-­clock duration of a SLOB test in seconds&lt;/li&gt;
&lt;li&gt;WORK_LOOP - SLOB test duration based on iterations&lt;/li&gt;
&lt;li&gt;SCALE - Number of database blocks / Size&lt;/li&gt;
&lt;li&gt;SCAN_TABLE_SZ -  size of the short scan table(s)&lt;/li&gt;
&lt;li&gt;WORK_UNIT - scope of blocks being manipulated by each operation&lt;/li&gt;
&lt;li&gt;REDO_STRESS - HEAVY -&amp;gt; generate significant amounts of redo logging&lt;/li&gt;
&lt;li&gt;LOAD_PARALLEL_DEGREE -  number of Oracle Database sessions concurrently inserting data&lt;/li&gt;
&lt;li&gt;THREADS_PER_SCHEMA – sessions against each schema&lt;/li&gt;
&lt;li&gt;DATABASE_STATISTICS_TYPE -  “awr” or “statspack.”&lt;/li&gt;
&lt;li&gt;ADMIN_SQLNET_SERVICE – separate service for admin operations&lt;/li&gt;
&lt;li&gt;SQLNET_SERVICE_BASE – service for load balance and round robin connection&lt;/li&gt;
&lt;li&gt;SQLNET_SERVICE_MAX -  appended to SQLNET_SERVICE_BASE in a RAC testing scenario&lt;/li&gt;
&lt;li&gt;DBA_PRIV_USER – sys / system or any DBA user&lt;/li&gt;
&lt;li&gt;SYSDBA_PASSWD – password of the above user&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;Results &amp;amp; tools&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;iostat.out - input/output statistics: Read Thoughput (MB/sec), Write Throughput (MB/sec) and information about queue lengths.&lt;/li&gt;
&lt;li&gt;mpstat.out - CPU utilization (processors related statistics)&lt;/li&gt;
&lt;li&gt;vmstat.out - virtual memory statistics&lt;/li&gt;
&lt;li&gt;misc/awr_info.sh - extracts interesting information from the awr.txt file&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote&gt;$ misc/awr_info.sh awr_pdb.txt&lt;br /&gt;
FILE|SESSIONS|ELAPSED|DB CPU|DB Tm|EXECUTES|LIO|PREADS|READ_MBS|PWRITES|WRITE_MBS|REDO_MBS|DFSR_LAT|DPR_LAT|DFPR_LAT|DFPW_LAT|LFPW_LAT|TOP WAIT|&lt;br /&gt;
awr_pdb.txt||61|0.6|1.0|695|52106|1997|   16.6|0|    53|34.8|     250|0|0|0|     192|DB CPU                                           33.3              54.7|&lt;/blockquote&gt;</description><link>https://oracledba.blogspot.com/2018/08/slob.html</link><author>noreply@blogger.com (Yossi Nixon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-2612951972654274146</guid><pubDate>Mon, 23 Jul 2018 14:00:00 +0000</pubDate><atom:updated>2018-08-02T17:03:19.809+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">benchmark</category><category domain="http://www.blogger.com/atom/ns#">performance</category><category domain="http://www.blogger.com/atom/ns#">swingbench</category><title>Swingbench Short cookbook commands</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://draft.blogger.com/null" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="873" data-original-width="1600" height="174" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis7Guc30A-zP4GDo8thbb8wLGqG9I8B8qbOMAcxrOAUdCx5yfgfvVlY6rG42i7cIj0V8ad5PvA2rmyA-YEbWWl-ybuXsfsiwmEMw9BY99YANJY55IyiYL6lhhpPuMsjJaDzEIq/s320/swing.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style="margin-top: 10px; padding: 0px;"&gt;In this example we are using Swingbench 2.6 with &lt;strong&gt;Order Entry&lt;/strong&gt; stress test - using a configuration file (SOE_Server_Side_V2.xml)&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Connection String:&lt;/strong&gt;&lt;br /&gt;
The connection will always be defined to pluggable database (not CDB) - if installed.&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;u&gt;//hostname/service_name&lt;/u&gt; valid for driver type: &lt;strong&gt;Oracle oci Driver&lt;/strong&gt; &amp;amp; &lt;strong&gt;Oracle jdbc Driver&lt;/strong&gt; (&lt;strong&gt;oewizard&lt;/strong&gt;,&lt;strong&gt;sbutil&lt;/strong&gt; use only this option) .&lt;br /&gt;
Make sure the service name is recognized by the listener (&lt;em&gt;lsnrctl services | grep Service&lt;/em&gt;) &lt;/li&gt;
&lt;li&gt;&lt;u&gt;Tnsnames alias&lt;/u&gt; valid &lt;strong&gt;only&lt;/strong&gt; for driver type: &lt;strong&gt;Oracle oci Driver&lt;/strong&gt; – requires Oracle 12.2 client &lt;/li&gt;
&lt;/ul&gt;&lt;strong&gt;Creating the schema:&lt;/strong&gt;&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;cd swingbench/bin&lt;br /&gt;
$ ./oewizard -dbap &lt;span style="color: red;"&gt;change_on_install&lt;/span&gt; -ts SOE -nopart -u soe -p soe -cl -df +DATA -create &lt;span style="color: red;"&gt;-scale 1 -cs //db_server/db_service&lt;/span&gt;&lt;/blockquote&gt;&lt;strong&gt;Running:&lt;/strong&gt;&lt;br /&gt;
If you need to use &lt;span style="text-decoration-line: underline;"&gt;Connection Pooling&lt;/span&gt;:&lt;br /&gt;
&lt;ul style="margin: 10px 0px 0px;"&gt;&lt;li&gt;Change the driver type to "&lt;em&gt;Oracle oci Driver"&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Change the format of the connection string to tns alias&lt;/li&gt;
&lt;li&gt;For further needed changes, look at: &lt;a class="external-link" href="http://dominicgiles.com/blog/files/8278e1395e583ab4ba63429cfcf609bb-138.html" rel="nofollow" style="text-decoration-line: none;"&gt;Application Continuity in Oracle Database 12c (12.1.0.2)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style="margin-top: 10px; padding: 0px;"&gt;charbench - character mode benchmark&lt;br /&gt;
minibench - graphical minimal mode benchmark&lt;br /&gt;
swingbench - graphical full mode benchmark (need Xming)&lt;/div&gt;&lt;div style="margin-top: 10px; padding: 0px;"&gt;&lt;br class="atl-forced-newline" /&gt; &lt;strong&gt;&lt;span style="text-decoration-line: underline;"&gt;Swingbench&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Main parameters:&lt;/div&gt;&lt;div style="margin-left: 30px; margin-top: 10px; padding: 0px;"&gt;-uc: user count&lt;br /&gt;
-r: results file&lt;br /&gt;
-rt: run time for the benchmark&lt;br /&gt;
-cs:connection string&lt;br /&gt;
-a: run automatically&lt;br /&gt;
-cpuuser: os username of the user used to monitor cpu&lt;br /&gt;
-cpupass: os password of the user used to monitor cpu&lt;br /&gt;
-cpuloc: location/hostname of the cpu monitor&lt;br /&gt;
&lt;/div&gt;&lt;div style="margin-top: 10px; padding: 0px;"&gt;When running swingbench or minibench with "&lt;strong&gt;-a&lt;/strong&gt;" parameter it starts automatically, you may want to omit this parameter, to look or change some parameters.&lt;br /&gt;
See more &lt;a href="https://draft.blogger.com/blogger.g?blogID=6061714#Swingbench-Swingbenchparameters" style="text-decoration-line: none;"&gt;Swingbench parameters&lt;/a&gt; at the end of this document.&lt;br /&gt;
&lt;br /&gt;
Run XLaunch (Xming) or equivalent application&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;$ export DISPLAY=your windows ip&lt;you ip="" windows=""&gt;:0.0&lt;/you&gt;&lt;br /&gt;
$ cd swingbench/bin&lt;br /&gt;
$ &lt;strong&gt;./swingbench&lt;/strong&gt; -u soe -p soe -min 10 -max 200 -stats full -c ../configs/SOE_Server_Side_V2.xml -ld 500 -f -dbap &lt;span style="color: red;"&gt;change_on_install&lt;/span&gt; -dbau "sys as sysdba" &lt;span style="background: yellow;"&gt;-r scale1_100user.xml -uc 100 -rt 0:05 -cs //db_server/db_service -cpuuser db_os_owner -cpupass db_os_owner_password -cpuloc db_server&lt;b&gt; -a&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div style="margin-top: 10px; padding: 0px;"&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="text-decoration-line: underline;"&gt;Minibench&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;$ &lt;strong&gt;./minibench&lt;/strong&gt; -u soe -p soe -min 10 -max 200 -stats full -c ../configs/SOE_Server_Side_V2.xml -ld 500 -f -dbap &lt;span style="color: red;"&gt;change_on_install&lt;/span&gt; -dbau "sys as sysdba" &lt;span style="background: yellow;"&gt;-r scale1_100user.xml -uc 100 -rt 0:05 -cs //db_server/db_service -cpuuser db_os_owner -cpupass db_os_owner_password -cpuloc db_server&lt;b&gt; -a&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div style="margin-top: 10px; padding: 0px;"&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="text-decoration-line: underline;"&gt;Charbench&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;$ &lt;strong&gt;./charbench&lt;/strong&gt; -u soe -p soe -min 10 -max 200 -stats full -c ../configs/SOE_Server_Side_V2.xml -ld 500 -f -dbap &lt;span style="color: red;"&gt;change_on_install&lt;/span&gt; -dbau "sys as sysdba" &lt;span style="background: yellow;"&gt;-r scale1_100user.xml -uc 100 -rt 0:05 -cs //db_server/db_service -cpuuser db_os_owner -cpupass db_os_owner_password -cpuloc db_server&lt;/span&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="text-decoration-line: underline;"&gt;See swingbench database tables&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;$ ./sbutil -soe -u soe -p soe -cs &lt;span style="color: red;"&gt;//db_server/db_service&lt;/span&gt; -tables&lt;/blockquote&gt;&lt;div&gt;&lt;strong&gt;Compress tables:&lt;/strong&gt;&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;$ ./sbutil -soe -u soe -p soe -cs &lt;span style="color: red;"&gt;//db_server/db_service&lt;/span&gt; -dup 1 -ac -sort&lt;/blockquote&gt;&lt;div&gt;&lt;strong&gt;Format result output to pdf&lt;/strong&gt;&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;$ ./results2pdf -c results.xml&lt;/blockquote&gt;&lt;div&gt;The formatting may not work properly in Linux. The solution will be to use the windows version:&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;C:\swingbench\winbin\results2pdf.bat -c results.xml&lt;/blockquote&gt;&lt;div style="margin-top: 10px; padding: 0px;"&gt;&lt;div&gt;&lt;strong&gt;Combine&lt;/strong&gt; &lt;span style="color: red;"&gt;&lt;strong&gt;main&lt;/strong&gt;&lt;/span&gt; &lt;strong&gt;data of several loads to one csv&lt;/strong&gt;&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;$ ./utils/parse_results.py -r scale1_400user.xml scale1_300user.xml scale1_200user.xml scale1_100user.xml -o results.csv&lt;/blockquote&gt;&lt;div&gt;&lt;strong&gt;Compare several runs:&lt;/strong&gt;&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;$ ./bmcompare -r scale1_100user.xml,scale1_200user.xml&lt;/blockquote&gt;&lt;div&gt;&lt;a class="external-link" href="https://www.youtube.com/watch?v=b5E5579-ITo&amp;amp;feature=youtu.be" rel="nofollow" style="text-decoration-line: none;"&gt;Swingbench 2.6 Walkthrough&lt;/a&gt; - This screencast shows a complete walk through of Swingbench 2.6 from running a wizard to selecting a benchmark to run.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;Running swingbench simultanically from several hosts&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white;"&gt;&lt;a href="http://dominicgiles.com/clusteroverviewwalkthough23.html"&gt;Clusteroverview Walkthrough&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: white; margin-top: 10px; padding: 0px;"&gt;&lt;strong&gt;&lt;span style="text-decoration-line: underline;"&gt;On coordinator_server&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;$ ./coordinator -g &amp;amp;&lt;/blockquote&gt;&lt;div style="background-color: white; color: black; margin-top: 10px; padding: 0px;"&gt;&lt;strong&gt;&lt;span style="text-decoration-line: underline;"&gt;On other machines&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;$ ./charbench -c ../configs/SOE_Server_Side_V2.xml -dt thin -dbap &lt;span style="color: red;"&gt;change_on_install &lt;/span&gt;-uc 100 -r scale1_100user.xml -rt 0:05 -cs &lt;span style="color: red;"&gt;//db_server/db_service&lt;/span&gt; -g group1 -co &lt;span style="color: red;"&gt;&lt;i&gt;coordinator_server&lt;/i&gt;&lt;/span&gt; -bg &amp;amp;&lt;br /&gt;
&lt;br /&gt;
$ ./charbench -c ../configs/SOE_Server_Side_V2.xml -dt thin -dbap &lt;span style="color: red;"&gt;change_on_install&lt;/span&gt;-uc 100 -r scale2_100user.xml -rt 0:05 -cs &lt;span style="color: red;"&gt;//db_server/db_service&lt;/span&gt; -g group2 -co &lt;span style="color: red;"&gt;&lt;i&gt;coordinator_server&lt;/i&gt;&lt;/span&gt; -bg &amp;amp;&lt;/blockquote&gt;&lt;div style="background-color: white; color: black; margin-top: 10px; padding: 0px;"&gt;&lt;strong&gt;&lt;span style="text-decoration-line: underline;"&gt;On coordinator_server / PC&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;$ ./clusteroverview -rt 00:02 -co &lt;span style="color: red;"&gt;&lt;i&gt;coordinator_server&lt;/i&gt;&lt;/span&gt; -c ../configs/clusteroverview.xml&lt;/blockquote&gt;&lt;div&gt;&lt;strong&gt;Swingbench parameters:&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-top: 10px; padding: 0px;"&gt;$ ./swingbench -h&lt;br /&gt;
Application :     Swingbench&lt;br /&gt;
Author      :     Dominic Giles&lt;br /&gt;
Version     :     2.6.0.1082&lt;/div&gt;&lt;div style="margin-top: 10px; padding: 0px;"&gt;usage: parameters:&lt;/div&gt;&lt;div class="table-wrap" style="margin: 10px 0px 0px; overflow-x: auto; padding: 0px;"&gt;&lt;br /&gt;
&lt;table resolved="" style="border-collapse: collapse; margin: 0px; overflow-x: auto;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-D &lt;variable value=""&gt;&lt;/variable&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;use value for given environment variable&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-a&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;run automatically&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-be &lt;stopafter&gt;&lt;/stopafter&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;end recording statistics after. Value is in the form hh:mm.sec&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-bs &lt;startafter&gt;&lt;/startafter&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;start recording statistics after. Value is in the form hh:mm.sec&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-c &lt;filename&gt;&lt;/filename&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;specify config file&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-cf &lt;username&gt;&lt;/username&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;the location of a crendentials file for Oracle Exadata Express&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-cm&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;maximise the charts of swingbench/minibench at startup&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-co &lt;hostname&gt;&lt;/hostname&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;specify/override coordinator in configuration file.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-com &lt;comment&gt;&lt;/comment&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;specify comment for this benchmark run (in double quotes)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-cpuloc &lt;hostname&gt;&lt;/hostname&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;specify/overide location/hostname of the cpu monitor.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-cpupass&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;specify/overide os password of the user used to monitor cpu.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-cpuuser&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;specify/overide os username of the user used to monitor cpu.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-cs &lt;connectstring&gt;&lt;/connectstring&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;override connect string in configuration file&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-dbap &lt;password&gt;&lt;/password&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;the password of admin user (used for collecting DB Stats)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-dbau &lt;username&gt;&lt;/username&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;the username of admin user (used for collecting DB stats)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-debug&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;turn on debugging. Written to standard out&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-debugf&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;turn on debugging. Witten to debug.log.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-debugfine&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;turn on finest level of debugging&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-debugg&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;turn on debugging via graphical window.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-di &lt;shortname s=""&gt;&lt;/shortname&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;disable transactions(s) by short name, comma separated&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-dim &lt;dimension&gt;&lt;/dimension&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;dimensions of swingbench/minibench &lt;width height=""&gt;&lt;/width&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-dt &lt;drivertype&gt;&lt;/drivertype&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;override driver type in configuration file(thin, oci, ttdirect, ttclient)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-dumptx&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;output transaction response times to file&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-dumptxdir &lt;directory name=""&gt;&lt;/directory&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;directory for transaction response times files&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-en &lt;shortname s=""&gt;&lt;/shortname&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;enable transactions(s) by short name, comma separated&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-env&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;display environment configuration&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-f&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;force data collection and run termination regardless of state&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-g &lt;groupid&gt;&lt;/groupid&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;distributed group identifier&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-h,--help&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;print this message&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-i&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;run interactively (default)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-intermax &lt;milliseconds&gt;&lt;/milliseconds&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;override minimum inter transaction sleep time (default = 0)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-intermin &lt;milliseconds&gt;&lt;/milliseconds&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;override minimum inter transaction sleep time (default = 0)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-ld &lt;milliseconds&gt;&lt;/milliseconds&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;specify/overide the logon delay(milliseconds)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-max &lt;milliseconds&gt;&lt;/milliseconds&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;override maximum intra transaction think time in configuration file&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-min &lt;milliseconds&gt;&lt;/milliseconds&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;override minimum intra transaction think time in configuration file&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-p &lt;password&gt;&lt;/password&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;override password in configuration file&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-pos &lt;startpos&gt;&lt;/startpos&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;starting position of swingbench/minibench &lt;topleftx toplefty=""&gt;&lt;/topleftx&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-r &lt;filename&gt;&lt;/filename&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;specify results file&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-rr&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;specify/overide refresh rate for charts in secs&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-rt &lt;runtime&gt;&lt;/runtime&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;specify/overide run time for the benchmark. Value is in the form hh:mm.sec&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-stats &lt;stats level=""&gt;&lt;/stats&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="452"&gt;&lt;div style="padding: 0px;"&gt;specify level result stats detail (full or simple)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid rgb(221, 221, 221); min-width: 8px; padding: 7px 10px; vertical-align: top;" width="245"&gt;&lt;div style="padding: 0px;"&gt;-t &lt;title&gt;&lt;/p&gt;&lt;/td&gt;&lt;td width="452"  style="border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; min-width: 8px;"&gt;&lt;p style="padding: 0px;"&gt;set the window title for swingbench and minibench&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td width="245"  style="border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; min-width: 8px;"&gt;&lt;p style="padding: 0px;"&gt; -u &lt;username&gt;&lt;/p&gt;&lt;/td&gt;&lt;td width="452"  style="border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; min-width: 8px;"&gt;&lt;p style="padding: 0px;"&gt;override username in configuration file&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td width="245"  style="border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; min-width: 8px;"&gt;&lt;p style="padding: 0px;"&gt; -uc &lt;user count&gt;&lt;/p&gt;&lt;/td&gt;&lt;td width="452"  style="border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; min-width: 8px;"&gt;&lt;p style="padding: 0px;"&gt;override user count in configuration file.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td width="245"  style="border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; min-width: 8px;"&gt;&lt;p style="padding: 0px;"&gt; -wc&lt;/p&gt;&lt;/td&gt;&lt;td width="452"  style="border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; min-width: 8px;"&gt;&lt;p style="padding: 0px;"&gt;wait until all session have disconnected from the database&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p style="margin-top: 10px; padding: 0px; color: rgb(9, 30, 66); background-color: rgb(255, 255, 255);"&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p style="margin-top: 10px; padding: 0px; color: rgb(9, 30, 66);  background-color: rgb(255, 255, 255);"&gt;Resource: &lt;a href="http://www.dominicgiles.com/swingbench.html"&gt;http://www.dominicgiles.com/swingbench.html&lt;/a&gt;&lt;/p&gt;&lt;p style="margin-top: 10px; padding: 0px; color: rgb(9, 30, 66);  background-color: rgb(255, 255, 255);"&gt;&lt;br /&gt;
&lt;/p&gt;&lt;/title&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><link>https://oracledba.blogspot.com/2018/07/swingbench-short-cookbook-commands.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis7Guc30A-zP4GDo8thbb8wLGqG9I8B8qbOMAcxrOAUdCx5yfgfvVlY6rG42i7cIj0V8ad5PvA2rmyA-YEbWWl-ybuXsfsiwmEMw9BY99YANJY55IyiYL6lhhpPuMsjJaDzEIq/s72-c/swing.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-965995665585273518</guid><pubDate>Mon, 16 Jul 2018 13:55:00 +0000</pubDate><atom:updated>2018-07-18T19:38:32.892+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">exadata</category><title>Steps To Shutdown / Startup The Exadata</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Steps To Shutdown / Startup The Exadata" border="0" data-original-height="520" data-original-width="900" height="184" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyd57VNzYAKJcuKtLXOOuQF8VxUvmR5PrcEoRNtdCGTVZhQtXE5YjZrVr9GqPyxUJVtT1v_GgjcW0mQO0xgV6SSPM5QxISnRX6J5rSOGJO4DrKF31x3MPMT4EBabHG7tFW-JVj/s320/exadata.png" title="" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;h2 id="StepsToShutdown/StartupTheExadata&amp;amp;RDBMSServicesandCell/ComputeNodesOnAnExadataConfiguration-ShutDownShutDown" style="background-color: white; border-bottom-color: rgb(204, 204, 204); color: #333333; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 20px; line-height: 1.5; margin: 10px 0px 0px; padding: 0px;"&gt;&lt;br /&gt;
&lt;/h2&gt;&lt;h2 id="StepsToShutdown/StartupTheExadata&amp;amp;RDBMSServicesandCell/ComputeNodesOnAnExadataConfiguration-ShutDownShutDown" style="background-color: white; border-bottom-color: rgb(204, 204, 204); color: #333333; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 20px; line-height: 1.5; margin: 10px 0px 0px; padding: 0px;"&gt;ShutDown&lt;span class="confluence-anchor-link conf-macro output-inline" data-hasbody="false" data-macro-id="24c56b87-ebf2-4212-8685-bd93a54ea238" data-macro-name="anchor" id="StepsToShutdown/StartupTheExadata&amp;amp;RDBMSServicesandCell/ComputeNodesOnAnExadataConfiguration-ShutDown" style="font-weight: normal;"&gt;&lt;/span&gt;&lt;/h2&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Log in to the first database server as root.&lt;/li&gt;
&lt;li&gt;Change to the OneCommand directory&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;# cd /opt/oracle.SupportTools/onecommand&lt;/div&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Note whether the Grid Infrastructure is currently enabled for autostart, so that this state can be restored later:&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;# dcli -g dbs_group -l root /u01/app/12.1.0.2/grid/bin/crsctl config crs&lt;/div&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Disable the Grid Infrastructure for autostart on the database servers if the previous step indicated it is currently enabled for autostart.&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;# dcli -g dbs_group -l root /u01/app/12.1.0.2/grid/bin/crsctl disable crs&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin-left: 30px; margin-top: 10px; padding: 0px;"&gt;Note: This is step is [Optional] and it can required during maintenance operation like “firmware patches” which requires to reboot the Compute Node several times.&lt;/div&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Stop the Grid Infrastructure stack on the database servers (compute nodes):&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;# dcli -g dbs_group -l root "/u01/app/12.1.0.2/grid/bin/crsctl stop crs"&lt;/div&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Verify that the Grid Infrastructure stack has shutdown successfully on the database servers. The following command should show no output if the GI stack has shutdown:&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;# dcli -g dbs_group -l root "ps -ef | grep diskmo[n]"&lt;/div&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;[Optional] Disable email/SNMP alerts if applicable. If alerts will be enabled, first note the notification method in use so that it can be restored later. The following command will show the current notification method:&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;#&amp;nbsp;&lt;strong&gt;dcli -g cell_group&lt;/strong&gt;&amp;nbsp;-l root "su - celladmin -c \"cellcli -e list cell attributes name,notificationMethod\""&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin-left: 30px; margin-top: 10px; padding: 0px;"&gt;Now set the notification method to null to disable alerts:&lt;/div&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;# dcli -g cell_group -l root "su - celladmin -c \"cellcli -e alter cell notificationMethod=null\""&lt;/div&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Shutdown all the cells:&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;# dcli -g cell_group -l root "su - celladmin -c \"cellcli -e alter cell shutdown services all \""&lt;/div&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Power off all cells:&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;# dcli -g cell_group -l root poweroff&lt;/div&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Copy the /opt/oracle.SupportTools/onecommand/dbs_group to /opt/oracle.SupportTools/onecommand/dbs_group2:&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;# cp /opt/oracle.SupportTools/onecommand/dbs_group /opt/oracle.SupportTools/onecommand/dbs_group2&lt;/div&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Remove the “first compute node name” from the /opt/oracle.SupportTools/onecommand/dbs_group2 file (using any editor, e.g. vi).&lt;/li&gt;
&lt;li&gt;Power off all the compute nodes (except compute node # 1):&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;pre style="padding: 0px;"&gt;# dcli -g dbs_group2 -l root poweroff&lt;/pre&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Power off the compute node #1:&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;# poweroff&lt;/div&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Now, both Cell Servers &amp;amp; Compute nodes are down for maintenance.&lt;/li&gt;
&lt;/ul&gt;&lt;h2 id="StepsToShutdown/StartupTheExadata&amp;amp;RDBMSServicesandCell/ComputeNodesOnAnExadataConfiguration-StartupStartup" style="background-color: white; border-bottom-color: rgb(204, 204, 204); color: #333333; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 20px; line-height: 1.5; margin: 30px 0px 0px; padding: 0px;"&gt;Startup&lt;span class="confluence-anchor-link conf-macro output-inline" data-hasbody="false" data-macro-id="ac7e0b7f-938a-436a-a0e6-477b3c379c67" data-macro-name="anchor" id="StepsToShutdown/StartupTheExadata&amp;amp;RDBMSServicesandCell/ComputeNodesOnAnExadataConfiguration-Startup" style="font-weight: normal;"&gt;&lt;/span&gt;&lt;/h2&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Power “compute node #1” on, by using the power button on the front panel of the Exadata Storage Servers.&lt;/li&gt;
&lt;li&gt;Change to the OneCommand directory&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;# cd /opt/oracle.SupportTools/onecommand&lt;/div&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Power the cells on, either by using the power button on the front panel of the Exadata Storage Servers, or by executing the following script from the first database server (from Compute node #1):&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;for host in `cat cell_group`; do&lt;br /&gt;
echo ${host}: `ipmitool -H ${host}-ilom -U root -P welcome1 chassis power on`&lt;br /&gt;
done&lt;/div&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Wait until all the Cell servers are up, then power the compute nodes on, either by using the power button on the front panel of the Exadata Storage Servers, or by executing the following script from the first database server:&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;for host in `cat dbs_group2`; do&lt;br /&gt;
echo ${host}: `ipmitool -H ${host}-ilom -U root -P welcome1 chassis power on`&lt;br /&gt;
done&lt;/div&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Verify that all Exadata Storage Servers have booted successfully:&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;# dcli -g cell_group -l root hostname&lt;/div&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Verify all the cells are up (MS, RS &amp;amp; CELLSRV services must be running):&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;# dcli -g cell_group -l root "su - celladmin -c \"cellcli -e list cell detail \""&lt;/div&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Reenable email/SNMP alerts if they were disabled during the pre-maintenance steps. The example below illustrates the command to use if both email and SMTP alerting used, but adjust the command as necessary to restore the notification method noted during the pre-maintenance steps.&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;# dcli -g cell_group -l root "su - celladmin -c \"cellcli -e alter cell notificationMethod=\'mail,snmp\'\""&lt;/div&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Start the Grid Infrastructure stack on the first database server&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;# /u01/app/12.1.0.2/grid/bin/crsctl start crs&lt;/div&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Wait until the Grid Infrastructure stack has started successfully on the first database server. To check the status of the Grid Infrastructure stack, run the following command and verify that the “ora.asm” instance is started. Note that the command below will continue to report that it is unable to communicate with the Grid Infrastructure software for several minutes after issuing the “crsctl start crs” command above:&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;# /u01/app/12.1.0.2/grid/bin/crsctl status resource -t&lt;/div&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Start the Grid Infrastructure stack on all remaining database servers with a 1-minute delay between servers. Note that the command below will issue the start command for all database servers, including the first database server where it is already started. The output for the first server will therefore indicate that the software is already started, but this message can be safely ignored:&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;for h in `cat dbs_group2`; do&lt;br /&gt;
echo "Starting CRS on host $h"&lt;br /&gt;
ssh $h /u01/app/12.1.0.2/grid/bin/crsctl start crs&lt;br /&gt;
echo "Waiting 60 seconds…"&lt;br /&gt;
sleep 60&lt;br /&gt;
done&lt;/div&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Monitor the startup progress (this could take several minutes):&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;# /u01/app/12.1.0.2/grid/bin/crsctl status resource -t&lt;/div&gt;&lt;/blockquote&gt;&lt;ul style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px;"&gt;&lt;li&gt;Reenable the Grid Infrastructure for autostart if it was found to be enabled for autostart at the beginning of the pre-maintenance steps.&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style="background-color: white; border-left: 1px solid rgb(204, 204, 204); color: #707070; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin: 10px 0px 0px 19px; padding: 10px 20px;"&gt;&lt;div style="padding: 0px;"&gt;# dcli -g dbs_group -l root /u01/app/12.1.0.2/grid/bin/crsctl enable crs&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="background-color: white; color: #091e42; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Noto Sans&amp;quot;, Ubuntu, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 14px; margin-left: 30px; margin-top: 10px; padding: 0px;"&gt;Note:&lt;strong&gt;&amp;nbsp;If dcli/ssh is not enabled due to security reasons, then you will need to connect and execute the above steps on each node at the time.&lt;/strong&gt;&lt;/div&gt;</description><link>https://oracledba.blogspot.com/2018/07/steps-to-shutdown-startup-exadata.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyd57VNzYAKJcuKtLXOOuQF8VxUvmR5PrcEoRNtdCGTVZhQtXE5YjZrVr9GqPyxUJVtT1v_GgjcW0mQO0xgV6SSPM5QxISnRX6J5rSOGJO4DrKF31x3MPMT4EBabHG7tFW-JVj/s72-c/exadata.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-8246577284771368343</guid><pubDate>Wed, 04 Jul 2018 18:05:00 +0000</pubDate><atom:updated>2018-07-04T21:05:21.820+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">LDAP</category><category domain="http://www.blogger.com/atom/ns#">ldap.ora</category><category domain="http://www.blogger.com/atom/ns#">oid</category><category domain="http://www.blogger.com/atom/ns#">Oracle Internet Directory</category><category domain="http://www.blogger.com/atom/ns#">sqlnet.ora</category><title>Install Oracle Internet Directory (OID) in Standalone mode</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://draft.blogger.com/null" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="215" data-original-width="235" height="183" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWdr7rQQM5tuHgEvwbYldym6enSbx320LRz_jJXy3WQUMlf3uBvqIPvhKmSboJp1KJKqbgpo4VY_95eNXT6VGZ7K2GiMmWPkzhOJBbGK16uCpBJ9xMtR0JHnCqTH75DREjUcb9/s200/LDAPUtility.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="tr_bq"&gt;
&lt;br /&gt;
Oracle Internet Directory (OID) is an LDAP server which uses an Oracle database as a datastore. Client machines can use the OID for all TNS lookups. With OID. Once all client machines are configured correctly any modifications to the TNS lookups can be done from a central location reducing the amount of client machine administration.&lt;/div&gt;
&lt;br /&gt;
This guide is about installing and using Oracle Internet Directory in Standalone mode, no need for Oracle Fusion Middleware Infrastructure.&lt;br /&gt;
&lt;br /&gt;
Step-by-step guide&lt;br /&gt;
&lt;br /&gt;
Download Oracle Internet Directory (Part of identity management) from&lt;br /&gt;
&lt;a href="http://www.oracle.com/technetwork/middleware/id-mgmt/downloads/index.html"&gt;http://www.oracle.com/technetwork/middleware/id-mgmt/downloads/index.html &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Install OID, follow instructions:&lt;br /&gt;
&lt;a href="https://docs.oracle.com/en/middleware/lifecycle/12.2.1.3/inoim/installing-product-software.html#GUID-5D47117E-3983-4BED-BADB-CB7DDD63DB34"&gt;https://docs.oracle.com/en/middleware/lifecycle/12.2.1.3/inoim/installing-product-software.html#GUID-5D47117E-3983-4BED-BADB-CB7DDD63DB34 &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Starting the Installation Program:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
./fmw_12.2.1.3.0_oid_linux64.bin&lt;/blockquote&gt;
Configure the Domain:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ORACLE_HOME/oracle_common/common/bin/config.sh&lt;/blockquote&gt;
Start the Servers for Standalone Oracle Internet Directory:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
DOMAIN_HOME/bin/startNodeManager.sh&lt;/blockquote&gt;
Perform Initial Oracle Internet Directory Setup:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ORACLE_HOME/oracle_common/common/bin/wlst.sh&lt;br /&gt;
&lt;br /&gt;
nmConnect(username='wls_user',password='password',domainName='base_domain')&lt;br /&gt;
&lt;br /&gt;
oid_setup(orcladminPassword='password',odsPassword='password',realmDN='dc=us,dc=oracle,dc=com')&lt;/blockquote&gt;
Start the Repository Creation Utility:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ORACLE_HOME/oracle_common/bin/rcu&lt;/blockquote&gt;
fix permissions (Doc ID 947285.1):&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
vi ldifFile&lt;br /&gt;
&lt;br /&gt;
dn: cn=oid1,cn=osdldapd,cn=subconfigsubentry&lt;br /&gt;
changetype: modify&lt;br /&gt;
replace: orclAnonymousBindsFlag&lt;br /&gt;
orclAnonymousBindsFlag: 1&lt;br /&gt;
&lt;br /&gt;
ldapmodify -D cn=orcladmin -q -p 3060 -h oid -f ldifFile&lt;/blockquote&gt;
Modify the file sqlnet.ora in $ORACLE_HOME/network/admin directory need to have the following line:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
NAMES.DIRECTORY_PATH= (LDAP,TNSNAMES,EZCONNECT)&lt;/blockquote&gt;
Create the file ldap.ora in the $ORACLE_HOME/network/admin directory location.&lt;br /&gt;
This file has information of the server where the LDAP directory resides along with the port numbers for normal and secure connections&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
DEFAULT_ADMIN_CONTEXT = "dc=us,dc=oracle,dc=com"&lt;br /&gt;
DIRECTORY_SERVERS = (oid.mydomain.local:3060:3131)&lt;br /&gt;
DIRECTORY_SERVER_TYPE = OID&lt;br /&gt;
NAMES.DEFAULT_DOMAIN = mydomain.local&lt;/blockquote&gt;
Add tns entry in OID (TESTTNS will be the tns alias):&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
vi add_entry.ldif&lt;br /&gt;
&lt;br /&gt;
dn: cn=TESTTNS,cn=OracleContext,dc=us,dc=oracle,dc=com&lt;br /&gt;
objectclass: top&lt;br /&gt;
objectclass: orclNetService&lt;br /&gt;
cn: TESTTNS&lt;br /&gt;
orclNetDescString: (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=oid)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=oid)))&lt;br /&gt;
orclnetdescname=000:cn=DESCRIPTION_0&lt;/blockquote&gt;
Load the ldif file:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
ldapadd -h oid -p 3060 -c -D "cn=orcladmin" -f add_entry.ldif -w mypassword&lt;/blockquote&gt;
We will now check a connection to the alias TESTTNS ensuring that the SQL*Net connection details are now obtained from the OID LDAP directory and not using information stored in the local tnsnames.ora file.&lt;br /&gt;
&lt;br /&gt;
Note: the output of the tnsping command shows that the LDAP directory was accessed to resolve the alias &lt;br /&gt;
&lt;br /&gt;
tnsping TESTTNS&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
TNS Ping Utility for Linux: Version 12.2.0.1.0 - Production on 02-JUL-2018 14:41:49&lt;br /&gt;
&lt;br /&gt;
Copyright (c) 1997, 2016, Oracle. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Used parameter files:&lt;br /&gt;
/oracle/product/12.2.0.1/dbhome_1/network/admin/sqlnet.ora&lt;br /&gt;
&lt;br /&gt;
Used &lt;b&gt;LDAP &lt;/b&gt;adapter to resolve the alias&lt;br /&gt;
Attempting to contact (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=oid.mydomain.local)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=oid)))&lt;br /&gt;
OK (0 msec)&lt;/blockquote&gt;
</description><link>https://oracledba.blogspot.com/2018/07/install-oracle-internet-directory-oid.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWdr7rQQM5tuHgEvwbYldym6enSbx320LRz_jJXy3WQUMlf3uBvqIPvhKmSboJp1KJKqbgpo4VY_95eNXT6VGZ7K2GiMmWPkzhOJBbGK16uCpBJ9xMtR0JHnCqTH75DREjUcb9/s72-c/LDAPUtility.jpg" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-8174786804151429844</guid><pubDate>Mon, 07 May 2018 15:43:00 +0000</pubDate><atom:updated>2018-05-08T09:38:20.405+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Active Data Guard</category><category domain="http://www.blogger.com/atom/ns#">awr</category><category domain="http://www.blogger.com/atom/ns#">Data Guard</category><category domain="http://www.blogger.com/atom/ns#">DBMS_UMF</category><category domain="http://www.blogger.com/atom/ns#">DBMS_WORKLOAD_REPOSITORY</category><title>Managing AWR in Active Data Guard Standby Databases</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpS_b9CU7cz2b7QF9C1nI6fcOTJ2qF4gvAZNrAqsv02iCR-5jKsLLIHKaMW0ZfSIUHgJs-GVSziJxf6HZi8HrkYV2uXzx07mJtPweLB3IP8e5TtmVTZuDO4-Nqfc-roa0NQi6F/s400/awr3.png" width="400" height="216" data-original-width="483" data-original-height="261" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;b&gt;Problem&lt;/b&gt;&lt;br /&gt;
- Automatic Workload Repository (AWR) snapshots cannot be taken in a read-only standby environment.&lt;br /&gt;
- Performance monitoring and analysis is limited to basic STATSPACK functionality .&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Solution&lt;/b&gt;&lt;br /&gt;
In Oracle Database &lt;b&gt;12.2&lt;/b&gt;, the AWR framework is enhanced to support capture of remote snapshots from any generic database, including Active Data Guard (ADG) databases. This framework is called the Remote Management Framework (RMF).&lt;br /&gt;
• A target catalog database collects snapshots from the remote databases (sources).&lt;br /&gt;
• Snapshots can be collected automatically or manually.&lt;br /&gt;
• AWR tables on the catalog database accumulate snapshot data from all sources via database links.&lt;br /&gt;
• Source databases must be registered on the catalog via new DBMS_WORKLOAD_REPOSITORY.REGISTER_REMOTE_DATABASE API&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://draft.blogger.com/null" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="734" data-original-width="1515" height="308" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWjR-53cFoRiKy05KbjXp6wsUfC9FMy4l83Gm8PHx5lBoGcxuOIfwwppgAuvTYYuDqJB8Hq94qDhYWteOpMVz_JTcfVVlB2K70aXwvrvseq9SyY9iQr0nkT0avONwLvJCeu8r2/s640/awr2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://draft.blogger.com/null" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="716" data-original-width="1462" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifIubEvrSRIOBpQWV4lWlmKBX1he424JofduwOEIdV4g0vFQwILLEBv659ya1-3rhIUWsEgmHS_sLp4hdrtKPKCspBJBQh4ygS1v5tu1UPxijU0MtJIslTIrZvMbkqu_umllWN/s640/awr22.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;
These are the basic steps for setting up the RMF topology for generating AWR on the physical standby:&lt;br /&gt;
1. Configure database nodes to add to the topology.&lt;br /&gt;
2. Create the topology.&lt;br /&gt;
3. Register database nodes with the topology.&lt;br /&gt;
4. Create remote snapshots.&lt;br /&gt;
5. Generate the AWR.&lt;br /&gt;
&lt;br /&gt;
In this example, we set the repository in the primary database; therefore it is called the target system. The standby database is called the source system.&lt;br /&gt;
In the following example the primary database name is: pdb and the standby database name is: sdb. For clarify, the sqlprompt was changed from SQL&amp;gt; to the database role Primary/Standby (for example: set sqlprompt "PRIMARY&amp;gt; ")&lt;br /&gt;
The RMF APIs are declared in the PL/SQL package DBMS_UMF. All the AWR-related operations in RMF can be performed only by the SYS$UMF user. Since the SYS$UMF user is locked by default, it must be unlocked before deploying the RMF topology:&lt;br /&gt;
&lt;blockquote&gt;PRIMARY&amp;gt; alter user sys$umf identified by sysumf account unlock;&lt;/blockquote&gt;Create the database link between the primary database and the standby database and vice versa:&lt;br /&gt;
&lt;blockquote&gt;PRIMARY&amp;gt; create DATABASE LINK DBLINK_pdb_to_sdb CONNECT TO sys$umf IDENTIFIED BY sysumf using 'sdb';&lt;br /&gt;
PRIMARY&amp;gt; create DATABASE LINK DBLINK_sdb_to_pdb CONNECT TO sys$umf IDENTIFIED BY sysumf using 'pdb';&lt;/blockquote&gt;Each database node in a topology must be assigned a unique name (default is DB_UNIQUE_NAME):&lt;br /&gt;
&lt;blockquote&gt;PRIMARY&amp;gt; exec DBMS_UMF.configure_node ('PDB');&lt;/blockquote&gt;Since the standby database is remote to the target system  (the primary database), we can register it via the corresponding database link:&lt;br /&gt;
&lt;blockquote&gt;STANDBY&amp;gt; exec DBMS_UMF.configure_node ('sdb', 'DBLINK_sdb_to_pdb');&lt;/blockquote&gt;Create the RMF topology and designate the node on which it is executed as the destination node for that topology:&lt;br /&gt;
&lt;blockquote&gt;PRIMARY&amp;gt; exec DBMS_UMF.create_topology ('Topology_1');&lt;br /&gt;
PRIMARY&amp;gt; select * from DBA_UMF_TOPOLOGY;&lt;br /&gt;
PRIMARY&amp;gt; select * from DBA_UMF_REGISTRATION;&lt;/blockquote&gt;Register the standby database in the AWR using the RMF:&lt;br /&gt;
&lt;blockquote&gt;PRIMARY&amp;gt; exec DBMS_WORKLOAD_REPOSITORY.register_remote_database(node_name=&amp;gt;'sdb');&lt;br /&gt;
PRIMARY&amp;gt; select * from DBA_UMF_SERVICE;&lt;/blockquote&gt;Create a remote snapshot using the RMF:&lt;br /&gt;
&lt;blockquote&gt;PRIMARY&amp;gt; exec DBMS_WORKLOAD_REPOSITORY.CREATE_REMOTE_SNAPSHOT('sdb');&lt;/blockquote&gt;Create AWR Report.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;PRIMARY&amp;gt; @?/rdbms/admin/awrrpti.sql&lt;br /&gt;
Specify the Report Type&lt;br /&gt;
~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;
AWR reports can be generated in the following formats. Please enter the name of the format at the prompt. Default value is 'html'.&lt;br /&gt;
&lt;br /&gt;
'html'    HTML format (default)&lt;br /&gt;
'text'    Text format&lt;br /&gt;
'active-html'   Includes Performance Hub active report&lt;br /&gt;
&lt;br /&gt;
Enter value for report_type:&lt;br /&gt;
&lt;br /&gt;
Type Specified: html&lt;br /&gt;
&lt;br /&gt;
Instances in this Workload Repository schema&lt;br /&gt;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;
DB Id      Inst Num DB Name      Instance   Host&lt;br /&gt;
------------ ---------- ---------    ----------   ------&lt;br /&gt;
&lt;b&gt;3810102760  1 PDB      sdb Local_host&lt;/b&gt;&lt;br /&gt;
* 3393159014  1 PDB      pdb   Remote_Host&lt;br /&gt;
Enter value for dbid: &lt;b&gt;3810102760&lt;/b&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://draft.blogger.com/null" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="543" data-original-width="1528" height="228" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVIV1kn_MplJ-STmuaLQS8g6UbB6Y0RbBfIunUAvWI6BDgJy7jObHWIvTyotNZ-zLtBksXxfr1TcI4nEP3X_aRezwdrGovtbsKVJPGNtzAJ11wQYnn3cJz3vG-JE7q_DCWvGkW/s640/Capture2.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Source:&lt;br /&gt;
Gathering Database Statistics - &lt;a href="https://docs.oracle.com/database/122/TGDBA/gathering-database-statistics.htm#TGDBA232"&gt;https://docs.oracle.com/database/122/TGDBA/gathering-database-statistics.htm#TGDBA232&lt;/a&gt;&lt;br /&gt;
DBMS_UMF - &lt;a href="https://docs.oracle.com/en/database/oracle/oracle-database/12.2/arpls/DBMS_UMF.html"&gt;https://docs.oracle.com/en/database/oracle/oracle-database/12.2/arpls/DBMS_UMF.html &lt;/a&gt;&lt;br /&gt;
DBMS_WORKLOAD_REPOSITORY - &lt;a href="https://docs.oracle.com/en/database/oracle/oracle-database/18/arpls/DBMS_WORKLOAD_REPOSITORY.html"&gt;https://docs.oracle.com/en/database/oracle/oracle-database/18/arpls/DBMS_WORKLOAD_REPOSITORY.html &lt;/a&gt;&lt;br /&gt;
Oracle Active Data Guard: Power, Speed, Ease, and Protection - &lt;a href="http://www.oracle.com/technetwork/database/availability/con6531-oracle-active-data-guard-3334919.pdf"&gt;http://www.oracle.com/technetwork/database/availability/con6531-oracle-active-data-guard-3334919.pdf &lt;/a&gt;</description><link>https://oracledba.blogspot.com/2018/05/managing-awr-in-adg-standby-databases.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpS_b9CU7cz2b7QF9C1nI6fcOTJ2qF4gvAZNrAqsv02iCR-5jKsLLIHKaMW0ZfSIUHgJs-GVSziJxf6HZi8HrkYV2uXzx07mJtPweLB3IP8e5TtmVTZuDO4-Nqfc-roa0NQi6F/s72-c/awr3.png" width="72"/><thr:total>0</thr:total><enclosure length="5785555" type="application/pdf; charset=" url="http://www.oracle.com/technetwork/database/availability/con6531-oracle-active-data-guard-3334919.pdf"/><itunes:explicit>yes</itunes:explicit><itunes:subtitle>Problem - Automatic Workload Repository (AWR) snapshots cannot be taken in a read-only standby environment. - Performance monitoring and analysis is limited to basic STATSPACK functionality . Solution In Oracle Database 12.2, the AWR framework is enhanced to support capture of remote snapshots from any generic database, including Active Data Guard (ADG) databases. This framework is called the Remote Management Framework (RMF). • A target catalog database collects snapshots from the remote databases (sources). • Snapshots can be collected automatically or manually. • AWR tables on the catalog database accumulate snapshot data from all sources via database links. • Source databases must be registered on the catalog via new DBMS_WORKLOAD_REPOSITORY.REGISTER_REMOTE_DATABASE API These are the basic steps for setting up the RMF topology for generating AWR on the physical standby: 1. Configure database nodes to add to the topology. 2. Create the topology. 3. Register database nodes with the topology. 4. Create remote snapshots. 5. Generate the AWR. In this example, we set the repository in the primary database; therefore it is called the target system. The standby database is called the source system. In the following example the primary database name is: pdb and the standby database name is: sdb. For clarify, the sqlprompt was changed from SQL&amp;gt; to the database role Primary/Standby (for example: set sqlprompt "PRIMARY&amp;gt; ") The RMF APIs are declared in the PL/SQL package DBMS_UMF. All the AWR-related operations in RMF can be performed only by the SYS$UMF user. Since the SYS$UMF user is locked by default, it must be unlocked before deploying the RMF topology: PRIMARY&amp;gt; alter user sys$umf identified by sysumf account unlock;Create the database link between the primary database and the standby database and vice versa: PRIMARY&amp;gt; create DATABASE LINK DBLINK_pdb_to_sdb CONNECT TO sys$umf IDENTIFIED BY sysumf using 'sdb'; PRIMARY&amp;gt; create DATABASE LINK DBLINK_sdb_to_pdb CONNECT TO sys$umf IDENTIFIED BY sysumf using 'pdb';Each database node in a topology must be assigned a unique name (default is DB_UNIQUE_NAME): PRIMARY&amp;gt; exec DBMS_UMF.configure_node ('PDB');Since the standby database is remote to the target system (the primary database), we can register it via the corresponding database link: STANDBY&amp;gt; exec DBMS_UMF.configure_node ('sdb', 'DBLINK_sdb_to_pdb');Create the RMF topology and designate the node on which it is executed as the destination node for that topology: PRIMARY&amp;gt; exec DBMS_UMF.create_topology ('Topology_1'); PRIMARY&amp;gt; select * from DBA_UMF_TOPOLOGY; PRIMARY&amp;gt; select * from DBA_UMF_REGISTRATION;Register the standby database in the AWR using the RMF: PRIMARY&amp;gt; exec DBMS_WORKLOAD_REPOSITORY.register_remote_database(node_name=&amp;gt;'sdb'); PRIMARY&amp;gt; select * from DBA_UMF_SERVICE;Create a remote snapshot using the RMF: PRIMARY&amp;gt; exec DBMS_WORKLOAD_REPOSITORY.CREATE_REMOTE_SNAPSHOT('sdb');Create AWR Report. PRIMARY&amp;gt; @?/rdbms/admin/awrrpti.sql Specify the Report Type ~~~~~~~~~~~~~~~~~~~~~~~ AWR reports can be generated in the following formats. Please enter the name of the format at the prompt. Default value is 'html'. 'html' HTML format (default) 'text' Text format 'active-html' Includes Performance Hub active report Enter value for report_type: Type Specified: html Instances in this Workload Repository schema ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DB Id Inst Num DB Name Instance Host ------------ ---------- --------- ---------- ------ 3810102760 1 PDB sdb Local_host * 3393159014 1 PDB pdb Remote_Host Enter value for dbid: 3810102760 Source: Gathering Database Statistics - https://docs.oracle.com/database/122/TGDBA/gathering-database-statistics.htm#TGDBA232 DBMS_UMF - https://docs.oracle.com/en/database/oracle/oracle-database/12.2/arpls/DBMS_UMF.html DBMS_WORKLOAD_REPOSITORY - https://docs.oracle.com/en/database/oracle/oracle-database/18/arpls/DBMS_WORKLOAD_REPOSITORY.html Oracle Active Data Guard: Power, Speed, Ease, and Protection - http://www.oracle.com/technetwork/database/availability/con6531-oracle-active-data-guard-3334919.pdf</itunes:subtitle><itunes:author>noreply@blogger.com (Yossi Nixon)</itunes:author><itunes:summary>Problem - Automatic Workload Repository (AWR) snapshots cannot be taken in a read-only standby environment. - Performance monitoring and analysis is limited to basic STATSPACK functionality . Solution In Oracle Database 12.2, the AWR framework is enhanced to support capture of remote snapshots from any generic database, including Active Data Guard (ADG) databases. This framework is called the Remote Management Framework (RMF). • A target catalog database collects snapshots from the remote databases (sources). • Snapshots can be collected automatically or manually. • AWR tables on the catalog database accumulate snapshot data from all sources via database links. • Source databases must be registered on the catalog via new DBMS_WORKLOAD_REPOSITORY.REGISTER_REMOTE_DATABASE API These are the basic steps for setting up the RMF topology for generating AWR on the physical standby: 1. Configure database nodes to add to the topology. 2. Create the topology. 3. Register database nodes with the topology. 4. Create remote snapshots. 5. Generate the AWR. In this example, we set the repository in the primary database; therefore it is called the target system. The standby database is called the source system. In the following example the primary database name is: pdb and the standby database name is: sdb. For clarify, the sqlprompt was changed from SQL&amp;gt; to the database role Primary/Standby (for example: set sqlprompt "PRIMARY&amp;gt; ") The RMF APIs are declared in the PL/SQL package DBMS_UMF. All the AWR-related operations in RMF can be performed only by the SYS$UMF user. Since the SYS$UMF user is locked by default, it must be unlocked before deploying the RMF topology: PRIMARY&amp;gt; alter user sys$umf identified by sysumf account unlock;Create the database link between the primary database and the standby database and vice versa: PRIMARY&amp;gt; create DATABASE LINK DBLINK_pdb_to_sdb CONNECT TO sys$umf IDENTIFIED BY sysumf using 'sdb'; PRIMARY&amp;gt; create DATABASE LINK DBLINK_sdb_to_pdb CONNECT TO sys$umf IDENTIFIED BY sysumf using 'pdb';Each database node in a topology must be assigned a unique name (default is DB_UNIQUE_NAME): PRIMARY&amp;gt; exec DBMS_UMF.configure_node ('PDB');Since the standby database is remote to the target system (the primary database), we can register it via the corresponding database link: STANDBY&amp;gt; exec DBMS_UMF.configure_node ('sdb', 'DBLINK_sdb_to_pdb');Create the RMF topology and designate the node on which it is executed as the destination node for that topology: PRIMARY&amp;gt; exec DBMS_UMF.create_topology ('Topology_1'); PRIMARY&amp;gt; select * from DBA_UMF_TOPOLOGY; PRIMARY&amp;gt; select * from DBA_UMF_REGISTRATION;Register the standby database in the AWR using the RMF: PRIMARY&amp;gt; exec DBMS_WORKLOAD_REPOSITORY.register_remote_database(node_name=&amp;gt;'sdb'); PRIMARY&amp;gt; select * from DBA_UMF_SERVICE;Create a remote snapshot using the RMF: PRIMARY&amp;gt; exec DBMS_WORKLOAD_REPOSITORY.CREATE_REMOTE_SNAPSHOT('sdb');Create AWR Report. PRIMARY&amp;gt; @?/rdbms/admin/awrrpti.sql Specify the Report Type ~~~~~~~~~~~~~~~~~~~~~~~ AWR reports can be generated in the following formats. Please enter the name of the format at the prompt. Default value is 'html'. 'html' HTML format (default) 'text' Text format 'active-html' Includes Performance Hub active report Enter value for report_type: Type Specified: html Instances in this Workload Repository schema ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DB Id Inst Num DB Name Instance Host ------------ ---------- --------- ---------- ------ 3810102760 1 PDB sdb Local_host * 3393159014 1 PDB pdb Remote_Host Enter value for dbid: 3810102760 Source: Gathering Database Statistics - https://docs.oracle.com/database/122/TGDBA/gathering-database-statistics.htm#TGDBA232 DBMS_UMF - https://docs.oracle.com/en/database/oracle/oracle-database/12.2/arpls/DBMS_UMF.html DBMS_WORKLOAD_REPOSITORY - https://docs.oracle.com/en/database/oracle/oracle-database/18/arpls/DBMS_WORKLOAD_REPOSITORY.html Oracle Active Data Guard: Power, Speed, Ease, and Protection - http://www.oracle.com/technetwork/database/availability/con6531-oracle-active-data-guard-3334919.pdf</itunes:summary><itunes:keywords>Active Data Guard, awr, Data Guard, DBMS_UMF, DBMS_WORKLOAD_REPOSITORY</itunes:keywords></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-3161068415123131720</guid><pubDate>Thu, 08 Feb 2018 16:33:00 +0000</pubDate><atom:updated>2018-02-08T18:33:18.615+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">12.2</category><category domain="http://www.blogger.com/atom/ns#">broker</category><category domain="http://www.blogger.com/atom/ns#">Data Guard</category><category domain="http://www.blogger.com/atom/ns#">dgmgrl</category><title>Extract Data Guard Commands on Oracle 12.2</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBXNCiUTzTF5OH-F7cN8qpy-7Z-eFF72NDBv7vMRsw5gMhGGirsWZePOXPwMZ3YSNpbhdvq-VhCyGK2n0IFw7qyVq_Pl3uzuAM1lzpkpKtl7LhLIw9DEjn6Xa82DjCdGF1_vAO/s1600/newin.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="266" data-original-width="345" height="246" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBXNCiUTzTF5OH-F7cN8qpy-7Z-eFF72NDBv7vMRsw5gMhGGirsWZePOXPwMZ3YSNpbhdvq-VhCyGK2n0IFw7qyVq_Pl3uzuAM1lzpkpKtl7LhLIw9DEjn6Xa82DjCdGF1_vAO/s320/newin.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="tr_bq"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="tr_bq"&gt;
Hi,&lt;/div&gt;
These days I am starting to work on Oracle 12.2, leaving behind the old versions.&lt;br /&gt;
Since my main domain is Oracle Data Guard,&amp;nbsp; I posted a blog about &lt;a href="https://oracledba.blogspot.com/2016/09/oracle-12c-release-2-new-features-for_29.html"&gt;Oracle 12c Release 2 New Features for Active Data Guard&lt;/a&gt;, one of a big new feature I missed is that the internal Data Guard broker configuration was changed dramatically on 12.2.&lt;br /&gt;
Last week, I tried to "&lt;a href="https://oracledba.blogspot.com/2016/05/extract-data-guard-commands.html"&gt;Extract Data Guard Commands&lt;/a&gt;", and realized it is not working as before :(&lt;br /&gt;
So I sat down and adjusted it to work on 12.2, this time I enhanced the output with some more important information.&lt;br /&gt;
&lt;br /&gt;
Run the following script as sysdba&lt;br /&gt;
displayconfig122.sql:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
PROMPT disable FAST_START FAILOVER;&lt;br /&gt;PROMPT disable configuration;&lt;br /&gt;PROMPT remove configuration;&lt;br /&gt;DECLARE&lt;br /&gt;&amp;nbsp; &amp;nbsp;rid&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INTEGER;&lt;br /&gt;&amp;nbsp; &amp;nbsp;indoc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VARCHAR2 (4000);&lt;br /&gt;&amp;nbsp; &amp;nbsp;outdoc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VARCHAR2 (4000);&lt;br /&gt;&amp;nbsp; &amp;nbsp;p&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INTEGER;&lt;br /&gt;&amp;nbsp; &amp;nbsp;z&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; XMLTYPE;&lt;br /&gt;&amp;nbsp; &amp;nbsp;y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CLOB;&lt;br /&gt;&amp;nbsp; &amp;nbsp;v_xml&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; XMLTYPE;&lt;br /&gt;&amp;nbsp; &amp;nbsp;tout&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VARCHAR2 (4000);&lt;br /&gt;&amp;nbsp; &amp;nbsp;db_type&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VARCHAR2 (10);&lt;br /&gt;&amp;nbsp; &amp;nbsp;db_headers_commands&amp;nbsp; &amp;nbsp; &amp;nbsp; CLOB;&lt;br /&gt;&amp;nbsp; &amp;nbsp;db_commands&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CLOB;&lt;br /&gt;&amp;nbsp; &amp;nbsp;general_commands&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CLOB;&lt;br /&gt;&amp;nbsp; &amp;nbsp;db_commands_RedoRoutes&amp;nbsp; &amp;nbsp;CLOB;&lt;br /&gt;&amp;nbsp; &amp;nbsp;v_last_role&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VARCHAR2 (50) := NULL;&lt;br /&gt;&amp;nbsp; &amp;nbsp;v_new_role&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VARCHAR2 (50);&lt;br /&gt;&amp;nbsp; &amp;nbsp;v_protect_mode_no&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NUMBER;&lt;br /&gt;&amp;nbsp; &amp;nbsp;protect_mode&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VARCHAR2 (50);&lt;br /&gt;&amp;nbsp; &amp;nbsp;v_fast_start_failover&amp;nbsp; &amp;nbsp; VARCHAR2 (50);&lt;br /&gt;&amp;nbsp; &amp;nbsp;v_enabled&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VARCHAR2 (50);&lt;br /&gt;BEGIN&lt;br /&gt;&amp;nbsp; &amp;nbsp;indoc := '&lt;do_configure_drc&gt;&lt;get_drc&gt;&lt;/get_drc&gt;&lt;/do_configure_drc&gt;';&lt;br /&gt;&amp;nbsp; &amp;nbsp;y := NULL;&lt;br /&gt;&amp;nbsp; &amp;nbsp;rid := dbms_drs.do_control (indoc);&lt;br /&gt;&amp;nbsp; &amp;nbsp;outdoc := NULL;&lt;br /&gt;&amp;nbsp; &amp;nbsp;p := 1;&lt;br /&gt;&amp;nbsp; &amp;nbsp;WHILE (outdoc IS NULL)&lt;br /&gt;&amp;nbsp; &amp;nbsp;LOOP&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; outdoc := dbms_drs.get_response (rid, p);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; y := y || TO_CLOB (outdoc);&lt;br /&gt;&amp;nbsp; &amp;nbsp;END LOOP;&lt;br /&gt;&amp;nbsp; &amp;nbsp;BEGIN&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; WHILE (outdoc IS NOT NULL)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; LOOP&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p := p + 1;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;outdoc := dbms_drs.get_response (rid, p);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;y := y || TO_CLOB (outdoc);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; END LOOP;&lt;br /&gt;&amp;nbsp; &amp;nbsp;EXCEPTION&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN NO_DATA_FOUND&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; THEN&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NULL;&lt;br /&gt;&amp;nbsp; &amp;nbsp;END;&lt;br /&gt;&amp;nbsp; &amp;nbsp;z := XMLType (y);&lt;br /&gt;&amp;nbsp; &amp;nbsp;dbms_drs.delete_request (rid);&lt;br /&gt;&amp;nbsp; &amp;nbsp;SELECT XMLQUERY ('/DRC' PASSING z RETURNING CONTENT) INTO v_xml FROM DUAL;&lt;br /&gt;&amp;nbsp; &amp;nbsp;FOR l&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; IN (WITH drc_data&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AS (SELECT xt.*&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;FROM XMLTABLE ('/DRC'&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; PASSING v_xml&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; COLUMNS conf PATH '/DRC/@name'&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; &amp;nbsp; &amp;nbsp; , protect_mode PATH '/DRC/@protect_mode'&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; &amp;nbsp; &amp;nbsp; , fast_start_failover PATH '/DRC/@fast_start_failover'&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; &amp;nbsp; &amp;nbsp; , enabled PATH '/DRC/@enabled'&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; &amp;nbsp; &amp;nbsp; , valuess XMLTYPE PATH '/DRC/SITE') xt)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;, site_data&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AS (SELECT conf&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; , protect_mode&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; , fast_start_failover&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; , enabled&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; , xt2.*&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;FROM drc_data dd&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; LEFT OUTER JOIN XMLTABLE ('/SITE' PASSING dd.valuess COLUMNS name PATH '/SITE/@name', id PATH '/SITE/@site_id') xt2&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;ON 1 = 1)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT *&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM site_data)&lt;br /&gt;&amp;nbsp; &amp;nbsp;LOOP&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; v_protect_mode_no := l.protect_mode;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; v_fast_start_failover := l.fast_start_failover;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; v_enabled := l.enabled;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; indoc := '&lt;do_configure_site&gt;&lt;get_resource res_id="' || l.id || '"&gt;&lt;/get_resource&gt;&lt;/do_configure_site&gt;';&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; y := NULL;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; rid := dbms_drs.do_control (indoc);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; outdoc := NULL;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; p := 1;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; WHILE (outdoc IS NULL)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; LOOP&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;outdoc := dbms_drs.get_response (rid, p);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;y := y || TO_CLOB (outdoc);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; END LOOP;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHILE (outdoc IS NOT NULL)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LOOP&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p := p + 1;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; outdoc := dbms_drs.get_response (rid, p);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; y := y || TO_CLOB (outdoc);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;END LOOP;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; EXCEPTION&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHEN NO_DATA_FOUND&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;THEN&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NULL;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; END;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; z := XMLType (y);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT XMLQUERY ('/RESOURCE' PASSING z RETURNING CONTENT) INTO v_xml FROM DUAL;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; FOR q&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IN (WITH resource_data&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AS (SELECT xt.*&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; FROM XMLTABLE ('/RESOURCE'&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; &amp;nbsp;PASSING v_xml&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; &amp;nbsp;COLUMNS res_id PATH '/RESOURCE/@res_id', valuess XMLTYPE PATH '/RESOURCE/PROPERTY_LIST/VALUE') xt)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , values_data&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AS (SELECT res_id, xt2.*&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; FROM resource_data dd&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;LEFT OUTER JOIN&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;XMLTABLE ('/VALUE'&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; &amp;nbsp;PASSING dd.valuess&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; &amp;nbsp;COLUMNS name PATH '/VALUE/@name', VALUE PATH '/VALUE/@value', property_type PATH '/VALUE/@property_type') xt2&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; ON 1 = 1)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SELECT *&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FROM values_data&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHERE&amp;nbsp; &amp;nbsp; &amp;nbsp;VALUE IS NOT NULL&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AND name NOT IN ('ENABLED'&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;, 'STATUS'&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;, 'ERROR_NUM'&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;, 'ERROR_TEXT'&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;, 'ClusterDatabase'&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;, 'DbChangeCritical'&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;, 'DbIsCritical'&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;, 'DbDisplayName'&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;, 'GUIProperty3'&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;, 'IncarnationTable'&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;, 'SRLStatus'&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;, 'SidName'&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;, 'HostName'&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;, 'SRLStatus'&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;, 'DataGuardSyncLatency'&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;, 'InstanceName'))&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; LOOP&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;v_last_role := v_new_role;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SELECT UTL_RAW.cast_to_varchar2 (HEXTORAW (value_raw))&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;INTO v_new_role&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FROM x$drc&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHERE attribute = 'role' AND object_id = q.res_id;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IF v_last_role &amp;lt;&amp;gt; v_new_role OR v_last_role IS NULL&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;THEN&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CASE v_new_role&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHEN 'PRIMARY'&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;THEN&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; outdoc :=&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;'create configuration ' || l.conf || ' as primary database is ''' || l.name || ''' connect identifier is ''' || l.name || ''';';&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; db_type := 'database';&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; db_headers_commands := db_headers_commands || CHR (10) || outdoc;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHEN 'PHYSICAL'&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;THEN&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; outdoc := 'add database ''' || l.name || ''' as connect identifier is ''' || l.name || ''';';&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; db_type := 'database';&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; db_headers_commands := db_headers_commands || CHR (10) || outdoc;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHEN 'FAR_SYNC_INSTANCE'&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;THEN&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; outdoc := 'add far_sync ''' || l.name || ''' as connect identifier is ''' || l.name || ''';';&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; db_type := 'far_sync';&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; db_headers_commands := db_headers_commands || CHR (10) || outdoc;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END CASE;&lt;br /&gt;&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;IF&amp;nbsp; &amp;nbsp; &amp;nbsp;db_type = 'far_sync'&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AND q.name IN ('DelayMins'&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;, 'ApplyInstanceTimeout'&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;, 'ApplyLagThreshold'&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;, 'ApplyParallel'&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;, 'StandbyFileManagement'&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;, 'ArchiveLagTarget'&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;, 'DbFileNameConvert'&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;, 'LsbyMaxSga'&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;, 'LsbyMaxServers'&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;, 'ApplyInstances'&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;, 'LsbyMaxEventsRecorded'&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;, 'StaticConnectIdentifier')&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;THEN&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NULL;&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; IF q.name = 'RedoRoutes'&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; THEN&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;db_commands_RedoRoutes :=&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;'edit '&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || db_type&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || ' '&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || l.name&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || ' set property '&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || q.name&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || ' = '''&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || q.VALUE&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || ''';'&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || CHR (10)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || db_commands_RedoRoutes;&lt;br /&gt;&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;--DBMS_OUTPUT.put_line ( 'edit ' || db_type || ' ' || l.name || ' set property ' || q.name || ' = ''' || q.VALUE || ''';' );&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;db_commands :=&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; db_commands || CHR (10) || 'edit ' || db_type || ' ' || l.name || ' set property ' || q.name || ' = ''' || q.VALUE || ''';';&lt;br /&gt;&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; dbms_drs.delete_request (rid);&lt;br /&gt;&amp;nbsp; &amp;nbsp;END LOOP;&lt;br /&gt;&amp;nbsp; &amp;nbsp;indoc := '&lt;do_configure_site&gt;&lt;get_resource res_id="0"&gt;&lt;/get_resource&gt;&lt;/do_configure_site&gt;';&lt;br /&gt;&amp;nbsp; &amp;nbsp;y := NULL;&lt;br /&gt;&amp;nbsp; &amp;nbsp;rid := dbms_drs.do_control (indoc);&lt;br /&gt;&amp;nbsp; &amp;nbsp;outdoc := NULL;&lt;br /&gt;&amp;nbsp; &amp;nbsp;P := 1;&lt;br /&gt;&amp;nbsp; &amp;nbsp;WHILE (outdoc IS NULL)&lt;br /&gt;&amp;nbsp; &amp;nbsp;LOOP&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; outdoc := dbms_drs.get_response (rid, P);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; y := y || TO_CLOB (outdoc);&lt;br /&gt;&amp;nbsp; &amp;nbsp;END LOOP;&lt;br /&gt;&amp;nbsp; &amp;nbsp;BEGIN&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; WHILE (outdoc IS NOT NULL)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; LOOP&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p := p + 1;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;outdoc := dbms_drs.get_response (rid, p);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;y := y || TO_CLOB (outdoc);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; END LOOP;&lt;br /&gt;&amp;nbsp; &amp;nbsp;EXCEPTION&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN NO_DATA_FOUND&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; THEN&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NULL;&lt;br /&gt;&amp;nbsp; &amp;nbsp;END;&lt;br /&gt;&amp;nbsp; &amp;nbsp;z := XMLTYPE (y);&lt;br /&gt;&amp;nbsp; &amp;nbsp;SELECT XMLQUERY ('/RESOURCE/PROPERTY_LIST/VALUE' PASSING z RETURNING CONTENT) INTO v_xml FROM DUAL;&lt;br /&gt;&amp;nbsp; &amp;nbsp;FOR C IN (SELECT name, VALUE&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FROM XMLTABLE ('/VALUE' PASSING v_xml COLUMNS NAME PATH '/VALUE/@name', VALUE PATH '/VALUE/@value')&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHERE&amp;nbsp; &amp;nbsp; &amp;nbsp;VALUE IS NOT NULL&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AND NAME NOT IN ('ENABLED'&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;, 'STATUS'&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;, 'ERROR_NUM'&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;, 'ERROR_TEXT'&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;, 'MIV'&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;, 'PRIMARY_SITE_ID'&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;, 'HEALTH_CHECK_INTERVAL'&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;, 'HEALTH_CHECK_ENABLED'&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;, 'DRC_UNIQUE_ID'&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;, 'DRC_UNIQUE_ID_SEQUENCE'&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;, 'EXT_COND'&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;, 'OVERALL_PROTECTION_MODE'&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;, 'ObserverHB'&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;, 'FSFO_MIV'&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;, 'MANAGED_STANDBY_MASK'&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;, 'RoleChangeHistory'&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;, 'FastStartFailoverConditions'&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;, 'FastStartFailoverTgtSwitchInt'&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;, 'FastStartFailoverOBID1'&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;, 'FastStartFailoverOBID2'&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;, 'FastStartFailoverOBID3'&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;, 'ObserverVersion1'&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;, 'ObserverVersion2'&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;, 'ObserverVersion3'&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;, 'FastStartFailoverMode'&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;, 'Configuration_Name'&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;, 'ObserverName1'&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;, 'ObserverName2'&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;, 'ObserverName3'))&lt;br /&gt;&amp;nbsp; &amp;nbsp;LOOP&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; general_commands := general_commands || CHR (10) || 'edit configuration set property ' || c.NAME || ' = ''' || c.VALUE || ''';';&lt;br /&gt;&amp;nbsp; &amp;nbsp;END LOOP;&lt;br /&gt;&amp;nbsp; &amp;nbsp;dbms_drs.delete_request (rid);&lt;br /&gt;&amp;nbsp; &amp;nbsp;DBMS_OUTPUT.put_line (db_headers_commands);&lt;br /&gt;&amp;nbsp; &amp;nbsp;DBMS_OUTPUT.put_line (db_commands);&lt;br /&gt;&amp;nbsp; &amp;nbsp;DBMS_OUTPUT.put_line ('EDIT CONFIGURATION SET PROTECTION MODE AS MAXPERFORMANCE;');&lt;br /&gt;&amp;nbsp; &amp;nbsp;IF v_enabled = 'yes'&lt;br /&gt;&amp;nbsp; &amp;nbsp;THEN&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; DBMS_OUTPUT.put_line ('enable configuration;');&lt;br /&gt;&amp;nbsp; &amp;nbsp;END IF;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DBMS_OUTPUT.put_line (db_commands_RedoRoutes);&lt;br /&gt;&amp;nbsp; &amp;nbsp;CASE v_protect_mode_no&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN 3&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; THEN&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;protect_mode := 'MAXPERFORMANCE';&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN 2&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; THEN&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;protect_mode := 'MAXAVAILABILITY';&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN 1&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; THEN&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;protect_mode := 'MAXPROTECTION';&lt;br /&gt;&amp;nbsp; &amp;nbsp;END CASE;&lt;br /&gt;&amp;nbsp; &amp;nbsp;IF v_protect_mode_no &amp;lt;&amp;gt; 3&lt;br /&gt;&amp;nbsp; &amp;nbsp;THEN&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; DBMS_OUTPUT.put_line ('EDIT CONFIGURATION SET PROTECTION MODE AS ' || protect_mode || ';');&lt;br /&gt;&amp;nbsp; &amp;nbsp;END IF;&lt;br /&gt;&amp;nbsp; &amp;nbsp;IF v_fast_start_failover = 'ENABLED'&lt;br /&gt;&amp;nbsp; &amp;nbsp;THEN&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; DBMS_OUTPUT.put_line ('ENABLE FAST_START FAILOVER;');&lt;br /&gt;&amp;nbsp; &amp;nbsp;END IF;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DBMS_OUTPUT.put_line ('show configuration;');&lt;br /&gt;&amp;nbsp; &amp;nbsp;DBMS_OUTPUT.put_line (general_commands);&lt;br /&gt;END;&lt;br /&gt;/&lt;/blockquote&gt;
&lt;br /&gt;
Enjoy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="mso-ansi-language: EN-GB; mso-bidi-font-family: Arial; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-GB; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"&gt;Yossi Nixon&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;&lt;a href="https://apex.oracle.com/pls/apex/f?p=19297:4:::NO:4:P4_ID:16673"&gt;&lt;span lang="EN-GB" style="color: windowtext; mso-ansi-language: EN-GB; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-GB; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes; text-decoration: none; text-underline: none;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shapetype
 id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t"
 path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;
 &lt;v:stroke joinstyle="miter"/&gt;
 &lt;v:formulas&gt;
  &lt;v:f eqn="if lineDrawn pixelLineWidth 0"/&gt;
  &lt;v:f eqn="sum @0 1 0"/&gt;
  &lt;v:f eqn="sum 0 0 @1"/&gt;
  &lt;v:f eqn="prod @2 1 2"/&gt;
  &lt;v:f eqn="prod @3 21600 pixelWidth"/&gt;
  &lt;v:f eqn="prod @3 21600 pixelHeight"/&gt;
  &lt;v:f eqn="sum @0 0 1"/&gt;
  &lt;v:f eqn="prod @6 1 2"/&gt;
  &lt;v:f eqn="prod @7 21600 pixelWidth"/&gt;
  &lt;v:f eqn="sum @8 21600 0"/&gt;
  &lt;v:f eqn="prod @7 21600 pixelHeight"/&gt;
  &lt;v:f eqn="sum @10 21600 0"/&gt;
 &lt;/v:formulas&gt;
 &lt;v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/&gt;
 &lt;o:lock v:ext="edit" aspectratio="t"/&gt;
&lt;/v:shapetype&gt;&lt;v:shape id="Picture_x0020_1" o:spid="_x0000_i1029" type="#_x0000_t75"
 alt="Image result for oracle ace associate"
 href="https://apex.oracle.com/pls/apex/f?p=19297:4:::NO:4:P4_ID:16673"
 style='width:113.25pt;height:41.25pt;visibility:visible;mso-wrap-style:square'
 o:button="t"&gt;
 &lt;v:imagedata src="file:///C:/Users/yossin/AppData/Local/Temp/msohtmlclip1/01/clip_image001.png"
  o:title="Image result for oracle ace associate"/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style="mso-ignore: vglayout;"&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="mso-ansi-language: EN-GB; mso-bidi-font-family: Arial; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-GB; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="mso-ansi-language: EN-GB; mso-bidi-font-family: Arial; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-GB; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"&gt;Chief Database Architect&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
Twitter:&amp;nbsp;
&lt;a href="https://twitter.com/YossiNixon"&gt;&lt;span style="color: #0563c1; mso-bidi-font-family: Arial;"&gt;@YossiNixon&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="mso-ansi-language: EN-GB; mso-bidi-font-family: Arial; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-GB; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"&gt;Linkedin: &lt;/span&gt;&lt;u&gt;&lt;span style="background: white; color: #0563c1; font-family: &amp;quot;Arial&amp;quot;,sans-serif; font-size: 8.5pt; mso-ansi-language: EN-GB; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-GB; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"&gt;&lt;span style="color: #0563c1;"&gt;&lt;a href="https://www.linkedin.com/in/ynixon/"&gt;https://www.linkedin.com/in/ynixon/&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;
</description><link>https://oracledba.blogspot.com/2018/02/extract-data-guard-commands-on-oracle.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBXNCiUTzTF5OH-F7cN8qpy-7Z-eFF72NDBv7vMRsw5gMhGGirsWZePOXPwMZ3YSNpbhdvq-VhCyGK2n0IFw7qyVq_Pl3uzuAM1lzpkpKtl7LhLIw9DEjn6Xa82DjCdGF1_vAO/s72-c/newin.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6061714.post-8032953584842554915</guid><pubDate>Mon, 29 Jan 2018 17:00:00 +0000</pubDate><atom:updated>2018-01-29T19:00:18.366+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">alert.log</category><category domain="http://www.blogger.com/atom/ns#">bash</category><category domain="http://www.blogger.com/atom/ns#">colors</category><category domain="http://www.blogger.com/atom/ns#">Linux</category><category domain="http://www.blogger.com/atom/ns#">script</category><title>Coloring alert.log output via tail and less</title><description>&lt;div class="tr_bq"&gt;Making my day to day job easier and convenient I like having some utilities and some aliases.&lt;/div&gt;We, the DBAs nation, have a need to look at the alert.log file frequently. So basically, I did the following:&lt;br /&gt;
-&lt;span style="white-space: pre;"&gt; &lt;/span&gt;Created a script to tail my alert.log file.&lt;br /&gt;
-&lt;span style="white-space: pre;"&gt; &lt;/span&gt;Colored the important words.&lt;br /&gt;
-&lt;span style="white-space: pre;"&gt; &lt;/span&gt;Added an alias to that script&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;$ vi tail_alert.sh&lt;br /&gt;
&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
export SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &amp;amp;&amp;amp; pwd )"&lt;br /&gt;
source ${SCRIPT_DIR}/platform.env&lt;br /&gt;
&lt;br /&gt;
ECHO_RED="\E[1;40;31m"&lt;br /&gt;
ECHO_STD="\E[1;40;37m"&lt;br /&gt;
&lt;br /&gt;
LIGHT_RED=`echo -e '\033[1;40m\033[1;31m'`&lt;br /&gt;
RED=`echo -e '\033[1;40m\033[0;31m'`&lt;br /&gt;
LIGHT_PURPLE=`echo -e '\033[1;40m\033[0;35m'`&lt;br /&gt;
GREEN=`echo -e '\033[1;40m\033[32m'`&lt;br /&gt;
NORMAL=`echo -e '\033[0m'`&lt;br /&gt;
&lt;br /&gt;
if [ "$1" = "" ]&lt;br /&gt;
then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ALERT_FILE=${ORACLE_BASE}/diag/${DIR_TYPE}/${ORACLE_UNQNAME,,}/${ORACLE_SID}/trace/alert_${ORACLE_SID}.log&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if [ ! -s ${ALERT_FILE} ]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo -e "${ECHO_RED}please provide alert.log file name${ECHO_STD}"&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exit&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fi&lt;br /&gt;
else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ALERT_FILE="$1"&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
WARNING_PATTERN="ORA-\|annot\|&amp;nbsp; not\|WARNING\|cannot allocate\|not complete\|LGWR: Attempting destination\|network reconnect\|LGWR: Destination LOG_ARCHIVE_DEST_\|is UNSYNCHRONIZED\|All online logs need archiving\|Examine archive trace files for archiving errors\|hung\|Killing\|Terminating\|WARN:\|Possible network disconnect\|Archive log rejected\|request rejected\|dead\|failed\|shutting down\|shutdown\|disabled"&lt;br /&gt;
ERROR_PATTERN="ORA-[^:][^ ]*\|TNS-[^:][^ ]*\|Error\|Archival stopped\|Fatal"&lt;br /&gt;
GOOD_PATTERN="continu\|STARTING\|Completed:\|COMPLETE\|Starting ORACLE instance\|Success\|succeeded"&lt;br /&gt;
&lt;br /&gt;
tail -n30 -f ${ALERT_FILE} | ${SED} "s/${WARNING_PATTERN}/${LIGHT_PURPLE}&amp;amp;${NORMAL}/gi;s/${ERROR_PATTERN}/${LIGHT_RED}&amp;amp;${NORMAL}/gi;s/${GOOD_PATTERN}/${GREEN}&amp;amp;${NORMAL}/gi"&lt;/blockquote&gt;&lt;br /&gt;
The last step to make it the easiest way to run, is adding an alias to the script&lt;br /&gt;
&lt;blockquote&gt;alias talert='/home/oracle/scripts/tail_alert.sh'&lt;/blockquote&gt;The same trick for just viewing the file via less&lt;br /&gt;
&lt;blockquote&gt;$ vi less_alert.sh&lt;br /&gt;
&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
export SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &amp;amp;&amp;amp; pwd )"&lt;br /&gt;
source ${SCRIPT_DIR}/platform.env&lt;br /&gt;
&lt;br /&gt;
ECHO_RED="\E[1;40;31m"&lt;br /&gt;
ECHO_STD="\E[1;40;37m"&lt;br /&gt;
&lt;br /&gt;
LIGHT_RED=`echo -e '\033[1;40m\033[1;31m'`&lt;br /&gt;
RED=`echo -e '\033[1;40m\033[0;31m'`&lt;br /&gt;
LIGHT_PURPLE=`echo -e '\033[1;40m\033[0;35m'`&lt;br /&gt;
GREEN=`echo -e '\033[1;40m\033[32m'`&lt;br /&gt;
NORMAL=`echo -e '\033[0m'`&lt;br /&gt;
&lt;br /&gt;
if [ "$1" = "" ]&lt;br /&gt;
then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ALERT_FILE=${ORACLE_BASE}/diag/${DIR_TYPE}/${ORACLE_UNQNAME,,}/${ORACLE_SID}/trace/alert_${ORACLE_SID}.log&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if [ ! -s ${ALERT_FILE} ]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo -e "${ECHO_RED}please provide alert.log file name${ECHO_STD}"&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exit&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fi&lt;br /&gt;
else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ALERT_FILE="$1"&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
WARNING_PATTERN="ORA-\|annot\|&amp;nbsp; not\|WARNING\|cannot allocate\|not complete\|LGWR: Attempting destination\|network reconnect\|LGWR: Destination LOG_ARCHIVE_DEST_\|is UNSYNCHRONIZED\|All online logs need archiving\|Examine archive trace files for archiving errors\|hung\|Killing\|Terminating\|WARN:\|Possible network disconnect\|Archive log rejected\|request rejected\|dead\|failed\|shutting down\|shutdown\|disabled"&lt;br /&gt;
ERROR_PATTERN="ORA-[^:][^ ]*\|TNS-[^:][^ ]*\|Error\|Archival stopped\|Fatal"&lt;br /&gt;
GOOD_PATTERN="continu\|STARTING\|Completed:\|COMPLETE\|Starting ORACLE instance\|Success\|succeeded"&lt;br /&gt;
&lt;br /&gt;
cat ${ALERT_FILE} | ${SED} "s/${WARNING_PATTERN}/${LIGHT_PURPLE}&amp;amp;${NORMAL}/gi;s/${ERROR_PATTERN}/${LIGHT_RED}&amp;amp;${NORMAL}/gi;s/${GOOD_PATTERN}/${GREEN}&amp;amp;${NORMAL}/gi" | less -R&lt;/blockquote&gt;And again adding an alias to the script&lt;br /&gt;
&lt;blockquote&gt;alias alert='/home/oracle/scripts/less_alert.sh'&lt;/blockquote&gt;Sample output:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCMY32b0Javvae4_wk-aU0_CCNWt1OoORDNCEGWEaINEPtbJwew5wHKDKx2vYn-OTJzJSidnLi54G067ulzvU0GgkQfftRQhkEQ-4hMf650jLoB-r7h_nUMY-B1LjaLsgb2jEf/s1600/Capture.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="505" data-original-width="833" height="385" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCMY32b0Javvae4_wk-aU0_CCNWt1OoORDNCEGWEaINEPtbJwew5wHKDKx2vYn-OTJzJSidnLi54G067ulzvU0GgkQfftRQhkEQ-4hMf650jLoB-r7h_nUMY-B1LjaLsgb2jEf/s640/Capture.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Enjoy</description><link>https://oracledba.blogspot.com/2018/01/coloring-alertlog-output-via-tail-and.html</link><author>noreply@blogger.com (Yossi Nixon)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCMY32b0Javvae4_wk-aU0_CCNWt1OoORDNCEGWEaINEPtbJwew5wHKDKx2vYn-OTJzJSidnLi54G067ulzvU0GgkQfftRQhkEQ-4hMf650jLoB-r7h_nUMY-B1LjaLsgb2jEf/s72-c/Capture.JPG" width="72"/><thr:total>0</thr:total></item></channel></rss>