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

<channel>
	<title>Welcome to Oracle</title>
	<atom:link href="http://exploreoracle.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://exploreoracle.com</link>
	<description>Reference to Oracle Database 10g</description>
	<pubDate>Tue, 22 Dec 2009 04:52:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Oracle PGA</title>
		<link>http://exploreoracle.com/2009/11/09/oracle-pga/</link>
		<comments>http://exploreoracle.com/2009/11/09/oracle-pga/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 22:06:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[DataBase Architecture]]></category>

		<category><![CDATA[Oracle Database 10g]]></category>

		<guid isPermaLink="false">http://exploreoracle.com/?p=275</guid>
		<description><![CDATA[Oracle instance consists of SGA and oracle processes.  Oracle processes can be divided into server processes and background processes. Oracle database uses background processes to perform overall database operations, for example, database writer process writes dirty buffer from database buffer cache to datafiles. Oracle creates one or more Server Processes for users connected to [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="text-align: justify;">Oracle instance consists of SGA and oracle processes. <span> </span>Oracle processes can be divided into server processes and background processes. Oracle database uses background processes to perform overall database operations, for example, database writer process writes dirty buffer from database buffer cache to datafiles. <span id="more-275"></span>Oracle creates one or more Server Processes for users connected to database. Each oracle process is assigned a memory area to contain data and control information.<span> </span>This memory area is called Program Global Area (PGA).</p>
<p class="MsoNormal" style="text-align: justify;">
<p class="MsoNormal" style="text-align: justify;">Oracle database creates server processes to mange requests of user process. All user process issues SQL statements, it is the responsibility of Server process to execute these statements and return results to user process. Each server process has one PGA. PGA is memory where server process executes statements and stores information. PGA consists of Private SQL Area, session memory and SQL work Areas.</p>
<p class="MsoNormal" style="text-align: justify;">
<p class="MsoNormal" style="text-align: justify;">Each statement in oracle is associated with a Private SQL area. Private SQL area can be divided into <strong>persistent area</strong> and <strong>run-time area</strong>. Persistent area contains bind information, i.e. the values for bind variables. Runtime area is used to execute the statements. <span> </span>Private SQL area is created in PGA if the connection is established using dedicated server. In case of shard server connection, Private SQL area is created in SGA.</p>
<p class="MsoNormal" style="text-align: justify;">
<p class="MsoNormal" style="text-align: justify;">PGA also contains Session Memory which is used to store session information for example session variables and logon information.</p>
<p class="MsoNormal" style="text-align: justify;"><span> </span></p>
<p class="MsoNormal" style="text-align: justify;">Few queries require complex operation like Hash Join or sorting. These operations are performed in the memory. To perform these tasks, SQL work areas are created in runtime area. The size of SQL work areas should be large enough that it can contain  data accessed by SQL statements. If size of work area is not large enough then response time may increase and hurt database performance. Oracle supports automatic memory management of work areas. Automatic management involve to steps, first you decide maximum memory available for PAG. Then use PGA_AGGREGATE_TARGET initialization parameter to set maximum memory available for PGA. This will only work for dedicated server mode. Because in shared servers, SQL work areas are created in SGA.</p>
<p class="MsoNormal" style="text-align: justify;">
]]></content:encoded>
			<wfw:commentRss>http://exploreoracle.com/2009/11/09/oracle-pga/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ORA-02248 error while connecting Developer 6i to Database 11g</title>
		<link>http://exploreoracle.com/2009/10/29/ora-02248-error-while-connecting-developer-6i-to-database-11g/</link>
		<comments>http://exploreoracle.com/2009/10/29/ora-02248-error-while-connecting-developer-6i-to-database-11g/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 10:57:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Application Developement]]></category>

		<category><![CDATA[Oracle Database 11g]]></category>

		<guid isPermaLink="false">http://exploreoracle.com/?p=261</guid>
		<description><![CDATA[If you have an older version of Developer 6i and try to connect to Database server 11g, connection fails with following error message
ORA-02248: invalid option for ALTER SESSION
To resolve this problem simply upgrade your Developer 6i release by applying a patch or by fresh installation. For example, when I first time encountered this problem, I [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">If you have an older version of Developer 6i and try to connect to Database server 11g, connection fails with following error message</p>
<p class="MsoNormal"><strong>ORA-02248: invalid option for ALTER SESSION</strong></p>
<p class="MsoNormal" style="text-align: justify;">To resolve this problem simply upgrade your Developer 6i release by <span id="more-261"></span>applying a patch or by fresh installation. For example, when I first time encountered this problem, I was using <strong>Forms Builder 6.0.5.0.2</strong>. I removed my previous release and installed Developer release <strong>6.0.8.8.0</strong>. After up-gradation I was able to connect to 11g server without further problem.</p>
<p class="MsoNormal" style="text-align: justify;">When I first time tried to run my form, Forms Builder 6.0.8.8.0 asked me to re-enter password. This is because 11g has new <strong>Case sensitive password</strong> feature. When I first time connected to Forms Builder, I supplied correct password which was in lower case. When I tried to run form, Forms Builder tried to connect to 11g server with upper case user and upper case password. This is default behavior of Forms builder. Similar problem occurred when I tried to call reports from Forms using RUN_PRODUCT() method. <span> </span>To resolve this problem either set database users passwords to upper case or issue following SQL command to disable case Sensitive password feature.</p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = FALSE;</span></p>
<p class="MsoNormal">
<p class="MsoNormal" style="text-align: justify;">Upgrading your Developer release will resolve you problem but you must remember that developer 6i with 11g is not a supported combination by oracle as support for Developer 6i has been dis-continued. Oracle recommends upgrading you developer to latest version like Oracle Developer Suite <em><span style="font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;">10g </span></em><em><span style="font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; font-style: normal;">or Forms 11g</span></em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://exploreoracle.com/2009/10/29/ora-02248-error-while-connecting-developer-6i-to-database-11g/feed/</wfw:commentRss>
		</item>
		<item>
		<title>RMAN Recovery &#124; Restore Controlfile</title>
		<link>http://exploreoracle.com/2009/09/12/rman-recovery-restore-controlfile/</link>
		<comments>http://exploreoracle.com/2009/09/12/rman-recovery-restore-controlfile/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 12:45:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Backup and Recovery]]></category>

		<category><![CDATA[Oracle Database 10g]]></category>

		<guid isPermaLink="false">http://exploreoracle.com/?p=218</guid>
		<description><![CDATA[In this post, you will learn how to recover a database using RMAN. To recover database, an RMAN backup is required. In last article, it was explained that how we can take backup using RMAN. In following example, backup taken in last article will be used to perform full database recovery. Visit following link to [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="text-align: justify;">In this post, you will learn how to recover a database using RMAN. To recover database, an RMAN backup is required. In last article, it was explained that how we can take backup using RMAN. <span id="more-218"></span>In following example, backup taken in last article will be used to perform full database recovery. Visit following link to view last article.</p>
<p class="MsoNormal" style="text-align: justify;">
<p class="MsoNormal" style="text-align: justify;"><a href="../2009/09/06/rman-script-to-take-full-database-backup/">http://exploreoracle.com/2009/09/06/rman-script-to-take-full-database-backup/</a></p>
<p class="MsoNormal" style="text-align: justify;">
<p class="MsoNormal" style="text-align: justify;">Now we have scenario in which all data files have lost, we have also lost controlfiles.<span> </span>But some how, we haven’t lost archivelog files since last backup. In this case, we can recover our database using RMAN backup and archivelog files. We shall only lose data which was in current online redo log file. <span> </span>Remember, at startup our database in not opened.</p>
<p class="MsoNormal" style="text-align: justify;">Invoke RMAN and connect to database using following command.</p>
<p class="MsoNormal" style="margin-left: 0.25in;"><code style="color: #ff9900"> RMAN&gt; connect target /</code></p>
<p class="MsoNormal" style="text-align: justify;">Now set DBID with following command, it should be the Id of your database.</p>
<p class="MsoNormal" style="margin-left: 0.25in;"><code style="color: #ff9900"> RMAN&gt; set dbid=1216018526</code></p>
<p class="MsoNormal" style="text-align: justify;">Now start database in nomount stage.</p>
<p class="MsoNormal" style="margin-left: 0.25in;"><code style="color: #ff9900">RMAN&gt; startup nomount;</code></p>
<p class="MsoNormal" style="text-align: justify;">Now configure controlfile autoback location.</p>
<p class="MsoNormal" style="margin-left: 0.25in;"><code style="color: #ff9900">RMAN&gt; set controlfile autobackup format for device type disk to 'd:/rmanbackup/%F’;</code></p>
<p class="MsoNormal" style="text-align: justify;">Use      following command to restore controlfiles.</p>
<p class="MsoNormal" style="margin-left: 0.25in;"><code style="color: #ff9900">RMAN&gt; restore controlfile from autobackup;</code></p>
<p class="MsoNormal" style="margin-left: 0.25in;">
<p class="MsoNormal" style="text-align: justify;"><strong><em style="color: #4682B4">Using this way all three control files will be restored to their default locations. However, there is another way to restore controlfile if you do not want to restore controlfile using &#8220;from autobackup&#8221;.  In this method,  first connect to database, and then start it in nomount stage.  Now locate the file name  which contains controlfile backup in d:\rmanbackup,  copy its  name.  Now issues following command to restore control file</em></strong></p>
<p class="MsoNormal" style="text-align: justify;"><strong><em style="color: #4682B4">RMAN&gt; restore controlfile to &#8216;c:/CONTROL01.CTL&#8217; from  &#8216;d:/rmanbackup/C-1216018526-20090905-00&#8242;;</em></strong></p>
<p class="MsoNormal" style="text-align: justify;"><strong><em style="color: #4682B4">In this command  &#8216;</em></strong><strong><em style="color: #4682B4">C-1216018526-20090905-00&#8242; is name of backup file which contains controlfile backup. This file can be from autobackup or from  other backup. Other back means controlfile backup taken using &#8220;backup format&#8221; method in RMAN.<br />
</em></strong></p>
<p class="MsoNormal" style="text-align: justify;"><strong><em style="color: #4682B4"> </em></strong><strong><em style="color: #4682B4">Above restore controlfile  command will create only one controlfile at &#8216;c:/CONTROL01.CTL&#8217;. Now copy this first control file at its location and save as it two times to create CONTROL02.CTL, and CONTROL03.CTL files.  using this method you do not need to set DBID</em>, <em style="color: #4682B4">and autobackup control file location.</em></strong></p>
<p><strong></strong></p>
<p class="MsoNormal" style="text-align: justify;">Restoration of control file is key point in database recovery. As control file has the information about all datafiles. Once control file is restored, database can be mounted.  Mounting of database is necessary.  All recovery operation can only be performed in mount stage. You can mount your database using following command.</p>
<p class="MsoNormal" style="margin-left: 0.25in;"><code style="color: #ff9900">RMAN&gt; mount database;</code></p>
<p class="MsoNormal" style="text-align: justify;">After mounting database, this is time to restore all datafilese. To restore database, use following command.</p>
<p class="MsoNormal" style="margin-left: 0.25in;"><code style="color: #ff9900">RMAN&gt; restore database using tag full_db;</code></p>
<p class="MsoNormal" style="text-align: justify;">Media Recovery should be performed on database before opening. In this step archivelogs are applied to recover data since last backup and to bring database in consistent stage.</p>
<p class="MsoNormal" style="margin-left: 0.25in;"><code style="color: #ff9900">RMAN&gt; recover database;</code></p>
<p class="MsoNormal" style="text-align: justify;">Issue following command to open database and reset logs</p>
<p class="MsoNormal" style="margin-left: 0.25in;"><code style="color: #ff9900">RMAN&gt; alter database open resetlogs;</code></p>
<p class="MsoNormal" style="text-align: justify;">Following snapshots show full recovery process.</p>
<p class="MsoNormal" style="text-align: justify;">
<div class="wp-caption alignnone" style="width: 673px"><img title="Rman Recovery (part 1)" src="/images/RMAN/RMAN_2.PNG" alt="Rman Recovery (part 1)" width="663" height="618" /><p class="wp-caption-text">Rman Recovery (part 1)</p></div>
<p class="MsoNormal" style="text-align: justify;">
<p class="MsoNormal" style="text-align: justify;">
<div class="wp-caption alignnone" style="width: 678px"><img title="Rman Recovery (part 2)" src="/images/RMAN/RMAN_3.PNG" alt="Rman Recovery (part 2)" width="668" height="758" /><p class="wp-caption-text">Rman Recovery (part 2)</p></div>
]]></content:encoded>
			<wfw:commentRss>http://exploreoracle.com/2009/09/12/rman-recovery-restore-controlfile/feed/</wfw:commentRss>
		</item>
		<item>
		<title>RMAN script to take full database backup</title>
		<link>http://exploreoracle.com/2009/09/06/rman-script-to-take-full-database-backup/</link>
		<comments>http://exploreoracle.com/2009/09/06/rman-script-to-take-full-database-backup/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 21:17:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Backup and Recovery]]></category>

		<category><![CDATA[Oracle Database 10g]]></category>

		<guid isPermaLink="false">http://exploreoracle.com/?p=179</guid>
		<description><![CDATA[
Following section explains how we can take full database backup using RMAN command line interface on windows.
Before tacking backup, decide which type of backup you want to take. You can take online or offline backup using RMAN. For online backups, database archiving must be turned ON. If archiving of you database is not ON, database [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin: 0in 0in 0pt;">
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 12pt; font-family: Times New Roman;">Following section explains how we can take full database backup using RMAN command line interface on windows.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 12pt; font-family: Times New Roman;">Before tacking backup, decide which type of backup you want to take. You can take online or offline backup using RMAN.<span id="more-179"></span> For online backups, database archiving must be turned ON. If archiving of you database is not ON, database must be in MOUNT stage to take backup using RMAN. Oracle recommends you to turn ON archiving to protect your data. This example is tested with online backup option.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 12pt; font-family: Times New Roman;"><br />
</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;">
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in;"><span style="font-family: Times New Roman;"><span style="mso-list: Ignore;"><span style="font-size: 12pt;">1-</span><span style="font: 10pt &quot;Times New Roman&quot;;"> </span></span><span style="font-size: 12pt;">First step is to start RMAN, click <strong style="mso-bidi-font-weight: normal;">Start-&gt;Run</strong> and type RMAN and press Enter key. </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in;"><span style="font-family: Times New Roman;"><span style="mso-list: Ignore;"><span style="font-size: 12pt;">2-</span><span style="font: 12pt &quot;Times New Roman&quot;;"> </span></span><span style="font-size: 12pt;">Second step is to connect RMAN to database. In this example, RMAN metadata will be saved in control file of target database. Now, issue following commands to connect database.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in;"><span style="font-family: Times New Roman;"><span style="font-size: 12pt;"><br />
</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in;"><code style="color: #ff9900">RMAN&gt; Connect target /</code></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in;">
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in;">
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in;">
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in;">Here note down DBID of database. This DBID will be used in recovery process</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in;"><span style="font-size: 12pt; font-family: Times New Roman;">3-<span style="mso-tab-count: 1;"> </span>Create a directory name as “D:\RMANBACKUP”. Now type following script to take full database backup.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in;">
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in;">
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in;">
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><code style="color: #ff9900"><br />
RMAN&gt; run{</code></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><code style="color: #ff9900">2&gt;</code><code style="color: #ff9900"> configure controlfile autobackup format for device type disk to 'd:/rmanbackup/%F';<br />
</code></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><code style="color: #ff9900">3&gt; configure controlfile autobackup on;</code><br />
<code style="color: #ff9900"> 4&gt; allocate channel d1 type disk;</code><code style="color: #ff9900"> </code></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><code style="color: #ff9900">5&gt; backup tag FULL_DB format 'd:/rmanbackup/db_%t_%s.bk' (database);</code><br />
<code style="color: #ff9900"> 6&gt; release channel d1;<br />
7&gt; }</code></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;">
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;">
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;">
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;">
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;">
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;">
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;">
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: 12pt; font-family: Times New Roman;">After the procedure is competed, you will find backupup files in “D:\RMANBACKUP” directory.These backup files can be used to recover any datafile or all datafiles, control file or SPFILE. </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: 12pt; font-family: Times New Roman;"><br />
</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: 12pt; font-family: Times New Roman;">In production database, you will have several backups. What if you want to restore a particular backup? To handle this issue, RMAN supports a TAG with each backup. In above script tag <strong style="mso-bidi-font-weight: normal;">FULL_DB </strong>is used at line 3. At the time of recovery this tag can be used to restore a particular backup. </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: 12pt; font-family: Times New Roman;">Following is the snapshot of all above process.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: 12pt; font-family: Times New Roman;"><br />
</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;">
<div class="wp-caption alignnone" style="width: 675px"><img title="RMAN backup" src="/images/RMAN/RMAN_1.PNG" alt="RMAN backup" width="665" height="742" /><p class="wp-caption-text">RMAN backup</p></div>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;">Visit  following link to find an example of  database recovery using above backup</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;"><span style="font-size: 12pt; font-family: Times New Roman;"><br />
</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;"><a href="../2009/09/12/rman-recovery-restore-controlfile/">http://exploreoracle.com/2009/09/12/rman-recovery-restore-controlfile/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://exploreoracle.com/2009/09/06/rman-script-to-take-full-database-backup/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Oracle RMAN</title>
		<link>http://exploreoracle.com/2009/09/02/oracle-rman/</link>
		<comments>http://exploreoracle.com/2009/09/02/oracle-rman/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 15:06:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Backup and Recovery]]></category>

		<category><![CDATA[Oracle Database 10g]]></category>

		<guid isPermaLink="false">http://exploreoracle.com/?p=176</guid>
		<description><![CDATA[

Recovery Manager (RMAN) is client/server utility provided by oracle to perform backup and recovery operations on oracle database. RMAN is available in command-line interface as well as in Enterprise manager GUI. RMAN is part of oracle database and does not require separate installation or configuration. RMAN was firstly introduced with oracle 8.0. With RMAN, process [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;">
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;">
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;"><span style="font-size: 12pt; font-family: Times New Roman;">Recovery Manager (RMAN) is client/server utility provided by oracle to perform backup and recovery operations on oracle database. RMAN is available in command-line interface as well as in Enterprise manager GUI. RMAN is part of oracle database and does not require separate installation or configuration. <span id="more-176"></span>RMAN was firstly introduced with oracle 8.0. With RMAN, process of backup and recovery is easy, reliable and fast.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;"><span style="font-size: 12pt; font-family: Times New Roman;">Oracle supports two methods to perform backup and recovery. First method is known as user-managed backups, in this method backup of database files is taken using operating system commands and SQL *Plus commands are used to perform recovery. In second method, RMAN is used to perform all backup and recovery operations. RMAN has certain advantages over user-managed backups. Following are main advantages of RMAN over user-managed backups</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;"><span style="font-size: 12pt; font-family: Times New Roman;"><br />
</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;"><span style="font-size: 12pt; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; text-align: justify; mso-list: l0 level1 lfo1; tab-stops: list .5in;"><span style="font-family: Times New Roman;"><span style="mso-list: Ignore;"><span style="font-size: 12pt;">1- </span><span style="font: 12pt &quot;Times New Roman&quot;;"> </span></span><span style="font-size: 12pt;">If you want to take an online backup using user-managed technique, all online read/write tablespaces must be put in backup mode. If you failed to do so, database recovery may not be possible when required. With RMAN, no tablespace is required to be put in backup mode.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; text-align: justify; mso-list: l0 level1 lfo1; tab-stops: list .5in;"><span style="font-family: Times New Roman;"><span style="mso-list: Ignore;"><span style="font-size: 12pt;">2-</span><span style="font: 12pt &quot;Times New Roman&quot;;"> </span></span><span style="font-size: 12pt;">RMAN allows incremental backups. In incremental backup, only thatdata blocks are copied which have changed after previous backup. In user-managed backups all data blocks are copied every time.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; text-align: justify; mso-list: l0 level1 lfo1; tab-stops: list .5in;"><span style="font-family: Times New Roman;"><span style="mso-list: Ignore;"><span style="font-size: 12pt;">3-</span><span style="font: 7pt &quot;Times New Roman&quot;;"> </span></span><span style="font-size: 12pt;">RMAN checks for data block corruption and archive log corruption during backup.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; text-align: justify; mso-list: l0 level1 lfo1; tab-stops: list .5in;"><span style="font-family: Times New Roman;"><span style="mso-list: Ignore;"><span style="font-size: 12pt;">4-</span><span style="font: 12pt &quot;Times New Roman&quot;;"> </span></span><span style="font-size: 12pt;">RMAN omits data blocks that have never been used. Operating systemcommands used in user-managed backup copy all the database files with all blocks.<span style="mso-spacerun: yes;"> </span>So the size of RMAN backup is usually small.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; text-align: justify; mso-list: l0 level1 lfo1; tab-stops: list .5in;"><span style="font-family: Times New Roman;"><span style="font-size: 12pt;"><br />
</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;"><span style="font-size: 12pt; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;"><span style="font-size: 12pt;"><span style="font-family: Times New Roman;">In addition to above, RMAN maintains metadata of its operations. This metadata is called RMAN repository. RMAN repository can be kept in target database (database which is being backed up) control file or in a separate database schema called recovery catalog. This repository stores information about location of backup sets, target database schema and current RMAN settings. Metadata can be accessed by using LIST, SHOW and REPORT commands. If you are using recovery catalog, certain views are available to query RMAN repository.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;"><span style="font-size: 12pt;"><span style="font-family: Times New Roman;"><br />
</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;"><span style="font-size: 12pt; font-family: Times New Roman;">When database is recovered using RMAN, RMAN requires metadata to find location and type of backups. Without this repository, RMAN can not perform restoration and recovery operation.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;">
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;"><span style="font-size: 12pt; font-family: Times New Roman;">Visit following link to find an example of RMAN backup script,</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;"><span style="font-size: 12pt; font-family: Times New Roman;"><br />
</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;"><a href="../2009/09/06/rman-script-to-take-full-database-backup/">http://exploreoracle.com/2009/09/06/rman-script-to-take-full-database-backup/</a></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;"><span style="font-size: 12pt; font-family: Times New Roman;"><br />
</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;">Visit  following link to find an example of database recovery using RMAN.</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;"><span style="font-size: 12pt; font-family: Times New Roman;"><br />
</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify;"><a href="../2009/09/12/rman-recovery-restore-controlfile/">http://exploreoracle.com/2009/09/12/rman-recovery-restore-controlfile/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://exploreoracle.com/2009/09/02/oracle-rman/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Oracle External Table</title>
		<link>http://exploreoracle.com/2009/08/20/oracle-external-table/</link>
		<comments>http://exploreoracle.com/2009/08/20/oracle-external-table/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 10:08:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Oracle Database 10g]]></category>

		<category><![CDATA[10g]]></category>

		<guid isPermaLink="false">http://exploreoracle.com/?p=165</guid>
		<description><![CDATA[Suppose we have a text file named “emp.data”. This text files contains employees data in following format,
1, Michle , clerk
2, king , manager
3, joe , clerk


What if we want to use this data in SQL query? Remember we do not want to import this data in oracle database but we want to reference this data [...]]]></description>
			<content:encoded><![CDATA[<p>Suppose we have a text file named “emp.data”. This text files contains employees data in following format,</p>
<p><code style="color: #ff9900">1, Michle , clerk<br />
2, king , manager<br />
3, joe , clerk<br />
</code></p>
<p class="MsoNormal">
<p class="MsoNormal">What if we want to use this data in SQL query? Remember we do not want to import this data in oracle database but we want to reference this data from its physical location. To achieve this oracle database has provided a feature called External Tables. Using this feature, we can register “emp.dat” file in oracle database as external table.<span> <span id="more-165"></span></span></p>
<p class="MsoNormal">In oracle database, an external table resides outside of database. These tables can be used in SQL queries like regular database tables. Views can also be created on external tables but no DML operation can be performed on external table. This is why external tables are read-only. Also we cannot create indexes on external tables.</p>
<p class="MsoNormal">External tales are created using ORGANIZATION EXTERNAL clause in CREATE TABLE statement. Following section creates an external table to reference data in “emp.dat” data.</p>
<p class="MsoNormal">Create a directory as <strong>c:\external_data. </strong>Create a new file as <strong>“emp.dat” </strong>in c:\external_data<span> </span>directory<strong>.<span> </span></strong>Copy and paste following three rows in “emp.dat” file,</p>
<p><code style="color: #ff9900"><br />
1, Michle , clerk<br />
2, king , manager<br />
3, joe , clerk<br />
</code></p>
<p class="MsoNormal">Now Connect to oracle database from <strong>sys</strong> user and issue following SQL statements,</p>
<p><code style="color: #ff9900">create or replace directory data_dir as 'C:\external_table';<br />
grant read,write on directory data_dir to scott;<br />
</code></p>
<p class="MsoNormal">
<p class="MsoNormal">Now connect to SCOTT user and following CREATE TABLE statement to create external table</p>
<p><code style="color: #ff9900"><br />
CREATE TABLE EXT_TABLE<br />
(EMP_ID NUMBER,<br />
EMP_NAME VARCHAR2(50),<br />
EMP_JOB VARCHAR2(20))<br />
ORGANIZATION EXTERNAL<br />
(<br />
TYPE ORACLE_LOADER<br />
DEFAULT DIRECTORY DATA_DIR<br />
ACCESS PARAMETERS<br />
(<br />
records delimited by newline<br />
fields terminated by ','<br />
)<br />
LOCATION ('EMP.DAT')<br />
)</code></p>
<p class="MsoNormal">Now we can query external table. We can use this external table like we use other database tables.</p>
<p class="MsoNormal">All above process is shown in figure below.</p>
<p class="MsoNormal">
<div class="wp-caption alignnone" style="width: 684px"><img title="External Tables" src="/images/EXT_TABLE_A.PNG" border="1" alt="External Tables" width="674" height="602" /><p class="wp-caption-text">External Tables</p></div>
<p class="MsoNormal">
<p class="MsoNormal">For further details you may visit following link</p>
<p class="MsoNormal">http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/tables.htm#sthref2445</p>
]]></content:encoded>
			<wfw:commentRss>http://exploreoracle.com/2009/08/20/oracle-external-table/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Archivelog mode concepts &#124; Oracle Hot backup and cold backup</title>
		<link>http://exploreoracle.com/2009/08/12/archivelog-mode-concepts-oracle-hot-backup-and-cold-backup/</link>
		<comments>http://exploreoracle.com/2009/08/12/archivelog-mode-concepts-oracle-hot-backup-and-cold-backup/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 06:54:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Backup and Recovery]]></category>

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

		<category><![CDATA[Oracle Database 10g]]></category>

		<guid isPermaLink="false">http://exploreoracle.com/?p=159</guid>
		<description><![CDATA[We take complete physical backup of database by copying physical database files including datafiles, control files, password file and parameter file. Backup can be online backup or offline backup.  In online backup, our database is in open stage and datafiles have different SCN. This type of backup is also known as hot backup as [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="text-align: justify;">We take complete physical backup of database by copying physical database files including datafiles, control files, password file and parameter file. Backup can be online backup or offline backup. <span> </span>In online backup, our database is in open stage and datafiles have different SCN.<span> <span id="more-159"></span></span>This type of backup is also known as hot backup as during the process of backup, database is open and user s can access and change data.<span> </span>In offline backup which also known as cold backup, all datafiles and control files have same SCN number. This type of backup is possible when database is closed by a clean shutdown.</p>
<p class="MsoNormal" style="text-align: justify;">When changes are made to datafiles, before these changes are written to datafies, redo entries for these changes are written to online redo log file. These redo entries can be used to re-build or re-store database changes. When a redo log file is full and archivelog mode of database is turned on, this redo log file is copied to offline destination known as archived redo log. The process of coping online redo log to archive redo log is called archiving. Redo log files work in circular fashion, it means redo log files are reused. For example, if our database has two redo log files, oracle uses second redo log file when first redo log file is full. When second redo log file is also full, oracle switches back to first redo log file. So if archiving is not turned on redo entries in redo log file are lost.</p>
<p class="MsoNormal">We need archive redo logs in flowing situations,</p>
<p class="MsoNormal" style="text-align: justify;">To take an online or hot backup, database archiving must be turned on because in online backup, datafiles have different SCN and data in data files in not consistent. When we restore an online backup, archived redo logs are applied to bring database in consistent stage.</p>
<p class="MsoNormal" style="text-align: justify;">Suppose we have taken a physical backup. After four hours of physical backup, few or all datafiles stop working due to media loss. We have a backup which is four hour old. We can only recover last four hours working only if automatic archiving is on.</p>
<p class="MsoNormal">Flashback database feature also requires that database archiving should be turned on.</p>
<p class="MsoNormal">To summarize, we can conclude that to protect our data and to ensure database recovery, archiving of database must be turned on.</p>
]]></content:encoded>
			<wfw:commentRss>http://exploreoracle.com/2009/08/12/archivelog-mode-concepts-oracle-hot-backup-and-cold-backup/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Oracle Temporary Table</title>
		<link>http://exploreoracle.com/2009/08/08/oracle-temporary-table/</link>
		<comments>http://exploreoracle.com/2009/08/08/oracle-temporary-table/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 11:26:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[DataBase Architecture]]></category>

		<category><![CDATA[Oracle Database 10g]]></category>

		<guid isPermaLink="false">http://exploreoracle.com/?p=146</guid>
		<description><![CDATA[Often database developers require temporary storage location which is private to session.  To accomplish this requirement, Oracle database allows us to create Temporary tables. Temporary tables are of two types

1- Transaction Specific Temporary Table
 
A transaction specific temporary table holds a data until a commit is performed. A transaction begins when first SQL statement [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="text-align: justify;">Often database developers require temporary storage location which is private to session. <span> </span>To accomplish this requirement, Oracle database allows us to create Temporary tables. Temporary tables are of two types<span id="more-146"></span></p>
<p class="MsoNormal">
<p class="MsoNormal" style="margin-left: 0in; text-indent: 0.25in;"><span>1-<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;"> </span></span><strong>Transaction Specific Temporary Table</strong></p>
<p class="MsoNormal" style="margin-left: 0.25in;"><strong> </strong></p>
<p class="MsoNormal" style="margin-left: 0.5in; text-align: justify;">A transaction specific temporary table holds a data until a commit is performed. A transaction begins when first SQL statement is executed and ends when a commit or rollback is performed.<span> </span>When a transaction ends either by commit or rollback, data in transaction specific temporary table is lost.</p>
<p class="MsoNormal" style="margin-left: 0.25in;">
<p class="MsoNormal" style="margin-left: 0.25in; text-indent: 0.25in;">Use following command to create a transaction specific temporary table</p>
<p class="MsoNormal" style="margin-left: 0.25in;">
<p class="MsoNormal" style="margin-left: 0.25in; text-indent: 0.25in;"><em>CREATE GLOBAL TEMPORARY TABLE temp_table<br />
(emp_id<span> </span><span> </span>number,<br />
emp_name <span> </span>varchar2(50))<br />
ON COMMIT DELETE ROWS;</em></p>
<p class="MsoNormal" style="margin-left: 0.25in;">
<p class="MsoNormal" style="margin-left: 0.5in;">Note ON COMMIT clause in table creation. If ON COMMIT clause is omitted, by default oracle creates a transaction specific temporary table.</p>
<p class="MsoNormal" style="text-indent: 0.5in;">
<p class="MsoNormal" style="text-indent: 0.25in;">
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><span>2-<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;"> </span></span><strong>Session Specific Temporary Table</strong></p>
<p class="MsoNormal">
<p class="MsoNormal" style="margin-left: 0.5in; text-align: justify;">A session specific temporary table holds data until session lasts. When a commit is performed on session specific temporary table, data is preserved in table. But the data is not visible to others session. The data is lost when session ends.</p>
<p class="MsoNormal" style="margin-left: 0.5in;">
<p class="MsoNormal" style="margin-left: 33pt;">Session specific temporary table can be created using “PRESERVE DATA” in ON COMMIT clause.</p>
<p class="MsoNormal" style="margin-left: 33pt;">
<p class="MsoNormal" style="margin-left: 0.25in; text-indent: 0.25in;"><em>CREATE GLOBAL TEMPORARY TABLE temp_table<br />
(emp_id<span> </span><span> </span>number,<br />
emp_name <span> </span>varchar2(50))<br />
ON COMMIT PRESERVE ROWS;</em></p>
<p class="MsoNormal">
<p class="MsoNormal">
<p class="MsoNormal" style="text-align: justify;">The definition of temporary table is visible to all the sessions. Unlike permanent table, segment for temporary table is allocated when first INSERT statement is executed on temporary table. Indexes can also be created on temporary tables. The scope and life time of these indexes is similar to temporary tables.</p>
]]></content:encoded>
			<wfw:commentRss>http://exploreoracle.com/2009/08/08/oracle-temporary-table/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Undo Management and Undo Tablespace &#124; Undo Retention</title>
		<link>http://exploreoracle.com/2009/07/31/undo-management-and-undo-tablespace-undo-retention/</link>
		<comments>http://exploreoracle.com/2009/07/31/undo-management-and-undo-tablespace-undo-retention/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 18:33:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Oracle Database 10g]]></category>

		<category><![CDATA[Performance & Tuning]]></category>

		<guid isPermaLink="false">http://exploreoracle.com/?p=136</guid>
		<description><![CDATA[When a query tries to modify database, original data entries are kept in separate location and then changes are applied to datafiles. The data which is kept in separate location is called Undo data. Undo data is used to maintain data integrity and data consistency. Oracle uses Undo data in following situations 
1- After query [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%; font-family: &quot;Times New Roman&quot;;">When a query tries to modify database, original data entries are kept in separate location and then changes are applied to datafiles. The data which is kept in separate location is called Undo data. Undo data is used to maintain data integrity and data consistency.<span> </span>Oracle uses Undo data in following situations <span id="more-136"></span></span></p>
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%; font-family: &quot;Times New Roman&quot;;">1-<span> </span>After query execution, user may commit or rollback transaction. If user issues a rollback, original data is copied from Undo data entries. </span></p>
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%; font-family: &quot;Times New Roman&quot;;">2-<span> </span>Suppose a user execute query which take 20 minutes to execute. Other users may change the data during these 20 minutes. This may cause read inconsistency. To insure read consistency, oracle database uses original data from undo entries if data is changed during the execution of a query.</span></p>
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%; font-family: &quot;Times New Roman&quot;;">3-<span> </span>Flashback features including Oracle Flashback Query, Oracle Flashback version, Flashback transaction query and Oracle Flashback Table make use of undo data.</span></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; line-height: 115%; font-family: &quot;Times New Roman&quot;;">Undo Management and Undo Retention Period</span></strong></p>
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%; font-family: &quot;Times New Roman&quot;;">Oracle supports two types of Undo management, <strong>Manual Undo Management</strong> and <strong>Auto Undo Management</strong>. In manual management, undo data is kept in rollback segments. When new database is created, oracle creates one rollback segments is system tablespace. Additional rollback segments can be created on requirement. Memory management for rollback segments is really complex. By default database is configured to use Manual Undo Management but it is not recommended by oracle.</span></p>
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%; font-family: &quot;Times New Roman&quot;;">Oracle database 9i and latest releases including 10g provide auto management of undo data. In auto management, undo data is stored in undo tablespace. Oracle creates one undo tablespace when a new database is created. Undo tablespace can also be created using following SQL statement.</span></p>
<p><em><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;;">CREATE UNDO TABLESPACE undotbs_02</span></em><br />
<em><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;;"><span> </span><span> </span>DATAFILE &#8216;/oracle/oradata/orcl/undo0201.dbf&#8217; SIZE 100M REUSE;</span></em></p>
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%; font-family: &quot;Times New Roman&quot;;"> </span></p>
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%; font-family: &quot;Times New Roman&quot;;">Use <span style="line-height: 115%; font-family: &quot;Times New Roman&quot;;">UNDO_MANAGEMENT initialization parameter to enable auto undo management. Set the value of this initialization parameter to Auto to start undo management as shown below</span></span></p>
<p class="MsoNormal"><code><em><span style="font-size: 12pt; line-height: 115%; font-family: &quot;Times New Roman&quot;;">UNDO_MANAGEMENT=Auto</span></em></code></p>
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%; font-family: &quot;Times New Roman&quot;;"><span> </span>When oracle instance start, it select first undo tablespace to keep undo data. <em>UNDO_TABLESPACE</em> initialization parameter can be used to utilize a specific undo tablespace if you have more than one undo tablespaces.</span></p>
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%; font-family: &quot;Times New Roman&quot;;"><span> </span>The size of undo tablespace can be fixed or autoextend. Even with outoextend option enabled, maximum size of undo tablespace can be controlled by MAXSIZE clause. If undo tablespace has fixed size or MAXSIZE defined then old undo entries can be overwritten by new entries. The size of undo table space should be large enough to insure the undo data is available when required. This is done by setting <strong>Undo Retention period</strong>. Oracle database tries to retain undo data for time given by undo Retention period. Oracle database tries best to ensure this retention period. To insure read consistency, Undo retention period should be at least equal to time taken by your longest running query. If query is running and oracle finds that the data required by query is overwritten in undo tablespace, query fails with <strong>snapshot too old</strong> er<a name="sthref1479"></a><a name="sthref1480"></a>ror message. If an SQL statement has not been committed or rolled back, its undo entries are said to be <strong>Active. </strong>Oracle ensures that these entries retain until corresponding entries are committed.<strong> </strong>Undo entries are marked expired which are old than current retention period. Undo retention period can be set by using <em>UNDO_RETENTION</em> initialization parameter. Value for this parameter can be set in parameter file as shows below</span></p>
<p class="MsoNormal"><em><span style="font-size: 12pt; line-height: 115%; font-family: &quot;Times New Roman&quot;;">UNDO_RETENTION=3000<span> </span></span></em></p>
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%; font-family: &quot;Times New Roman&quot;;">The value is in seconds</span></p>
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%; font-family: &quot;Times New Roman&quot;;">Use following statements to set Retention period at runtime</span></p>
<p><em><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;;">ALTER SYSTEM SET UNDO_RETENTION = 3000;</span></em></p>
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%; font-family: &quot;Times New Roman&quot;;"> </span></p>
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%; font-family: &quot;Times New Roman&quot;;">If you are using Logical level flashback features, make sure that retention period is set according to requirements as flash back features use undo data to get past information.</span></p>
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%; font-family: &quot;Times New Roman&quot;;">By default retention period in not guaranteed, oracle database may overwrite undo data if space for new undo entries is not available. You can use <em>RETENTION GUARANTEE</em> clause while creating undo tablespace to guarantee retention period.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://exploreoracle.com/2009/07/31/undo-management-and-undo-tablespace-undo-retention/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Introduction to Oracle Backup and Recovery &#124; Oracle Flashback Features</title>
		<link>http://exploreoracle.com/2009/07/30/introduction-to-backup-and-recovery-oracle-flashback-features/</link>
		<comments>http://exploreoracle.com/2009/07/30/introduction-to-backup-and-recovery-oracle-flashback-features/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 04:42:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Backup and Recovery]]></category>

		<category><![CDATA[Oracle Database 10g]]></category>

		<guid isPermaLink="false">http://exploreoracle.com/?p=124</guid>
		<description><![CDATA[Oracle has provided powerful mechanism to protect database in situation of data loss. This mechanism includes a range of methods to Backup and Recover your data. First step is to backup you data and second step is to recover required data. Broadly speaking, oracle supports two types of backups, Logical Backup and Physical database backups.

Logical [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">Oracle has provided powerful mechanism to protect database in situation of data loss. This mechanism includes a range of methods to <strong>Backup</strong> and <strong>Recover</strong> your data. First step is to backup you data and second step is to recover required data. Broadly speaking, oracle supports two types of backups, Logical Backup and Physical database backups.</p>
<p class="MsoNormal"><span id="more-124"></span></p>
<p class="MsoNormal"><strong>Logical Database Backup</strong></p>
<p class="MsoNormal">Logical backup means to backup you logical structure, for example, tables and packages. Logical backup can be taken using oracle utilities like Data Pump or oracle export utility.</p>
<p class="MsoNormal">
<p class="MsoNormal"><strong>Physical Database Backup</strong></p>
<p class="MsoNormal"><strong></strong>Physical backup is taken by maintaining backup of those files which constitute physical structure of oracle database. These files include datafiles, control files, redo log files, archived redo logs, parameter file and password file. Physical backup is considered more reliable and all of oracle backup and recovery techniques revolve around physical backups. Oracle uses term “Backup” for physical backups. Physical backups can be taken by using operating system commands or by using oracle utility <strong>RMAN. <span> </span></strong>RMAN is powerful utility to mange backups. Most of oracle backup and recovery techniques are designed around RMAN.</p>
<p class="MsoNormal">Usually DBA requires data recovery in two possible scenarios, loss of data due to user error or loss of data due to media failure.</p>
<p class="MsoNormal">Some user can accidentally change or deleted data or an error in application might cause logical data corruption. As a result of this, DBA is required to recover database to a stage prior to that mistake. In this case, an old backup is restored and archive logs are applied to recover lost data.</p>
<p class="MsoNormal">Some time, due to corruption of physical media, few or all of storage files are lost. In this case, DBA is required to reconstruct the database.</p>
<p class="MsoNormal">
<p class="MsoNormal">
<p class="MsoNormal">
<p class="MsoNormal"><strong><span style="font-size: 22pt;">Oracle Flashback Features</span></strong></p>
<p class="MsoNormal">Before the release of oracle database 10g, all data recovery techniques were applied when database is not in open stage. Oracle database 10g has provided a new feature called Flashback feature which can be used to recover data lost due to user errors and data can be recovered when database is in open stage. Flashback recovery is considered an alternate to Point-in-time recovery. Oracle Flashback feature can be divided into two categories, Logical Level Features and Physical Level Features.</p>
<p class="MsoNormal">Except Flashback Drop, all Logical Level Flashback features rely on UNDO Data which is kept in undo tablespace. Recovery using these features depends on retention period.  At logical level Flashback features consists of following</p>
<p class="MsoNormal">
<p class="MsoNormal"><strong>Oracle Flashback Query</strong></p>
<p class="MsoNormal">This feature allows you to execute a query on past stage of data. For example, you can execute a query by provide time interval of<span> </span>two hours back, the result will be same as query would have retrieved two hours back.</p>
<p class="MsoNormal">
<p class="MsoNormal"><strong>Oracle Flashback version and Flashback transaction query</strong></p>
<p class="MsoNormal">In oracle database, a transition begins when first SQL statement is executed and transacting ends when commit or rollback is issued. When transaction is completed, all effected rows attain a <strong>Version.<span> </span></strong>If within a transaction, a row has been updated ten times, it will have only one final <strong>Version</strong>. When a new transaction is performed a new Version of the rows is recorded.</p>
<p class="MsoNormal">Oracle flashback version query feature allows us to get all version of particular rows within a given time interval. As stated earlier, a final version may have been attained after execution of several SQL statements. Oracle Flashback transaction query feature allows to view changes made within a transition. <code><span style="font-size: 10pt;">FLASHBACK_TRANSACTION_QUERY </span></code><code><span style="font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">view</span></code><code><span style="font-size: 10pt;"> </span></code><code><span style="font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">is used to get Flashback transitions. This view also contains undo statements to reverse the effect of transaction.</span></code></p>
<p class="MsoNormal">
<p class="MsoNormal"><strong>Oracle Flashback Table</strong></p>
<p class="MsoNormal">This feature is used to bring a table to a past stage.</p>
<p class="MsoNormal"><strong> </strong></p>
<p class="MsoNormal"><strong>Oracle Flashback Drop</strong></p>
<p class="MsoNormal">This feature is used to recover a dropped table. Flashback drop is managed around <strong>Recycle Bin</strong> concept.</p>
<p class="MsoNormal">At physical level, oracle has provided <strong>Flashback Database</strong> feature. Flashback Database use flashback logs and archives redo logs to obtain past version of data. Flashback database can be used to restore entire database to an earlier point.</p>
<p class="MsoNormal"><strong><span style="font-size: 22pt;">Restore Points</span></strong></p>
<p class="MsoNormal">Oracle Database 10g also supports restore points. You can define a restore point with an SCN number. In future, database can be restored to an available restore point. Restore points can also be  used  in conjunction with Flashback Database.</p>
]]></content:encoded>
			<wfw:commentRss>http://exploreoracle.com/2009/07/30/introduction-to-backup-and-recovery-oracle-flashback-features/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
