<?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>Andrew Fraser DBA</title>
	<atom:link href="http://andrewfraserdba.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://andrewfraserdba.com</link>
	<description>Oracle DBA (plus SQL Server)</description>
	<lastBuildDate>Wed, 18 Jan 2012 15:25:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>unlock orcladmin password in shell script</title>
		<link>http://andrewfraserdba.com/2011/12/05/unlock-orcladmin-password-in-shell-script/</link>
		<comments>http://andrewfraserdba.com/2011/12/05/unlock-orcladmin-password-in-shell-script/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 17:36:29 +0000</pubDate>
		<dc:creator>Andrew Fraser</dc:creator>
				<category><![CDATA[Oracle forms]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://andrewfraserdba.com/?p=830</guid>
		<description><![CDATA[Shell script to check if orcladmin account is locked, and unlock it if required # Check to see if orcladmin account is locked, and unlock it if it is. if [ "`ldapbind -p &#60;myport&#62; -D cn=orcladmin -w &#60;myorcladminpassword&#62;`" = "bind &#8230; <a href="http://andrewfraserdba.com/2011/12/05/unlock-orcladmin-password-in-shell-script/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Shell script to check if orcladmin account is locked, and unlock it if required</p>
<pre class="brush:bash, shell"># Check to see if orcladmin account is locked, and unlock it if it is.
if [ "`ldapbind -p &lt;myport&gt; -D cn=orcladmin -w &lt;myorcladminpassword&gt;`" = "bind successful" ]
then
   echo orcladmin account is ok, is not locked.
else
   echo unlocking orcladmin account...
   oidpasswd connect=&lt;mydatabase&gt; unlock_su_acct=true &lt;&lt;END_PASSWD
&lt;mydatabasepassword&gt;
END_PASSWD
fi</pre>
<p>Useful for running from cron for an environment where orcladmin repeatedly gets locked.</p>
<p>The -p port is optional depending on configuration.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewfraserdba.com/2011/12/05/unlock-orcladmin-password-in-shell-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Indexed views &#8211; workaround for &#8220;Cannot create index on view because it uses a LEFT, RIGHT, or FULL OUTER join, and no OUTER joins are allowed in indexed views. Consider using an INNER join instead.&#8221;</title>
		<link>http://andrewfraserdba.com/2011/12/05/indexed-views-workaround-for-cannot-create-index-on-view-because-it-uses-a-left-right-or-full-outer-join-and-no-outer-joins-are-allowed-in-indexed-views-consider-using-an-inner-join-instead/</link>
		<comments>http://andrewfraserdba.com/2011/12/05/indexed-views-workaround-for-cannot-create-index-on-view-because-it-uses-a-left-right-or-full-outer-join-and-no-outer-joins-are-allowed-in-indexed-views-consider-using-an-inner-join-instead/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 17:08:19 +0000</pubDate>
		<dc:creator>Andrew Fraser</dc:creator>
				<category><![CDATA[Performance tuning]]></category>
		<category><![CDATA[SQL server]]></category>

		<guid isPermaLink="false">http://andrewfraserdba.com/?p=821</guid>
		<description><![CDATA[Indexed views (the SQL Server equivalent of Oracle&#8217;s materialized views) are a good performance fix, especially for reporting and data warehouse systems. However they only work with inner joins. Attempts to create an indexed view with outer joins fail with: &#8230; <a href="http://andrewfraserdba.com/2011/12/05/indexed-views-workaround-for-cannot-create-index-on-view-because-it-uses-a-left-right-or-full-outer-join-and-no-outer-joins-are-allowed-in-indexed-views-consider-using-an-inner-join-instead/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Indexed views (the SQL Server equivalent of Oracle&#8217;s materialized views) are a good performance fix, especially for reporting and data warehouse systems.</p>
<p>However they only work with inner joins. Attempts to create an indexed view with outer joins fail with: </p>
<blockquote><p>Cannot create index on view because it uses a LEFT, RIGHT, or FULL OUTER join, and no OUTER joins are allowed in indexed views. Consider using an INNER join instead.</p></blockquote>
<p>This is quite a limitation of SQL Server &#8211; Oracle&#8217;s materialized views do not have this limitation.</p>
<p>One workaround is to manually create a table using the same SQL that you tried to use in the indexed view:</p>
<pre class="brush:sql">select col1, col2, col3
INTO myreportingtable
from table1
left join table2 on ...</pre>
<p>And then change the view definition to reference only that new table:</p>
<pre class="brush:sql">create view myview as select col1, col2, col3 from myreportingtable</pre>
<p>That does mean a scheduled task or job will need to be created to refresh the new reporting table every night (or as required).</p>
<p><span id="more-821"></span>Code to create indexed views is like:</p>
<pre class="brush:sql">create view myview with schemabinding as select col1, col2, col3 from ....
go
create unique clustered index myindex on myview (col1, col2, col3 )
go</pre>
]]></content:encoded>
			<wfw:commentRss>http://andrewfraserdba.com/2011/12/05/indexed-views-workaround-for-cannot-create-index-on-view-because-it-uses-a-left-right-or-full-outer-join-and-no-outer-joins-are-allowed-in-indexed-views-consider-using-an-inner-join-instead/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle range limit AD BC dates</title>
		<link>http://andrewfraserdba.com/2011/08/11/oracle-range-limit-ad-bc-dates/</link>
		<comments>http://andrewfraserdba.com/2011/08/11/oracle-range-limit-ad-bc-dates/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 16:12:46 +0000</pubDate>
		<dc:creator>Andrew Fraser</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://andrewfraserdba.com/?p=798</guid>
		<description><![CDATA[This is the extreme limit for oracle dates: alter session set nls_date_format = 'Dy DD-Mon-YYYY AD' ; select sysdate, to_date('01-JAN-4712 BC','DD-MON-YYYY AD'), to_date('30-DEC-9999 AD','DD-MON-YYYY AD') from dual ; Without encountering this error: ORA-01841: (full) year must be between -4713 and &#8230; <a href="http://andrewfraserdba.com/2011/08/11/oracle-range-limit-ad-bc-dates/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is the extreme limit for oracle dates:</p>
<pre class="brush:sql">alter session set nls_date_format = 'Dy DD-Mon-YYYY AD' ;
select sysdate, to_date('01-JAN-4712 BC','DD-MON-YYYY AD'), to_date('30-DEC-9999 AD','DD-MON-YYYY AD') from dual ;</pre>
<p>Without encountering this error:</p>
<p>ORA-01841: (full) year must be between -4713 and +9999, and not be 0<br />
01841. 00000 &#8211;  &#8220;(full) year must be between -4713 and +9999, and not be 0&#8243;<br />
*Cause:    Illegal year entered<br />
*Action:   Input year in the specified range</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewfraserdba.com/2011/08/11/oracle-range-limit-ad-bc-dates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle SQL Developer privileges for Other Users procedures and package bodies</title>
		<link>http://andrewfraserdba.com/2011/08/11/oracle-sql-developer-privileges-for-other-users-procedures-and-package-bodies/</link>
		<comments>http://andrewfraserdba.com/2011/08/11/oracle-sql-developer-privileges-for-other-users-procedures-and-package-bodies/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 12:59:46 +0000</pubDate>
		<dc:creator>Andrew Fraser</dc:creator>
				<category><![CDATA[SQL Developer]]></category>

		<guid isPermaLink="false">http://andrewfraserdba.com/?p=781</guid>
		<description><![CDATA[To view code for procedures and package bodies in SQL Developer that are owned by other users, you need the following privilege: grant select_catalog_role to &#60;user&#62; ; This privilege does not give access to the sys.link$ view, so should be &#8230; <a href="http://andrewfraserdba.com/2011/08/11/oracle-sql-developer-privileges-for-other-users-procedures-and-package-bodies/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>To view code for procedures and package bodies in SQL Developer that are owned by other users, you need the following privilege:</p>
<pre class="brush:sql">grant select_catalog_role to &lt;user&gt; ;</pre>
<p>This privilege does not give access to the sys.link$ view, so should be safe to grant out.</p>
<p>You also need to use version 3 or above of Oracle SQL Developer, because of <a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;type=BUG&amp;id=9530717">bug 9530717</a> in version 2 which caused package body to not display for users who did not have elevated security privileges.  Note that <a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;type=NOT&amp;doctype=PROBLEM&amp;id=1226324.1">Oracle Support Note 1226324.1</a> still states that SQL Developer v3 is not released yet &#8211; actually it was released March 2011.</p>
<p>Granting &#8216;select any dictionary&#8217; would also be sufficient for SQL Developer users to see other users procedures and package bodies &#8211; but that is more powerful than select_catalog_role especially in 11g and above with <a href=http://jhdba.wordpress.com/2010/01/04/the-need-to-ensure-that-hashed-password-values-are-safe/>this security issue</a>.</p>
<p>Mike Smithers has a <a href="http://mikesmithers.wordpress.com/2010/08/06/unable-to-see-package-bodies-in-sqldeveloper-2-1-1/">related posting</a> on this SQL Developer issue &#8211; although his workaround is no longer required with SQL Developer v3.</p>
<p>If moving from an older to a newer version of SQL Developer, you can export your saved connections first &#8211; including stored passwords &#8211; and then import them into the new version. To do this, right click on &#8216;Connections&#8217; and choose &#8216;Export Connections&#8217; or &#8216;Import Connections&#8217;. The export writes the information to an xml file which you can delete afterwards, although the passwords inside it are encrypted anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewfraserdba.com/2011/08/11/oracle-sql-developer-privileges-for-other-users-procedures-and-package-bodies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Data Guard Overview</title>
		<link>http://andrewfraserdba.com/2011/08/09/oracle-data-guard-overview/</link>
		<comments>http://andrewfraserdba.com/2011/08/09/oracle-data-guard-overview/#comments</comments>
		<pubDate>Tue, 09 Aug 2011 18:03:42 +0000</pubDate>
		<dc:creator>Andrew Fraser</dc:creator>
				<category><![CDATA[Dataguard]]></category>

		<guid isPermaLink="false">http://andrewfraserdba.com/?p=744</guid>
		<description><![CDATA[Oracle Data Guard is Oracle&#8217;s main solution for high availability in the event of a disaster. This overview is for Oracle 11gR2. A pdf version of this page is available here. Data Guard is controlled with either the &#8216;dgmgrl&#8217; command line utility &#8230; <a href="http://andrewfraserdba.com/2011/08/09/oracle-data-guard-overview/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Oracle Data Guard is Oracle&#8217;s main solution for high availability in the event of a disaster. This overview is for Oracle 11gR2. A <a href="http://andrewfraserdba.com/wp-content/uploads/2011/08/Oracle-Data-Guard-Overview.pdf">pdf version of this page is available here</a>.</p>
<p><img class="alignnone" title="Data Guard Overview" src="http://download.oracle.com/docs/cd/E11882_01/server.112/e17022/img/sbydb042.gif" alt="Data Guard Overview" width="546" height="168" /></p>
<p><span id="more-744"></span>Data Guard is controlled with either the &#8216;dgmgrl&#8217; command line utility &#8211; to run, type &#8216;dgmgrl&#8217; at the unix or windows command prompt &#8211; or through Oracle Enterprise Manager Grid Control. Version 8i lacked &#8216;dgmgrl&#8217; and were controlled through alter system commands &#8211; those commands remain valid, but should now be avoided in favour of the superior dgmgrl utility.</p>
<p>This uses a Data Guard Broker background process, seen in the process list as &#8216;dmon&#8217;.</p>
<p>Data Guard can also be referred to as &#8216;log shipping&#8217; (it&#8217;s name in version 8i) or &#8216;standby&#8217; (because it has a standby database).</p>
<p>Data Guard advantages over RAC Real Applications Clusters:</p>
<ol>
<li>It uses separate disk storage.<br />
So a failure at one SAN doesn’t stop both nodes.  RAC on its own isn’t adequate for this, you either need RAC+DG or RAC+SAN replication.<br />
Data Guard is superior to SAN replication because it allows for automated failover, and also because it tends to be organisationally under the control of DBAs.</li>
<li>It can run at different sites at unlimited distances from each other.<br />
RAC clusters have to be physically close together (a few km at most).</li>
<li>RAC licensing is around 50% more expensive than Data Guard licensing.<br />
RAC licensing is an expensive extra cost option.<br />
Data Guard is not an extra cost option, but you do have to pay for a full oracle license at the standby node.</li>
</ol>
<p>Data Guard disadvantages compared to RAC:</p>
<ol>
<li>It is active-passive.<br />
So one server is idle, wasting hardware.<br />
The best that Data Guard can do is have the idle server used for read only reporting.</li>
</ol>
<p><strong>Data Guard Modes</strong></p>
<p>In old versions (9i and earlier), the standby would lag half an hour or so behind primary, driven by on line redo log switch times through the &#8216;arch&#8217; process.  Not any more with 10g and later, where the &#8216;lgwr&#8217; process performs redo transport in real time.</p>
<p>There are three data guard modes:</p>
<ol>
<li>Maximum Availability – (synchronous) commit’s try to wait for acknowledgement from standby (but they don’t wait if the standby is completely down)</li>
<li>Maximum Performance – asynchronous propagation of redo, so standby can be a few seconds/minutes behind primary.</li>
<li>Maximum Protection – (synchronous) commit’s wait for acknowledgement from standby.  The live database shuts down if at least one standby isn’t accessible – so the recommendation if using this is to have multiple standbys set up.</li>
</ol>
<p>You switch between modes with:</p>
<pre>DGMGRL&gt; edit configuration set protection mode as maxavilability ;</pre>
<p><strong>Switchover and Failover</strong></p>
<p>Switchover is an orderly role reversal between primary and standby databases. Data Guard continues to transport redo from the new primary database to the new standby database. You can switch back and forward multiple times without extra work or preparation. It is often used for testing DR, or for planned outages to the primary server.</p>
<p>Failover is used when switchover is not possible &#8211; typically during a disaster so severe that the primary database is unreachable. Failover makes the standby database become the new primary database, but redo transport stops, there is no new standby database. After the disaster is over, a new standby database has to be manually recreated by a DBA using a backup and restore of the primary database.</p>
<p>Commands for these are:</p>
<pre>DGMGRL&gt; switchover to mydb_sby ;
DGMGRL&gt; failover to mydb_sby [immediate] ;</pre>
<p>(Substitute &#8216;mydb_sby&#8217; with the service name of the standby database service as stated in &#8220;DGMGRL&gt; show configuration&#8221; &#8211; normally set to be the same as its tnsnames connect identifier.)</p>
<div class="wp-caption alignnone" style="width: 438px"><img title="Data Guard Configuration Before Switchover" src="http://download.oracle.com/docs/cd/E11882_01/server.112/e17022/img/sbydb044.gif" alt="" width="428" height="362" /><p class="wp-caption-text">1) Before Switchover</p></div>
<div class="wp-caption alignnone" style="width: 441px"><img title="Data Guard Environment After Switchover" src="http://download.oracle.com/docs/cd/E11882_01/server.112/e17022/img/sbydb033.gif" alt="Data Guard Environment After Switchover" width="431" height="362" /><p class="wp-caption-text">2) After Switchover</p></div>
<div class="wp-caption alignnone" style="width: 439px"><img title="Failover" src="http://download.oracle.com/docs/cd/E11882_01/server.112/e17022/img/sbydb048.gif" alt="Failover" width="429" height="380" /><p class="wp-caption-text">3) After Failover</p></div>
<p><strong>Tnsnames for Failover</strong></p>
<p>Often missed &#8211; but there is no point having DR databases if your users cannot connect to them when failover or switchover is done. One reason to regularly perform a switchover is to test that users all connect ok.</p>
<p>This requires all tnsnames.ora files, in PCs and in servers, to specify both primary and standby host addresses plus &#8220;(failover=on)&#8221;:</p>
<pre>MYDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = primaryserver.mydomain.com)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = standbyserver.mydomain.com)(PORT = 1521))
    (FAILOVER = ON)
    (CONNECT_DATA =
      (SERVICE_NAME = mydb.mydomain.com)))</pre>
<p>Alternatively, you can change DNS entry each time switchover or failover happens &#8211; but the drawback of that is that it is often outwith the control of the DBA team, making its automation organisationally difficult.</p>
<p><strong>Fast Start Failover</strong></p>
<p>You can let Oracle automatically initiate failover when it detects a problem with the primary database.</p>
<pre>DGMGRL&gt; enable fast_start failover ;</pre>
<p>This uses a Fast Start Failover Observer process to check for problems. That should either be located on a third server, or on the DR standby server &#8211; because you want this observer to be functioning even (especially) if the primary server is dead.</p>
<pre>DGMGRL&gt; start observer ;</pre>
<p>You can see current configuration with:</p>
<pre>DGMGRL&gt; show fast_start failover ;
DGMGRL&gt; show configuration [verbose] ;</pre>
<p><strong>Making use of a standby database &#8211; Snapshot Standby</strong></p>
<p>This is very useful for reporting purposes.</p>
<p>Run this command:</p>
<pre>DGMGRL&gt; convert database 'mydb_sby' to snapshot standby ;</pre>
<p>to open up your standby database to users.</p>
<p>This is not just opened read only &#8211; updates etc. are allowed, although they are temporary, they will be overwritten when you convert the database back to being a physical standby database. But that is useful for materialized views, data marts, temporary tables.</p>
<p>Snapshot standby databases continue to receive redo from the primary database, but do not apply it &#8211; it just queues up on the standby server &#8211; until they are reverted back to being a physical standby database with:</p>
<pre>DGMGRL&gt; convert database 'mydb_sby' to physical standby ;</pre>
<p>Typically databases are switched back into physical standby overnight.</p>
<p><strong>Making use of a standby database &#8211; Active Data Guard</strong></p>
<p>Active Data Guard allows the physical standby database to be open to users while still applying redo from the primary database. The standby database is restricted to read only operations.</p>
<p>This is an extra cost option for the Oracle license, similar to RAC, partitioning, etc. It costs around an extra 20% on top of the normal Enterprise Edition license fee.</p>
<p><strong>Logical Standby instead of Physical Standby</strong></p>
<p>Logical Standby behaves similarly to physical standby, except it uses a more complex method of applying SQL statements (logical) instead of block level redo changes (physical). It is rarely used.</p>
<p>Possible reasons for using logical standby are:</p>
<ul>
<li>It can be used for rolling database upgrades (e.g. upgrade primary database first, standby database later).</li>
<li>Saves extra license cost of Active Data Guard option if you want the standby database to be open read only while still keeping up to date with the primary database (logical standby databases do this by default without extra cost options).</li>
</ul>
<p>See <a href="http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1434904500346353807">Tom Kyte on this question</a>.</p>
<p><strong>Limitations of Data Guard</strong></p>
<ul>
<li>Nologging or unrecoverable operations are not applied to standby &#8211; so be cautious in using those options. Alarming data block corruption error messages are reported if a user attempts to access any nologging or unrecoverable data blocks.</li>
<li>&#8216;Drop tablespace&#8217;, &#8216;drop datafile&#8217;, &#8216;rename datafile&#8217;, and add/drop online redo log files operations need done on both nodes manually.</li>
<li>Initialization parameter changes need done on both nodes manually.</li>
<li>For databases upgrades, the software in the new ORACLE_HOME must be separately installed on both nodes. The database part of the upgrade is carried out only on the primary database.<br />
Often Data Guard replication is suspended for a significant period of time during and following the primary database upgrade. That is done with <em>DGMGRL&gt; edit database &#8216;mydb_sby&#8217; set state=&#8217;APPLY-OFF&#8217; ;</em>. The standby server is only upgraded, and replication resumed, once the primary upgrade has been determined to be a success.</li>
<li>For patches, the software/binaries in the ORACLE_HOME must be separately patched on both nodes.  The database part of the patch (if any) is carried out only on the primary database.</li>
</ul>
<p><strong>SQL Server Equivalents</strong></p>
<p>Microsoft SQL Server&#8217;s <strong>Database Mirroring</strong> is their equivalent of Oracle Data Guard. Like Data Guard, Database Mirroring can run either synchronous and asynchronous. Unlike Oracle, Database Mirroring comes with Standard Edition &#8211; although only for synchronous database mirroring, the high performance asynchronous database mirroring does require Enterprise Edition.</p>
<p>Microsoft do make <strong>Log Shipping</strong> available with standard edition, which allows for asynchronous transaction log shipping to standby, but at set time intervals (such as every 30 minutes) rather than in real time/near real time.</p>
<p><strong>Licensing</strong></p>
<p>A full license is required for the standby server, irrespective of whether or not it is also used for e.g. reporting purposes as well as DR. See <a href="http://www.oracle.com/us/corporate/pricing/data-recovery-licensing-070587.pdf">Oracle&#8217;s Licensing Data Recovery Environments</a>.</p>
<p>Oracle Data Guard is included in Enterprise Edition at no extra cost. Active Data Guard (see above) is an extra cost option.</p>
<p>Standard Edition does not come with Oracle Data Guard, but for this you could use log shipping controlled through your own cron scripts as a cheap alternative.</p>
<p><strong>Further Reading</strong></p>
<ul>
<li><a href="http://download.oracle.com/docs/cd/E11882_01/server.112/e17023/toc.htm">Kathy Rich and others: Oracle Data Guard Broker, 11g Release 2 (11.2)</a></li>
<li><a href="http://download.oracle.com/docs/cd/E11882_01/server.112/e17022/toc.htm">Kathy Rich and others: Oracle Data Guard Concepts and Administration, 11g Release 2 (11.2)</a></li>
<li><a href="http://www.ritzyblogs.com/OraTalk/PostID/105/How-to-setup-DGMGRL-broker-with-example">Ritesh Chhajer: How to setup DGMGRL, broker with example</a></li>
<li><a href="http://www.ritzyblogs.com/OraTalk/PostID/106/How-to-switchover-using-DGMGRL-broker-with-example">Ritesh Chhajer: How to switchover using DGMGRL, broker with example</a></li>
<li><a href="http://gavinsoorma.com/2010/03/11g-data-guard-broker-dgmgrl-configuration-quick-steps/">Gavin Soorma: 11g Data Guard Broker DGMGRL Configuration quick steps</a></li>
<li><a href="http://www.orafaq.com/wiki/Data_Guard_implementation_for_Oracle_10gR2">Oracle FAQ: Data Guard implementation for Oracle 10gR2</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://andrewfraserdba.com/2011/08/09/oracle-data-guard-overview/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Switch Oracle Forms List of Values on and off dynamically at run time</title>
		<link>http://andrewfraserdba.com/2011/08/09/switch-oracle-forms-list-of-values-on-and-off-dynamically-at-run-time/</link>
		<comments>http://andrewfraserdba.com/2011/08/09/switch-oracle-forms-list-of-values-on-and-off-dynamically-at-run-time/#comments</comments>
		<pubDate>Tue, 09 Aug 2011 15:40:55 +0000</pubDate>
		<dc:creator>Andrew Fraser</dc:creator>
				<category><![CDATA[Oracle forms]]></category>

		<guid isPermaLink="false">http://andrewfraserdba.com/?p=736</guid>
		<description><![CDATA[In e.g. post-query block level trigger: IF block.check_field = 'F' THEN -- switch on Set_Item_Property( 'block.field' , LOV_NAME, 'your lov') ; Set_Item_Property( 'block.field', VALIDATE_FROM_LIST, PROPERTY_TRUE); ELSE -- switch off Set_Item_Property( 'block.field' , LOV_NAME, '') ; Set_Item_Property( 'block.field', VALIDATE_FROM_LIST, PROPERTY_FALSE); END &#8230; <a href="http://andrewfraserdba.com/2011/08/09/switch-oracle-forms-list-of-values-on-and-off-dynamically-at-run-time/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In e.g. post-query block level trigger:</p>
<pre class="brush:sql">IF block.check_field = 'F'
THEN
   -- switch on
   Set_Item_Property( 'block.field' , LOV_NAME, 'your lov') ;
   Set_Item_Property( 'block.field', VALIDATE_FROM_LIST, PROPERTY_TRUE);
ELSE
   -- switch off
   Set_Item_Property( 'block.field' , LOV_NAME, '') ;
   Set_Item_Property( 'block.field', VALIDATE_FROM_LIST, PROPERTY_FALSE);
END IF ;</pre>
<p>H/t <a href=http://forums.oracle.com/forums/thread.jspa?threadID=590926>François Degrelle</a></p>
]]></content:encoded>
			<wfw:commentRss>http://andrewfraserdba.com/2011/08/09/switch-oracle-forms-list-of-values-on-and-off-dynamically-at-run-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Developer Suite 10g 9.0.4.0.1 windows software download media</title>
		<link>http://andrewfraserdba.com/2011/07/15/oracle-developer-suite-10g-9-0-4-0-1-windows-software-download-media/</link>
		<comments>http://andrewfraserdba.com/2011/07/15/oracle-developer-suite-10g-9-0-4-0-1-windows-software-download-media/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 13:57:54 +0000</pubDate>
		<dc:creator>Andrew Fraser</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://andrewfraserdba.com/?p=734</guid>
		<description><![CDATA[Oracle Developer Suite 10g 9.0.4.0.1 for Windows (forms developer) is not easy to obtain now, out of support by Oracle for a long time, but that version is still in use out there. So I have zipped both installation CDs &#8230; <a href="http://andrewfraserdba.com/2011/07/15/oracle-developer-suite-10g-9-0-4-0-1-windows-software-download-media/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Oracle Developer Suite 10g 9.0.4.0.1 for Windows (forms developer) is not easy to obtain now, out of support by Oracle for a long time, but that version is still in use out there. So I have <a href="http://andrewfraserdba.com/Oracle Developer Suite 10g 9.0.4.0.1.zip">zipped both installation CDs here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewfraserdba.com/2011/07/15/oracle-developer-suite-10g-9-0-4-0-1-windows-software-download-media/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Cron fix for ulimit: max user processes: cannot modify limit:operation not permitted</title>
		<link>http://andrewfraserdba.com/2011/07/14/cron-fix-for-ulimit-max-user-processes-cannot-modify-limitoperation-not-permitted/</link>
		<comments>http://andrewfraserdba.com/2011/07/14/cron-fix-for-ulimit-max-user-processes-cannot-modify-limitoperation-not-permitted/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 16:15:41 +0000</pubDate>
		<dc:creator>Andrew Fraser</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://andrewfraserdba.com/?p=726</guid>
		<description><![CDATA[Werner Puschitz has details of how to use ulimit and limits.conf to change maximum processes and open file descriptors. But for processes running from cron, I found I had to additionally make the below changes (this is on old version: &#8230; <a href="http://andrewfraserdba.com/2011/07/14/cron-fix-for-ulimit-max-user-processes-cannot-modify-limitoperation-not-permitted/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.puschitz.com/TuningLinuxForOracle.shtml#LimitingMaximumNumberOfProcessesForTheOracleUser">Werner Puschitz has details of how to use ulimit and limits.conf</a> to change maximum processes and open file descriptors.</p>
<p>But for processes running from cron, I found I had to additionally make the below changes (this is on old version: <em>32 bit Linux 2.4.21-27.ELsmp Red Hat Enterprise Linux AS release 3 (Taroon Update 4)</em> &#8211; maybe not needed for newer versions).</p>
<pre class="brush:bash, shell">vi /etc/init.d/crond</pre>
<p>Add lines like:</p>
<pre class="brush:bash, shell">ulimit -Hu 131072  # new line Jul 2011
ulimit -Su 131072  # new line Jul 2011
ulimit -Hn 262144  # new line Jul 2011
ulimit -Sn 262144  # new line Jul 2011</pre>
<p>These should be the first commands in that file.</p>
<p>Restart cron with:</p>
<pre class="brush:bash, shell">/etc/init.d/crond restart</pre>
<p>Not relevant for cron, but file /etc/profile is loaded at login and may have been edited to contain ulimit settings &#8211; if so those lines would need changed or removed for normal (non cron) logins.</p>
<p>Thanks to <a href="http://linux.derkeiler.com/Newsgroups/comp.os.linux.setup/2004-07/0596.html">Michael Heiming</a> for this.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewfraserdba.com/2011/07/14/cron-fix-for-ulimit-max-user-processes-cannot-modify-limitoperation-not-permitted/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Split space delimited string with regexp SQL</title>
		<link>http://andrewfraserdba.com/2011/07/13/split-space-delimited-string-with-regexp-sql/</link>
		<comments>http://andrewfraserdba.com/2011/07/13/split-space-delimited-string-with-regexp-sql/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 15:53:50 +0000</pubDate>
		<dc:creator>Andrew Fraser</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://andrewfraserdba.com/?p=721</guid>
		<description><![CDATA[Split up a delimited string with: select regexp_substr('Hello world !' ,'[^ ]+', 1, 1) , regexp_substr('Hello world !' ,'[^ ]+', 1, 2) , regexp_substr('Hello world !' ,'[^ ]+', 1, 3) from dual ; Output: REGEX REGEX R ----- ----- - &#8230; <a href="http://andrewfraserdba.com/2011/07/13/split-space-delimited-string-with-regexp-sql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Split up a delimited string with:</p>
<pre class="brush:sql">select regexp_substr('Hello world !' ,'[^ ]+', 1, 1)
  , regexp_substr('Hello world !' ,'[^ ]+', 1, 2)
  , regexp_substr('Hello world !' ,'[^ ]+', 1, 3)
from dual ;</pre>
<p>Output:</p>
<pre class="brush:sql">REGEX REGEX R
----- ----- -
Hello world !</pre>
<p>From <a href="http://psoug.org/reference/regexp.html">http://psoug.org/reference/regexp.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://andrewfraserdba.com/2011/07/13/split-space-delimited-string-with-regexp-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sed change entire line</title>
		<link>http://andrewfraserdba.com/2011/06/08/sed-change-entire-line/</link>
		<comments>http://andrewfraserdba.com/2011/06/08/sed-change-entire-line/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 11:08:22 +0000</pubDate>
		<dc:creator>Andrew Fraser</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://andrewfraserdba.com/?p=715</guid>
		<description><![CDATA[Here I use sed to replace the entire 2nd line in a lot of files with a new 2nd line. The shell script: for fle in `ls *.msg` do # copy file first so as can keep permissions and ownership &#8230; <a href="http://andrewfraserdba.com/2011/06/08/sed-change-entire-line/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here I use sed to replace the entire 2nd line in a lot of files with a new 2nd line.</p>
<p>The shell script:</p>
<pre class="brush:bash, shell">for fle in `ls *.msg`
do
    # copy file first so as can keep permissions and ownership identical
    cp -p $fle test_$fle
    # replace entire 2nd line with a new 2nd line
    sed -f t.sed $fle > test_$fle
done</pre>
<p>Which calls this sed command file, named t.sed:</p>
<pre class="brush:bash, shell">2c\
\To: dummy.email@me.com</pre>
<p>The result is that the 2nd line in each file reads:
<pre class="brush:bash, shell">To: dummy.email@me.com</pre>
]]></content:encoded>
			<wfw:commentRss>http://andrewfraserdba.com/2011/06/08/sed-change-entire-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

