<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ora-solutions.net - Martin Decker</title>
	<atom:link href="http://www.ora-solutions.net/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ora-solutions.net/web</link>
	<description>Indepented Oracle consultant</description>
	<lastBuildDate>Fri, 23 Mar 2012 22:47:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Oracle certifies OEL6/RHEL6 for Oracle Database 11gR2 and Fusion Middleware</title>
		<link>http://www.ora-solutions.net/web/2012/03/24/oracle-certifies-oel6rhel6-for-oracle-database-11gr2-and-fusion-middleware/</link>
		<comments>http://www.ora-solutions.net/web/2012/03/24/oracle-certifies-oel6rhel6-for-oracle-database-11gr2-and-fusion-middleware/#comments</comments>
		<pubDate>Fri, 23 Mar 2012 22:47:38 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[11gR2]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle Database]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=1161</guid>
		<description><![CDATA[Oracle yesterday announced certification of RHEL6 / OEL6 with Oracle Database 11gR2 and Oracle Fusion Middleware 11.1. Moreover, Oracle will from now on provide errata packages for free. Until now, they could only be obtained with a valid ULN support contract. I think this will be a big plus for Oracle Linux in competition with [...]]]></description>
			<content:encoded><![CDATA[<p>Oracle yesterday announced certification of RHEL6 / OEL6 with Oracle Database 11gR2 and Oracle Fusion Middleware 11.1. </p>
<p>Moreover, Oracle will from now on provide errata packages for free. Until now, they could only be obtained with a valid ULN support contract. I think this will be a big plus for Oracle Linux in competition with Red Hat Enterprise Linux.</p>
<p>I wonder how long it will take before they ship Exadata and Oracle Database Appliance (ODA) with Unbreakable Kernel.</p>
<p>Reference: <a href="http://www.oracle.com/us/corporate/press/1563775">http://www.oracle.com/us/corporate/press/1563775</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2012/03/24/oracle-certifies-oel6rhel6-for-oracle-database-11gr2-and-fusion-middleware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No more cleartext-passwords in Scripts &#8211; Oracle Secure External Password Store (SEPS)</title>
		<link>http://www.ora-solutions.net/web/2012/03/08/no-more-cleartext-passwords-in-scripts-oracle-secure-external-password-store-seps/</link>
		<comments>http://www.ora-solutions.net/web/2012/03/08/no-more-cleartext-passwords-in-scripts-oracle-secure-external-password-store-seps/#comments</comments>
		<pubDate>Thu, 08 Mar 2012 19:49:09 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[11g]]></category>
		<category><![CDATA[11gR2]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=1139</guid>
		<description><![CDATA[Gone are the day when cleartext passwords had to be stored in scripts for Oracle database access. The solution to this requirement is &#8220;Oracle Secure External Password Store (SEPS)&#8221;. This article will give a short introduction and a practical example of the solution. Key facts: no Advanced Security Option (License) necessary every unix-account, who has [...]]]></description>
			<content:encoded><![CDATA[<p>Gone are the day when cleartext passwords had to be stored in scripts for Oracle database access. The solution to this requirement is &#8220;Oracle Secure External Password Store (SEPS)&#8221;. This article will give a short introduction and a practical example of the solution.</p>
<h1>Key facts:</h1>
<p></p>
<div>
<ul>
<li>
<div>no Advanced Security Option (License) necessary</div>
</li>
<li>
<div><strong>every unix-account, who has access to the wallet can use it to log on to the contained databases without a password! Therefore prevent other unix-accounts from accessing your wallet!</strong> (chmod, chown)</div>
</li>
</ul>
</div>
<p></p>
<h1>Installation</h1>
<p></p>
<ul>
<li>
<div><strong>Oracle Client</strong>: Unix-Account, who wishes to connect to the database without providing a password needs to have an Oracle Client installed. Actually it can be an Instant Client, however the Instant Client does not have the Oracle Wallet Manager (owm).</div>
</li>
<p></p>
<li>
<div><strong>TNS_ADMIN</strong>: If the installed Oracle-Client is also used by other unix-accounts, you have to set Environment-Variable TNS_ADMIN to point to a dedicated destination for sqlnet.ora</div>
</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">echo &quot;export TNS_ADMIN=/home/techuser/oracle/network/admin&quot; &amp;gt;&amp;gt; ~/.bash_profile</pre></div></div>

<ul>
</p>
<li>
<div><strong>sqlnet.ora</strong> in  $TNS_ADMIN: In this file, the path to your personal wallet is defined:</div>
</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">WALLET_LOCATION =
(
   SOURCE =
      (METHOD = FILE)
      (METHOD_DATA =
         (DIRECTORY = /home/techuser/oracle/network/wallet)
      )
)
SQLNET.WALLET_OVERRIDE = TRUE
SSL_CLIENT_AUTHENTICATION = FALSE</pre></div></div>

<p><strong>Be aware that sqlnet.ora has very sensitive formatting! Blank at the beginning of the line means that previous line is continued. If the first character of a line is not a blank, then it is supposed to be new directive. Therefore note the identation of wallet_location parameter.<br />
</strong></p>
<ul>
</p>
<li>
<div><strong>tnsnames.ora</strong> in  $TNS_ADMIN: This file contains TNS Aliases, which are used to connect to database. If the unix-account needs to  connect to one database but with 2 different database accounts, then it needs to use 2 distinct tns aliases!</div>
</li>
<p></p>
<li>
<div><strong>Creation of Wallet</strong>: When the wallet is created, a wallet password is requested. This password is needed when viewing, adding, modifying and deleting wallet entries.</div>
</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">mkstore –wrl /home/techuser/oracle/network/wallet –create</pre></div></div>

<h1>Management of Credentials in Wallet:</h1>
<div>
<ul>
</p>
<li>
<div>Adding Credentials to Wallet:</div>
</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">mkstore -wrl /home/techuser/oracle/network/wallet \
-createCredential</pre></div></div>

<ul>
<li>
<div>Removal of Credentials from wallet:</div>
</li>
</ul>
<p></p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">mkstore -wrl /home/techuser/oracle/network/wallet \
-deleteCredential TNSAlias</pre></div></div>

<p></p>
<ul>
<li>
<div>Modification of Credential in wallet</div>
</li>
</ul>
<p></p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">mkstore -wrl /home/techuser/oracle/network/wallet \
-modifyCredential N102 scott newpassword
Enter password:
Modify credential Modify 1
&nbsp;
mkstore -wrl /home/techuser/oracle/network/wallet \
-modifyEntry oracle.security.client.password1 newpass
Enter password:</pre></div></div>

<p></p>
<ul>
<li>
<div>Viewing of Credentials in Wallet</div>
</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">mkstore -wrl /home/techuser/oracle/network/wallet -list
&nbsp;
Oracle Secret Store entries:
oracle.security.client.connect_string1
oracle.security.client.password1
oracle.security.client.username
&nbsp;
mkstore -wrl /home/techuser/oracle/network/wallet \
-viewEntry oracle.security.client.connect_string1
Enter password: 
&nbsp;
oracle.security.client.connect_string1 = N102
&nbsp;
mkstore -wrl /home/techuser/oracle/network/wallet -viewEntry oracle.security.client.username1
Enter password:
oracle.security.client.username1 = scott
&nbsp;
mkstore -wrl /home/techuser/oracle/network/wallet -viewEntry oracle.security.client.password1
Enter password:
oracle.security.client.password1 = tiger</pre></div></div>

</div>
<p></p>
<ul>
<li>
<div>Changing Wallet Password </div>
</li>
</ul>
<div>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">orapki wallet change_pwd -wallet /home/techuser/oracle/network/wallet \
-oldpwd welcome1 -newpwd welcome2</pre></div></div>

</div>
<p></p>
<h1>Example:</h1>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">DBs:
&nbsp;
TESTDB1 <span style="color: #66cc66;">&#40;</span>11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>3<span style="color: #66cc66;">&#41;</span>
TESTDB2 <span style="color: #66cc66;">&#40;</span>11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>3<span style="color: #66cc66;">&#41;</span>
&nbsp;
Techuser:
techuser1 <span style="color: #66cc66;">-</span> uses RDBMS Server Home als Client
techuser2 <span style="color: #66cc66;">-</span> uses Oracle Instant Client
&nbsp;
Requirements:
techuser1 should be able <span style="color: #993333; font-weight: bold;">TO</span> connect <span style="color: #993333; font-weight: bold;">TO</span> ro_user@TESTDB2 <span style="color: #993333; font-weight: bold;">AND</span> rw_user@TESTDB2
techuser2 should be able <span style="color: #993333; font-weight: bold;">TO</span> connect <span style="color: #993333; font-weight: bold;">TO</span> ro_user@TESTDB2 <span style="color: #993333; font-weight: bold;">AND</span> rw_user@TESTDB1 
&nbsp;
Preparations:
&nbsp;
<span style="color: #993333; font-weight: bold;">AS</span> oracle:
<span style="color: #66cc66;">.</span> TESTDB2<span style="color: #66cc66;">.</span>env
&nbsp;
sqlplus <span style="color: #ff0000;">&quot;/as sysdba&quot;</span>
&nbsp;
SQL&amp;gt; <span style="color: #993333; font-weight: bold;">GRANT</span> <span style="color: #993333; font-weight: bold;">CREATE</span> session <span style="color: #993333; font-weight: bold;">TO</span> ro_user <span style="color: #993333; font-weight: bold;">IDENTIFIED</span> <span style="color: #993333; font-weight: bold;">BY</span> ro_password;
&nbsp;
<span style="color: #993333; font-weight: bold;">GRANT</span> succeeded<span style="color: #66cc66;">.</span>
&nbsp;
SQL&amp;gt; <span style="color: #993333; font-weight: bold;">GRANT</span> <span style="color: #993333; font-weight: bold;">CREATE</span> session <span style="color: #993333; font-weight: bold;">TO</span> rw_user <span style="color: #993333; font-weight: bold;">IDENTIFIED</span> <span style="color: #993333; font-weight: bold;">BY</span> rw_password;
&nbsp;
<span style="color: #993333; font-weight: bold;">GRANT</span> succeeded<span style="color: #66cc66;">.</span>
&nbsp;
<span style="color: #66cc66;">.</span> TESTDB1<span style="color: #66cc66;">.</span>env
&nbsp;
sqlplus <span style="color: #ff0000;">&quot;/as sysdba&quot;</span>
&nbsp;
SQL&amp;gt; <span style="color: #993333; font-weight: bold;">GRANT</span> <span style="color: #993333; font-weight: bold;">CREATE</span> session <span style="color: #993333; font-weight: bold;">TO</span> rw_user <span style="color: #993333; font-weight: bold;">IDENTIFIED</span> <span style="color: #993333; font-weight: bold;">BY</span> rw_password;
&nbsp;
<span style="color: #993333; font-weight: bold;">GRANT</span> succeeded<span style="color: #66cc66;">.</span>
&nbsp;
<span style="color: #993333; font-weight: bold;">AS</span> root:
useradd techuser1
useradd techuser2
&nbsp;
su <span style="color: #66cc66;">-</span> techuser1
export ORACLE_HOME<span style="color: #66cc66;">=/</span>u01<span style="color: #66cc66;">/</span>app<span style="color: #66cc66;">/</span>oracle<span style="color: #66cc66;">/</span>product<span style="color: #66cc66;">/</span>11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">/</span>dbhome_1
export PATH<span style="color: #66cc66;">=</span>$ORACLE_HOME<span style="color: #66cc66;">/</span>bin:$PATH
export TNS_ADMIN<span style="color: #66cc66;">=/</span>home<span style="color: #66cc66;">/</span>techuser1<span style="color: #66cc66;">/</span>oracle<span style="color: #66cc66;">/</span>network<span style="color: #66cc66;">/</span>admin
mkdir <span style="color: #66cc66;">-</span>p oracle<span style="color: #66cc66;">/</span>network<span style="color: #66cc66;">/</span>admin oracle<span style="color: #66cc66;">/</span>network<span style="color: #66cc66;">/</span>wallet
&nbsp;
vi $TNS_ADMIN<span style="color: #66cc66;">/</span>sqlnet<span style="color: #66cc66;">.</span>ora:
WALLET_LOCATION <span style="color: #66cc66;">=</span>
   <span style="color: #66cc66;">&#40;</span>SOURCE <span style="color: #66cc66;">=</span>
      <span style="color: #66cc66;">&#40;</span>METHOD <span style="color: #66cc66;">=</span> FILE<span style="color: #66cc66;">&#41;</span>
         <span style="color: #66cc66;">&#40;</span>METHOD_DATA<span style="color: #66cc66;">=</span>
           <span style="color: #66cc66;">&#40;</span>DIRECTORY<span style="color: #66cc66;">=/</span>home<span style="color: #66cc66;">/</span>techuser1<span style="color: #66cc66;">/</span>oracle<span style="color: #66cc66;">/</span>network<span style="color: #66cc66;">/</span>wallet<span style="color: #66cc66;">&#41;</span>
         <span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#41;</span>
&nbsp;
SQLNET<span style="color: #66cc66;">.</span>WALLET_OVERRIDE<span style="color: #66cc66;">=</span>TRUE
SSL_CLIENT_AUTHENTICATION<span style="color: #66cc66;">=</span>FALSE
&nbsp;
vi $TNS_ADMIN<span style="color: #66cc66;">/</span>tnsnames<span style="color: #66cc66;">.</span>ora:
&nbsp;
TESTDB2_ro <span style="color: #66cc66;">=</span>
  <span style="color: #66cc66;">&#40;</span>DESCRIPTION <span style="color: #66cc66;">=</span>
    <span style="color: #66cc66;">&#40;</span>ADDRESS <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span>PROTOCOL <span style="color: #66cc66;">=</span> TCP<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>HOST <span style="color: #66cc66;">=</span> oravm1<span style="color: #66cc66;">.</span>intra<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>PORT <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1522</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#40;</span>CONNECT_DATA <span style="color: #66cc66;">=</span>
      <span style="color: #66cc66;">&#40;</span>SERVER <span style="color: #66cc66;">=</span> DEDICATED<span style="color: #66cc66;">&#41;</span>
      <span style="color: #66cc66;">&#40;</span>SERVICE_NAME <span style="color: #66cc66;">=</span> TESTDB2_SITE1<span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#41;</span>
&nbsp;
TESTDB2_rw <span style="color: #66cc66;">=</span>
  <span style="color: #66cc66;">&#40;</span>DESCRIPTION <span style="color: #66cc66;">=</span>
    <span style="color: #66cc66;">&#40;</span>ADDRESS <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span>PROTOCOL <span style="color: #66cc66;">=</span> TCP<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>HOST <span style="color: #66cc66;">=</span> oravm1<span style="color: #66cc66;">.</span>intra<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>PORT <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1522</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#40;</span>CONNECT_DATA <span style="color: #66cc66;">=</span>
      <span style="color: #66cc66;">&#40;</span>SERVER <span style="color: #66cc66;">=</span> DEDICATED<span style="color: #66cc66;">&#41;</span>
      <span style="color: #66cc66;">&#40;</span>SERVICE_NAME <span style="color: #66cc66;">=</span> TESTDB2_SITE1<span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#91;</span>techuser1@oravm1 admin<span style="color: #66cc66;">&#93;</span>$ tnsping TESTDB2_ro
&nbsp;
TNS Ping Utility <span style="color: #993333; font-weight: bold;">FOR</span> Linux: Version 11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>3<span style="color: #66cc66;">.</span>0 <span style="color: #66cc66;">-</span> Production <span style="color: #993333; font-weight: bold;">ON</span> 01<span style="color: #66cc66;">-</span>MAR<span style="color: #66cc66;">-</span><span style="color: #cc66cc;">2012</span> <span style="color: #cc66cc;">11</span>:<span style="color: #cc66cc;">13</span>:<span style="color: #cc66cc;">34</span>
&nbsp;
Copyright <span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">&#41;</span> <span style="color: #cc66cc;">1997</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">2011</span><span style="color: #66cc66;">,</span> Oracle<span style="color: #66cc66;">.</span>  <span style="color: #993333; font-weight: bold;">ALL</span> rights reserved<span style="color: #66cc66;">.</span>
&nbsp;
Used parameter files:
<span style="color: #66cc66;">/</span>home<span style="color: #66cc66;">/</span>techuser1<span style="color: #66cc66;">/</span>oracle<span style="color: #66cc66;">/</span>network<span style="color: #66cc66;">/</span>admin<span style="color: #66cc66;">/</span>sqlnet<span style="color: #66cc66;">.</span>ora
&nbsp;
Used TNSNAMES adapter <span style="color: #993333; font-weight: bold;">TO</span> resolve the alias
Attempting <span style="color: #993333; font-weight: bold;">TO</span> contact <span style="color: #66cc66;">&#40;</span>DESCRIPTION <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span>ADDRESS <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span>PROTOCOL <span style="color: #66cc66;">=</span> TCP<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>HOST <span style="color: #66cc66;">=</span> oravm1<span style="color: #66cc66;">.</span>intra<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>PORT <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1522</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>CONNECT_DATA <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span>SERVER <span style="color: #66cc66;">=</span> DEDICATED<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>SERVICE_NAME <span style="color: #66cc66;">=</span> TESTDB2_SITE1<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
OK <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span> msec<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#91;</span>techuser1@oravm1 admin<span style="color: #66cc66;">&#93;</span>$ tnsping TESTDB2_rw
&nbsp;
TNS Ping Utility <span style="color: #993333; font-weight: bold;">FOR</span> Linux: Version 11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>3<span style="color: #66cc66;">.</span>0 <span style="color: #66cc66;">-</span> Production <span style="color: #993333; font-weight: bold;">ON</span> 01<span style="color: #66cc66;">-</span>MAR<span style="color: #66cc66;">-</span><span style="color: #cc66cc;">2012</span> <span style="color: #cc66cc;">11</span>:<span style="color: #cc66cc;">13</span>:<span style="color: #cc66cc;">36</span>
&nbsp;
Copyright <span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">&#41;</span> <span style="color: #cc66cc;">1997</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">2011</span><span style="color: #66cc66;">,</span> Oracle<span style="color: #66cc66;">.</span>  <span style="color: #993333; font-weight: bold;">ALL</span> rights reserved<span style="color: #66cc66;">.</span>
&nbsp;
Used parameter files:
<span style="color: #66cc66;">/</span>home<span style="color: #66cc66;">/</span>techuser1<span style="color: #66cc66;">/</span>oracle<span style="color: #66cc66;">/</span>network<span style="color: #66cc66;">/</span>admin<span style="color: #66cc66;">/</span>sqlnet<span style="color: #66cc66;">.</span>ora
&nbsp;
Used TNSNAMES adapter <span style="color: #993333; font-weight: bold;">TO</span> resolve the alias
Attempting <span style="color: #993333; font-weight: bold;">TO</span> contact <span style="color: #66cc66;">&#40;</span>DESCRIPTION <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span>ADDRESS <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span>PROTOCOL <span style="color: #66cc66;">=</span> TCP<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>HOST <span style="color: #66cc66;">=</span> oravm1<span style="color: #66cc66;">.</span>intra<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>PORT <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1522</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>CONNECT_DATA <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span>SERVER <span style="color: #66cc66;">=</span> DEDICATED<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>SERVICE_NAME <span style="color: #66cc66;">=</span> TESTDB2_SITE1<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
OK <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10</span> msec<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#91;</span>techuser1@oravm1 admin<span style="color: #66cc66;">&#93;</span>$ mkstore <span style="color: #66cc66;">-</span>wrl <span style="color: #66cc66;">/</span>home<span style="color: #66cc66;">/</span>techuser1<span style="color: #66cc66;">/</span>oracle<span style="color: #66cc66;">/</span>network<span style="color: #66cc66;">/</span>wallet <span style="color: #66cc66;">-</span><span style="color: #993333; font-weight: bold;">CREATE</span>
Oracle Secret Store Tool : Version 11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>3<span style="color: #66cc66;">.</span>0 <span style="color: #66cc66;">-</span> Production
Copyright <span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">&#41;</span> <span style="color: #cc66cc;">2004</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">2011</span><span style="color: #66cc66;">,</span> Oracle <span style="color: #993333; font-weight: bold;">AND</span><span style="color: #66cc66;">/</span><span style="color: #993333; font-weight: bold;">OR</span> its affiliates<span style="color: #66cc66;">.</span> <span style="color: #993333; font-weight: bold;">ALL</span> rights reserved<span style="color: #66cc66;">.</span>
&nbsp;
Enter password:
Enter password again:
&nbsp;
mkstore <span style="color: #66cc66;">-</span>wrl <span style="color: #66cc66;">/</span>home<span style="color: #66cc66;">/</span>techuser1<span style="color: #66cc66;">/</span>oracle<span style="color: #66cc66;">/</span>network<span style="color: #66cc66;">/</span>wallet \
 <span style="color: #66cc66;">-</span>createCredential TESTDB2_rw rw_user rw_password
&nbsp;
mkstore <span style="color: #66cc66;">-</span>wrl <span style="color: #66cc66;">/</span>home<span style="color: #66cc66;">/</span>techuser1<span style="color: #66cc66;">/</span>oracle<span style="color: #66cc66;">/</span>network<span style="color: #66cc66;">/</span>wallet \
<span style="color: #66cc66;">-</span>createCredential TESTDB2_ro ro_user ro_password
&nbsp;
<span style="color: #66cc66;">&#91;</span>techuser1@oravm1 admin<span style="color: #66cc66;">&#93;</span>$ mkstore <span style="color: #66cc66;">-</span>wrl <span style="color: #66cc66;">/</span>home<span style="color: #66cc66;">/</span>techuser1<span style="color: #66cc66;">/</span>oracle<span style="color: #66cc66;">/</span>network<span style="color: #66cc66;">/</span>wallet \
<span style="color: #66cc66;">-</span>createCredential TESTDB2_rw rw_user rw_password
Oracle Secret Store Tool : Version 11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>3<span style="color: #66cc66;">.</span>0 <span style="color: #66cc66;">-</span> Production
Copyright <span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">&#41;</span> <span style="color: #cc66cc;">2004</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">2011</span><span style="color: #66cc66;">,</span> Oracle <span style="color: #993333; font-weight: bold;">AND</span><span style="color: #66cc66;">/</span><span style="color: #993333; font-weight: bold;">OR</span> its affiliates<span style="color: #66cc66;">.</span> <span style="color: #993333; font-weight: bold;">ALL</span> rights reserved<span style="color: #66cc66;">.</span>
&nbsp;
Enter wallet password:
<span style="color: #993333; font-weight: bold;">CREATE</span> credential oracle<span style="color: #66cc66;">.</span>security<span style="color: #66cc66;">.</span>client<span style="color: #66cc66;">.</span>connect_string1
&nbsp;
<span style="color: #66cc66;">&#91;</span>techuser1@oravm1 admin<span style="color: #66cc66;">&#93;</span>$ mkstore <span style="color: #66cc66;">-</span>wrl <span style="color: #66cc66;">/</span>home<span style="color: #66cc66;">/</span>techuser1<span style="color: #66cc66;">/</span>oracle<span style="color: #66cc66;">/</span>network<span style="color: #66cc66;">/</span>wallet \
 <span style="color: #66cc66;">-</span>createCredential TESTDB2_ro ro_user ro_password
Oracle Secret Store Tool : Version 11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>3<span style="color: #66cc66;">.</span>0 <span style="color: #66cc66;">-</span> Production
Copyright <span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">&#41;</span> <span style="color: #cc66cc;">2004</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">2011</span><span style="color: #66cc66;">,</span> Oracle <span style="color: #993333; font-weight: bold;">AND</span><span style="color: #66cc66;">/</span><span style="color: #993333; font-weight: bold;">OR</span> its affiliates<span style="color: #66cc66;">.</span> <span style="color: #993333; font-weight: bold;">ALL</span> rights reserved<span style="color: #66cc66;">.</span>
&nbsp;
Enter wallet password:
<span style="color: #993333; font-weight: bold;">CREATE</span> credential oracle<span style="color: #66cc66;">.</span>security<span style="color: #66cc66;">.</span>client<span style="color: #66cc66;">.</span>connect_string2
&nbsp;
<span style="color: #66cc66;">&#91;</span>techuser1@oravm1 admin<span style="color: #66cc66;">&#93;</span>$ sqlplus <span style="color: #66cc66;">/</span>@TESTDB2_rw
SQL<span style="color: #66cc66;">*</span>Plus: Release 11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>3<span style="color: #66cc66;">.</span>0 Production <span style="color: #993333; font-weight: bold;">ON</span> Thu Mar <span style="color: #cc66cc;">1</span> <span style="color: #cc66cc;">11</span>:<span style="color: #cc66cc;">19</span>:<span style="color: #cc66cc;">40</span> <span style="color: #cc66cc;">2012</span>
&nbsp;
Copyright <span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">&#41;</span> <span style="color: #cc66cc;">1982</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">2011</span><span style="color: #66cc66;">,</span> Oracle<span style="color: #66cc66;">.</span>  <span style="color: #993333; font-weight: bold;">ALL</span> rights reserved<span style="color: #66cc66;">.</span>
&nbsp;
Connected <span style="color: #993333; font-weight: bold;">TO</span>:
Oracle <span style="color: #993333; font-weight: bold;">DATABASE</span> 11g Enterprise Edition Release 11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>3<span style="color: #66cc66;">.</span>0 <span style="color: #66cc66;">-</span> 64bit Production
<span style="color: #993333; font-weight: bold;">WITH</span> the Partitioning<span style="color: #66cc66;">,</span> OLAP<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">DATA</span> Mining <span style="color: #993333; font-weight: bold;">AND</span> Real Application Testing options
&nbsp;
SQL&amp;gt; <span style="color: #993333; font-weight: bold;">SHOW</span> user
USER <span style="color: #993333; font-weight: bold;">IS</span> <span style="color: #ff0000;">&quot;RW_USER&quot;</span>
SQL&amp;gt; quit
Disconnected <span style="color: #993333; font-weight: bold;">FROM</span> Oracle <span style="color: #993333; font-weight: bold;">DATABASE</span> 11g Enterprise Edition Release 11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>3<span style="color: #66cc66;">.</span>0 <span style="color: #66cc66;">-</span> 64bit Production
<span style="color: #993333; font-weight: bold;">WITH</span> the Partitioning<span style="color: #66cc66;">,</span> OLAP<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">DATA</span> Mining <span style="color: #993333; font-weight: bold;">AND</span> Real Application Testing options
<span style="color: #66cc66;">&#91;</span>techuser1@oravm1 admin<span style="color: #66cc66;">&#93;</span>$ sqlplus <span style="color: #66cc66;">/</span>@TESTDB2_ro
&nbsp;
SQL<span style="color: #66cc66;">*</span>Plus: Release 11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>3<span style="color: #66cc66;">.</span>0 Production <span style="color: #993333; font-weight: bold;">ON</span> Thu Mar <span style="color: #cc66cc;">1</span> <span style="color: #cc66cc;">11</span>:<span style="color: #cc66cc;">19</span>:<span style="color: #cc66cc;">45</span> <span style="color: #cc66cc;">2012</span>
&nbsp;
Copyright <span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">&#41;</span> <span style="color: #cc66cc;">1982</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">2011</span><span style="color: #66cc66;">,</span> Oracle<span style="color: #66cc66;">.</span>  <span style="color: #993333; font-weight: bold;">ALL</span> rights reserved<span style="color: #66cc66;">.</span>
&nbsp;
Connected <span style="color: #993333; font-weight: bold;">TO</span>:
Oracle <span style="color: #993333; font-weight: bold;">DATABASE</span> 11g Enterprise Edition Release 11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>3<span style="color: #66cc66;">.</span>0 <span style="color: #66cc66;">-</span> 64bit Production
<span style="color: #993333; font-weight: bold;">WITH</span> the Partitioning<span style="color: #66cc66;">,</span> OLAP<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">DATA</span> Mining <span style="color: #993333; font-weight: bold;">AND</span> Real Application Testing options
&nbsp;
SQL&amp;gt; <span style="color: #993333; font-weight: bold;">SHOW</span> user
USER <span style="color: #993333; font-weight: bold;">IS</span> <span style="color: #ff0000;">&quot;RO_USER&quot;</span>
&nbsp;
<span style="color: #66cc66;">&#91;</span>techuser1@oravm1 wallet<span style="color: #66cc66;">&#93;</span>$ ls <span style="color: #66cc66;">-</span>la <span style="color: #66cc66;">/</span>home<span style="color: #66cc66;">/</span>techuser1<span style="color: #66cc66;">/</span>oracle<span style="color: #66cc66;">/</span>network<span style="color: #66cc66;">/</span>wallet<span style="color: #66cc66;">/</span>
total <span style="color: #cc66cc;">24</span>
drwxrwxr<span style="color: #66cc66;">-</span>x <span style="color: #cc66cc;">2</span> techuser1 techuser1 <span style="color: #cc66cc;">4096</span> Mar  <span style="color: #cc66cc;">1</span> <span style="color: #cc66cc;">11</span>:<span style="color: #cc66cc;">15</span> <span style="color: #66cc66;">.</span>
drwxrwxr<span style="color: #66cc66;">-</span>x <span style="color: #cc66cc;">4</span> techuser1 techuser1 <span style="color: #cc66cc;">4096</span> Mar  <span style="color: #cc66cc;">1</span> <span style="color: #cc66cc;">11</span>:01 <span style="color: #66cc66;">..</span>
<span style="color: #66cc66;">-</span>rw<span style="color: #808080; font-style: italic;">------- 1 techuser1 techuser1 4341 Mar  1 11:17 cwallet.sso</span>
<span style="color: #66cc66;">-</span>rw<span style="color: #808080; font-style: italic;">------- 1 techuser1 techuser1 4264 Mar  1 11:17 ewallet.p12</span>
<span style="color: #66cc66;">&#91;</span>techuser1@oravm1 wallet<span style="color: #66cc66;">&#93;</span>$
&nbsp;
techuser2 <span style="color: #993333; font-weight: bold;">WITH</span> instant client:
&nbsp;
unzip instantclient<span style="color: #66cc66;">-</span>basic<span style="color: #66cc66;">-</span>linux<span style="color: #66cc66;">.</span>x64<span style="color: #66cc66;">-</span>11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>3<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>zip
unzip instantclient<span style="color: #66cc66;">-</span>sqlplus<span style="color: #66cc66;">-</span>linux<span style="color: #66cc66;">.</span>x64<span style="color: #66cc66;">-</span>11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>3<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>zip
&nbsp;
export ORACLE_HOME<span style="color: #66cc66;">=/</span>home<span style="color: #66cc66;">/</span>techuser2<span style="color: #66cc66;">/</span>instantclient_11_2
export PATH<span style="color: #66cc66;">=</span>$ORACLE_HOME:$PATH
export TNS_ADMIN<span style="color: #66cc66;">=/</span>home<span style="color: #66cc66;">/</span>techuser2<span style="color: #66cc66;">/</span>oracle<span style="color: #66cc66;">/</span>network<span style="color: #66cc66;">/</span>admin
export LD_LIBRARY_PATH<span style="color: #66cc66;">=</span>$ORACLE_HOME:$LD_LIBRARY_PATH
&nbsp;
<span style="color: #66cc66;">&#91;</span>techuser2@oravm1 ~<span style="color: #66cc66;">&#93;</span>$ mkdir <span style="color: #66cc66;">-</span>p <span style="color: #66cc66;">/</span>home<span style="color: #66cc66;">/</span>techuser2<span style="color: #66cc66;">/</span>oracle<span style="color: #66cc66;">/</span>network<span style="color: #66cc66;">/</span>admin
<span style="color: #66cc66;">&#91;</span>techuser2@oravm1 ~<span style="color: #66cc66;">&#93;</span>$ mkdir <span style="color: #66cc66;">-</span>p <span style="color: #66cc66;">/</span>home<span style="color: #66cc66;">/</span>techuser2<span style="color: #66cc66;">/</span>oracle<span style="color: #66cc66;">/</span>network<span style="color: #66cc66;">/</span>wallet
&nbsp;
vi $TNS_ADMIN<span style="color: #66cc66;">/</span>sqlnet<span style="color: #66cc66;">.</span>ora
&nbsp;
WALLET_LOCATION <span style="color: #66cc66;">=</span>
   <span style="color: #66cc66;">&#40;</span>SOURCE <span style="color: #66cc66;">=</span>
      <span style="color: #66cc66;">&#40;</span>METHOD <span style="color: #66cc66;">=</span> FILE<span style="color: #66cc66;">&#41;</span>
         <span style="color: #66cc66;">&#40;</span>METHOD_DATA<span style="color: #66cc66;">=</span>
           <span style="color: #66cc66;">&#40;</span>DIRECTORY<span style="color: #66cc66;">=/</span>home<span style="color: #66cc66;">/</span>techuser2<span style="color: #66cc66;">/</span>oracle<span style="color: #66cc66;">/</span>network<span style="color: #66cc66;">/</span>wallet<span style="color: #66cc66;">&#41;</span>
         <span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#41;</span>
&nbsp;
SQLNET<span style="color: #66cc66;">.</span>WALLET_OVERRIDE<span style="color: #66cc66;">=</span>TRUE
SSL_CLIENT_AUTHENTICATION<span style="color: #66cc66;">=</span>FALSE
&nbsp;
vi $TNS_ADMIN<span style="color: #66cc66;">/</span>tnsnames<span style="color: #66cc66;">.</span>ora
&nbsp;
TESTDB2_ro <span style="color: #66cc66;">=</span>
  <span style="color: #66cc66;">&#40;</span>DESCRIPTION <span style="color: #66cc66;">=</span>
    <span style="color: #66cc66;">&#40;</span>ADDRESS <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span>PROTOCOL <span style="color: #66cc66;">=</span> TCP<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>HOST <span style="color: #66cc66;">=</span> oravm1<span style="color: #66cc66;">.</span>intra<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>PORT <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1522</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#40;</span>CONNECT_DATA <span style="color: #66cc66;">=</span>
      <span style="color: #66cc66;">&#40;</span>SERVER <span style="color: #66cc66;">=</span> DEDICATED<span style="color: #66cc66;">&#41;</span>
      <span style="color: #66cc66;">&#40;</span>SERVICE_NAME <span style="color: #66cc66;">=</span> TESTDB2_SITE1<span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#41;</span>
&nbsp;
TESTDB1 <span style="color: #66cc66;">=</span>
  <span style="color: #66cc66;">&#40;</span>DESCRIPTION <span style="color: #66cc66;">=</span>
    <span style="color: #66cc66;">&#40;</span>ADDRESS <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span>PROTOCOL <span style="color: #66cc66;">=</span> TCP<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>HOST <span style="color: #66cc66;">=</span> oravm1<span style="color: #66cc66;">.</span>intra<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>PORT <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1522</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#40;</span>CONNECT_DATA <span style="color: #66cc66;">=</span>
      <span style="color: #66cc66;">&#40;</span>SERVER <span style="color: #66cc66;">=</span> DEDICATED<span style="color: #66cc66;">&#41;</span>
      <span style="color: #66cc66;">&#40;</span>SERVICE_NAME <span style="color: #66cc66;">=</span> TESTDB1<span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#41;</span>
&nbsp;
Test interactive Password:
&nbsp;
<span style="color: #66cc66;">&#91;</span>techuser2@oravm1 instantclient_11_2<span style="color: #66cc66;">&#93;</span>$ sqlplus ro_user@TESTDB2_ro
&nbsp;
SQL<span style="color: #66cc66;">*</span>Plus: Release 11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>3<span style="color: #66cc66;">.</span>0 Production <span style="color: #993333; font-weight: bold;">ON</span> Thu Mar <span style="color: #cc66cc;">1</span> <span style="color: #cc66cc;">11</span>:<span style="color: #cc66cc;">28</span>:<span style="color: #cc66cc;">53</span> <span style="color: #cc66cc;">2012</span>
&nbsp;
Copyright <span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">&#41;</span> <span style="color: #cc66cc;">1982</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">2011</span><span style="color: #66cc66;">,</span> Oracle<span style="color: #66cc66;">.</span>  <span style="color: #993333; font-weight: bold;">ALL</span> rights reserved<span style="color: #66cc66;">.</span>
&nbsp;
Enter password:
&nbsp;
Connected <span style="color: #993333; font-weight: bold;">TO</span>:
Oracle <span style="color: #993333; font-weight: bold;">DATABASE</span> 11g Enterprise Edition Release 11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>3<span style="color: #66cc66;">.</span>0 <span style="color: #66cc66;">-</span> 64bit Production
<span style="color: #993333; font-weight: bold;">WITH</span> the Partitioning<span style="color: #66cc66;">,</span> OLAP<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">DATA</span> Mining <span style="color: #993333; font-weight: bold;">AND</span> Real Application Testing options
&nbsp;
SQL&amp;gt; quit
&nbsp;
Problem: no mkstore Tool <span style="color: #993333; font-weight: bold;">IN</span> Instantclient
Workaround: <span style="color: #993333; font-weight: bold;">CREATE</span> wallet <span style="color: #993333; font-weight: bold;">WITH</span> oracle  binaries owner <span style="color: #993333; font-weight: bold;">AND</span> copy afterwards
&nbsp;
<span style="color: #66cc66;">&#91;</span>oracle@oravm1 ~<span style="color: #66cc66;">&#93;</span>$ mkdir <span style="color: #66cc66;">/</span>tmp<span style="color: #66cc66;">/</span>wallet
<span style="color: #66cc66;">&#91;</span>oracle@oravm1 ~<span style="color: #66cc66;">&#93;</span>$  <span style="color: #66cc66;">/</span>u01<span style="color: #66cc66;">/</span>app<span style="color: #66cc66;">/</span>oracle<span style="color: #66cc66;">/</span>product<span style="color: #66cc66;">/</span>11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">/</span>dbhome_1<span style="color: #66cc66;">/</span>bin<span style="color: #66cc66;">/</span>mkstore \
<span style="color: #66cc66;">-</span>wrl <span style="color: #66cc66;">/</span>tmp<span style="color: #66cc66;">/</span>wallet <span style="color: #66cc66;">-</span><span style="color: #993333; font-weight: bold;">CREATE</span>
Oracle Secret Store Tool : Version 11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>3<span style="color: #66cc66;">.</span>0 <span style="color: #66cc66;">-</span> Production
Copyright <span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">&#41;</span> <span style="color: #cc66cc;">2004</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">2011</span><span style="color: #66cc66;">,</span> Oracle <span style="color: #993333; font-weight: bold;">AND</span><span style="color: #66cc66;">/</span><span style="color: #993333; font-weight: bold;">OR</span> its affiliates<span style="color: #66cc66;">.</span> <span style="color: #993333; font-weight: bold;">ALL</span> rights reserved<span style="color: #66cc66;">.</span>
&nbsp;
Enter password:
Enter password again:
<span style="color: #66cc66;">&#91;</span>oracle@oravm1 ~<span style="color: #66cc66;">&#93;</span>$
<span style="color: #66cc66;">&#91;</span>oracle@oravm1 ~<span style="color: #66cc66;">&#93;</span>$
<span style="color: #66cc66;">&#91;</span>oracle@oravm1 ~<span style="color: #66cc66;">&#93;</span>$
<span style="color: #66cc66;">&#91;</span>oracle@oravm1 ~<span style="color: #66cc66;">&#93;</span>$
<span style="color: #66cc66;">&#91;</span>oracle@oravm1 ~<span style="color: #66cc66;">&#93;</span>$ <span style="color: #66cc66;">/</span>u01<span style="color: #66cc66;">/</span>app<span style="color: #66cc66;">/</span>oracle<span style="color: #66cc66;">/</span>product<span style="color: #66cc66;">/</span>11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">/</span>dbhome_1<span style="color: #66cc66;">/</span>bin<span style="color: #66cc66;">/</span>mkstore \
<span style="color: #66cc66;">-</span>wrl <span style="color: #66cc66;">/</span>tmp<span style="color: #66cc66;">/</span>wallet <span style="color: #66cc66;">-</span>createCredential TESTDB2_ro ro_user ro_password
Oracle Secret Store Tool : Version 11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>3<span style="color: #66cc66;">.</span>0 <span style="color: #66cc66;">-</span> Production
Copyright <span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">&#41;</span> <span style="color: #cc66cc;">2004</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">2011</span><span style="color: #66cc66;">,</span> Oracle <span style="color: #993333; font-weight: bold;">AND</span><span style="color: #66cc66;">/</span><span style="color: #993333; font-weight: bold;">OR</span> its affiliates<span style="color: #66cc66;">.</span> <span style="color: #993333; font-weight: bold;">ALL</span> rights reserved<span style="color: #66cc66;">.</span>
&nbsp;
Enter wallet password:
&nbsp;
<span style="color: #993333; font-weight: bold;">CREATE</span> credential oracle<span style="color: #66cc66;">.</span>security<span style="color: #66cc66;">.</span>client<span style="color: #66cc66;">.</span>connect_string1
<span style="color: #66cc66;">&#91;</span>oracle@oravm1 ~<span style="color: #66cc66;">&#93;</span>$ <span style="color: #66cc66;">/</span>u01<span style="color: #66cc66;">/</span>app<span style="color: #66cc66;">/</span>oracle<span style="color: #66cc66;">/</span>product<span style="color: #66cc66;">/</span>11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">/</span>dbhome_1<span style="color: #66cc66;">/</span>bin<span style="color: #66cc66;">/</span>mkstore \
<span style="color: #66cc66;">-</span>wrl <span style="color: #66cc66;">/</span>tmp<span style="color: #66cc66;">/</span>wallet <span style="color: #66cc66;">-</span>createCredential TESTDB1 rw_user rw_password
Oracle Secret Store Tool : Version 11<span style="color: #66cc66;">.</span>2<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>3<span style="color: #66cc66;">.</span>0 <span style="color: #66cc66;">-</span> Production
Copyright <span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">&#41;</span> <span style="color: #cc66cc;">2004</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">2011</span><span style="color: #66cc66;">,</span> Oracle <span style="color: #993333; font-weight: bold;">AND</span><span style="color: #66cc66;">/</span><span style="color: #993333; font-weight: bold;">OR</span> its affiliates<span style="color: #66cc66;">.</span> <span style="color: #993333; font-weight: bold;">ALL</span> rights reserved<span style="color: #66cc66;">.</span>
&nbsp;
Enter wallet password:
<span style="color: #993333; font-weight: bold;">CREATE</span> credential oracle<span style="color: #66cc66;">.</span>security<span style="color: #66cc66;">.</span>client<span style="color: #66cc66;">.</span>connect_string2
&nbsp;
<span style="color: #66cc66;">&#91;</span>techuser2@oravm1 wallet<span style="color: #66cc66;">&#93;</span>$ ls <span style="color: #66cc66;">-</span>al
total <span style="color: #cc66cc;">28</span>
drwxr<span style="color: #66cc66;">-</span>xr<span style="color: #66cc66;">-</span>x  <span style="color: #cc66cc;">2</span> oracle oinstall <span style="color: #cc66cc;">4096</span> Mar  <span style="color: #cc66cc;">1</span> <span style="color: #cc66cc;">11</span>:<span style="color: #cc66cc;">32</span> <span style="color: #66cc66;">.</span>
drwxrwxrwt <span style="color: #cc66cc;">31</span> root   root     <span style="color: #cc66cc;">4096</span> Mar  <span style="color: #cc66cc;">1</span> <span style="color: #cc66cc;">11</span>:<span style="color: #cc66cc;">32</span> <span style="color: #66cc66;">..</span>
<span style="color: #66cc66;">-</span>rw<span style="color: #808080; font-style: italic;">-------  1 oracle oinstall 4333 Mar  1 11:33 cwallet.sso</span>
<span style="color: #66cc66;">-</span>rw<span style="color: #808080; font-style: italic;">-------  1 oracle oinstall 4256 Mar  1 11:33 ewallet.p12</span>
&nbsp;
<span style="color: #66cc66;">&#91;</span>root@oravm1 techuser2<span style="color: #66cc66;">&#93;</span><span style="color: #808080; font-style: italic;"># chown -R techuser2:techuser2 /tmp/wallet</span>
&nbsp;
<span style="color: #66cc66;">&#91;</span>root@oravm1 techuser2<span style="color: #66cc66;">&#93;</span><span style="color: #808080; font-style: italic;"># ls -la /tmp/wallet/</span>
total <span style="color: #cc66cc;">28</span>
drwxr<span style="color: #66cc66;">-</span>xr<span style="color: #66cc66;">-</span>x  <span style="color: #cc66cc;">2</span> techuser2 techuser2 <span style="color: #cc66cc;">4096</span> Mar  <span style="color: #cc66cc;">1</span> <span style="color: #cc66cc;">11</span>:<span style="color: #cc66cc;">32</span> <span style="color: #66cc66;">.</span>
drwxrwxrwt <span style="color: #cc66cc;">31</span> root      root      <span style="color: #cc66cc;">4096</span> Mar  <span style="color: #cc66cc;">1</span> <span style="color: #cc66cc;">11</span>:<span style="color: #cc66cc;">35</span> <span style="color: #66cc66;">..</span>
<span style="color: #66cc66;">-</span>rw<span style="color: #808080; font-style: italic;">-------  1 techuser2 techuser2 4333 Mar  1 11:33 cwallet.sso</span>
<span style="color: #66cc66;">-</span>rw<span style="color: #808080; font-style: italic;">-------  1 techuser2 techuser2 4256 Mar  1 11:33 ewallet.p12</span>
&nbsp;
<span style="color: #66cc66;">&#91;</span>techuser2@oravm1 wallet<span style="color: #66cc66;">&#93;</span>$ pwd
<span style="color: #66cc66;">/</span>home<span style="color: #66cc66;">/</span>techuser2<span style="color: #66cc66;">/</span>oracle<span style="color: #66cc66;">/</span>network<span style="color: #66cc66;">/</span>wallet
<span style="color: #66cc66;">&#91;</span>techuser2@oravm1 wallet<span style="color: #66cc66;">&#93;</span>$ mv <span style="color: #66cc66;">/</span>tmp<span style="color: #66cc66;">/</span>wallet<span style="color: #808080; font-style: italic;">/* .
[techuser2@oravm1 wallet]$ ls -la
total 24
drwxrwxr-x 2 techuser2 techuser2 4096 Mar  1 11:36 .
drwxrwxr-x 4 techuser2 techuser2 4096 Mar  1 11:25 ..
-rw------- 1 techuser2 techuser2 4333 Mar  1 11:33 cwallet.sso
-rw------- 1 techuser2 techuser2 4256 Mar  1 11:33 ewallet.p12
&nbsp;
[techuser2@oravm1 wallet]$ sqlplus /@TESTDB2_ro
&nbsp;
SQL*Plus: Release 11.2.0.3.0 Production on Thu Mar 1 11:36:58 2012
&nbsp;
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
&nbsp;
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
&nbsp;
SQL&amp;gt; show user
USER is &quot;RO_USER&quot;
SQL&amp;gt; quit
&nbsp;
[techuser2@oravm1 wallet]$ sqlplus /@TESTDB1
&nbsp;
SQL*Plus: Release 11.2.0.3.0 Production on Thu Mar 1 11:38:06 2012
&nbsp;
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
&nbsp;
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
&nbsp;
SQL&amp;gt; show user
USER is &quot;RW_USER&quot;</span></pre></div></div>

<h2><a name="135cdd8931946f11_referenz">Referenz:</a></h2>
<div>
<ul>
<li>
<div><a title="http://www.oracle.com/technetwork/database/security/twp-db-security-secure-ext-pwd-stor-133399.pdf" rel="nofollow" href="http://www.oracle.com/technetwork/database/security/twp-db-security-secure-ext-pwd-stor-133399.pdf" target="_blank">http://www.oracle.com/technetwork/database/security/twp-db-security-secure-ext-pwd-stor-133399.pdf</a></div>
</li>
<li>
<div>Using The Secure External Password Store [ID 340559.1]</div>
</li>
<li>
<div>How To Change The Wallet Password For A Secure External Password Store? [ID 557382.1]</div>
</li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2012/03/08/no-more-cleartext-passwords-in-scripts-oracle-secure-external-password-store-seps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bug: ORA-4031 for subheap &#8220;KTC latch subh&#8221; in 11.2.0.3</title>
		<link>http://www.ora-solutions.net/web/2012/01/25/bug-ora-4031-for-subheap-ktc-latch-subh-in-11-2-0-3/</link>
		<comments>http://www.ora-solutions.net/web/2012/01/25/bug-ora-4031-for-subheap-ktc-latch-subh-in-11-2-0-3/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 14:04:18 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[11gR2]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Oracle Database]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=1135</guid>
		<description><![CDATA[I just saw MOS Note ORA-4031 After Upgrade From 11.2.0.1 To 11.2.0.3 With Leak in &#8216;KTC latch subh&#8217; Subheaps [ID 1398984.1] giving very little information about this bug. At the time of this writing, there is no patch available but I expect it to be in a few days. I have checked some 11.2.0.3 instances [...]]]></description>
			<content:encoded><![CDATA[<p>I just saw MOS Note</p>
<blockquote><p>ORA-4031 After Upgrade From 11.2.0.1 To 11.2.0.3 With Leak in &#8216;KTC latch subh&#8217; Subheaps [ID 1398984.1]</p></blockquote>
<p>giving very little information about this bug. At the time of this writing, there is no patch available but I expect it to be in a few days. I have checked some 11.2.0.3 instances and found only one with &gt; 60 MB for this subheap.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2012/01/25/bug-ora-4031-for-subheap-ktc-latch-subh-in-11-2-0-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle SCN Problem</title>
		<link>http://www.ora-solutions.net/web/2012/01/19/oracle-scn-problem/</link>
		<comments>http://www.ora-solutions.net/web/2012/01/19/oracle-scn-problem/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 21:56:52 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[11g]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Oracle Database]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=1125</guid>
		<description><![CDATA[In case you have not heard all the buzz about the Oracle SCN flaw, which was published by Infoworld after the release of January CPU, I summarize the essentials. There is a risk that the SCN reaches it´s maximum value and this could lead to an outage of the database. There is a bug in [...]]]></description>
			<content:encoded><![CDATA[<p>In case you have not heard all the buzz about the Oracle SCN flaw, which was published by <a href="http://www.infoworld.com/d/security/fundamental-oracle-flaw-revealed-184163-0">Infoworld</a> after the release of January CPU, I summarize the essentials.</p>
<ul>
<li>There is a risk that the SCN reaches it´s maximum value and this could lead to an outage of the database.</li>
<li>There is a bug in &#8220;ALTER DATABASE BEGIN BACKUP&#8221;, which increases the SCN dramatically. (Bug 12371955 &#8211; fixed in 11.2.0.2.4 and others)</li>
<li>When you query a remote database via database link from a database with elevated SCN, the remote SCN gets increased to the higher value as well. This has the dramatic effect, that a database will infect the other database.</li>
<li>Imagine an unpatched environment with user-managed online backups (e.g. for SAN split mirror technology) and dozens of interconnected databases with database links.</li>
<li>Now imagine an evil employee with this little innocent database account with only &#8220;create session&#8221; privilege  &#8230; you get the picture.</li>
<li>The January 2012 CPU/PSU contains a patch that should restrict the ways to increase the SCN. However, I am not sure that the issue with db links is solved. I could bump up the SCN to 12562779343042 by a remote select even after patching with CPU January 2012.</li>
</ul>
<p>Additionally, there are already quite a few articles showing how a potential attacker could use this flaw, e.g. <a href="http://www.gokhanatil.com/2012/01/fundamental-oracle-flaw-revealed-lets.html ">this one.</a></p>
<p>References:</p>
<ul>
<li><span style="font-family: helvetica;">Information on the System Change Number (SCN) and how it is used in the Oracle Database [ID 1376995.1]</span></li>
<li><span style="font-family: helvetica;">Installing, Executing and Interpreting output from the &#8220;scnhealthcheck.sql&#8221; script [ID 1393363.1]</span></li>
<li><span style="font-family: helvetica;">Bug 12371955 &#8211; Backup task can cause increased SCN growth rate leading to ORA-600 [2252] errors [ID 12371955.8]<strong><br />
</strong></span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2012/01/19/oracle-scn-problem/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RDBMS 11.2.0.2: unrecoverable operations of Compression Advisor running daily</title>
		<link>http://www.ora-solutions.net/web/2011/10/20/rdbms-11-2-0-2-unrecoverable-operations-of-compression-advisor-running-daily/</link>
		<comments>http://www.ora-solutions.net/web/2011/10/20/rdbms-11-2-0-2-unrecoverable-operations-of-compression-advisor-running-daily/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 16:35:55 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[11gR2]]></category>
		<category><![CDATA[Oracle Database]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=1109</guid>
		<description><![CDATA[At one of my customers, we wondered about some entries in v$datafile.unrecoverable_change# for the most critical tablespace of the application. Certainly no application components were allowed to perform nologging operations for segments inside this tablespace and yet there was evidence that &#8220;something&#8221; was done with nologging. The unrecoverable_time was shortly after 10 pm The ASH [...]]]></description>
			<content:encoded><![CDATA[<p>At one of my customers, we wondered about some entries in v$datafile.unrecoverable_change# for the most critical tablespace of the application. Certainly no application components were allowed to perform nologging operations for segments inside this tablespace and yet there was evidence that &#8220;something&#8221; was done with nologging.</p>
<ul>
<li>The unrecoverable_time was shortly after 10 pm</li>
<li>The ASH data covering this time period showed activity by DBMS_SCHEDULER and Autotask Jobs.</li>
<li>An internal DDL log table showed the following operations:</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">&quot;MYOWNER&quot;</span><span style="color: #66cc66;">.</span>DBMS_TABCOMP_TEMP_UNCMP
tablespace <span style="color: #ff0000;">&quot;DAT_MYOWNER&quot;</span> nologging
<span style="color: #993333; font-weight: bold;">AS</span>
<span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #808080; font-style: italic;">/*+ FULL(&quot;MYOWNER&quot;.&quot;MYTAB&quot;) */</span> <span style="color: #66cc66;">*</span>  <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #ff0000;">&quot;MYOWNER&quot;</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">&quot;MYTAB&quot;</span>  sample block<span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">3.55</span><span style="color: #66cc66;">&#41;</span> mytab ;   
&nbsp;
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">&quot;MYOWNER&quot;</span><span style="color: #66cc66;">.</span>DBMS_TABCOMP_TEMP_CMP ORGANIZATION HEAP
TABLESPACE <span style="color: #ff0000;">&quot;DAT_MYOWNER&quot;</span>
COMPRESS <span style="color: #993333; font-weight: bold;">FOR</span> <span style="color: #993333; font-weight: bold;">ALL</span> OPERATIONS
NOLOGGING
<span style="color: #993333; font-weight: bold;">AS</span>
<span style="color: #993333; font-weight: bold;">SELECT</span>  <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #ff0000;">&quot;MYOWNER&quot;</span><span style="color: #66cc66;">.</span>DBMS_TABCOMP_TEMP_UNCMP MYTAB;
&nbsp;
<span style="color: #993333; font-weight: bold;">DROP</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">&quot;MYOWNER&quot;</span><span style="color: #66cc66;">.</span>DBMS_TABCOMP_TEMP_UNCMP PURGE;
<span style="color: #993333; font-weight: bold;">DROP</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">&quot;MYOWNER&quot;</span><span style="color: #66cc66;">.</span>DBMS_TABCOMP_TEMP_CMP purge;</pre></div></div>

<p><strong>Summary:</strong></p>
<p>I find it suboptimal that Compression Advisor is executed on a daily basis during the maintenance window and that the Compression Advisor can not be seperately disabled without also disabling the Segment Advisor. (Although there is supposed to be an enhancement request open for this.)</p>
<p>In addition to that, it is more than problematic that the is using the user tablespace, which could lead to tablespace pressure and that the operations are performed as unrecoverable and therefore logged in v$datafile.unrecoverable_time, overwriting potential important information of real &#8220;user&#8221; operations performing with NOLOGGING.</p>
<p>More information about Compression Advisor can be found in MOS Note: How Does Compression Advisor Work? [ID 1284972.1]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2011/10/20/rdbms-11-2-0-2-unrecoverable-operations-of-compression-advisor-running-daily/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Workaround for ORA-600/ORA-7445 with SQL Repair Advisor</title>
		<link>http://www.ora-solutions.net/web/2011/07/26/workaround-for-ora-600ora-7445-with-sql-repair-advisor/</link>
		<comments>http://www.ora-solutions.net/web/2011/07/26/workaround-for-ora-600ora-7445-with-sql-repair-advisor/#comments</comments>
		<pubDate>Tue, 26 Jul 2011 16:14:47 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[11gR2]]></category>
		<category><![CDATA[Oracle Database]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=1096</guid>
		<description><![CDATA[From time to time we hit Errors like ORA-600 or ORA-7445, which are triggered by specific SQL statements. For these cases, Oracle developed the SQL Repair Advisor. This is a short demonstration of utilizing the SQL Repair Advisor to avoid ORA-7445 caused by a SQL statement. SQL and Error: 1 2 3 4 5 6 [...]]]></description>
			<content:encoded><![CDATA[<p>From time to time we hit Errors like ORA-600 or ORA-7445, which are triggered by specific SQL statements. For these cases, Oracle developed the SQL Repair Advisor. This is a short demonstration of utilizing the SQL Repair Advisor to avoid ORA-7445 caused by a SQL statement.</p>
<p><strong>SQL and Error:</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span>
EXTRACT<span style="color: #66cc66;">&#40;</span>YEAR <span style="color: #993333; font-weight: bold;">FROM</span> date_new<span style="color: #66cc66;">&#41;</span> jahr<span style="color: #66cc66;">,</span>
EXTRACT<span style="color: #66cc66;">&#40;</span>MONTH <span style="color: #993333; font-weight: bold;">FROM</span> date_new<span style="color: #66cc66;">&#41;</span> monat<span style="color: #66cc66;">,</span>
COUNT<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">DISTINCT</span> TRUNC<span style="color: #66cc66;">&#40;</span>date_new<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> arbeitstage<span style="color: #66cc66;">,</span>
SUM<span style="color: #66cc66;">&#40;</span>CASE WHEN STRING1 <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> STRING1
<span style="color: #993333; font-weight: bold;">FROM</span> MD<span style="color: #66cc66;">.</span>MD1
<span style="color: #993333; font-weight: bold;">WHERE</span> STRING1_GROUP <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'CUST'</span><span style="color: #66cc66;">&#41;</span>
THEN
DECODE<span style="color: #66cc66;">&#40;</span>FLAG<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'J'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
ELSE
<span style="color: #cc66cc;">0</span>
END<span style="color: #66cc66;">&#41;</span> cust_flag
<span style="color: #993333; font-weight: bold;">FROM</span>
SCHEMA<span style="color: #66cc66;">.</span>TAB1
<span style="color: #993333; font-weight: bold;">WHERE</span>
date_new <span style="color: #993333; font-weight: bold;">BETWEEN</span> TO_DATE<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">201101</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'yyyymm'</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #993333; font-weight: bold;">AND</span> ADD_MONTHS<span style="color: #66cc66;">&#40;</span>TO_DATE<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">201107</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'yyyymm'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span>
EXTRACT<span style="color: #66cc66;">&#40;</span>YEAR <span style="color: #993333; font-weight: bold;">FROM</span> date_new<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
EXTRACT<span style="color: #66cc66;">&#40;</span>MONTH <span style="color: #993333; font-weight: bold;">FROM</span> date_new<span style="color: #66cc66;">&#41;</span>
<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">2</span>;
&nbsp;
ERROR at line <span style="color: #cc66cc;">6</span>:
ORA<span style="color: #66cc66;">-</span>03113: end<span style="color: #66cc66;">-</span>of<span style="color: #66cc66;">-</span>file <span style="color: #993333; font-weight: bold;">ON</span> communication channel
Process ID: <span style="color: #cc66cc;">7746</span>
Session ID: <span style="color: #cc66cc;">737</span> Serial number: <span style="color: #cc66cc;">9823</span>
&nbsp;
Tue Jul <span style="color: #cc66cc;">26</span> <span style="color: #cc66cc;">15</span>:<span style="color: #cc66cc;">19</span>:<span style="color: #cc66cc;">41</span> <span style="color: #cc66cc;">2011</span>
Exception <span style="color: #66cc66;">&#91;</span>type: SIGSEGV<span style="color: #66cc66;">,</span> Address <span style="color: #993333; font-weight: bold;">NOT</span> mapped <span style="color: #993333; font-weight: bold;">TO</span> object<span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#91;</span>ADDR:0xA<span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#91;</span>PC:0x888A3C9<span style="color: #66cc66;">,</span> xtyqbcb<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">+</span><span style="color: #cc66cc;">413</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">...</span>
ORA<span style="color: #66cc66;">-</span>07445: exception encountered: core dump <span style="color: #66cc66;">&#91;</span>xtyqbcb<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">+</span><span style="color: #cc66cc;">413</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#91;</span>SIGSEGV<span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#91;</span>ADDR:0xA<span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#91;</span>PC:0x888A3C9<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">...</span></pre></td></tr></table></div>

<p><strong>Execution of SQL Repair Advisor:</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;">DECLARE
  rep_out CLOB;
  t_id VARCHAR2<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">50</span><span style="color: #66cc66;">&#41;</span>;
BEGIN
  T_ID :<span style="color: #66cc66;">=</span> DBMS_SQLDIAG<span style="color: #66cc66;">.</span>CREATE_DIAGNOSIS_TASK<span style="color: #66cc66;">&#40;</span> 
  sql_text <span style="color: #66cc66;">=&gt;</span> q<span style="color: #ff0000;">'#SELECT
EXTRACT(YEAR FROM date_new) jahr,
EXTRACT(MONTH FROM date_new) monat,
COUNT(DISTINCT TRUNC(date_new)) arbeitstage,
SUM(CASE WHEN STRING1 IN (SELECT STRING1
FROM MD.MD1
WHERE STRING1_GROUP = '</span>CUST<span style="color: #ff0000;">')
THEN
DECODE(FLAG, '</span>J<span style="color: #ff0000;">', 1, 0)
ELSE
0
END) cust_flag
FROM
SCHEMA.TAB1
WHERE
date_new BETWEEN TO_DATE(201101, '</span>yyyymm<span style="color: #ff0000;">')
AND ADD_MONTHS(TO_DATE(201107, '</span>yyyymm<span style="color: #ff0000;">'), 1)
GROUP BY
EXTRACT(YEAR FROM date_new),
EXTRACT(MONTH FROM date_new)
ORDER BY 1,2#'</span><span style="color: #66cc66;">,</span> 
  task_name <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000;">'ORA7445-xtyqbcb'</span><span style="color: #66cc66;">,</span> 
  problem_type <span style="color: #66cc66;">=&gt;</span>DBMS_SQLDIAG<span style="color: #66cc66;">.</span>PROBLEM_TYPE_COMPILATION_ERROR
  <span style="color: #66cc66;">&#41;</span>;
  DBMS_SQLDIAG<span style="color: #66cc66;">.</span>EXECUTE_DIAGNOSIS_TASK <span style="color: #66cc66;">&#40;</span>t_id<span style="color: #66cc66;">&#41;</span>;
  rep_out :<span style="color: #66cc66;">=</span> DBMS_SQLDIAG<span style="color: #66cc66;">.</span>REPORT_DIAGNOSIS_TASK <span style="color: #66cc66;">&#40;</span>t_id<span style="color: #66cc66;">,</span> DBMS_SQLDIAG<span style="color: #66cc66;">.</span>TYPE_TEXT<span style="color: #66cc66;">&#41;</span>;
  DBMS_OUTPUT<span style="color: #66cc66;">.</span>PUT_LINE <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Report : '</span> <span style="color: #66cc66;">||</span> rep_out<span style="color: #66cc66;">&#41;</span>;
END;
<span style="color: #66cc66;">/</span>
&nbsp;
<span style="color: #66cc66;">&lt;</span>strong<span style="color: #66cc66;">&gt;</span>Output:<span style="color: #66cc66;">&lt;/</span>strong<span style="color: #66cc66;">&gt;</span>
&nbsp;
Report : GENERAL INFORMATION SECTION
<span style="color: #808080; font-style: italic;">-------------------------------------------------------------------------------</span>
Tuning Task Name   : ORA7445<span style="color: #66cc66;">-</span>xtyqbcb
Tuning Task Owner  : SYS
Workload Type      : Single SQL Statement
Scope              : COMPREHENSIVE
Time <span style="color: #993333; font-weight: bold;">LIMIT</span><span style="color: #66cc66;">&#40;</span>seconds<span style="color: #66cc66;">&#41;</span>:
<span style="color: #cc66cc;">1800</span>
Completion <span style="color: #993333; font-weight: bold;">STATUS</span>  : COMPLETED
Started at         : 07<span style="color: #66cc66;">/</span><span style="color: #cc66cc;">26</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2011</span> <span style="color: #cc66cc;">15</span>:<span style="color: #cc66cc;">46</span>:<span style="color: #cc66cc;">38</span>
Completed at       : 07<span style="color: #66cc66;">/</span><span style="color: #cc66cc;">26</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2011</span> <span style="color: #cc66cc;">15</span>:<span style="color: #cc66cc;">46</span>:<span style="color: #cc66cc;">38</span>
&nbsp;
<span style="color: #808080; font-style: italic;">-------------------------------------------------------------------------------</span>
Schema Name: SYS
SQL ID     : 39ac71hjcn0rt
<span style="color: #66cc66;">...</span>
&nbsp;
<span style="color: #808080; font-style: italic;">-------------------------------------------------------------------------------</span>
FINDINGS SECTION <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>
finding<span style="color: #66cc66;">&#41;</span>
<span style="color: #808080; font-style: italic;">-------------------------------------------------------------------------------</span>
&nbsp;
<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">-</span> SQL Patch Finding <span style="color: #66cc66;">&#40;</span>see <span style="color: #993333; font-weight: bold;">EXPLAIN</span> plans section below<span style="color: #66cc66;">&#41;</span>
<span style="color: #808080; font-style: italic;">------------------------------------------------------</span>
  A potentially better execution plan was found <span style="color: #993333; font-weight: bold;">FOR</span> this statement<span style="color: #66cc66;">.</span>
&nbsp;
  Recommendation
&nbsp;
&nbsp;
<span style="color: #808080; font-style: italic;">--------------</span>
  <span style="color: #66cc66;">-</span> Consider accepting the recommended SQL patch<span style="color: #66cc66;">.</span>
    execute dbms_sqldiag<span style="color: #66cc66;">.</span>accept_sql_patch<span style="color: #66cc66;">&#40;</span>task_name <span style="color: #66cc66;">=&gt;</span>
            <span style="color: #ff0000;">'ORA7445-xtyqbcb'</span><span style="color: #66cc66;">,</span> task_owner <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000;">'SYS'</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">REPLACE</span> <span style="color: #66cc66;">=&gt;</span> TRUE<span style="color: #66cc66;">&#41;</span>;
&nbsp;
  Rationale
  <span style="color: #808080; font-style: italic;">---------</span>
    Recommended plan <span style="color: #993333; font-weight: bold;">WITH</span> hash value <span style="color: #cc66cc;">1503213169</span> has number of rows <span style="color: #cc66cc;">7</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CHECK</span>
&nbsp;
sum <span style="color: #cc66cc;">13925076401</span><span style="color: #66cc66;">,</span> execution time <span style="color: #cc66cc;">264</span> <span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #cc66cc;">1972</span> buffer gets
&nbsp;
<span style="color: #808080; font-style: italic;">-------------------------------------------------------------------------------</span>
&nbsp;
&nbsp;
&nbsp;
PL<span style="color: #66cc66;">/</span>SQL procedure successfully completed<span style="color: #66cc66;">.</span></pre></td></tr></table></div>

<p><strong>Activation:</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"> begin dbms_sqldiag<span style="color: #66cc66;">.</span>accept_sql_patch<span style="color: #66cc66;">&#40;</span>
      task_name <span style="color: #66cc66;">=&gt;</span><span style="color: #ff0000;">'ORA7445-xtyqbcb'</span><span style="color: #66cc66;">,</span> 
      task_owner <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000;">'SYS'</span><span style="color: #66cc66;">,</span> 
      <span style="color: #993333; font-weight: bold;">REPLACE</span> <span style="color: #66cc66;">=&gt;</span> TRUE<span style="color: #66cc66;">&#41;</span>;
end;
<span style="color: #66cc66;">/</span></pre></td></tr></table></div>

<p><strong>Test:</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span>
EXTRACT<span style="color: #66cc66;">&#40;</span>YEAR <span style="color: #993333; font-weight: bold;">FROM</span> date_new<span style="color: #66cc66;">&#41;</span> jahr<span style="color: #66cc66;">,</span>
EXTRACT<span style="color: #66cc66;">&#40;</span>MONTH <span style="color: #993333; font-weight: bold;">FROM</span> date_new<span style="color: #66cc66;">&#41;</span> monat<span style="color: #66cc66;">,</span>
COUNT<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">DISTINCT</span> TRUNC<span style="color: #66cc66;">&#40;</span>date_new<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> arbeitstage<span style="color: #66cc66;">,</span>
SUM<span style="color: #66cc66;">&#40;</span>CASE WHEN STRING1 <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> STRING1
<span style="color: #993333; font-weight: bold;">FROM</span> MD<span style="color: #66cc66;">.</span>MD1
<span style="color: #993333; font-weight: bold;">WHERE</span> STRING1_GROUP <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'CUST'</span><span style="color: #66cc66;">&#41;</span>
THEN
DECODE<span style="color: #66cc66;">&#40;</span>FLAG<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'J'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
ELSE
<span style="color: #cc66cc;">0</span>
END<span style="color: #66cc66;">&#41;</span> cust_flag
<span style="color: #993333; font-weight: bold;">FROM</span>
SCHEMA<span style="color: #66cc66;">.</span>TAB1
<span style="color: #993333; font-weight: bold;">WHERE</span>
date_new <span style="color: #993333; font-weight: bold;">BETWEEN</span> TO_DATE<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">201101</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'yyyymm'</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #993333; font-weight: bold;">AND</span> ADD_MONTHS<span style="color: #66cc66;">&#40;</span>TO_DATE<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">201107</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'yyyymm'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span>
EXTRACT<span style="color: #66cc66;">&#40;</span>YEAR <span style="color: #993333; font-weight: bold;">FROM</span> date_new<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
EXTRACT<span style="color: #66cc66;">&#40;</span>MONTH <span style="color: #993333; font-weight: bold;">FROM</span> date_new<span style="color: #66cc66;">&#41;</span>
<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">2</span>;
&nbsp;
      JAHR      MONAT ARBEITSTAGE CUST_FLAG
<span style="color: #808080; font-style: italic;">---------- ---------- ----------- ----------------</span>
      <span style="color: #cc66cc;">2011</span>          <span style="color: #cc66cc;">1</span>          <span style="color: #cc66cc;">20</span>                <span style="color: #cc66cc;">0</span>
&nbsp;
&nbsp;
<span style="color: #cc66cc;">7</span> rows selected<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #993333; font-weight: bold;">TABLE</span><span style="color: #66cc66;">&#40;</span>dbms_xplan<span style="color: #66cc66;">.</span>display_cursor<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'ADVANCED'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
PLAN_TABLE_OUTPUT
<span style="color: #808080; font-style: italic;">---------------------</span>
SQL_ID  5wdztx81x0r8f<span style="color: #66cc66;">,</span> child number <span style="color: #cc66cc;">0</span>
<span style="color: #808080; font-style: italic;">-------------------------------------</span>
&nbsp;
&nbsp;
Plan hash value: <span style="color: #cc66cc;">1503213169</span>
&nbsp;
<span style="color: #808080; font-style: italic;">-----------------------------------------------------------------------------------------------</span>
<span style="color: #66cc66;">|</span> Id  <span style="color: #66cc66;">|</span> Operation          <span style="color: #66cc66;">|</span> Name             <span style="color: #66cc66;">|</span> Rows  <span style="color: #66cc66;">|</span> Bytes <span style="color: #66cc66;">|</span>TempSpc<span style="color: #66cc66;">|</span> Cost <span style="color: #66cc66;">&#40;</span>%CPU<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> Time     <span style="color: #66cc66;">|</span>
<span style="color: #808080; font-style: italic;">-----------------------------------------------------------------------------------------------</span>
<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">|</span> <span style="color: #993333; font-weight: bold;">SELECT</span> STATEMENT   <span style="color: #66cc66;">|</span>                  <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">591</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span>          <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|*</span>  <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span>  <span style="color: #993333; font-weight: bold;">TABLE</span> ACCESS <span style="color: #993333; font-weight: bold;">FULL</span> <span style="color: #66cc66;">|</span> MD1              <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span>    <span style="color: #cc66cc;">12</span> <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">3</span>   <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:00:01 <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">|</span>  SORT <span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span>     <span style="color: #66cc66;">|</span>                  <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">27402</span> <span style="color: #66cc66;">|</span>   294K<span style="color: #66cc66;">|</span>  2776K<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">591</span>  <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">12</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:00:02 <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|*</span>  <span style="color: #cc66cc;">3</span> <span style="color: #66cc66;">|</span>   <span style="color: #993333; font-weight: bold;">TABLE</span> ACCESS <span style="color: #993333; font-weight: bold;">FULL</span><span style="color: #66cc66;">|</span> TAB1             <span style="color: #66cc66;">|</span>   117K<span style="color: #66cc66;">|</span>  1260K<span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">369</span>  <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:00:01 <span style="color: #66cc66;">|</span>
<span style="color: #808080; font-style: italic;">-----------------------------------------------------------------------------------------------</span>
&nbsp;
&nbsp;
<span style="color: #66cc66;">...</span>
&nbsp;
&nbsp;
Note
<span style="color: #808080; font-style: italic;">-----</span>
   <span style="color: #66cc66;">-</span> SQL patch <span style="color: #ff0000;">&quot;SYS_SQLPTCH_013166b4fb2a0001&quot;</span> used <span style="color: #993333; font-weight: bold;">FOR</span> this statement
&nbsp;
&nbsp;
<span style="color: #cc66cc;">66</span> rows selected<span style="color: #66cc66;">.</span></pre></td></tr></table></div>

<p><strong>Removal of SQL Patch:</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;">exec DBMS_SQLDIAG<span style="color: #66cc66;">.</span>DROP_SQL_PATCH <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'SYS_SQLPTCH_013166b4fb2a0001'</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p><strong>Deletion of SQL Diag Task:</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"> exec DBMS_SQLDIAG<span style="color: #66cc66;">.</span>DROP_DIAGNOSIS_TASK <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'ORA7445-xtyqbcb'</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2011/07/26/workaround-for-ora-600ora-7445-with-sql-repair-advisor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance Degradation for Query on DBA_SEGMENTS.BYTES in 11gR2</title>
		<link>http://www.ora-solutions.net/web/2011/07/18/performance-degradation-for-query-on-dba_segments-bytes-in-11gr2/</link>
		<comments>http://www.ora-solutions.net/web/2011/07/18/performance-degradation-for-query-on-dba_segments-bytes-in-11gr2/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 14:21:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[11gR2]]></category>
		<category><![CDATA[MetaLink]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Performance Tuning]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=1085</guid>
		<description><![CDATA[I have been troubleshooting a performance issue in a DWH environment, which is quite interesting. It was a query on DBA_SEGMENTS in 11gR2 with lots of partitions and it was taking almost 10 minutes versus only a few seconds in 10gR2. The problem could be stripped downt to this SQL query:]]></description>
			<content:encoded><![CDATA[<p>I have been troubleshooting a performance issue in a DWH environment, which is quite interesting. It was a query on DBA_SEGMENTS in 11gR2 with lots of partitions and it was taking almost 10 minutes versus only a few seconds in 10gR2. The problem could be stripped downt to this SQL query:</p>
<pre lang=SQL">select bytes from dba_segments</pre>
<p>The dba_segment view can be seen in DBA_VIEWS:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">...</span>
       decode<span style="color: #66cc66;">&#40;</span>bitand<span style="color: #66cc66;">&#40;</span>segment_flags<span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">131072</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">131072</span><span style="color: #66cc66;">,</span> blocks<span style="color: #66cc66;">,</span>
           <span style="color: #66cc66;">&#40;</span>decode<span style="color: #66cc66;">&#40;</span>bitand<span style="color: #66cc66;">&#40;</span>segment_flags<span style="color: #66cc66;">,</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span>
            <span style="color: #66cc66;">&lt;</span>strong<span style="color: #66cc66;">&gt;</span>dbms_space_admin<span style="color: #66cc66;">.</span>segment_number_blocks<span style="color: #66cc66;">&lt;/</span>strong<span style="color: #66cc66;">&gt;</span><span style="color: #66cc66;">&#40;</span>tablespace_id<span style="color: #66cc66;">,</span> relative_fno<span style="color: #66cc66;">,</span>
            header_block<span style="color: #66cc66;">,</span> segment_type_id<span style="color: #66cc66;">,</span> buffer_pool_id<span style="color: #66cc66;">,</span> segment_flags<span style="color: #66cc66;">,</span>
            segment_objd<span style="color: #66cc66;">,</span> blocks<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> blocks<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">*</span>blocksize<span style="color: #66cc66;">,</span>
      <span style="color: #66cc66;">...</span>
<span style="color: #993333; font-weight: bold;">FROM</span> sys_dba_segs</pre></div></div>

<p>The response time was dominated by Waits for &#8220;db file sequential reads&#8221; taking almost all of the response time.</p>
<p><strong>11gR2:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch    12563     23.17     546.74     157447     580414          1      188421
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total    12565     23.17     546.74     157447     580414          1      188421</pre></div></div>

<p><strong>10gR2:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.06       0.06          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch     5104      1.77       2.54          0      96688          0       76542
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total     5106      1.83       2.61          0      96688          0       76542</pre></div></div>

<p>The 10046 Trace File contains more data regarding those waits:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">WAIT #4: nam='db file sequential read' ela= 134 file#=21 block#=2313482 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 120 file#=15 block#=2128019 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 128 file#=21 block#=2313490 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 372 file#=21 block#=2313498 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 108 file#=21 block#=2313506 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 130 file#=21 block#=2313514 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 132 file#=21 block#=2313522 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 121 file#=21 block#=2313530 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 158 file#=15 block#=2128003 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 146 file#=21 block#=2313538 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 116 file#=21 block#=2313546 blocks=1 obj#=-1 
(Output modified for formatting)</pre></div></div>

<p>Strange thing that obj# is -1. I made some block dumps of those blocks and found out that all those blocks (file#/block#) have something in common: They were all segment header blocks. Another strange thing was that when the query was executed a second time, all those I/O requests were performed again &#8211; so no caching. </p>
<p>At that point, I opened a Support service request. After a couple of weeks, Support suggested running this for each tablespace of the user segments:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">exec  dbms_space_admin<span style="color: #66cc66;">.</span>TABLESPACE_FIX_SEGMENT_EXTBLKS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'&lt;tablespace_name&gt;'</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>Finally this fixed the problem. Now, we are trying to find out why this was necessary for a database, that was freshly created with dbca 11.2.0.2 from the seeded template and filled with data pump import.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2011/07/18/performance-degradation-for-query-on-dba_segments-bytes-in-11gr2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Data Guard 11.2.0.2 &#8211; update</title>
		<link>http://www.ora-solutions.net/web/2011/05/26/data-guard-11-2-0-2-update/</link>
		<comments>http://www.ora-solutions.net/web/2011/05/26/data-guard-11-2-0-2-update/#comments</comments>
		<pubDate>Thu, 26 May 2011 13:21:32 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Data Guard]]></category>
		<category><![CDATA[Oracle Database]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=1072</guid>
		<description><![CDATA[In March, Oracle MAA has published a white paper for implementing Data Guard on Exadata platforms. (http://www.oracle.com/technetwork/database/features/availability/maa-wp-dr-dbm-130065.pdf) Although the paper is focused on Exadata, some information can be applied to non-Exadata systems as well: Corruption Protection: Primary: DB_BLOCK_CHECKSUM=FULL, DB_BLOCK_CHECKING=FULL, DB_LOST_WRITE_PROTECT=TYPICAL (Physical) Standby: DB_BLOCK_CHECKSUM=FULL, DB_BLOCK_CHECKING=OFF, DB_LOST_WRITE_PROTECT=TYPICAL Network Tuning: TCP Send/Receive Buffers: 3 x Bandwith Delay Product [...]]]></description>
			<content:encoded><![CDATA[<p>In March, Oracle MAA has published a white paper for implementing Data Guard on Exadata platforms. (<a title="http://www.oracle.com/technetwork/database/features/availability/maa-wp-dr-dbm-130065.pdf" href="http://www.oracle.com/technetwork/database/features/availability/maa-wp-dr-dbm-130065.pdf">http://www.oracle.com/technetwork/database/features/availability/maa-wp-dr-dbm-130065.pdf</a>)</p>
<p>Although the paper is focused on Exadata, some information can be applied to non-Exadata systems as well:</p>
<ul>
<li><strong>Corruption Protection:</strong>
<ul>
<li style="text-align: left;"> Primary:
<ul>
<li style="text-align: left;">DB_BLOCK_CHECKSUM=FULL,</li>
<li style="text-align: left;">DB_BLOCK_CHECKING=FULL,</li>
<li style="text-align: left;">DB_LOST_WRITE_PROTECT=TYPICAL</li>
</ul>
</li>
</ul>
<ul>
<li style="text-align: left;"> (Physical) Standby:
<ul>
<li style="text-align: left;">DB_BLOCK_CHECKSUM=FULL,</li>
<li style="text-align: left;">DB_BLOCK_CHECKING=OFF,</li>
<li style="text-align: left;">DB_LOST_WRITE_PROTECT=TYPICAL</li>
</ul>
</li>
</ul>
</li>
<li><strong>Network Tuning:</strong><br />
TCP Send/Receive Buffers: 3 x Bandwith Delay Product or 10 MB, whichever is greater</li>
<li><strong>Redo Transport Modes:</strong>
<ul>
<li>SYNC is recommended if round-trip-time is less than 5 ms.  Impact of SYNC Mode on primary performance has been improved because local online redo log write and redo shipping is not done sequentially anymore but in parallel.</li>
<li>ASYNC: Transport Lag is reduced because Redo is not read from online redo log from disk but from log buffer if possible. init.ora log_buffer might need to be increased for this to yield the maximum benefit.</li>
</ul>
</li>
<li><strong>LOGGING/NOLOGGING: </strong>Normally, in Data Guard you set database-wide &#8220;ALTER DATABASE FORCE LOGGING&#8221;. In Data Warehouse environments, it might be advisable to set it to NOLOGGING and decide on a tablespace-basis whether the tablespace should allow or disallow NOLOGGING operations. E.g. a tablespace containing only transient, recreatable  or non-critical data might benefit from being set to NOLOGGING for certain bulk operations. (CTAS, Direct Path Inserts, index rebuilds, etc.)</li>
<li><strong>STANDBY-FIRST Patches:</strong> Some patches (PSU, CPU, PSE) will be flagged in the patch README with &#8220;Standby-First&#8221;. This means that they can be applied on a physical standby before being applied on the primary. For regular patches, this was not supported.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2011/05/26/data-guard-11-2-0-2-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Grid Control Repository for RDBMS Patch Report</title>
		<link>http://www.ora-solutions.net/web/2011/05/19/using-grid-control-repository-for-rdbms-patch-report/</link>
		<comments>http://www.ora-solutions.net/web/2011/05/19/using-grid-control-repository-for-rdbms-patch-report/#comments</comments>
		<pubDate>Thu, 19 May 2011 16:18:53 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Oracle Enterprise Manager]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=1062</guid>
		<description><![CDATA[I was looking for a method to utilize the Grid Control Repository, which contains information about installed Oracle Homes, databases and patches, for a patch report. With a little reverse engineering i came up with these relevant tables: Mgmt_Ecm_Snapshot: Every time the inventory is refreshed, a new line is inserted into this table containing the [...]]]></description>
			<content:encoded><![CDATA[<p>I was looking for a method to utilize the Grid Control Repository, which contains information about installed Oracle Homes, databases and patches, for a patch report.</p>
<p>With a little reverse engineering i came up with these relevant tables:</p>
<ul>
<li><strong>Mgmt_Ecm_Snapshot:</strong> Every time the inventory is refreshed, a new line is inserted into this table containing the host name and the snapshot_guid. The most current snapshot has flag IS_CURRENT set to &#8216;Y&#8217;</li>
<li><strong>Mgmt_Inv_Container</strong>: Every Oracle Home is a container. This table contains the snapshot_guid and the container_guid along with a container_description which is basically the Oracle Home Path</li>
<li><strong>Mgmt_Inv_Patch:</strong> This table contains container_guid, Patch ID and patch installation timestamp</li>
<li><strong>Mgmt_Inv_Component:</strong> This table lists all the components of the oracle homes along with their version. There is one component per container with the flag Is_Top_Level set to &#8216;Y&#8217;.  We use this component for getting the base version of the installed product. (e.g. 11.2.0.2)</li>
<li><strong>Mgmt_Inv_Versioned_Patch</strong>: I am not sure if this table is needed for version information, but one of the mgmt views was using these two tables together, so I used it as a reference.</li>
</ul>
<p>The complete statement now is:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">OR</span> <span style="color: #993333; font-weight: bold;">REPLACE</span> FORCE <span style="color: #993333; font-weight: bold;">VIEW</span> <span style="color: #ff0000;">&quot;SYSMAN&quot;</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">&quot;RDBMS_PATCH_REPORT&quot;</span>
<span style="color: #993333; font-weight: bold;">AS</span>
<span style="color: #993333; font-weight: bold;">SELECT</span>
      N<span style="color: #66cc66;">.</span>Target_Name<span style="color: #66cc66;">,</span>
    S<span style="color: #66cc66;">.</span>Start_Timestamp <span style="color: #993333; font-weight: bold;">AS</span> Collected_Time<span style="color: #66cc66;">,</span>
    S<span style="color: #66cc66;">.</span>Target_Name     <span style="color: #993333; font-weight: bold;">AS</span> Host_Name<span style="color: #66cc66;">,</span>
    C<span style="color: #66cc66;">.</span>Container_Name  <span style="color: #993333; font-weight: bold;">AS</span> Oracle_Home_Name<span style="color: #66cc66;">,</span>
    Container_Location<span style="color: #66cc66;">,</span>
    P<span style="color: #66cc66;">.</span>Id <span style="color: #993333; font-weight: bold;">AS</span> Patch_Id<span style="color: #66cc66;">,</span>
    <span style="color: #66cc66;">&#40;</span>
    CASE Id
      WHEN <span style="color: #ff0000;">'10157506'</span>
      THEN <span style="color: #ff0000;">'GI Bundle1'</span>
      WHEN <span style="color: #ff0000;">'10185523'</span>
      THEN <span style="color: #ff0000;">'OWB Bundle'</span>
      WHEN <span style="color: #ff0000;">'10248523'</span>
      THEN <span style="color: #ff0000;">'PSU Jan 2011'</span>
      WHEN <span style="color: #ff0000;">'11724916'</span>
      THEN <span style="color: #ff0000;">'PSU Apr 2011'</span>
      WHEN <span style="color: #ff0000;">'12311357'</span>
      THEN <span style="color: #ff0000;">'GI Psu Apr 2011'</span>
      ELSE <span style="color: #993333; font-weight: bold;">NULL</span>
    END <span style="color: #66cc66;">&#41;</span> description<span style="color: #66cc66;">,</span>
    P<span style="color: #66cc66;">.</span>Timestamp <span style="color: #993333; font-weight: bold;">AS</span> Install_Time<span style="color: #66cc66;">,</span>
    CASE
      WHEN VP<span style="color: #66cc66;">.</span>version <span style="color: #993333; font-weight: bold;">IS</span> <span style="color: #993333; font-weight: bold;">NULL</span>
      THEN M<span style="color: #66cc66;">.</span>version
      ELSE VP<span style="color: #66cc66;">.</span>version
    END <span style="color: #993333; font-weight: bold;">AS</span> Version
  <span style="color: #993333; font-weight: bold;">FROM</span> Mgmt_Ecm_Snapshot S<span style="color: #66cc66;">,</span>
    Mgmt_Inv_Container C<span style="color: #66cc66;">,</span>
    Mgmt_Inv_Patch P<span style="color: #66cc66;">,</span>
    <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> T<span style="color: #66cc66;">.</span>Target_Guid<span style="color: #66cc66;">,</span>
      T<span style="color: #66cc66;">.</span>Host_Name<span style="color: #66cc66;">,</span>
      T<span style="color: #66cc66;">.</span>Target_Name<span style="color: #66cc66;">,</span>
      T<span style="color: #66cc66;">.</span>Target_Type<span style="color: #66cc66;">,</span>
      Mp<span style="color: #66cc66;">.</span>Property_Value <span style="color: #993333; font-weight: bold;">AS</span> Oh
    <span style="color: #993333; font-weight: bold;">FROM</span> Mgmt_Targets T<span style="color: #66cc66;">,</span>
      Mgmt_Target_Properties Mp
    <span style="color: #993333; font-weight: bold;">WHERE</span> T<span style="color: #66cc66;">.</span>Target_Guid  <span style="color: #66cc66;">=</span> Mp<span style="color: #66cc66;">.</span>Target_Guid
    <span style="color: #993333; font-weight: bold;">AND</span> Mp<span style="color: #66cc66;">.</span>Property_Name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'OracleHome'</span>
    <span style="color: #993333; font-weight: bold;">AND</span> Target_Type      <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'oracle_database'</span>
    <span style="color: #66cc66;">&#41;</span> N<span style="color: #66cc66;">,</span>
    Mgmt_Inv_Component M <span style="color: #66cc66;">,</span>
    MGMT_INV_VERSIONED_PATCH VP
  <span style="color: #993333; font-weight: bold;">WHERE</span> S<span style="color: #66cc66;">.</span>Snapshot_Guid <span style="color: #66cc66;">=</span> C<span style="color: #66cc66;">.</span>Snapshot_Guid
  <span style="color: #993333; font-weight: bold;">AND</span> S<span style="color: #66cc66;">.</span>Is_Current      <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'Y'</span>
  <span style="color: #993333; font-weight: bold;">AND</span> C<span style="color: #66cc66;">.</span>Container_Type  <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'O'</span>
  <span style="color: #993333; font-weight: bold;">AND</span> P<span style="color: #66cc66;">.</span>Container_Guid  <span style="color: #66cc66;">=</span> C<span style="color: #66cc66;">.</span>Container_Guid
  <span style="color: #993333; font-weight: bold;">AND</span> N<span style="color: #66cc66;">.</span>Host_Name       <span style="color: #66cc66;">=</span> S<span style="color: #66cc66;">.</span>Target_Name
  <span style="color: #993333; font-weight: bold;">AND</span> N<span style="color: #66cc66;">.</span>Oh              <span style="color: #66cc66;">=</span> C<span style="color: #66cc66;">.</span>Container_Location
  <span style="color: #993333; font-weight: bold;">AND</span> M<span style="color: #66cc66;">.</span>Component_Guid  <span style="color: #66cc66;">=</span> Vp<span style="color: #66cc66;">.</span>Component_Guid<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">+</span><span style="color: #66cc66;">&#41;</span>
  <span style="color: #993333; font-weight: bold;">AND</span> M<span style="color: #66cc66;">.</span>Is_Top_Level    <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'Y'</span>
  <span style="color: #993333; font-weight: bold;">AND</span> M<span style="color: #66cc66;">.</span>Container_Guid  <span style="color: #66cc66;">=</span> C<span style="color: #66cc66;">.</span>Container_Guid
  <span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">3</span>;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2011/05/19/using-grid-control-repository-for-rdbms-patch-report/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is 11.2.0.2 ready for production? Judge yourself &#8230;</title>
		<link>http://www.ora-solutions.net/web/2011/04/18/is-11-2-0-2-ready-for-production-judge-yourself/</link>
		<comments>http://www.ora-solutions.net/web/2011/04/18/is-11-2-0-2-ready-for-production-judge-yourself/#comments</comments>
		<pubDate>Mon, 18 Apr 2011 09:34:12 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[11gR2]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Data Guard]]></category>
		<category><![CDATA[MetaLink]]></category>
		<category><![CDATA[Oracle Database]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=1036</guid>
		<description><![CDATA[Murphy said: if problems arise, they all come at the same time. After several weeks of stability, this week brought hell of a lot of Oracle problems with 11.2.0.2 and RAC. To list the worst: Downtime because of ASM process limit reached. Normally, the formula to calculate depends on the number of concurrent datafile extensions. [...]]]></description>
			<content:encoded><![CDATA[<p>Murphy said: if problems arise, they all come at the same time. After several weeks of stability, this week brought hell of a lot of Oracle problems with 11.2.0.2 and RAC. To list the worst:</p>
<ul>
<li><strong>Downtime because of ASM process limit reached. </strong>Normally, the formula to calculate depends on the number of concurrent datafile extensions. In our case 100 ASM processes were not enough. Increased to 200 and found  Note 1287496.1 which describes the issue. Merge Patch for bug is available for 11.2.0.2 GI Bundle 1 but not yet for GI Bundle 2. Ups.</li>
<li><strong>CPU Starvation because of Adaptive Cursor Sharing:</strong> One server process was taking up 100% of cpu time for the last several hours. It turned out to be an OEM monitoring query having several thousands of child cursors.<br />
<blockquote>
<pre>PID 	USER 	PR NI VIRT 	RES SHR S %CPU %MEM TIME+ COMMAND
8667 	ora11 25 0 	8423m 33m 28m R 99.7 	0.1 358:27.78 ora_pz98_MDDB</pre>
</blockquote>
<p>I then checked different databases and found that almost all of our 11.2.0.2 databases have several hundreds or even thousands of child cursors.</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> sql_id<span style="color: #66cc66;">,</span> is_shareable<span style="color: #66cc66;">,</span> min<span style="color: #66cc66;">&#40;</span>child_number<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> max<span style="color: #66cc66;">&#40;</span>child_number<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> count<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #993333; font-weight: bold;">FROM</span> gv$sql
<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> sql_id<span style="color: #66cc66;">,</span> is_shareable <span style="color: #993333; font-weight: bold;">HAVING</span> count<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span> &amp;gt;<span style="color: #cc66cc;">100</span> <span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #cc66cc;">6</span> <span style="color: #993333; font-weight: bold;">DESC</span>
&nbsp;
SQL_ID        IS_SHAREABLE MIN<span style="color: #66cc66;">&#40;</span>CHILD_NUMBER<span style="color: #66cc66;">&#41;</span> MAX<span style="color: #66cc66;">&#40;</span>CHILD_NUMBER<span style="color: #66cc66;">&#41;</span>  COUNT<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #808080; font-style: italic;">------------- ------------ ----------------- ------------------ ---------</span>
c7kt3njhnmtkm Y            <span style="color: #cc66cc;">0</span>                 <span style="color: #cc66cc;">5097</span>               <span style="color: #cc66cc;">1397</span>
c7kt3njhnmtkm N            <span style="color: #cc66cc;">3</span>                 <span style="color: #cc66cc;">3544</span>               <span style="color: #cc66cc;">1836</span>
1vnhgmpc17vv0 Y            <span style="color: #cc66cc;">0</span>                 <span style="color: #cc66cc;">3022</span>               <span style="color: #cc66cc;">2697</span>
1vnhgmpc17vv0 N            <span style="color: #cc66cc;">6</span>                 <span style="color: #cc66cc;">2185</span>               <span style="color: #cc66cc;">444</span>
93qh89pxuxzuw Y            <span style="color: #cc66cc;">0</span>                 <span style="color: #cc66cc;">1949</span>               <span style="color: #cc66cc;">1522</span>
93qh89pxuxzuw N            <span style="color: #cc66cc;">2</span>                 <span style="color: #cc66cc;">1625</span>               <span style="color: #cc66cc;">428</span>
5fk0v8km2f811 Y            <span style="color: #cc66cc;">0</span>                 <span style="color: #cc66cc;">1281</span>               <span style="color: #cc66cc;">1763</span>
4f3ufvfcgfqsg Y            <span style="color: #cc66cc;">0</span>                 <span style="color: #cc66cc;">792</span>                <span style="color: #cc66cc;">794</span>
cjbwk0ww7j5rv Y            <span style="color: #cc66cc;">0</span>                 <span style="color: #cc66cc;">627</span>                <span style="color: #cc66cc;">1251</span>
dyqdzgxcv4d3t Y            <span style="color: #cc66cc;">0</span>                 <span style="color: #cc66cc;">626</span>                <span style="color: #cc66cc;">1252</span>
5fk0v8km2f811 N            <span style="color: #cc66cc;">3</span>                 <span style="color: #cc66cc;">543</span>                <span style="color: #cc66cc;">260</span>
f0jxh8d6b5af2 Y            <span style="color: #cc66cc;">0</span>                 <span style="color: #cc66cc;">494</span>                <span style="color: #cc66cc;">564</span>
f0jxh8d6b5af2 N            <span style="color: #cc66cc;">0</span>                 <span style="color: #cc66cc;">290</span>                <span style="color: #cc66cc;">130</span>
dbvkky621gqtr Y            <span style="color: #cc66cc;">0</span>                 <span style="color: #cc66cc;">266</span>                <span style="color: #cc66cc;">267</span>
32rqmpqpfv0gm Y            <span style="color: #cc66cc;">0</span>                 <span style="color: #cc66cc;">255</span>                <span style="color: #cc66cc;">257</span>
g9uwxs7pr8tjm Y            <span style="color: #cc66cc;">0</span>                 <span style="color: #cc66cc;">254</span>                <span style="color: #cc66cc;">257</span>
40k6jjt90n4fa Y            <span style="color: #cc66cc;">3</span>                 <span style="color: #cc66cc;">199</span>                <span style="color: #cc66cc;">129</span></pre></div></div>

<p>I suspect this to be Bug 10182051 Extended cursor sharing generates many shareable child cursors  and there is a workaround:</p>
<blockquote><p>alter system set &#8220;_optimizer_extended_cursor_sharing_rel&#8221;=none;</p></blockquote>
</li>
</ul>
<ul>
<li><strong>Limited database availability because of failing queries on gv$ tables:</strong><br />
<blockquote>
<pre>SQL&gt; select count(*) from gv$session
2 ;
select count(*) from  gv$session
*
ERROR at line 1:
ORA-12850: Could not allocate slaves on  all specified instances: 2 needed, 1
allocated
ORA-12801: error signaled  in parallel query server P001, instance 3599</pre>
</blockquote>
<p>Currently no other known workaround than bouncing all the RAC instances.</li>
<li><strong>DataGuard ASYNC Redo Transport not reliable:</strong> We have a RAC primary / single instance physical standby setup and use async redo transport. During times of heavy ETL on the primary, the standby databases stops at recovery of one archivelog with &#8220;(in transit)&#8221;. Primary is showing this error in alert log:

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">ARC7: Creating remote archive destination LOG_ARCHIVE_DEST_2: <span style="color: #ff0000;">'HAMDB'</span> <span style="color: #66cc66;">&#40;</span>thread <span style="color: #cc66cc;">2</span> sequence <span style="color: #cc66cc;">4044</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>MUCDB2<span style="color: #66cc66;">&#41;</span>
ARC7: Archive log rejected <span style="color: #66cc66;">&#40;</span>thread <span style="color: #cc66cc;">2</span> sequence <span style="color: #cc66cc;">4044</span><span style="color: #66cc66;">&#41;</span> at host <span style="color: #ff0000;">'HAMDB'</span>
FAL<span style="color: #66cc66;">&#91;</span>server<span style="color: #66cc66;">,</span> ARC7<span style="color: #66cc66;">&#93;</span>: FAL archive failed<span style="color: #66cc66;">,</span> see trace file<span style="color: #66cc66;">.</span>
ARCH: FAL archive failed<span style="color: #66cc66;">.</span> Archiver continuing
ORACLE Instance MUCDB2 <span style="color: #66cc66;">-</span> Archival Error<span style="color: #66cc66;">.</span> Archiver continuing<span style="color: #66cc66;">.</span></pre></div></div>

<p>On standby side, it says:<br />
Media Recovery Waiting for thread 2 sequence 4044 (in transit)</p>
<p>The standby database never recovers from this problem, except when standby database is bounced. The problem appears with and without broker configuration. Currently there is no known workaround.</p>
</li>
</ul>
<p>Maybe some of this issues will be addressed in upcoming PSU April, which will be released this week. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2011/04/18/is-11-2-0-2-ready-for-production-judge-yourself/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

