<?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"
	>

<channel>
	<title>Blogging about Software Development &#187; Operating Systems</title>
	<atom:link href="http://www.bloggingaboutjava.org/category/general/operating-systems/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bloggingaboutjava.org</link>
	<description>Blogging about Software Development</description>
	<pubDate>Tue, 04 Aug 2009 08:02:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>Databases and system: what kind of relationships.</title>
		<link>http://www.bloggingaboutjava.org/2006/09/databases-and-system-what-kind-of-relationships/</link>
		<comments>http://www.bloggingaboutjava.org/2006/09/databases-and-system-what-kind-of-relationships/#comments</comments>
		<pubDate>Wed, 27 Sep 2006 13:21:10 +0000</pubDate>
		<dc:creator>Piet de Visser</dc:creator>
		
		<category><![CDATA[Databases]]></category>

		<category><![CDATA[General]]></category>

		<category><![CDATA[Operating Systems]]></category>

		<category><![CDATA[Oracle Applications]]></category>

		<guid isPermaLink="false">http://www.bloggingaboutoracle.org/?p=187</guid>
		<description><![CDATA[Recently, I&#8217;ve had several interesting discussion on the relationship between &#8220;databases&#8221; and &#8220;systems&#8221;. It comes down to this: Should there be many databases on a single system (m:1, the traditional approach), or should there be many systems underneath one database (1:m, grid)? And when is 1:1 appropriate?
Current hardware is powerful enough to allow &#8220;supernodes&#8221; that [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I&#8217;ve had several interesting discussion on the relationship between &#8220;databases&#8221; and &#8220;systems&#8221;. It comes down to this: Should there be many databases on a single system (m:1, the traditional approach), or should there be many systems underneath one database (1:m, grid)? And when is 1:1 appropriate?</p>
<p>Current hardware is powerful enough to allow &#8220;supernodes&#8221; that can run hundreds of databases. We are also confronted with Virtualization or &#8220;carve-up&#8221; of hardware by way of XEN, VMware, or vendor specific product that create domains or partitions.<br />
With the current push towards &#8220;virtualization&#8221; of systems and the (in)capabilities of Oracle, it may just be worth to re-start some of the n:m discussion (did it ever go away?).</p>
<p>It is time to take a position on the many-to-many relationship between databases and systems.</p>
<p><span id="more-83"></span></p>
<p>To summarize it for those architects and (account-)managers who are in a hurry:<br />
I am in favor of 1:1 wherever possible, I support 1:m (RAC, grid) if really, really needed (but just please think about it one more time). RAC is a wonderful piece of technology that can serve many other vendors as a good example. It can be made to work. I will try to indicate under which conditions I think RAC can or cannot be applied.<br />
Finally, I will only tolerate the old-fashioned m:1 for non-critical situations or on systems where there is some sort of risk-mitigation against interference between the (instances of) multiple databases.</p>
<p>After explaining these positions, I also have a list of recommendations for customers, providers and even for the Big-Oracle itself.</p>
<p>Those of you interested: read on. Possibly prove me wrong.<br />
Others, keep browsing, the truth is out there, whichever version or vendor you want to see.</p>
<p>For the record: the bottom of the text contains links to all our major &#8220;partners&#8221;. Please keep the invites coming.</p>
<p><strong>Intro, and some definitions.</strong></p>
<p>On conventional systems, we generally find 1 or more databases running on a single system (*nix or even windows). For example, for concept-testing of a DG setup with cascaded standby, my laptop has run 5 databases simultaneously. Slow, but running. It just takes loads of memory and careful (memory-) parameter setting. It illustrates the capabilities of the Oracle database that the concept, once proven on a laptop could then be used to clone a 3TB production system (this time not on Windows). But the laptop Proof-of-Concept also illustrated an important issue when running multiple databases on a single system: Contention. The databases were visibly (and audibly from disk and fan) competing for IO and CPU resource.</p>
<p>NB: Can&#8217;t resist to put one in for Deb and Nigel: Let the world know that Deb got more memory into her laptop then Nigel, but then both David and I still have more memory in our laptops then the two of you together, so there ;-). Size matters. Techies rule.<br />
Back to serious business.</p>
<p>With the current possibilities for virtualization, you can take hardware and split it into many &#8220;systems&#8221; using VMware, Xen or vendor-specific tools for domains, lpars, etc.. Each resulting system can then be used to run instance(s) of 1 or more databases. When is this useful and how far should we take this?<br />
With Oracle RAC (GRID, anyone?) you can take a database and distribute its instances over many system. When does this add benefits?</p>
<p>First a few quick definitions to delimit the playing field. Please not that the definitions are for the purpose of this argument only. They don&#8217;t pretend to be scientific or final. Or even to be correct.</p>
<p>System: a running *nix (or win*) instance containing a process list and an amount of addressable memory. On short: a running instance of an &#8220;operating system&#8221;.<br />
A system can be Virtual if the hardware seen by the operating system is not identical to the actual underlying kit. This is the case when a larger system is split into &#8220;virtual&#8221; units by use of Xen, VMware or some vendor-specific layer of software or firmware. Some of those can also be modified dynamically (e.g.: Rolling). Some definitions and a good description can be found here:<br />
http://encyclopedia.thefreedictionary.com/virtualization.</p>
<p>Database: an (Oracle) database, containing one system tablespace, and one user called SYS (I&#8217;m still trying to find the &#8220;essence&#8221; of an Oracle database, how about the sys.obj$ entries?). Note that the use of DataGuard can mystify the definition of a &#8220;database&#8221;, because each DG-clone can represent &#8220;the database&#8221;. The actual Single Point of Truth (SPoT) is where the current &#8220;primary instantiation&#8221; of the database resides.</p>
<p>Also note that my definitions do not include the binaries, or the ORACLE_HOME, as part of the database or the system. Indeed, systems and databases can be used in situations where the software needed to run them is &#8220;shared&#8221;. Most system only need a few &#8220;system specific&#8221; files in /var and /etc. I will always point out VMS as the ultimate mother of all clustered systems whereby files are shared between multiple nodes. But that requires a Clustered File System (CFS), and that opens a different discussion altogether. Suffice to say that a CFS is very suitable to ensure that all machines can be connected to the same, identical software and are guaranteed to run the same version of the binaries.</p>
<p>Now let me briefly elaborate on the different options.</p>
<p><strong>Conventional: many:1.</strong></p>
<p>On conventional systems, we often see many databases running on a single (unix) instace.<br />
The DBA can look after the databases, and the unix administrators have only one entity to watch. Any collision between databases will have to be handled by the DBA. Note that in most of these conventional cases all databases share the same software-tree (multi databases running from the same oracle_home).<br />
These systems tend to have a relaxed SLA. The utilization varies and sometimes we see high percentages of CPU or IO bandwidth being consumed by a single database.</p>
<p>The main disadvantage of conventional systems is the fact that there is only one system, and all databases meet there. A problem with either a single database or with the system itself can quickly contaminate all databases on the system. And upgrades of system- or oracle-software lead to simultaneous outages of all databases on the system.</p>
<p>In case of system- or hardware failures many databases must be recovered simultaneously or re-started on one or more (other) systems (requiring some prioritization). The simultaneous recovery of many databases may lead to a brief period of overload and/or chaos an possibly a domino effect on other systems or components.</p>
<p>The advantages of an m:1 configuration are the simplicity of a &#8220;single system&#8221;, which is easy on the system-admin, and the often cheaper license structure when using per-system license.</p>
<p><strong>Simple: 1:1</strong></p>
<p>On system with a high load or a stringent SLA, we tend to see 1:1 relationships: a single database, whereby the sole and single instance of the database runs in a single unix system. This is sometimes referred to as the monogamous configuration.<br />
By having the whole system to itself, the database can benefit from all the resources available. There is no interaction (disturbance) from adjacent instances or other processes. Determining parameters is relatively simple.</p>
<p>However, as Oracle (-sales) will point out, this 1:1 configuration generally means the system is grossly under-utilized. It also means the database can still suffer from unix- or hardware failures.<br />
But I like the simplicity of this configuration, I think this is the most &#8220;robust&#8221; solution and is applicable to the majority of databases. Whenever a problem occurs on one of the systems, only one database is affected, and recovery-efforts can be concentrated on a single database and application, reducing the risk of a domino-effect.</p>
<p>The 1:1 situation also lends itself very well to hardware-clustering or &#8220;cold failover&#8221; whereby a database is re-started on another system (node) in case the underlying system or hardware fails. Only one database needs to be re-started or recovered.</p>
<p>Since a 1:1 configuration requires many &#8220;systems&#8221;, it is attractive to use server virtualization. By running multiple &#8220;virtual&#8221; systems on a single piece of hardware, you can quickly create the required number of &#8220;separate&#8221; or isolated systems. When doing this, keep in mind that the underlying hardware remains the single point of failure. When one or more virtual system are meant to replace one-another in case of failure, they should preferably run on separated hardware.</p>
<p><strong>RAC: 1 : many.</strong></p>
<p>As a techie, I like the technology behind RAC. It is a wonderful thing to play with and I like the challenge to master this thoroughbred in real-life system. But I have to be careful not to be running a &#8220;solution looking for a problem&#8221;.</p>
<p>We tend to see RAC databases in organizations with formal and very stringent SLA&#8217;s and with the budget and the resources to try and meet these requirements.</p>
<p>OPS and RAC eliminate the SPoF of the &#8220;system&#8221; and deploy the database over multiple systems. Theoretically this works nicely and even provides dynamic provisioning of system resources (you can utilize all available kit, and you can add more kit as needed). In practice, many have pointed out the relative complex setup, the high price, and the other shortcomings of RAC (link to Miraculous, Famous Danish company).</p>
<p>We have indeed seen successful deployments of multi-instance database on some very large kit. In some cases, the impressive amount of hardware was able to hide badly designed application-code for quite some time. And by constantly distributing the (mainly CPU-) workload over the available unix systems, the coders got away with some appallingly inefficient constructions. Some of these cases have demonstrated the viability (and sometimes vulnerability) of RAC quite nicely, although a better design or implementation might have been cheaper (I prefer brains over iron, always!, in case of doubt: reduce the size of the hardware and tell the IT crowd to JFDI).<br />
Note however, that it is important to let the hardware boys and vendors it their way a bit too. Riding in some extra hardware makes them happy, and is good for our relationship with these vendors. They might invite us on future projects.</p>
<p>And to pour further praise on the Oracle techies, TAF has saved our systems several times when a node got in trouble and died. Database-nodes die mostly through software errors, core dumps or memory leaks, and sometimes through human errors. The underlying hardware is rarely a problem, as these high-end-hardware systems are built to keep running run even if a salty ocean wave runs through the lower floors of the building : unintentionally (Kathryn, are you reading this?).<br />
Please remark that even when you have RAC and TAF-capabilities, you still need to code your application to correctly trap and handle the failover-events. Otherwise, it only works on &#8220;idle&#8221; connections.</p>
<p>Note that most databases can (be made to) run on RAC, provided there are no obvious bottlenecks such as an ordered-no-cache sequence or some very hot blocks with running-totals. And those bottlenecks can generally be un-designed.<br />
NB: Oracle currently seems to have the following position on RAC: if it doesn&#8217;t run (or scale) on RAC, your design is wrong.</p>
<p>Suffice to say that where Very Fast Failover (TAF or FCF/FAN) are needed, RAC has no equal. And for systems that have extreme hardware (CPU) requirements, the RAC scale-out model is also beneficial.</p>
<p><strong>Question : Now what to choose ?</strong></p>
<p>The classic answer: It Depends.<br />
However, I will try to provide some guidance and some opinions.</p>
<p>The only factor that really matters is &#8220;The Business&#8221; (duh).<br />
What does your business need and what can it afford. For simple or undemanding SLAs the traditional m:1 configuration is often sufficient and cost-effective. For businesses that have more stringent demands or for providers that risk being sued by their (business-)customers over a broken SLA, a 1:1 is advised, possibly with some cold-failover mechanism. And finally, if you really need the additional 10 minutes, or if you need the scale-out features, AND if you can afford the resources for testing, training and ongoing maintenance, a 1:m configuration (aka RAC or grid) can be your choice.</p>
<p>To figure out what your business needs (and can afford), you can either think for yourself, or you can give yourself and your department more credibility by engaging (principle-, business-) consultants to do cost-benefit analysis, risk-assessments or FEMA (that is: Failure Escalation Mode Analysis, not the other FEMA). They will especially stress the business-cost of downtime and any related loss of data/productivity/customers/orders/MegaWatts/ That is enough FUD for the moment. Back to more practical matters.</p>
<p>On the practical level, there are some factors that come into play. There is a) the preference (eeh: dictate) of your system administrators, your SAN engineers, your ASP,  or your hosting provider. Then there is b) your commercial relationship with Oracle which will determine how high your licensing cost will turn out. But there may be others, such as c) the capabilities and preferences of your DBA. We will not even go into items like d) the availability of test-systems to prove and maintain your architecture, or e) the available rack-space.</p>
<p>The first important factor that often comes into play is the preference (or the pricing-policy) of the system-admin team or the Hosting-Organization (the ASP). Are they capable of handling many systems or do they prefer a low number of unixes ? Can they quickly build and clone systems for provisioning? What price do your ASP&#8217;s charge for additional systems ? This may determine your capability to run &#8220;multiple&#8221; systems.<br />
Some organizations, by choice or by force, still get away with running just 1 large unix box with everything on it: HR, CRM, Logistics, and sometimes they even have their dev/test/uat environments on the very same box. Feasible, but with most of the drawback of a m:1 configuration.</p>
<p>The next factor is often License cost. How is your relation with Oracle, commercially? If you have to pay list-price, you will want to stick with &#8220;conventional&#8221;. Here, Oracle shoots itself in the foot: a lower price on RAC would speed up acceptance of the RAC and GRID model.<br />
Machiavelli did suspect this was done to buy sufficient Beta-time to find all quirks, possibly to find a solution for instance-affinity and to give customers the time to come up with a solution for the friendly delivered &#8220;Your Design is Wrong&#8221; consultancy-audit outcomes.</p>
<p>And last but not least, what do your DBA&#8217;s prefer, and how trained and comfortable are they with RAC/grid? The traditional choice, m:1, despite its disadvantages (contention, domino-effects) is still the easiest to maintain for a DBA. Choosing a 1:1 configuration brings on a slightly higher workload, but has the advantage of more robustness and easier, isolated, troubleshooting since databases and systems do not affect one-another when trouble or maintenance occurs (yes, yes, someone must shout &#8220;utilization&#8221; now, thank you).</p>
<p>The choice for a RAC or grid configuration tends to create a significant overhead. We politely disagree with Oracle at this point that the new grid-control alleviates all problems.<br />
And even if GC and its agents do try to take away a lot of the routine-tasks, Knowledge and Experience can never be completely replaced by a GUI. This aspect, the Human- or Operator dimension, tends to be the most under-estimated factor when (prematurely) implementing RAC/Grid.</p>
<p><strong>Recommendations:</strong></p>
<p>For customers and end-user businesses:<br />
Move carefully from m:1 to 1:1. The 1:1 configuraion is at this moment arguably the most robust way to run a database. Consider using virtual systems to support a 1:1 deployment, but beware of the possible contention and SPoF on the underlying physical layers. Move on to 1:m (RAC) for cases with specific needs (failover or scale-out). Only use RAC in cases where you must, but then don&#8217;t hesitate to use it. It can (be made to) work, and it will work (eventually), and you may have to learn these tricks eventually. Start on the first valid occasion.</p>
<p>For ASP and hosting organizations:<br />
Learn how to handle clusters, clones and virtual systems. These tools will give you an edge in flexibility. Then offer your customers the possibility to host many _identical_ systems at a rebate. Your customers will buy more as 1:1 and 1:m systems proliferate, and in the long run you will benefit. Hosting Companies and some vendor pricing-policies are the largest obstacle when moving from m:1 to 1:1 or even on to 1:m. Innovative customers will try to move to cheaper and more flexible platforms, and even lagging customers will eventually follow. If the hosting provider can quickly &#8220;provision&#8221; at acceptable cost, he can be seen as a partner in commoditization, rather then as an obstacle to flexibility.</p>
<p>For System-admins:<br />
Learn how to handle a multitude of systems, learn how to keep them in sync, and how to clone or (re-)build systems quickly.<br />
NB: for the addicts: investigate the use of Clustered File Systems (CFS).</p>
<p>For DBA&#8217;s and system-admins:<br />
Aim to deploy databases and systems in a 1:1 fashion. The &#8220;isolation&#8221; of each database and system greatly facilitates admin- and troubleshooting activities.<br />
Also get used to replicating or sharing software through OUI or other mechanisms.<br />
And if possible, start to work with a CFS.<br />
Sharing storage at the &#8220;filesystem&#8221; level can facilitate the juggling of multiple systems very much. Even NFS (supported, but not recommended <img src='http://www.bloggingaboutjava.org/cms/wordpress2/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> is a usable alternative.<br />
A CFS can offer great advantages by sharing files across nodes and this can simplify software-deployment and distribution. You will always need two copies of software for redundancy-purposes, but please think before making he 3rd, 4th or 42nd copy. Sharing is better the copying, especially at high numbers. It is easier to manage a small number of shared oracle_home trees then to have 42 or more copies that need to be rsynced or otherwise kept identical.</p>
<p>For Oracle:<br />
It is appalling to find that a grid (aka an OPS database) was easier to build and maintain under VMS or Tru64 with Oracle 8174 then it is with the current 10g versions.<br />
Please pursue the development of OCFS and facilitate shared-binary installs on OCFS and other CFS platforms. This will help proliferation of your GRID strategy, and will get you more market-share and revenue in the long run. The oracle-inventory mechanism and the configuration of agents tend to make life difficult for deployment of shared-binaries. Any viable grid should IMHO include the shared use of a software tree and not depend on endless replication of executables.</p>
<p><strong>Shutdown (normal)</strong></p>
<p>By adopting a grid-strategy, Oracle has greatly increased the options for its customers. And for those of you who don&#8217;t know it yet: find the Oracle Sponsored GRID-INDEX. Various hard- and software vendors have added to the palette of choices by implementing their own versions of Grid, clusters, or virtualization. All this new (eh, apologies: innovative but proven) technology can be put to good use, but only when making the correct choices.</p>
<p>We hope the preceding information can offer some help, and we would like to close down by adding one more item of advice: try to base you choices on simplicity</p>
<p>Relevant links</p>
<p>The usual brownie-point partner-links and marketing buzzwords on grid etc :<br />
http://www.oracle.com/global/nl/corporate/press/200634.html<br />
http://www.oracle.com/global/eu/pressroom/emeagridreport4.pdf<br />
http://www.hp.com/techservers/grid/index.html<br />
http://www.ibm.com<br />
http://www.sun.com</p>
<p>More on server-virtualisation (start here!):<br />
http://encyclopedia.thefreedictionary.com/virtualization</p>
<p>An introduction to Clustered File Systems:<br />
http://www.beedub.com/clusterfs.html<br />
http://www.oracle.com/technology/pub/articles/calish_filesys2.html</p>
<p>Some good, albeit biassed arguments for CFS can also be found here:<br />
http://www.polyserver.com (look for articles by Kevin Closson).</p>
<p>A classic on RAC:<br />
http://www.miracleas.dk/WritingsFromMogens/YouProbablyDontNeedRACUSVersion.pdf</p>
<p>Just for fun:<br />
http://www.userfriendly.org<br />
http://www.dilbert.com</p>
<p>Last bootnote for all Alliance Managers and other people in control of party-invites: take note of my cross-links to our &#8220;powerful partners&#8221;. And don&#8217;t worry, since you didn&#8217;t bother to read all of the text, neither did the real decision-makers, hence no damage is done. Oh, and please keep me on the invite-lists, I still appreciate good food and quality entertainment.</p>
<p>Now shoot me (over lunch?).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggingaboutjava.org/2006/09/databases-and-system-what-kind-of-relationships/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Poc MAA - Blog 11 - Testing a switchover to the physical Standby Database</title>
		<link>http://www.bloggingaboutjava.org/2006/05/poc-maa-blog-11-testing-a-switchover-to-the-physical-standby-database/</link>
		<comments>http://www.bloggingaboutjava.org/2006/05/poc-maa-blog-11-testing-a-switchover-to-the-physical-standby-database/#comments</comments>
		<pubDate>Mon, 29 May 2006 14:47:51 +0000</pubDate>
		<dc:creator>Yuri van Buren</dc:creator>
		
		<category><![CDATA[Databases]]></category>

		<category><![CDATA[Networks]]></category>

		<category><![CDATA[Operating Systems]]></category>

		<guid isPermaLink="false">http://www.bloggingaboutoracle.org/?p=151</guid>
		<description><![CDATA[For a Real Application Clusters database, only one primary instance and one standby instance can be active during a switchover. Therefore, before a switchover, shut down all but one primary instance and one standby instance. After the switchover completes, restart the primary and standby instances that were shut down during the switchover.
&#160;
When other instances are [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span>For a Real Application Clusters database<strong>, only one</strong> primary instance and <strong>one</strong> standby instance can be active during a switchover. Therefore, <strong>before a switchover, shut down all but one primary instance and one standby instance</strong>. After the switchover completes, restart the primary and standby instances that were shut down during the switchover.</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>When other instances are active, an attempt to switch over fails with the following error message:</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &quot;Courier New&quot;">SQL&gt; ALTER DATABASE COMMIT TO SWITCHOVER TO STANDBY; </span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &quot;Courier New&quot;">ALTER DATABASE COMMIT TO SWITCHOVER TO STANDBY * </span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &quot;Courier New&quot;">ORA-01105: mount is incompatible with mounts by other instances </span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><a name="_Toc130634962"></a><strong><span style="font-size: 12pt">Switch over steps</span></strong><strong><span style="font-size: 12pt"></span></strong></p>
<p style="margin-right: -17.55pt" class="MsoNormal"><span>On the primary database, execute the following statement:</span></p>
<p style="margin-right: -16.35pt" class="MsoNormal"><span style="font-size: 9pt; font-family: &quot;Courier New&quot;">ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN;</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>This statement does the following:</span></p>
<p class="MsoNormal"><span>- It closes the primary database, terminating any active sessions</span></p>
<p class="MsoNormal"><span>- It transmits any unarchived redo log files and applies them to the standby database</span></p>
<p class="MsoNormal"><span>- It adds an end-of-redo marker to the header of the last log file being archived</span></p>
<p class="MsoNormal"><span>- It creates a backup of the current control file</span></p>
<p class="MsoNormal"><span>- It converts the current control file into a standby control file</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>If the Primary Site is destroyed by a disaster you can bring up the standby database as the primary database on the standby database server with:</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &quot;Courier New&quot;">ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &quot;Courier New&quot;">ALTER DATABASE ACTIVATE PHYSICAL STANDBY DATABASE;</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &quot;Courier New&quot;">&nbsp;</span></p>
<p class="MsoNormal"><span>The ACTIVATE statement immediately transitions the standby database to the primary role and makes no attempt to apply any additional redo data that might exist at the standby location. When using this statement, you must carefully balance the cost of data loss at the standby location against the potentially extended period of downtime required to fully repair the primary database.</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &quot;Courier New&quot;">&nbsp;</span></p>
<p class="MsoNormal"><span>Check the changed database role with:</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &quot;Courier New&quot;">select database_role, db_unique_name, name from v$database;</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &quot;Courier New&quot;">DATABASE_ROLE<span>&nbsp;&nbsp;&nbsp; </span>DB_UNIQUE_NAME<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>NAME</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &quot;Courier New&quot;">&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &quot;Courier New&quot;">PRIMARY<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>stdb<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>PRAC</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><a name="_Toc130634963"></a><strong><span style="font-size: 12pt">&nbsp;</span></strong></p>
<p class="MsoNormal"><span><strong><span style="font-size: 12pt">Establishing a Time Lag on a Physical Standby Database</span></strong></span><strong><span style="font-size: 12pt"></span></strong></p>
<p class="MsoNormal"><span>To create a physical standby database with a time lag, modify the </span></p>
<p class="MsoNormal"><span>LOG_ARCHIVE_DEST_2 initialization parameter on the <strong>primary database</strong> to set a delay for the standby database. The following is an example of how to add a 4-hour delay:</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &quot;Courier New&quot;">alter system set log_archive_dest_2=&#39;SERVICE=stdb LGWR ASYNC</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &quot;Courier New&quot;">VALID_FOR=(ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME=stdb&#39; <strong>DELAY=240</strong>&#39; scope=both;</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p>  <span><font></font></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggingaboutjava.org/2006/05/poc-maa-blog-11-testing-a-switchover-to-the-physical-standby-database/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PoC MAA -Blog 10 - Implementing a Physical Standby Database</title>
		<link>http://www.bloggingaboutjava.org/2006/05/poc-maa-blog-10-implementing-a-physical-standby-database/</link>
		<comments>http://www.bloggingaboutjava.org/2006/05/poc-maa-blog-10-implementing-a-physical-standby-database/#comments</comments>
		<pubDate>Mon, 22 May 2006 07:40:00 +0000</pubDate>
		<dc:creator>Yuri van Buren</dc:creator>
		
		<category><![CDATA[Databases]]></category>

		<category><![CDATA[Networks]]></category>

		<category><![CDATA[Operating Systems]]></category>

		<category><![CDATA[Oracle Infrastructure]]></category>

		<guid isPermaLink="false">http://www.bloggingaboutoracle.org/?p=147</guid>
		<description><![CDATA[Following our cookbook we installed CRS and RAC software on OCFS2 on our linux5 server. 
See our PoC MAA- Blogs 5,6 and 7 about OCFS2, CRS and RAC install respectively.
Overview of the file system on linux5:
[oracle@linux5 ~]$ df -k
Filesystem&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 1K-blocks&#160;&#160;&#160;&#160;&#160; Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 67829336&#160; 11887112&#160; 52496672&#160; 19% /
/dev/cciss/c0d0p1&#160;&#160;&#160;&#160;&#160;&#160; 102182&#160;&#160;&#160;&#160;&#160; 6774&#160;&#160;&#160;&#160; 95408&#160;&#160; 7% /boot/efi
none&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; [...]]]></description>
			<content:encoded><![CDATA[<p><span>Following our cookbook we installed CRS and RAC software on OCFS2 on our linux5 server.</span> </p>
<p>See our PoC MAA- Blogs 5,6 and 7 about OCFS2, CRS and RAC install respectively.</p>
<p><span>Overview of the file system on linux5:</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;">[oracle@linux5 ~]$ df -k</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;">Filesystem<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>1K-blocks<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Used Available Use% Mounted on</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;">/dev/mapper/VolGroup00-LogVol00</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>67829336<span>&nbsp; </span>11887112<span>&nbsp; </span>52496672<span>&nbsp; </span>19% /</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;">/dev/cciss/c0d0p1<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>102182<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>6774<span>&nbsp;&nbsp;&nbsp;&nbsp; </span>95408<span>&nbsp;&nbsp; </span>7% /boot/efi</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;">none<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>1020720<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<span>&nbsp;&nbsp; </span>1020720<span>&nbsp;&nbsp; </span>0% /dev/shm</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;">/dev/sdj<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>522240<span>&nbsp;&nbsp;&nbsp; </span>105408<span>&nbsp;&nbsp;&nbsp; </span>416832<span>&nbsp; </span>21% /u01/cd1</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;">/dev/sdk<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>522240<span>&nbsp;&nbsp;&nbsp; </span>102336<span>&nbsp;&nbsp;&nbsp; </span>419904<span>&nbsp; </span>20% /u02/cd2</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;">/dev/sdl<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>522240<span>&nbsp;&nbsp;&nbsp;&nbsp; </span>86976<span>&nbsp;&nbsp;&nbsp; </span>435264<span>&nbsp; </span>17% /u03/cd3</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;">/dev/sdm<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>20971200<span>&nbsp;&nbsp; </span>3783872<span>&nbsp; </span>17187328<span>&nbsp; </span>19% /u01/sw1</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;">/dev/sdn<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>20971200<span>&nbsp;&nbsp;&nbsp; </span>137984<span>&nbsp; </span>20833216<span>&nbsp;&nbsp; </span>1% /u09/sw2</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;">/dev/sdo<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>26213888<span>&nbsp; </span>11774080<span>&nbsp; </span>14439808<span>&nbsp; </span>45% /u02/oradata</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;">/dev/sdp<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>26213888<span>&nbsp;&nbsp; </span>2737664<span>&nbsp; </span>23476224<span>&nbsp; </span>11% /u03/oraflra</span></p>
<p class="MsoNormal"><span>We followed the steps outlined in Chapter 3 of the Oracle Data Guard Concepts and Administration Guide to create our physical standby database.</span></p>
<p class="MsoNormal">&lt;!&#8211;More&#8211;&gt;</p>
<p class="MsoNormal">&nbsp;<a name="_Toc130634952" title="_Toc130634952"></a><strong><span style="font-size: 12pt">Step 1 Configure a Standby redo log</span></strong></p>
<p class="MsoNormal"><strong><br /><em><span>Ensure log file sizes are identical on the primary and standby databases:</span></em></strong></p>
<p class="MsoNormal"><span>The primary database has 8 redolog groups of 50Mb each (All 4 nodes have two groups each).</span></p>
<p class="MsoNormal"><span>Because we use a backup to setup the Standby database the redologfiles of the Standby database are defacto the same size.</span></p>
<p class="MsoNormal"><span>&nbsp;</span><strong><em><span>Determine the appropriate number of standby redo log file groups: </span></em></strong></p>
<p class="MsoNormal"><span>As best practices you have to add:</span></p>
<p style="margin-right: -11.55pt" class="MsoNormal"><span>(maximum number of logfiles for each thread + 1 ) * maximum number of threads = (2+1) * 4 = 12</span></p>
<p class="MsoNormal"><span>&nbsp;</span><strong><em><span>Verify related database parameters and settings:</span></em></strong></p>
<p class="MsoNormal"><span>Check MAXLOGFILES and MAXLOGMEMBERS settings for 10.1. databases.</span></p>
<p class="MsoNormal"><span>Use: alter database backup controlfile to trace; + check the trace in the user_dump_dest directory. From 10.2 onwards the controlfile automatically expands for the MAX settings parameters. Be sure that 8 + 12 = 20 redolog files can be created.</span></p>
<p class="MsoNormal"><span>If that is not the case re-create the controlfile on the primary database for 10.1. databases only.</span></p>
<p class="MsoNormal"><strong><em><span>Create standby redo log file groups: </span></em></strong></p>
<p class="MsoNormal"><span>Add 12 standby redolog groups on the primary database all of the same size with:</span></p>
<p class="MsoNormal"><span>alter database add standby logfile group 9 (&#39;/u02/oradata/prac/stredo09.log&#39;) size 50M;</span></p>
<p class="MsoNormal"><span>alter database add standby logfile group 10 (&#39;/u02/oradata/prac/stredo10.log&#39;) size 50M;</span></p>
<p class="MsoNormal"><span>alter database add standby logfile group 11 (&#39;/u02/oradata/prac/stredo11.log&#39;) size 50M;</span></p>
<p class="MsoNormal"><span>alter database add standby logfile group 12 (&#39;/u02/oradata/prac/stredo12.log&#39;) size 50M;</span></p>
<p class="MsoNormal"><span>alter database add standby logfile group 13 (&#39;/u02/oradata/prac/stredo13.log&#39;) size 50M;</span></p>
<p class="MsoNormal"><span>alter database add standby logfile group 14 (&#39;/u02/oradata/prac/stredo14.log&#39;) size 50M;</span></p>
<p class="MsoNormal"><span>alter database add standby logfile group 15 (&#39;/u02/oradata/prac/stredo15.log&#39;) size 50M;</span></p>
<p class="MsoNormal"><span>alter database add standby logfile group 16 (&#39;/u02/oradata/prac/stredo16.log&#39;) size 50M;</span></p>
<p class="MsoNormal"><span>alter database add standby logfile group 17 (&#39;/u02/oradata/prac/stredo17.log&#39;) size 50M;</span></p>
<p class="MsoNormal"><span>alter database add standby logfile group 18 (&#39;/u02/oradata/prac/stredo18.log&#39;) size 50M;</span></p>
<p class="MsoNormal"><span>alter database add standby logfile group 19 (&#39;/u02/oradata/prac/stredo19.log&#39;) size 50M;</span></p>
<p class="MsoNormal"><span>alter database add standby logfile group 20 (&#39;/u02/oradata/prac/stredo20.log&#39;) size 50M;</span></p>
<p class="MsoNormal"><strong><em><span>&nbsp;Verify that the standby redo log file groups were created with:</span></em></strong></p>
<p class="MsoNormal"><span>select group#, thread#, sequence#, archived, status from v$standby_log;</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp; </span>GROUP#<span>&nbsp;&nbsp;&nbsp; </span>THREAD#<span>&nbsp; </span>SEQUENCE# ARC STATUS</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;">&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212; &#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>9<span>&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0 YES UNASSIGNED</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>10<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0 YES UNASSIGNED</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>11<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0 YES UNASSIGNED</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>12<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0 YES UNASSIGNED</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>13<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0 YES UNASSIGNED</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>14<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0 YES UNASSIGNED</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp; </span><span>&nbsp;&nbsp;&nbsp;</span>15<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0 YES UNASSIGNED</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>16<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0 YES UNASSIGNED</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>17<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0 YES UNASSIGNED</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>18<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0 YES UNASSIGNED</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>19<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0 YES UNASSIGNED</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>20<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0 YES UNASSIGNED</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;">12 rows selected.</span></p>
<p class="MsoNormal"><a name="_Toc130634953" title="_Toc130634953"></a><strong><span style="font-size: 12pt">Step 2 Set the Primary Database Initialization Parameters</span></strong></p>
<p class="MsoNormal"><span>Use the following alter system commands to change the necessary parameter settings:</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span>alter system set log_archive_config=&#39;DG_CONFIG=(prac,stdb)&#39; scope=both;</span></p>
<p class="MsoNormal"><span>&nbsp;alter system set log_archive_dest_1=&#39;LOCATION=/u02/oradata/prac_arch VALID_FOR=(ALL_LOGFILES, ALL_ROLES) DB_UNIQUE_NAME=prac&#39; scope=both;</span></p>
<p class="MsoNormal"><span>&nbsp;alter system set log_archive_dest_2=&#39;SERVICE=stdb LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME=stdb&#39;<span>&nbsp; </span>scope=both;</span></p>
<p class="MsoNormal"><span>&nbsp;alter system set log_archive_max_processes=30 scope=both;</span></p>
<p class="MsoNormal"><span>&nbsp;alter system set fal_server = &#39;stdb&#39; scope=both;</span></p>
<p class="MsoNormal"><span>&nbsp;alter system set fal_client = &#39;prac&#39; scope=both;</span></p>
<p class="MsoNormal"><span>&nbsp;alter system set db_file_name_convert=&#39;stdb&#39;,&#39;prac&#39; scope=spfile;</span></p>
<p class="MsoNormal"><span>&nbsp;And the most important one: specify online redolog location on Primary and Standby location.<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></p>
<p class="MsoNormal"><span>alter system set log_file_name_convert = &#39;/u02/oradata/prac/&#39;, &#39;/u02/oradata/prac/&#39; scope=spfile;</span></p>
<p class="MsoNormal"><span>&nbsp;Note that the scope is only spfile, so you have to restart the instance to make the parameter active.</span></p>
<p class="MsoNormal"><span>&nbsp;alter system set standby_file_management=AUTO scope=both;</span></p>
<p class="MsoNormal"><strong><a name="_Toc130634954" title="_Toc130634954"></a><span style="font-size: 12pt">Step 3 Check if ARCHIVELOG is enabled</span></strong></p>
<p class="MsoNormal"><span>Select log_mode from v$database;<span>&nbsp;&nbsp;Must be: </span></span><span>ARCHIVELOG.</span></p>
<p class="MsoNormal"><span>&nbsp;If the database is in NOARCHIVELOG enable it by doing:</span></p>
<p class="MsoNormal"><span>shutdown immediate;</span></p>
<p class="MsoNormal"><span>startup mount;</span></p>
<p class="MsoNormal"><span>alter database archivelog;</span></p>
<p class="MsoNormal"><span>alter database open;</span></p>
<p class="MsoNormal"><a name="_Toc130634955" title="_Toc130634955"></a><strong><span style="font-size: 12pt">Step 4 Create a backup copy of the Primary Database datafiles</span></strong></p>
<p class="MsoNormal"><span>Use RMAN or even more simple use a COLD BACKUP.</span></p>
<p class="MsoNormal"><span>&nbsp;shutdown immediate;</span></p>
<p class="MsoNormal"><span>&nbsp;Copy all database files to the standby site </span></p>
<p class="MsoNormal"><span>(This might take a while &hellip; depending on size of you&rsquo;re database and network speed).</span></p>
<p class="MsoNormal"><a name="_Toc130634956" title="_Toc130634956"></a><strong><span style="font-size: 12pt">Step 5 Create a Control File and Parameter File for the Standby Database</span></strong></p>
<p class="MsoNormal"><span>startup mount;</span></p>
<p class="MsoNormal"><span>alter database </span><span>create standby controlfile as &#39;/u02/oradata/prac/stdb.ctl&#39;;</span></p>
<p class="MsoNormal"><span>create pfile=&#39;/u02/oradata/prac/initstdb.ora&#39; from spfile;</span></p>
<p class="MsoNormal"><span>alter database open;</span></p>
<p class="MsoNormal"><span>&nbsp;Modify this initstdb.ora file with &ldquo;vi&rdquo; according to the following:</span></p>
<p class="MsoNormal"><span>This line is OK!! *.db_name=&#39;prac&#39;</span></p>
<p class="MsoNormal"><span>ADD line ==&gt; *.db_unique_name=&#39;stdb&#39;</span></p>
<p class="MsoNormal"><span>&nbsp;Flip names in these parameters to: </span></p>
<p class="MsoNormal"><span>*.db_file_name_convert=&#39;prac&#39;,&#39;stdb&#39;</span></p>
<p class="MsoNormal"><span>*.log_archive_dest_1=&#39;LOCATION=/u02/oradata/prac_arch VALID_FOR=(ALL_LOGFILES, ALL_ROLES) DB_UNIQUE_NAME=stdb&#39;</span></p>
<p class="MsoNormal"><span>*.log_archive_dest_2=&#39;SERVICE=stby LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME=prac&#39;</span></p>
<p class="MsoNormal"><span>*.fal_client=&#39;stdb&#39;</span></p>
<p class="MsoNormal"><span>*.fal_server=&#39;prac&#39;</span></p>
<p class="MsoNormal"><span>Remove both local and remote listener lines.</span></p>
<p class="MsoNormal"><span>Save the file and<br />
 copy it with the standby controlfile to the standby database server.</span></p>
<p class="MsoNormal"><span>&nbsp;Now we have on the standby database server in the /u02/oradata/prac directory the Cold Backup, the Standby Control File and the initstdb.ora file.</span></p>
<p class="MsoNormal"><a name="_Toc130634957" title="_Toc130634957"></a><strong><span style="font-size: 12pt">Step 6 Setup the environment to support the Standby database</span></strong></p>
<p class="MsoNormal"><strong><em><span>Create a password file for the &ldquo;prac&rdquo; standby database on the standby server:</span></em></strong></p>
<p class="MsoNormal"><span>orapwd file=orapwprac.ora entries=10</span></p>
<p class="MsoNormal"><strong><em><span>Configure the Oracle Net Services names on the primary and standby server:</span></em></strong></p>
<p class="MsoNormal"><span>Add the following two tnsnames.ora entries on the primary server and standby server.</span></p>
<p class="MsoNormal"><span>&nbsp;prac =</span></p>
<p class="MsoNormal"><span><span>&nbsp; </span>(DESCRIPTION =</span></p>
<p class="MsoNormal"><span><span>&nbsp;&nbsp;&nbsp; </span>(ADDRESS = (PROTOCOL = TCP)(HOST = linux1_vip)(PORT = 1522))</span></p>
<p class="MsoNormal"><span><span>&nbsp;&nbsp;&nbsp; </span>(ADDRESS = (PROTOCOL = TCP)(HOST = linux2_vip)(PORT = 1522))</span></p>
<p class="MsoNormal"><span><span>&nbsp;&nbsp;&nbsp; </span>(ADDRESS = (PROTOCOL = TCP)(HOST = linux3_vip)(PORT = 1522))</span></p>
<p class="MsoNormal"><span><span>&nbsp;&nbsp;&nbsp; </span>(ADDRESS = (PROTOCOL = TCP)(HOST = linux4_vip)(PORT = 1522))</span></p>
<p class="MsoNormal"><span><span>&nbsp;&nbsp;&nbsp; </span>(CONNECT_DATA =</span></p>
<p class="MsoNormal"><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>(SERVER = DEDICATED)</span></p>
<p class="MsoNormal"><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>(SERVICE_NAME = prac)<span>&nbsp;&nbsp;&nbsp;&nbsp; </span>)<span>&nbsp;&nbsp; </span>)</span></p>
<p class="MsoNormal"><span>&nbsp;stdb =</span></p>
<p class="MsoNormal"><span><span>&nbsp; </span>(DESCRIPTION =</span></p>
<p class="MsoNormal"><span><span>&nbsp;&nbsp;&nbsp; </span>(ADDRESS_LIST =</span></p>
<p class="MsoNormal"><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>(ADDRESS = (PROTOCOL = TCP)(HOST = linux5_vip)(PORT = 1521))</span></p>
<p class="MsoNormal"><span><span>&nbsp;&nbsp;&nbsp; </span>)</span></p>
<p class="MsoNormal"><span><span>&nbsp;&nbsp;&nbsp; </span>(CONNECT_DATA =</span></p>
<p class="MsoNormal"><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>(SERVER = DEDICATED)</span></p>
<p class="MsoNormal"><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>(SERVICE_NAME = prac)<span>&nbsp;&nbsp;&nbsp;&nbsp; </span>)<span>&nbsp;&nbsp; </span>)</span></p>
<p class="MsoNormal"><strong><em><span>&nbsp;Check if the listeners are configured on both the primary and standby database servers.</span></em></strong></p>
<p class="MsoNormal"><span>Restart the listeners on the primary servers with:</span></p>
<p class="MsoNormal"><span>[oracle@linux1 prac]$ . oraenv</span></p>
<p class="MsoNormal"><span>ORACLE_SID = [prac1] ? crs</span></p>
<p class="MsoNormal"><span>[oracle@linux1 prac]$ srvctl stop listener -n linux1</span></p>
<p class="MsoNormal"><span>[oracle@linux1 prac]$ srvctl start listener -n linux1</span></p>
<p class="MsoNormal"><span>[oracle@linux1 prac]$ srvctl stop listener -n linux2</span></p>
<p class="MsoNormal"><span>[oracle@linux1 prac]$ srvctl stop listener -n linux3</span></p>
<p class="MsoNormal"><span>[oracle@linux1 prac]$ srvctl stop listener -n linux4</span></p>
<p class="MsoNormal"><span>[oracle@linux1 prac]$ srvctl start listener -n linux2</span></p>
<p class="MsoNormal"><span>[oracle@linux1 prac]$ srvctl start listener -n linux3</span></p>
<p class="MsoNormal"><span>[oracle@linux1 prac]$ srvctl start listener -n linux4</span></p>
<p class="MsoNormal"><span>&nbsp;For a non RAC database use the familiar listener commands:</span></p>
<p class="MsoNormal"><span>lsnrctl stop</span></p>
<p class="MsoNormal"><span>lsnrctl start</span></p>
<p class="MsoNormal"><span>Specify the correct listener name if needed, check the listener.ora file for the name.</span></p>
<p class="MsoNormal"><a name="_Toc130634958" title="_Toc130634958"></a><strong><span style="font-size: 12pt">Step 7 Start the Physical Standby Database</span></strong></p>
<p class="MsoNormal"><span>Copy the standby control file to the controlfile names mentioned in the initstdb.ora file: </span></p>
<p class="MsoNormal"><span>cp stdb.ctl /u02/oradata/prac/control01.ctl</span></p>
<p class="MsoNormal"><span>cp stdb.ctl /u02/oradata/prac/control02.ctl</span></p>
<p class="MsoNormal"><span>cp stdb.ctl /u02/oradata/prac/control03.ctl</span></p>
<p class="MsoNormal"><span>&nbsp;Set the correct environment variables and do the following:</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">&nbsp;[oracle@linux5 prac]$ . oraenv</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">ORACLE_SID = [prac] ? prac</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">[oracle@linux5 prac]$ export ORACLE_SID=prac1</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">[oracle@linux5 prac]$ sqlplus /nolog</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">&nbsp;SQL*Plus: Release 10.2.0.1.0 - Production on Tue Feb 28 11:19:33 2006</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">&nbsp;Copyright (c) 1982, 2005, Oracle.<span>&nbsp; </span>All rights reserved.</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">&nbsp;SQL&gt; conn / as sysdba</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">Connected to an idle instance.</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">SQL&gt; create spfile from pfile=&#39;/u02/oradata/prac/initstdb.ora&#39;;</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">SQL&gt; startup mount;</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">ORACLE instance started.</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">&nbsp;Total System Global Area<span>&nbsp; </span>524288000 bytes</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">Fixed Size<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>1995688 bytes</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">Variable Size<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>213912664 bytes</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">Database Buffers<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>306184192 bytes</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">Redo Buffers<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>2195456 bytes</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">Database mounted.</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">&nbsp;SQL&gt; alter database recover managed standby database disconnect from session;</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">&nbsp;Database altered.</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">&nbsp;YES!!!</span></p>
<p class="MsoNormal"><a name="_Toc130634959" title="_Toc130634959"></a><strong><span style="font-size: 12pt">Step 8 Test the Physical Standby Database is performing properly</span></strong></p>
<p class="MsoNormal"><span>Force several log switches on the primary database w<br />
ith:</span></p>
<p class="MsoNormal"><span>alter system switch logfile;</span></p>
<p class="MsoNormal"><span>&nbsp;On the standby database connect as sysdba and check with;</span></p>
<p class="MsoNormal"><span>select sequence#, applied, first_time, next_time, archived, status </span></p>
<p class="MsoNormal"><span>from v$archived_log order by sequence#;</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;">&nbsp;SEQUENCE# APPLIED<span>&nbsp;&nbsp; </span>FIRST_TIME<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>NEXT_TIME<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>ARCHIVED<span>&nbsp; </span>STA</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;">&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212; &#8212;</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>426 YES<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>28-FEB-06<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>28-FEB-06<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>YES<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>A</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>427 YES<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>28-FEB-06<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>28-FEB-06<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>YES<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>A</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>428 YES<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>28-FEB-06<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>28-FEB-06<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>YES<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>A</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>429 YES<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>28-FEB-06<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>28-FEB-06<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>YES<span>&nbsp;&nbsp;&nbsp;&nbsp; </span><span>&nbsp;&nbsp;</span>A</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>430 YES<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>28-FEB-06<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>28-FEB-06<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>YES<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>A</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>431 YES<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>28-FEB-06<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>28-FEB-06<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>YES<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>A</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>432 NO<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>28-FEB-06<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>28-FEB-06<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>YES<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>A</span></p>
<p class="MsoNormal"><span style="font-family: &#39;Courier New&#39;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>433 NO<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>28-FEB-06<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>28-FEB-06<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>YES <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>A</span></p>
<p class="MsoNormal"><span><br /></span></p>
<p class="MsoNormal"><span>In the applied column you can see up to which logfile the standby database has catched up.</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span>To see the role of the standby database do: </span></p>
<p class="MsoNormal"><span>select database_role, db_unique_name, name from v$database;</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">&nbsp;DATABASE_ROLE<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>DB_UNIQUE_NAME<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>NAME</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: &#39;Courier New&#39;">PHYSICAL STANDBY<span>&nbsp;&nbsp;&nbsp;&nbsp; </span>stdb<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>PRAC</span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;You can also check the file system to see that the archived log files really arrive on the standby destination site.</span></p>
<p class="MsoNormal"><a name="_Toc130634960" title="_Toc130634960"></a><strong><span style="font-size: 12pt">Troubleshoot tips</span></strong></p>
<p class="MsoNormal"><strong><span>Always check the alert file on both the primary and the standby database site.</span></strong></p>
<p class="MsoNormal"><span>On Unix systems use tail &ndash;f alertprac.log to see the new messages appear at the end of the file.</span></p>
<p class="MsoNormal"><span>&nbsp;You might get errors like these:</span></p>
<p class="MsoNormal"><span>Error 12514 received logging on to the standby</span></p>
<p class="MsoNormal"><span>Tue Feb 28 13:07:22 2006</span></p>
<p class="MsoNormal"><span>Errors in file /u01/sw1/app/oracle/admin/prac/bdump/prac1_arc5_11753.trc:</span></p>
<p class="MsoNormal"><span>ORA-12514: TNS:listener does not currently know of service requested in connect descriptor</span></p>
<p class="MsoNormal"><span>PING[ARC5]: Heartbeat failed to connect to standby &#39;stdb&#39;. Error is 12514.</span></p>
<p class="MsoNormal"><span>&nbsp;OR</span></p>
<p class="MsoNormal"><span>&nbsp;Errors in file /u01/sw1/app/oracle/admin/prac/bdump/prac3_arcj_29779.trc:</span></p>
<p class="MsoNormal"><span>ORA-12545: Connect failed because target host or object does not exist</span></p>
<p class="MsoNormal"><span>PING[ARCj]: Heartbeat failed to connect to standby &#39;stdb&#39;. Error is 12545.</span></p>
<p class="MsoNormal"><span>&nbsp;==&gt; These are Oracle Net Configuration errors, fix in listener.ora, tnsnames.ora or sqlnet.ora.</span></p>
<p class="MsoNormal"><span>&nbsp;Test the connectivity from the primary database to the standby with:</span></p>
<p class="MsoNormal"><span>&nbsp;[oracle@linux1 admin]$ sqlplus system/arnhem@stdb</span></p>
<p class="MsoNormal"><span>&nbsp;SQL*Plus: Release 10.2.0.1.0 - Production on Tue Feb 28 13:23:01 2006</span></p>
<p class="MsoNormal"><span>&nbsp;Copyright (c) 1982, 2005, Oracle.<span>&nbsp; </span>All rights reserved.</span></p>
<p class="MsoNormal"><span>&nbsp;ERROR:</span></p>
<p class="MsoNormal"><span>ORA-01033: ORACLE initialization or shutdown in progress</span></p>
<p class="MsoNormal"><span>&nbsp;Enter user-name:</span></p>
<p class="MsoNormal"><span>THIS IS THE CORRECT MESSAGE YOU SHOULD GET SINCE THE STANDBY D</span><span>ATABASE IS IN MOUNT MODE!</span></p>
<p class="MsoNormal"><span>or You might get the following error:</span></p>
<p class="MsoNormal"><span>&nbsp;Tue Feb 28 12:15:21 2006</span></p>
<p class="MsoNormal"><span>Errors in file /u01/sw1/app/oracle/admin/prac/bdump/prac1_mrp0_31715.trc:</span></p>
<p class="MsoNormal"><span>ORA-00313: open failed for members of log group 8 of thread 4</span></p>
<p class="MsoNormal"><span>ORA-00312: online log 8 thread 4: &#39;/u02/oradata/pracredo08.log&#39;</span></p>
<p class="MsoNormal"><span>ORA-27037: unable to obtain file status</span></p>
<p class="MsoNormal"><span>Linux-ia64 Error: 2: No such file or directory</span></p>
<p class="MsoNormal"><span>Additional information: 3</span></p>
<p class="MsoNormal"><span>Clearing online redo logfile 8 /u02/oradata/pracredo08.log</span></p>
<p class="MsoNormal"><span>Clearing online log 8 of thread 4 sequence number 334</span></p>
<p class="MsoNormal"><span>Tue Feb 28 12:15:21 2006</span></p>
<p class="MsoNormal"><span>&#038;n<br />
bsp;Thus:<span>&nbsp; </span>/u02/oradata/pracredo08.log<span>&nbsp;&nbsp; </span>There is a missing &ldquo;/&rdquo; between prac and redo08.log?</span></p>
<p class="MsoNormal"><span>&nbsp;Check the parameter log_file_name_convert: /u02/oradata/prac/, /u02/oradata/prac</span></p>
<p class="MsoNormal"><span>AHA a Typo change it with:</span></p>
<p class="MsoNormal"><span>alter system set log_file_name_convert = &#39;/u02/oradata/prac/&#39;, &#39;/u02/oradata/prac/&#39; scope=spfile;</span></p>
<p class="MsoNormal"><span>Note that you have to recycle the instance because the scope is spfile only!</span></p>
<p class="MsoNormal"><strong><span>So parameter settings are KEY! </span></strong></p>
<p>&nbsp;</p>
<p><span><font><font></font></font></span></p>
<p><span><font><font></font></font></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggingaboutjava.org/2006/05/poc-maa-blog-10-implementing-a-physical-standby-database/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Poc MAA - Blog 9 - Performance and Scalability Test</title>
		<link>http://www.bloggingaboutjava.org/2006/05/poc-maa-blog-9-performance-and-scalability-test/</link>
		<comments>http://www.bloggingaboutjava.org/2006/05/poc-maa-blog-9-performance-and-scalability-test/#comments</comments>
		<pubDate>Fri, 12 May 2006 06:08:10 +0000</pubDate>
		<dc:creator>Yuri van Buren</dc:creator>
		
		<category><![CDATA[Databases]]></category>

		<category><![CDATA[Networks]]></category>

		<category><![CDATA[Operating Systems]]></category>

		<guid isPermaLink="false">http://www.bloggingaboutoracle.org/?p=141</guid>
		<description><![CDATA[Proof of Concept Maximum Availability Architecture
Performance and Scalability Test
To test the performance and scalability of our 4 node RAC cluster we setup a test script with a trick we learned from Steve Adams. Use a common lock on a table, to kick-off all the sessions you want to have run concurrently on a system at [...]]]></description>
			<content:encoded><![CDATA[<p>Proof of Concept Maximum Availability Architecture</p>
<p>Performance and Scalability Test<br />
To test the performance and scalability of our 4 node RAC cluster we setup a test script with a trick we learned from Steve Adams. Use a common lock on a table, to kick-off all the sessions you want to have run concurrently on a system at once! We tested for 25, 50, 100, 200 and 400 concurrent users all firing the emp_dml.sql code at the same time.</p>
<p><span id="more-41"></span></p>
<p>The used performance scripts:</p>
<p>scott_acor.sql  &#8212; Re-Creates the scott.emp table with 25 rows in it.</p>
<p>DROP TABLE EMP PURGE;</p>
<p>CREATE TABLE EMP<br />
       (EMPNO NUMBER(10) CONSTRAINT PK_EMP PRIMARY KEY,<br />
	ENAME VARCHAR2(10),<br />
	JOB VARCHAR2(9),<br />
	MGR NUMBER(4),<br />
	HIREDATE DATE,<br />
	SAL NUMBER(7,2),<br />
	COMM NUMBER(7,2),<br />
	DEPTNO NUMBER(2) CONSTRAINT FK_DEPTNO REFERENCES DEPT);</p>
<p>INSERT INTO EMP VALUES<br />
(1,&#8217;SMITH&#8217;,'CLERK&#8217;,7902,to_date(&#8217;17-12-1980&#8242;,&#8217;dd-mm-yyyy&#8217;),800,NULL,20);<br />
INSERT INTO EMP VALUES<br />
(2,&#8217;ALLEN&#8217;,'SALESMAN&#8217;,7698,to_date(&#8217;20-2-1981&#8242;,&#8217;dd-mm-yyyy&#8217;),1600,300,30);<br />
INSERT INTO EMP VALUES<br />
(3,&#8217;WARD&#8217;,'SALESMAN&#8217;,7698,to_date(&#8217;22-2-1981&#8242;,&#8217;dd-mm-yyyy&#8217;),1250,500,30);<br />
INSERT INTO EMP VALUES<br />
(4,&#8217;JONES&#8217;,'MANAGER&#8217;,7839,to_date(&#8217;2-4-1981&#8242;,&#8217;dd-mm-yyyy&#8217;),2975,NULL,20);<br />
INSERT INTO EMP VALUES<br />
(5,&#8217;MARTIN&#8217;,'SALESMAN&#8217;,7698,to_date(&#8217;28-9-1981&#8242;,&#8217;dd-mm-yyyy&#8217;),1250,1400,30);<br />
INSERT INTO EMP VALUES<br />
(6,&#8217;BLAKE&#8217;,'MANAGER&#8217;,7839,to_date(&#8217;1-5-1981&#8242;,&#8217;dd-mm-yyyy&#8217;),2850,NULL,30);<br />
INSERT INTO EMP VALUES<br />
(7,&#8217;CLARK&#8217;,'MANAGER&#8217;,7839,to_date(&#8217;9-6-1981&#8242;,&#8217;dd-mm-yyyy&#8217;),2450,NULL,10);<br />
INSERT INTO EMP VALUES<br />
(8,&#8217;SCOTT&#8217;,'ANALYST&#8217;,7566,to_date(&#8217;13-JUL-1987&#8242;)-85,3000,NULL,20);<br />
INSERT INTO EMP VALUES<br />
(9,&#8217;KING&#8217;,'PRESIDENT&#8217;,NULL,to_date(&#8217;17-11-1981&#8242;,&#8217;dd-mm-yyyy&#8217;),5000,NULL,10);<br />
INSERT INTO EMP VALUES<br />
(10,&#8217;TURNER&#8217;,'SALESMAN&#8217;,7698,to_date(&#8217;8-9-1981&#8242;,&#8217;dd-mm-yyyy&#8217;),1500,0,30);<br />
INSERT INTO EMP VALUES<br />
(11,&#8217;ADAMS&#8217;,'CLERK&#8217;,7788,to_date(&#8217;13-JUL-1987&#8242;)-51,1100,NULL,20);<br />
INSERT INTO EMP VALUES<br />
(12,&#8217;JAMES&#8217;,'CLERK&#8217;,7698,to_date(&#8217;3-12-1981&#8242;,&#8217;dd-mm-yyyy&#8217;),950,NULL,30);<br />
INSERT INTO EMP VALUES<br />
(13,&#8217;FORD&#8217;,'ANALYST&#8217;,7566,to_date(&#8217;3-12-1981&#8242;,&#8217;dd-mm-yyyy&#8217;),3000,NULL,20);<br />
INSERT INTO EMP VALUES<br />
(14,&#8217;MILLER&#8217;,'CLERK&#8217;,7782,to_date(&#8217;23-1-1982&#8242;,&#8217;dd-mm-yyyy&#8217;),1300,NULL,10);<br />
INSERT INTO EMP VALUES<br />
(15,&#8217;MARTIN&#8217;,'SALESMAN&#8217;,7698,to_date(&#8217;28-9-1991&#8242;,&#8217;dd-mm-yyyy&#8217;),1250,1400,30);<br />
INSERT INTO EMP VALUES<br />
(16,&#8217;BLAKE&#8217;,'MANAGER&#8217;,7839,to_date(&#8217;1-5-1991&#8242;,&#8217;dd-mm-yyyy&#8217;),2850,NULL,30);<br />
INSERT INTO EMP VALUES<br />
(17,&#8217;CLARK&#8217;,'MANAGER&#8217;,7839,to_date(&#8217;9-6-1991&#8242;,&#8217;dd-mm-yyyy&#8217;),2450,NULL,10);<br />
INSERT INTO EMP VALUES<br />
(18,&#8217;SCOTT&#8217;,'ANALYST&#8217;,7566,to_date(&#8217;13-JUL-1997&#8242;)-85,3000,NULL,20);<br />
INSERT INTO EMP VALUES<br />
(19,&#8217;ALLEN&#8217;,'SALESMAN&#8217;,7698,to_date(&#8217;20-2-1991&#8242;,&#8217;dd-mm-yyyy&#8217;),1600,300,30);<br />
INSERT INTO EMP VALUES<br />
(20,&#8217;TURNER&#8217;,'SALESMAN&#8217;,7698,to_date(&#8217;8-9-1991&#8242;,&#8217;dd-mm-yyyy&#8217;),1500,0,30);<br />
INSERT INTO EMP VALUES<br />
(21,&#8217;ADAMS&#8217;,'CLERK&#8217;,7788,to_date(&#8217;13-JUL-1997&#8242;)-51,1100,NULL,20);<br />
INSERT INTO EMP VALUES<br />
(22,&#8217;JAMES&#8217;,'CLERK&#8217;,7698,to_date(&#8217;3-12-1991&#8242;,&#8217;dd-mm-yyyy&#8217;),950,NULL,30);<br />
INSERT INTO EMP VALUES<br />
(23,&#8217;FORD&#8217;,'ANALYST&#8217;,7566,to_date(&#8217;3-12-1991&#8242;,&#8217;dd-mm-yyyy&#8217;),3000,NULL,20);<br />
INSERT INTO EMP VALUES<br />
(24,&#8217;MILLER&#8217;,'CLERK&#8217;,7782,to_date(&#8217;23-1-1992&#8242;,&#8217;dd-mm-yyyy&#8217;),1300,NULL,10);<br />
INSERT INTO EMP VALUES<br />
(25,&#8217;SMITH&#8217;,'CLERK&#8217;,7902,to_date(&#8217;17-12-1990&#8242;,&#8217;dd-mm-yyyy&#8217;),800,NULL,20);</p>
<p>lock_emp.sql  &#8212; Locks the common table.</p>
<p>prompt Performance Lock Script<br />
prompt<br />
prompt Starts with: delete from scott.emp;<br />
delete from scott.emp;<br />
Prompt<br />
prompt Now start the other SQL*PLus sessions<br />
prompt<br />
prompt Ready for take off?<br />
prompt A rollback statement will be issued and the locks on the rows are freed<br />
pause<br />
rollback;<br />
col syscol format a20 heading &#8220;Start Time of Test&#8221;<br />
select to_char(sysdate, &#8216;YYYYMMDD HH24MISS&#8217;) syscol from dual;</p>
<p>emp_dml.sql &#8212; Fires a heavy select statement and does an insert of 5000 rows in the emp table. Copy the emp table to the emp_org table once (With 25 rows) for the tests!</p>
<p>set lin 300 verify off trimspool on feedback off<br />
col spoolfile noprint new_value _spoolfile<br />
select &#8216;log/&#8217;||INSTANCE_NAME||&#8217;_'||to_char(25+1 + &#038;1.*5000)||&#8217;_tot_&#8217;||to_char(25+5000 + &#038;1.*5000)||&#8217;.txt&#8217; spoolfile from sys.v_$instance;<br />
spool &#038;_spoolfile<br />
update emp<br />
set sal = sal + 1<br />
where job = &#8216;PRESIDENT&#8217;;<br />
rollback;<br />
set timing on<br />
select count(*) COUNT_1A from emp_org a, emp_org b, emp_org c, emp_org d, emp_org e<br />
;<br />
begin<br />
for n in 1 .. 5000 loop<br />
INSERT INTO EMP VALUES (n+25 + &#038;1.*5000,&#8217;SMITH&#8217;,'CLERK&#8217;,7902, trunc(sysdate -36500),800,NULL,20);<br />
update emp set EMPNO = n+25 + &#038;1.*5000 where EMPNO = n+25 + &#038;1.*5000;<br />
end loop;<br />
end;<br />
/<br />
commit;<br />
spool off<br />
exit;</p>
<p>The kick_off_<nnn>.sh shell scripts looked like:</p>
<p>#!/bin/bash<br />
export ORACLE_HOME=/u00/sw1/app/oracle/product/102<br />
PATH=$ORACLE_HOME/bin:.</p>
<p>exec sqlplus -s scott/tiger@acor  @emp_dml 1 &#038;<br />
exec sqlplus -s scott/tiger@acor  @emp_dml 2 &#038;<br />
exec sqlplus -s scott/tiger@acor  @emp_dml 3 &#038;<br />
exec sqlplus -s scott/tiger@acor  @emp_dml 4 &#038;<br />
exec sqlplus -s scott/tiger@acor  @emp_dml 5 &#038;<br />
exec sqlplus -s scott/tiger@acor  @emp_dml 6 &#038;<br />
## etc. etc. etc. up to the number of concurrent sessions you wanted to test.</p>
<p>Test results:</p>
<p><img src='http://www.bloggingaboutoracle.org/wp-content/upload/thumb-blog9pict2_01.jpeg' alt='' /></p>
<p> The elapsed time is mentioned in seconds.</p>
<p><img src='http://www.bloggingaboutoracle.org/wp-content/upload/thumb-blog9pict1_01.jpeg' alt='' /></p>
<p>We got the best scalability on the 2 node RAC database which was running on the 4 CPU systems (linux1 and linux2). Our test on the 4 node RAC database with respectively 4,4,2 and 1 CPU&#8217;s showd that for 400 concurrent users, the single and dual CPU systems were causing the slowdown. The load balancer gives these system more processes because default the single and dual CPU systems have less Unix processes running on the server. Between a 4 CPU and single CPU system you can have easily a difference of 50 Unix processes.</p>
<p>We did not test the performance by tweaking the load balancer.</p>
<p>We can however conclude that the 2 Node RAC cluster with 4 CPU&#8217;s gives a very scalable solution. It can handle twice as many transactions as a single node 4 CPU system during heavy (400 concurrent users) load.</p>
<p>Best practice: To prevent load balancing mismatches it is the easiest to ask for servers with the same specification. Because of the fact that the interconnect traffic is CPU intensive you should not use single CPU servers in a RAC cluster.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggingaboutjava.org/2006/05/poc-maa-blog-9-performance-and-scalability-test/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PoC MAA -Blog 6 - Installing CRS</title>
		<link>http://www.bloggingaboutjava.org/2006/04/poc-maa-blog-6-installing-crs/</link>
		<comments>http://www.bloggingaboutjava.org/2006/04/poc-maa-blog-6-installing-crs/#comments</comments>
		<pubDate>Fri, 21 Apr 2006 09:17:11 +0000</pubDate>
		<dc:creator>Yuri van Buren</dc:creator>
		
		<category><![CDATA[Databases]]></category>

		<category><![CDATA[Networks]]></category>

		<category><![CDATA[Operating Systems]]></category>

		<category><![CDATA[Oracle Infrastructure]]></category>

		<guid isPermaLink="false">http://www.bloggingaboutoracle.org/?p=134</guid>
		<description><![CDATA[Installing CRS
If you are using RHEL or SUSE Linux, then you must install the cvuqdisk package. Without cvuqdisk the Cluster Verify Utility is unable to discover shared disks, and you receive the error message &#8220;Package cvuqdisk not installedÃ¯Â¿Â½?. Install this rpm from the Oracle Clusterware Installation Disk.

Go to the clusterware/rpm directory and install it with:
rpm [...]]]></description>
			<content:encoded><![CDATA[<p>Installing CRS</p>
<p>If you are using RHEL or SUSE Linux, then you must install the cvuqdisk package. Without cvuqdisk the Cluster Verify Utility is unable to discover shared disks, and you receive the error message &#8220;Package cvuqdisk not installedÃ¯Â¿Â½?. Install this rpm from the Oracle Clusterware Installation Disk.<br />
<span id="more-35"></span></p>
<p>Go to the clusterware/rpm directory and install it with:</p>
<p>rpm -iv cvuqdisk-1.0.1-1.rpm</p>
<p>Unpack the Oracle 10gR2 Clusterware software with:<br />
cpio -idcmv < 10201_clusterware_linuxitanium.cpio</p>
<p>From the clusterware software run the Cluster Verification Utility (runcluvfy.sh) which is in the cluvfy directory.</p>
<p>We do three pre installation checks with the CVU:<br />
- Performing post-checks for hardware and operating system setup<br />
- Verifying system requirement<br />
- Performing pre-checks for cluster services setup</p>
<p>The commands we used are:</p>
<p>./runcluvfy.sh stage -post hwos -n linux1,linux2,linux3,linux4 -verbose</p>
<p>./runcluvfy.sh comp sys -n linux1,linux2,linux3,linux4 -p crs -osdba dba -orainv oinstall -verbose</p>
<p>./runcluvfy.sh stage -pre crsinst -n linux1,linux2,linux3,linux4 -verbose</p>
<p>When you passed all checks its finally time to start an Oracle Universal Installer (OUI).</p>
<p>Go to the clusterware directory as oracle and start the OUI with ./runInstaller.<br />
Specify the oraInventory, you can only use one for the cluster!!  And click Next.<br />
Specify correct Path. Click Next, (Here you can add Product Languages if you want!!).</p>
<p>When you've done you're pre-checks and have run all runcluvy.sh scripts successful you should have all checks OK. (If not look at the error message, fix it, click on retry and hope for success!)</p>
<p>Accept the Cluster name (Default crs). We changed the default private node name linux-priv to you're /etc/hosts interconnect private IP address name. Adjusted the Virtual host name (From linux3-vip to linux3_vip) according to /etc/hosts as well and went on.</p>
<p>We repeated the steps for al our four nodes.</p>
<p>Then we adjusted the public (10.17.246.0) and private (16.0.0.0 Non Routable!) subnets.</p>
<p>At the specify OCR Location screen we chose Normal Redundancy (This means having two OCR's).<br />
At the specify Voting Disk Location screen we chose Normal Redundancy (This means having three Voting Disks).</p>
<p>Finally the Summary Screen Appeared, and it was time to do the Install.</p>
<p>At the end of the install you have to run orainstRoot.sh on all four nodes.<br />
!!!DO NOT TRY TO RUN THE SCRIPTS SIMULTANEOUSLY!!!<br />
This could corrupt the OCR.</p>
<p>After this you have to run the root.sh script on all nodes this formats the OCR and starts the CSS Deamons:</p>
<p>[root@linux3 crs]# ./root.sh<br />
WARNING: directory '/u01/sw1/app/oracle/product/10.2.0' is not owned by root<br />
WARNING: directory '/u01/sw1/app/oracle/product' is not owned by root<br />
WARNING: directory '/u01/sw1/app/oracle' is not owned by root<br />
Checking to see if Oracle CRS stack is already configured</p>
<p>Setting the permissions on OCR backup directory<br />
Setting up NS directories<br />
Oracle Cluster Registry configuration upgraded successfully<br />
WARNING: directory '/u01/sw1/app/oracle/product/10.2.0' is not owned by root<br />
WARNING: directory '/u01/sw1/app/oracle/product' is not owned by root<br />
WARNING: directory '/u01/sw1/app/oracle' is not owned by root<br />
Successfully accumulated necessary OCR keys.<br />
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.<br />
node <nodenumber>: <nodename>
<private interconnect name> <hostname><br />
node 1: linux3 linux3_rac linux3<br />
node 2: linux1 linux1_rac linux1<br />
node 3: linux2 linux2_rac linux2<br />
node 4: linux4 linux4_rac linux4<br />
Creating OCR keys for user &#8216;root&#8217;, privgrp &#8216;root&#8217;..<br />
Operation successful.<br />
Now formatting voting device: /u01/cd1/css/CSSFile<br />
Now formatting voting device: /u02/cd2/css/CSSFile<br />
Now formatting voting device: /u03/cd3/css/CSSFile<br />
Format of 3 voting devices complete.<br />
Startup will be queued to init within 90 seconds.<br />
Adding daemons to inittab<br />
Expecting the CRS daemons to be up within 600 seconds.<br />
CSS is active on these nodes.<br />
        linux3<br />
CSS is inactive on these nodes.<br />
        linux1<br />
        linux2<br />
        linux4<br />
Local node checking complete.</p>
<p>Run root.sh on remaining nodes to start CRS daemons on the other nodes.</p>
<p>After this go back to the OUI screen and continue the post-installation steps.<br />
The OUI starts the VIPCA. Fill in the network configuration details and continue.</p>
<p>Finally we got CRS on the 4 node cluster up and running.</p>
<p>In our next blog we show how we created a 4 node RAC database on our cluster.<br />
</hostname></private></nodename></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggingaboutjava.org/2006/04/poc-maa-blog-6-installing-crs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PoC MAA - Blog5 - Install and Configure OCFS2</title>
		<link>http://www.bloggingaboutjava.org/2006/04/poc-maa-blog5-install-and-configure-ocfs2/</link>
		<comments>http://www.bloggingaboutjava.org/2006/04/poc-maa-blog5-install-and-configure-ocfs2/#comments</comments>
		<pubDate>Thu, 13 Apr 2006 16:59:10 +0000</pubDate>
		<dc:creator>Yuri van Buren</dc:creator>
		
		<category><![CDATA[Databases]]></category>

		<category><![CDATA[Networks]]></category>

		<category><![CDATA[Operating Systems]]></category>

		<category><![CDATA[Oracle Infrastructure]]></category>

		<guid isPermaLink="false">http://www.bloggingaboutoracle.org/?p=129</guid>
		<description><![CDATA[The OCFS2 distributions comprises of two sets of RPM&#8217;s. Namely, the kernel module, and the tools module. Look at http://oss.oracle.com/projects/ocfs2 for all the information about OCFS2.
Download the appropriate RPM&#8217;s. For the kernel module, download the one that matches the
distribution, platform, kernel version and the kernel flavor (smp, hugemem, psmp, etc). For tools, simply match the [...]]]></description>
			<content:encoded><![CDATA[<p>The OCFS2 distributions comprises of two sets of RPM&#8217;s. Namely, the kernel module, and the tools module. Look at http://oss.oracle.com/projects/ocfs2 for all the information about OCFS2.</p>
<p>Download the appropriate RPM&#8217;s. For the kernel module, download the one that matches the<br />
distribution, platform, kernel version and the kernel flavor (smp, hugemem, psmp, etc). For tools, simply match the platform and distribution. The tools RPM&#8217;s are split into two. ocfs2tools includes the command line tools whereas ocfs2console includes the GUI front end for the tools. One does not have to install the console, though it is recommended for ease of use. Install the RPM&#8217;s using the rpm install or rpm upgrade command.</p>
<p>We downloaded the most recent OCFS2 rpm&#8217;s for Itanium (ia64).<br />
OCFS2 Kernel Module:  ocfs2-2.6.9-22.0.1.EL-1.0.9-1.ia64.rpm<br />
OCFS2 Console:                         ocfs2console-1.0.3-1.ia64.rpm<br />
OCFS2 Tools:      ocfs2-tools-1.0.3-1.ia64.rpm</p>
<p><span id="more-30"></span><br />
Because we installed ocfs2-2.6.9-22.0.1.EL we needed to patch RHEL4 U2 to<br />
kernel-2.6.9-22.0.1.EL.ia64.rpm to make it work.</p>
<p>Installation of the RHEL4 U2 patch was as easy as doing:<br />
rpm -ivh kernel-2.6.9-22.0.1.EL.ia64.rpm</p>
<p>Install OCFS2 on Linux1 to Linux5 as root with:</p>
<p>rpm -Uvh     ocfs2-2.6.9-22.0.1.EL-1.0.9-1.ia64.rpm \<br />
      ocfs2console-1.0.3-1.ia64.rpm \<br />
      ocfs2-tools-1.0.3-1.ia64.rpm</p>
<p>Preparing&#8230;                             ########################################### [100%]<br />
   1:ocfs2-tools                        ########################################### [ 33%]<br />
   2:ocfs2-2.6.9-22.0.1.EL  ########################################### [ 67%]<br />
   3:ocfs2console                    ########################################### [100%]</p>
<p>Check existence of ocfs2 on a node with:</p>
<p>which ocfs2console   The output will be:  /usr/sbin/ocfs2console</p>
<p>To configure OCFS2 start the ocfs2console. Since this is a GUI you should have a window that can run the xclock. We simply start vncserver and connect from our laptop with VNC Viewer.</p>
<p>Starting the vncserver is done by typing: vncserver.<br />
To stop a running vncserver do: vncserver -kill linux1:1<br />
Always test you&#8217;re DISPLAY output with: xclock.</p>
<p>Now start the ofcs2console GUI tool as root with: ocfs2console &#038;<br />
Select [Cluster] &#8211;> [Configure Nodes]. This starts the OCFS Cluster Stack, and brings up the &#8220;Node ConfigurationÃ¯Â¿Â½? dialog. Click the [Add] button, This brings up the &#8220;Add NodeÃ¯Â¿Â½? dialog.<br />
Enter the node name and IP address node for node. Click on Apply and Click on [Cluster]  Propagate Cluster Configuration, you see the next screen, then do close and exit.</p>
<p> <img src='/wp-content/upload/thumb-blog5pict1.jpeg' alt='' /></p>
<p>Now you have gotten a /etc/ocfs2/cluster.conf file. This file should be the same on all cluster nodes. Verify if the /etc/ocfs2/cluster.conf file is propagated to all the cluster nodes.</p>
<p>Content of our cluster.conf file:</p>
<p>[root@linux1 ocfs2]# more cluster.conf<br />
node:<br />
        ip_port = 7777<br />
        ip_address = 10.17.246.1<br />
        number = 0<br />
        name = linux1<br />
        cluster = ocfs2</p>
<p>node:<br />
        ip_port = 7777<br />
        ip_address = 10.17.246.2<br />
        number = 1<br />
        name = linux2<br />
        cluster = ocfs2</p>
<p>node:<br />
        ip_port = 7777<br />
        ip_address = 10.17.246.3<br />
        number = 2<br />
        name = linux3<br />
        cluster = ocfs2</p>
<p>node:<br />
        ip_port = 7777<br />
        ip_address = 10.17.246.4<br />
        number = 3<br />
        name = linux4<br />
        cluster = ocfs2</p>
<p>cluster:<br />
        node_count = 4<br />
        name = ocfs2</p>
<p>Before we can do anything with OCFS2 like formatting or mounting the file system, we need to first have OCFS2&#8217;s cluster stack, O2CB, running (It should run after you created the cluster.conf file). The stack includes the following services:<br />
-   NM: Node Manager that keep track of all the nodes in the cluster.conf<br />
-   HB: Heart beat service that issues up/down notifications when nodes join or leave the cluster<br />
-   TCP: Handles communication between the nodes<br />
- DLM: Distributed lock manager that keeps track of all locks, its owners and status<br />
-  CONFIGFS: User space driven configuration file system mounted at /config<br />
-   DLMFS: User space interface to the kernel space DLM<br />
All of the above cluster services have been packaged in the O2CB system service (/etc/init.d/o2cb).</p>
<p>To check the status do:<br />
/etc/init.d/o2cb status<br />
Module &#8220;configfs&#8221;: Loaded<br />
Filesystem &#8220;configfs&#8221;: Mounted<br />
Module &#8220;ocfs2_nodemanager&#8221;: Loaded<br />
Module &#8220;ocfs2_dlm&#8221;: Loaded<br />
Module &#8220;ocfs2_dlmfs&#8221;: Loaded<br />
Filesystem &#8220;ocfs2_dlmfs&#8221;: Mounted<br />
Checking cluster ocfs2: Online<br />
Checking heartbeat: Active<br />
If the modules are not loaded, load them with:<br />
/etc/init.d/o2cb load<br />
To start the created OCFS2 cluster do:<br />
/etc/init.d/o2cb online ocfs2<br />
You can also offline the cluster and unload the modules but we don&#8217;t need that now.<br />
You need to configure the on-boot properties of the O2BC driver, so that the cluster stack will start on each boot of the server. Do this with:<br />
/etc/init.d/o2cb configure   Answer yes, and give your clustername: ocfs2 (is the default).</p>
<p>Now format the pre-created devices, from 1 node (linux1 do):<br />
mkfs.ocfs2 -b 4K -C 32K -N 4 -L oracrs1 /dev/sdc<br />
mkfs.ocfs2 -b 4K -C 32K -N 4 -L oracrs2 /dev/sdd<br />
mkfs.ocfs2 -b 4K -C 32K -N 4 -L oracrs3 /dev/sde<br />
mkfs.ocfs2 -b 4K -C 32K -N 4 -L oraclehome1 /dev/sdf<br />
mkfs.ocfs2 -b 4K -C 32K -N 4 -L oradlehome2 /dev/sdg<br />
mkfs.ocfs2 -b 4K -C 128K -N 4 -L oradata /dev/sdh<br />
mkfs.ocfs2 -b 4K -C 128K -N 4 -L oraflra /dev/sdi</p>
<p>We used 4K block sizes and 32k or 128K cluster sizes. From the Frequently Asked Questions we got the tip to use 4k block sizes (The block size can be smaller 2k, 1k or 512bytes), for datafiles it was advised to use a bigger cluster size.</p>
<p>When the devices are created we can mount them on all cluster nodes. Be aware of the different device names on linux4 node!</p>
<p>mount :t ocfs2 <img src='http://www.bloggingaboutjava.org/cms/wordpress2/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> datavolume,nointr /dev/sdc /u01/cd1<br />
mount :t ocfs2 <img src='http://www.bloggingaboutjava.org/cms/wordpress2/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> datavolume,nointr /dev/sdd /u02/cd2<br />
mount :t ocfs2 <img src='http://www.bloggingaboutjava.org/cms/wordpress2/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> datavolume,nointr /dev/sde /u03/cd3<br />
mount :t ocfs2 <img src='http://www.bloggingaboutjava.org/cms/wordpress2/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> /dev/sdf /u01/sw1<br />
mount :t ocfs2 <img src='http://www.bloggingaboutjava.org/cms/wordpress2/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> /dev/sdg /u09/sw2<br />
mount :t ocfs2 <img src='http://www.bloggingaboutjava.org/cms/wordpress2/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> datavolume,nointr /dev/sdh /u02/oradata<br />
mount :t ocfs2 <img src='http://www.bloggingaboutjava.org/cms/wordpress2/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> datavolume,nointr /dev/sdi /u03/oraflra</p>
<p>Oracle database users must mount any volume that will contain the Voting Disk file, Cluster Registry (OCR), Data files, Redo logs, Archive logs, and Control files with the datavolume mount option so as to ensure that the Oracle processes open the files with the o_direct flag.</p>
<p>From the OCFS2 Frequently Asked Questions (FAQ) we read that option &#8220;nointrÃ¯Â¿Â½? is needed for datavolume mountpoints as well. The &#8220;nointrÃ¯Â¿Â½? option ensures that IO&#8217;s are not interrupted by signals.<br />
Any other type of volume, including an Oracle home, should not be mounted with this mount option.<br />
ALL mountpoints need to have the _netdev option as well. This is a MUST for OCFS2 volumes. The &#8220;_netdevÃ¯Â¿Â½? option indicates that the volume is to be mounted AFTER the network is started and dismounted BEFORE the network is shutdown.</p>
<p>If all mountpoints are mounted OK, you can edit the fstab to make the filesystems available after a reboot.</p>
<p>Here is a list of the /etc/fstab file from the linux1 server.</p>
<p>[root@linux1 bin]# cat /etc/fstab<br />
# This file is edited by fstab-sync - see &#8216;man fstab-sync&#8217; for details<br />
/dev/VolGroup00/LogVol00 /   ext3    defaults        1 1<br />
/dev/cciss/c0d0p1       /boot/efi  vfat    defaults        0 0<br />
none                    /dev/pts                  devpts  gid=5,mode=620  0 0<br />
none                    /dev/shm                tmpfs   defaults       0 0<br />
none                    /proc                         proc    defaults        0 0<br />
none                    /sys                            sysfs   defaults         0 0<br />
/dev/VolGroup00/LogVol01 swap             swap    defaults        0    0<br />
/dev/sdc   /u01/cd1        ocfs2   _netdev,datavolume,nointr    0    0<br />
/dev/sdd   /u02/cd2       ocfs2   _netdev,datavolume,nointr   0    0<br />
/dev/sde   /u03/cd3       ocfs2   _netdev,datavolume,nointr   0    0<br />
/dev/sdf   /u01/sw1         ocfs2   _netdev                      0    0<br />
/dev/sdg   /u09/sw2        ocfs2   _netdev                      0    0<br />
/dev/sdh   /u02/oradata  ocfs2   _netdev,datavolume,nointr    0    0<br />
/dev/sdi   /u03/oraflra    ocfs2   _netdev,datavolume,nointr    0    0<br />
/dev/hda   /media/cdrom   auto  pamconsole,exec,noauto,managed 0    0</p>
<p>Create a test file on the shared storage and verify if every cluster node can see the new file.</p>
<p>Test if the mountpoints come up correctly after a reboot of all the cluster nodes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggingaboutjava.org/2006/04/poc-maa-blog5-install-and-configure-ocfs2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PoC MAA - Blog4 - Pre-Installation Steps</title>
		<link>http://www.bloggingaboutjava.org/2006/04/poc-maa-blog4-pre-installation-steps/</link>
		<comments>http://www.bloggingaboutjava.org/2006/04/poc-maa-blog4-pre-installation-steps/#comments</comments>
		<pubDate>Fri, 07 Apr 2006 05:49:09 +0000</pubDate>
		<dc:creator>Yuri van Buren</dc:creator>
		
		<category><![CDATA[Databases]]></category>

		<category><![CDATA[Networks]]></category>

		<category><![CDATA[Operating Systems]]></category>

		<category><![CDATA[Oracle Infrastructure]]></category>

		<guid isPermaLink="false">http://www.bloggingaboutoracle.org/?p=127</guid>
		<description><![CDATA[Proof of Concept Maximum Availability Architecture 
Pre-installation Steps
Check the OS
On the HP Demo Servers RHEL3 or Windows 2003 was installed. (HP Integrity Servers can run several different Operating systems, with VM technology even at the same time!).
All servers need to have the same OS. To work with OCFS2 we have to have RHEL4. HP used [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Proof of Concept Maximum Availability Architecture </strong></p>
<p><strong>Pre-installation Steps</strong></p>
<p><strong>Check the OS</strong><br />
On the HP Demo Servers RHEL3 or Windows 2003 was installed. (HP Integrity Servers can run several different Operating systems, with VM technology even at the same time!).<br />
All servers need to have the same OS. To work with OCFS2 we have to have RHEL4. HP used the RHEL4 Update 2 install CD&#8217;s and completely Re-Installed the OS on all 6 servers. For linux6 the AMD RHEL4 Update 2 distribution was used. (Check you&#8217;re OS version with &#8220;uname :a).</p>
<p><span id="more-27"></span></p>
<p>Common RHEL4 installer prompts<br />
-  Remove all partitions (Yes)<br />
- Fill in hostname + IP address<br />
-  Fill in IP address for eth0 and eth1 + Check the box automatic start on reboot.<br />
-   Fill in the gateway (we used 10.17.246.254).<br />
-  Use no firewall<br />
- Language English<br />
-   Disable SELinux<br />
- Set the root password<br />
- Customize software packages (Remove GNOME, Add KDE, Remove Windows File Server, Add Legacy software, Add Development tools).<br />
Post Install steps:<br />
- Fill in license info later<br />
-  Set the time zone (Amsterdam) and time.</p>
<p>Look at available system tools with &#8220;system-config  {+ Hit the TAB Key, twice}.<br />
For instance to start the network GUI on RHEL4 to change eth0 and eth1 settings do:<br />
system-config-network</p>
<p>Other RHEL4 info can be found in the Red Hat Manuals: http://www.redhat.com/docs/manuals/</p>
<p><strong>Perform Network Configuration on all Nodes</strong><br />
Setup /etc/hosts on all nodes. Test the connectivity with &#8220;ping hostnameÃ¯Â¿Â½?. To be able to connect to all the HP servers from within the LogicaCMG network we had to ask for an IP range via a change at our Central IT organization. We are allowed to use the 10.17.246.x range during our PoC.</p>
<p>For the RAC Interconnect we decided to use a non-routable IP range 16.0.0.x, this was necessary to make sure the eth0 and eth1 network cards were addressed correctly.<br />
The public and private IP addresses must be in different subnets. E.g. 10.17.246.x and 10.17.247.x would have been OK as well.</p>
<p><strong>Create oracle user and directories</strong><br />
On Linux you first have to create the groups and then you create the user.<br />
It is essential that on ALL cluster nodes the group ID&#8217;s are identical.</p>
<p>Create the groups as root on all servers with:<br />
groupadd -g 200 dba<br />
groupadd -g 201 oinstall</p>
<p>Create the oracle user as root on all servers with (and watch out for Tabs in scripts):<br />
useradd -u 202 -g 201 -G 200 \<br />
-d /home/oracle \<br />
-s /bin/bash \<br />
-c &#8220;Oracle Software Owner&#8221; \<br />
-p oracle oracle</p>
<p>Change the password of the oracle user as root on all servers with:<br />
passwd oracle</p>
<p><strong>Create the CORDS / OFA directories:</strong><br />
mkdir -p /u01/cd1<br />
mkdir -p /u02/cd2<br />
mkdir -p /u03/cd3</p>
<p>mkdir -p /u01/sw1<br />
mkdir -p /u09/sw2</p>
<p>mkdir -p /u02/oradata<br />
mkdir -p /u03/oraflra</p>
<p>chown -R oracle:dba /u02/oradata<br />
chown -R oracle:dba /u03/oraflra</p>
<p><strong>Create partitions on shared storage</strong><br />
For Itanium servers it is necessary to have a management console to configure the MSA1500 Storage Area Network. We ran the HP Storage Array Control Utility (ACU 7.x) on the AMD server which could act as a management console during the PoC.</p>
<p>We asked the HP Engineer to carve the disks according to our prepared standards.<br />
(See our previous PoC Blog : Preparation Steps).</p>
<p>It is essential to know and administer, how every node sees the carved devices.<br />
Mounting different devices to different mountpoints could corrupt you&#8217;re data. Management of the /etc/fstab file is critical, DO NOT &#8220;scp &#8221; the fstab file to all the other nodes, when you have different device names on different nodes like we had.</p>
<p>During OCFS2 mount you have to make sure every node mounts the same device to the same mountpoint. Different device names are for instance due to different number of local disks or different number of array controllers in local servers.</p>
<p><strong>Configure the Linux Servers for oracle</strong><br />
Adjust Linux Kernel settings to run Oracle database SGA properly.</p>
<p>We added the following kernel settings in /etc/sysctl.conf on all 6 server nodes.</p>
<p>kernel.shmall = 2097152<br />
kernel.shmmax = 2147483648<br />
kernel.shmmni = 4096<br />
kernel.sem = 250 32000 100 128<br />
fs.file-max = 65536<br />
net.ipv4.ip_local_port_range = 1024 65000<br />
net.core.rmem_default = 262144<br />
net.core.rmem_max = 262144<br />
net.core.wmem_default = 262144<br />
net.core.wmem_max = 262144</p>
<p>To make the changes active you have to reboot, this can easily be done as root with:<br />
shutdown :r now</p>
<p><strong>Configure the hangcheck-timer Kernel Module</strong><br />
The hangcheck-timer.ko file is missing on the Itanium servers. Metalink shows that it should be part of the RHEL4 distribution. After some further searches, this turns out the be a known issue, documented in oracle bug 4714727. There are re-kitted kernels available to fix this issue, either from Oracle or from Redhat. In case you contact Oracle, log a service request to get a re-kitted kernel as described in the bug 4714727. In case you contact Redhat, the Red Hat issue 79368 should be referenced, this is the corresponding issue for the hangcheck-timer problem.</p>
<p>Because it took very long to find this issue we had no time to test the installation of the hangcheck-timer. We urge customers to use a hangcheck-timer in their production environments.</p>
<p><strong>Configure RAC Nodes for Remote Access </strong><br />
It is advised to setup secure shell (ssh) for the oracle user on all cluster nodes.</p>
<p>Here are our steps. Logon as the oracle user on all 4 nodes and do:</p>
<p>cd ~<br />
pwd<br />
touch ~/.ssh/authorized_keys<br />
cd ~/.ssh</p>
<p># Generate the RSA and DSA public and private keys with:<br />
/usr/bin/ssh-keygen -t rsa (Leave the pass phrase empty by pressing the ENTER key)<br />
/usr/bin/ssh-keygen -t dsa  (Leave the pass phrase empty by pressing the ENTER key)</p>
<p># from the .ssh dir, do a cat of the local and remote keys..<br />
ssh linux1 cat /home/oracle/.ssh/id_rsa.pub >> authorized_keys<br />
ssh linux1 cat /home/oracle/.ssh/id_dsa.pub >> authorized_keys<br />
ssh linux2 cat /home/oracle/.ssh/id_rsa.pub >> authorized_keys<br />
ssh linux2 cat /home/oracle/.ssh/id_dsa.pub >> authorized_keys<br />
ssh linux3 cat /home/oracle/.ssh/id_rsa.pub >> authorized_keys<br />
ssh linux3 cat /home/oracle/.ssh/id_dsa.pub >> authorized_keys<br />
ssh linux4 cat /home/oracle/.ssh/id_rsa.pub >> authorized_keys<br />
ssh linux4 cat /home/oracle/.ssh/id_dsa.pub >> authorized_keys</p>
<p># verify: 4 nodes times 2 lines per node gives 8 lines with &#8220;wc :l &#8221; (word count lines)<br />
wc :l authorized_keys</p>
<p># distribute the authorized_keys file to the other cluster nodes with scp (secure copy).<br />
scp authorized_keys linux2:/home/oracle/.ssh/<br />
scp authorized_keys linux3:/home/oracle/.ssh/<br />
scp authorized_keys linux4:/home/oracle/.ssh/</p>
<p>Test oracle user equivalence by issuing the following 4 commands on all 4 nodes:<br />
ssh linux1 date<br />
ssh linux2 date<br />
ssh linux3 date<br />
ssh linux4 date<br />
All commands should give the date without prompting for a password!<br />
If you did not check it correctly, the Cluster Verify Utility (runcluvfy.sh) will warn you.</p>
<p>For ease of maintenance it is very nice to setup user equivalence for the root user as well.<br />
<em>This is however not an installation requirement.</em></p>
<p>Due to the fact that the OUI uses rcp (remote copy) and rsh (remote shell) it is also necessary to setup host equivalence, at least during the usage of the OUI. After the installation you can disable it, but you should not forget to set it back again when you are going to apply a patch with the OUI.</p>
<p>For rsh to work two rsh RPM&#8217;s should be installed on each node:<br />
rpm :q rsh rsh-server<br />
rsh-0.17-25.3<br />
rsh-server-0.17-25.3</p>
<p>If they are not on the server install them from the installation media with:<br />
su :<br />
rpm :ivh rsh-0.17-25.3.ia64.rpm rsh-server-0.17-25.3.ia64.rpm</p>
<p>To enable the &#8220;rshÃ¯Â¿Â½? and &#8220;rloginÃ¯Â¿Â½? services, the &#8220;disableÃ¯Â¿Â½? attribute in the /etc/xinetd.d/rsh file must be set to &#8220;noÃ¯Â¿Â½? and xinitd must be reloaded on all nodes of the cluster with:</p>
<p>su :<br />
chkconfig rsh on<br />
chkconfig rlogin on<br />
service xinted reload</p>
<p>To allow the &#8220;oracleÃ¯Â¿Â½? Unix user account to be trusted among RAC nodes, create the /etc/hosts.equiv file on all cluster nodes with:</p>
<p>su :<br />
touch /etc/hosts.equiv<br />
chmod 600 /etc/hosts.equiv<br />
chown root:root /etc/hosts.equiv</p>
<p>Edit the file like this:<br />
[root@linux1 ~]# cat /etc/hosts.equiv<br />
linux1 root<br />
linux2 root<br />
linux3 root<br />
linux4 root<br />
linux1 oracle<br />
linux2 oracle<br />
linux3 oracle<br />
linux4 oracle<br />
linux1_rac oracle<br />
linux2_rac oracle<br />
linux3_rac oracle<br />
linux4_rac oracle</p>
<p>Before attempting to test rsh, ensure that you are using the correct version of rsh. By default, RHEL4 puts /usr/Kerberos/sbin at the head of the $PATH variable. Rename the Kerberos scripts to force the system to use the /usr/sbin/rsh command.</p>
<p>mv /usr/kerberos/bin/rsh /usr/kerberos/bin/rsh.original<br />
mv /usr/kerberos/bin/rcp /usr/kerberos/bin/rcp.original<br />
mv /usr/kerberos/bin/rlogin /usr/kerberos/bin/rlogin.original</p>
<p>Test the host equivalence with the following commands on all 4 cluster nodes:</p>
<p>rsh linux1 ls :l /etc/hosts.equiv<br />
rsh linux2 ls :l /etc/hosts.equiv<br />
rsh linux3 ls :l /etc/hosts.equiv<br />
rsh linux4 ls :l /etc/hosts.equiv<br />
All commands should give the listing without prompting for a password!</p>
<p><strong>Check required RPM Packages for Oracle 10gR2</strong><br />
Required RPM packages for RHEL4 for correct working of 10gR2<br />
(See Page 2-28 CRS Install Guide Part: B14203-05).</p>
<p>binutils-2.15.92.0.2-10.EL4<br />
compat-db-4.1.25-9<br />
control-center-2.8.0-12<br />
gcc-3.4.3-9.EL4<br />
gcc-c++-3.4.3-9.EL4<br />
glibc-2.3.4-2<br />
glibc-common-2.3.4-2<br />
gnome-libs-1.4.1.2.90-44.1<br />
libstdc++-3.4.3-9.EL4<br />
libstdc++-devel-3.4.3-9.EL4<br />
make-3.80-5<br />
pdksh-5.2.14-30<br />
sysstat-5.0.5-1<br />
xscreensaver-4.18-5.rhel4.2</p>
<p>Check these RPM&#8217;s with: rpm :q as follows:</p>
<p>rpm -q binutils<br />
rpm -q compat-db<br />
rpm -q control-center<br />
rpm -q gcc<br />
rpm -q gcc-c++<br />
rpm -q glibc<br />
rpm -q glibc-common<br />
rpm -q gnome-libs<br />
rpm -q libstdc++<br />
rpm -q make-3.80-5<br />
rpm -q pdksh<br />
rpm -q sysstat<br />
rpm -q xscreensaver</p>
<p><strong>Final pre-checks</strong><br />
Make sure that the ForwardX11 attribute is set to &#8220;noÃ¯Â¿Â½? for oracle</p>
<p>touch ~/.ssh/config</p>
<p>Edit the just created config file;  fill in:</p>
<p>Host *<br />
        ForwardX11 no</p>
<p>Do this once then do on copy to all other nodes with:<br />
scp /home/oracle/.ssh/config linux2:/home/oracle/.ssh/config<br />
scp /home/oracle/.ssh/config linux3:/home/oracle/.ssh/config<br />
scp /home/oracle/.ssh/config linux4:/home/oracle/.ssh/config<br />
scp /home/oracle/.ssh/config linux5:/home/oracle/.ssh/config</p>
<p>Modify ~/.bash_profile (again on all nodes) add:<br />
# prevent stty errors ora-installer<br />
if [ -t 0 ]; then<br />
    stty intr ^C<br />
fi</p>
<p>Do this once then do on all other nodes with:<br />
scp .bash-profile linux2:/home/oracle/.bash_profile<br />
scp .bash-profile linux3:/home/oracle/.bash_profile<br />
scp .bash-profile linux4:/home/oracle/.bash_profile<br />
scp .bash-profile linux5:/home/oracle/.bash_profile</p>
<p>Oracle user should have Umask=022 or 0022,<br />
check with: umask</p>
<p>Disk space should be at least 8Gb for  1 CRS+ 1 ASM + 1RAC Home.<br />
and /tmp should have enough (>> 400Mb) space:<br />
check with df :k.</p>
<p>RAM should be at least 1Gb<br />
check with: dmesg | grep &#8220;Memory&#8221;</p>
<p>Swap space should be Equal to size of RAM (for RAM >= 2Gb).<br />
Check with top: or &#8220;grep SwapTotal /proc/meminfoÃ¯Â¿Â½?</p>
<p>For this PoC we added 4, 8 or 16Gb of swap space with:<br />
cd /tmp<br />
dd if=/dev/zero of=tempswap bs=1k count=4000000<br />
chmod 600 tempswap<br />
mke2fs tempswap<br />
mkswap tempswap<br />
swapon tempswap</p>
<p>(for 8Gb we used count=8000000 and for 16Gb we used count=16000000).</p>
<p><strong>Set the date correct on the cluster nodes:</strong><br />
Normally you should use a Network Time Protocol Server.</p>
<p>For the PoC we used: date 0126133006   {MMDDHHMIYY}, on all 4 cluster nodes,<br />
this command is not allowed with ssh <img src='http://www.bloggingaboutjava.org/cms/wordpress2/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>Check the processor info<br />
Check with: cat /proc/cpuinfo (Itanium is used)<br />
Match this with the Oracle software  we already prepared that.</p>
<p>Increase shell limits for oracle,<br />
Do this by adding lines to /etc/security/limits.conf file<br />
oracle           soft    nproc           2047<br />
oracle           hard    nproc           16384<br />
oracle           soft    nofile          1024<br />
oracle           hard    nofile          65536</p>
<p>Edit the file /etc/pam.d/login :<br />
Add following if it does not already exist.<br />
session    required     pam_limits.so</p>
<p>Edit the /etc/profile (for BASH users)<br />
if [ $USER = "oracle" ]; then<br />
  if [ $SHELL = "/bin/ksh" ]; then<br />
    ulimit -p 16384<br />
    ulimit -n 65536<br />
  else<br />
    ulimit -u 16384 -n 65536<br />
  fi<br />
fi</p>
<p>Distribute the last two local (/etc files to all cluster nodes).</p>
<p>We finished the pre-installation Steps.</p>
<p>In the next blog we discuss how to intall and configure OCFS2.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggingaboutjava.org/2006/04/poc-maa-blog4-pre-installation-steps/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PoC - MAA - Blog 3 - Preparation Steps</title>
		<link>http://www.bloggingaboutjava.org/2006/03/poc-maa-blog-3-preparation-steps/</link>
		<comments>http://www.bloggingaboutjava.org/2006/03/poc-maa-blog-3-preparation-steps/#comments</comments>
		<pubDate>Fri, 31 Mar 2006 06:55:35 +0000</pubDate>
		<dc:creator>Yuri van Buren</dc:creator>
		
		<category><![CDATA[Databases]]></category>

		<category><![CDATA[Networks]]></category>

		<category><![CDATA[Operating Systems]]></category>

		<category><![CDATA[Oracle Infrastructure]]></category>

		<guid isPermaLink="false">http://www.bloggingaboutoracle.org/?p=123</guid>
		<description><![CDATA[Proof of Concept Maximum Availability Architecture
Preparation Steps
To prepare ourselves we have read the paper of Jeffrey Hunter: Build Your Own RAC 10g Release 2 Cluster on Linux and Firewire http://www.oracle.com/technology/pub/articles/hunter_rac10gr2.html
This paper has been in the top 5 most read DBA Articles on OTN for the last 3 months. And it is one of the first [...]]]></description>
			<content:encoded><![CDATA[<p>Proof of Concept Maximum Availability Architecture</p>
<p>Preparation Steps</p>
<p>To prepare ourselves we have read the paper of Jeffrey Hunter: Build Your Own RAC 10g Release 2 Cluster on Linux and Firewire <a class="url" href="http://www.oracle.com/technology/pub/articles/hunter_rac10gr2.html">http://www.oracle.com/technology/pub/articles/hunter_rac10gr2.html</a></p>
<p>This paper has been in the top 5 most read DBA Articles on OTN for the last 3 months. And it is one of the first who has worked with OCFS2. Since we want to setup a &#8220;Shared EverythingÃ¯Â¿Â½? environment on Linux, we want to use the Open Source Oracle Clustered File System software. Although this software is not certified yet with Oracle 10gR2, we think it can become a very important software component for RAC databases on Linux systems.</p>
<p><span id="more-24"></span></p>
<p>Other documents that are a Must Read are the Install and Deployment guides from Oracle:<br />
Oracle Clusterware and Oracle Real Application Clusters Installation Guide 10g Release 2 (10.2) for Linux. Part number: B14203-05 <a class="url" href="http://otn.oracle.com">http://otn.oracle.com</a></p>
<p>Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide 10g Release 2 (10.2). Part number: B14197-03 <a class="url" href="http://otn.oracle.com">http://otn.oracle.com </a></p>
<p>We spend some time preparing ourselves on a white-board, and come up with an Instance/Server Matrix:</p>
<p><img src='/wp-content/upload/thumb-blog3pict1.gif' alt='' /></p>
<p>To be able to run a RAC database on 4 nodes all cluster nodes need two public and one private IP address. Because we try to implement MAA we setup Network for two RAC clusters.</p>
<p>Network Setup for cluster 1 named crs:</p>
<p><img src='/wp-content/upload/thumb-blog3pict2.gif' alt='' /></p>
<p>Network Setup for cluster 2 (Standby Cluster) named crs2:</p>
<p><img src='/wp-content/upload/thumb-blog3pict3.gif' alt='' /></p>
<p>The Load Generator node has two network cards that are configured as:</p>
<p><img src='/wp-content/upload/thumb-blog3pict4.gif' alt='' /></p>
<p>Note that the 16.0.0.x IP addresses are Non Routable. You need to use different IP subnets for you&#8217;re eth0 and eth1 IP ranges to make sure the correct network cards are used.</p>
<p>The easiest setup for the network cards is during the initial installation of RHEL4 U2. You can also specify that both network interfaces should be brought up after a reboot of the server.</p>
<p>Setup this configuration in you&#8217;re /etc/hosts file on each node. And do ping tests to test connectivity. Check the network card setup with &#8220;ifconfig :aÃ¯Â¿Â½? on each node.</p>
<p>Fiber channel connections are made between Linux 1 to Linux 6 to the HP San Switch on the respective port numbers 1 to 6.</p>
<p>From the Linux 1 to Linux 6 LAN cables from (Port A) to port 1 to 6 on the Pro Curve switch.<br />
And Port B on ports 11 to 16.</p>
<p>Storage Layout<br />
All devices are setup on the MSA1500 with RAID 1+0. From the 8 * 73 Gb Bruto we can allocate Netto 4*73Gb = 292Gb. It is important to carve the disks into devices with correct sizes so that we can optimally use the available storage. As DBA&#8217;s we are responsible to give the correct carving instructions. We asked for the same sizes for both clusters.</p>
<p><img src='/wp-content/upload/thumb-blog3pict5.gif' alt='' /></p>
<p><img src='/wp-content/upload/thumb-blog3pict6.gif' alt='' /></p>
<p>It is important to notice that the names of the devices can be different on each node. Check the devices per node as root with: fdisk :l ; and fill in a table like we did.</p>
<p>Applied CORDS (LogicaCMG&#8217;s Remote DBA Standards) : OFA Rules:<br />
Mountpoint&#8217;s first part /u0x (should be) a physical disk (or array of disks).<br />
Second part is a functional specification.</p>
<p>cd = cluster data<br />
sw = software<br />
oradata = oracle database data<br />
oraflra = oracle flash recovery area</p>
<p>Unused space left on MSA1500 is 28975 Mb Bruto.</p>
<p>Devices are also known as LUN&#8217;s.</p>
<p>ASM Disks do not need to be mounted, they are raw disks formatted and maintained by the +ASM1, +ASM2, +ASM3, and +ASM4 instances.</p>
<p>Disclaimer: In a production environment you should always have you&#8217;re standby database on a different SAN. For our PoC we had to do the tests with one SAN.</p>
<p>CORDS / OFA Setup<br />
As best practice we use the CORDS / OFA installation guidelines to configure the cluster.</p>
<p>Starting with Oracle Database 10g Release 2 (10.2), Oracle Clusterware should be installed in a separate Oracle Clusterware home directory, because succeeding versions of Oracle Clusterware will overwrite the Oracle Clusterware installation in the same path. This is also advised for ASM. To install ASM in its own directory you have to run the database OUI twice. The first time you run the database OUI, install the ASM home. The second time you run the database OUI, install the database with RAC home. This allows you to patch the different homes (Clusterware/ASM/RAC) separately.</p>
<p>Starting with Oracle Database 10g Release 2 (10.2) with RAC, Oracle Clusterware provides for the creation of a mirrored Oracle Cluster Registry (OCR) file, enhancing cluster reliability. And you can configure the Cluster Synchronization Services (CSS) with multiple voting disks. In Oracle 10g Release 1 (10.1) you could only configure one voting disk. To obtain benefits of the multiple voting disks you must configure at least three voting disks on independent shared physical disks. It is possible (but not recommended by Oracle) to use RAW devices for these files.</p>
<p>Note that Oracle Clusterware is also available for use with single-instance databases and applications that you deploy on clusters. The API libraries required to use with single-instance databases are provided with the Oracle Client installation media.</p>
<p>We tried to specify different Oracle Inventories for CRS and RAC but the RAC installer does not recognize the cluster when the oraInventory points to an empty directory. You have to specify the CRS_HOME inventory to do a RAC installation.</p>
<p>Oracle recommends that you use Automatic Storage Management (ASM) for Database and Recovery files. LogicaCMG prefers the use of a clustered file system, for ease of maintenance.</p>
<p>Note if you create more then one database on the cluster, then they all share the same OCR.<br />
Note that with Oracle Database 10g Release 2 (10.2), Cluster Ready Services, or CRS, is now called Oracle Clusterware.</p>
<p>On the clustered file system the following CORDS / OFA directory standards are used:</p>
<p><img src='/wp-content/upload/thumb-blog3pict7.gif' alt='' /></p>
<p>Note that if you&#8217;re Oracle home is not on a shared file system, then OUI propagates the software onto the local disks of the other nodes with &#8220;rcp&#8217;. The OUI also uses rcp for copying files to the local /etc directory. So you always have to setup you&#8217;re /etc/hosts.equiv files.</p>
<p>In the next Blog we are going to write about the pre-installation steps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggingaboutjava.org/2006/03/poc-maa-blog-3-preparation-steps/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Raid for dummies</title>
		<link>http://www.bloggingaboutjava.org/2006/03/raid-for-dummies/</link>
		<comments>http://www.bloggingaboutjava.org/2006/03/raid-for-dummies/#comments</comments>
		<pubDate>Tue, 28 Mar 2006 07:33:37 +0000</pubDate>
		<dc:creator>Roel</dc:creator>
		
		<category><![CDATA[Operating Systems]]></category>

		<guid isPermaLink="false">http://www.bloggingaboutoracle.org/archives/raid-for-dummies</guid>
		<description><![CDATA[If you would like to explain to less technical people what RAID is in a figurative way you can use this link.
]]></description>
			<content:encoded><![CDATA[<p>If you would like to explain to less technical people what RAID is in a figurative way you can use <a class="url" href="http://www.epidauros.be/raid.jpg">this link</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggingaboutjava.org/2006/03/raid-for-dummies/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PoC - MAA - Blog2: Hardware and Software Stack</title>
		<link>http://www.bloggingaboutjava.org/2006/03/poc-maa-blog2-hardware-and-software-stack/</link>
		<comments>http://www.bloggingaboutjava.org/2006/03/poc-maa-blog2-hardware-and-software-stack/#comments</comments>
		<pubDate>Mon, 27 Mar 2006 09:31:52 +0000</pubDate>
		<dc:creator>Yuri van Buren</dc:creator>
		
		<category><![CDATA[Databases]]></category>

		<category><![CDATA[Networks]]></category>

		<category><![CDATA[Operating Systems]]></category>

		<category><![CDATA[Oracle Infrastructure]]></category>

		<guid isPermaLink="false">http://www.bloggingaboutoracle.org/?p=118</guid>
		<description><![CDATA[In the server room of LogicaCMG Arnhem we setup the Proof of Concept Servers using demo equipment from HP and with the help of an HP engineer.


Hardware Inventory:
Hardware Inventory
5 HP-RX4620 Itanium Servers (2 with 4 CPUs, 1 with 2CPUs and 2 with 1 CPU).
The 4 CPU and 2 CPU servers have a processor speed of [...]]]></description>
			<content:encoded><![CDATA[<p>In the server room of LogicaCMG Arnhem we setup the Proof of Concept Servers using demo equipment from HP and with the help of an HP engineer.</p>
<p><img src='/wp-content/upload/thumb-PoCBlog2HardwarePicture2_01.jpg' alt='' /></p>
<p><span id="more-21"></span></p>
<p><strong>Hardware Inventory:</strong><br />
Hardware Inventory<br />
5 HP-RX4620 Itanium Servers (2 with 4 CPUs, 1 with 2CPUs and 2 with 1 CPU).<br />
The 4 CPU and 2 CPU servers have a processor speed of 1,6Ghz; the 1 CPU servers have processor speed of 1,5Ghz. Four servers have 2 * 73Gb local storage and one server has 2 * 36Gb local storage. The 4 CPU servers have 16Gb Ram each, the 2 CPU server has 4Gb of Ram, one of the 1 CPU servers has 6Gb Ram and the other has 2 GB of Ram.</p>
<p>The mixed server configuration gives us extra testing possibilities during our Proof of Concept.</p>
<p>For production systems we advice to use the same server specs for all cluster nodes.</p>
<p>1 HP-DL385 Proliant Server with 2 AMD Opteron 2,6GHz CPUs, with 2 * 73Gb local storage.</p>
<p>1 HP MSA 1500 Storage Array (8 Disks of 73Gb).</p>
<p>1 HP MSA Controller Shelf.</p>
<p>1 HP Storage Works SAN Switch (16 Ports, 2 Gigabit Fiber channels are used).</p>
<p>1 HP Procurve Switch 2824 (With 20 LAN Ports).</p>
<p>1 HP Storage Rack with additional Power Units, and console.</p>
<p>In all 5 Itanium Servers an MSA Model B Fiber Channel I/O Module is built in by HP.</p>
<p><strong>Software Inventory:</strong><br />
The software stack used for the implementation of our Proof of Concept is the following:<br />
Oracle 10g Release 2 Enterprise Edition 10.2.0.1.0 : for Itanium<br />
Oracle 10g Release 2 Enterprise Edition 10.2.0.1.0 : for x86_64 (AMD).<br />
Oracle 10g Release 2 Clusterware 10.2.0.1.0 : for Itanium</p>
<p>From <a class="url" href="http://otn.oracle.com">http://otn.oracle.com </a>the following files were downloaded:<br />
10201_database_linuxitanium.cpio, 10201_clusterware_linuxitanium.cpio and<br />
for the AMD Load Generator Server 10201_database_linux_x86_64.cpio.</p>
<p>Oracle Cluster File System Release 2 (OCFS2) : for Itanium<br />
From the <a class="url" href="http://otn.oracle.com">http://oss.oracle.com</a> the following OCFS2 rpms were downloaded:<br />
ocfs2-2.6.9-22.0.1.EL-1.0.9-1.ia64.rpm, ocfs2console-1.0.3-1.ia64.rpm<br />
and ocfs2-tools-1.0.3-1.ia64.rpm.</p>
<p>Red Hat Enterprise Linux 4 Advanced Server Update 2 + Patch 0.1<br />
HP installed RHEL4 U2 from the RHEL4 U2 Installation CDs. This version was patched with kernel-2.6.9-22.0.1.EL.ia64.rpm to match the OCFS2 kernel version.<br />
(uname -a shows: Kernel 2.6.9-22.0.1. EL #1 SMP on the Itanium servers.</p>
<p>For the AMD Load Generator server HP installed RHEL4 U2 from x86_64 installation CDs.<br />
(uname -a shows: Kernel 2.6.9-22.ELsmp #1 SMP on the AMD server).</p>
<p><strong>Other Handy Tools:</strong><br />
To log on to the Linux systems with Secure Shell (ssh) we used Putty (0.53b).<br />
This tool can be downloaded from:<br />
<a class="url" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html ">http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html </a></p>
<p>To display GUI output of the Oracle Universal Installer (OUI) we used VNC-Viewer.<br />
Get the free VNC Viewer at <a class="url" href="www.realvnc.com">www.realvnc.com </a>.</p>
<p><strong>Round Up</strong><br />
Now we have got enough hardware and software to build a 4 Node RAC Cluster and a Physical Standby Database.</p>
<p>See our next PoC Blog article: Preparation Steps on bloggingaboutoracle.org</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggingaboutjava.org/2006/03/poc-maa-blog2-hardware-and-software-stack/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
