<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Oracle Database 10g</title>
	<atom:link href="http://francispaulraj.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://francispaulraj.wordpress.com</link>
	<description>Oracle DBA, Oracle Database 10g, RMAN, Dataguard</description>
	<lastBuildDate>Thu, 12 Jan 2012 13:40:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='francispaulraj.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Oracle Database 10g</title>
		<link>http://francispaulraj.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://francispaulraj.wordpress.com/osd.xml" title="Oracle Database 10g" />
	<atom:link rel='hub' href='http://francispaulraj.wordpress.com/?pushpress=hub'/>
		<item>
		<title>RMAN tablespace problem</title>
		<link>http://francispaulraj.wordpress.com/2008/09/02/rman-tablespace-problem/</link>
		<comments>http://francispaulraj.wordpress.com/2008/09/02/rman-tablespace-problem/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 15:58:37 +0000</pubDate>
		<dc:creator>francispaulraj</dc:creator>
				<category><![CDATA[RMAN]]></category>
		<category><![CDATA[ORA-01653: unable to extend table]]></category>
		<category><![CDATA[recovery catalog]]></category>

		<guid isPermaLink="false">http://francispaulraj.wordpress.com/2008/09/02/rman-tablespace-problem/</guid>
		<description><![CDATA[RMAN&#62; connect target connected to target database: ECENTRIC (DBID=1755705917)   RMAN&#62; connect catalog connected to recovery catalog database   RMAN&#62; list backup; starting full resync of recovery catalog RMAN-00571: ========================================================== RMAN-00569: ===== ERROR MESSAGE STACK FOLLOWS =========== RMAN-00571: =============================================== RMAN-03002: failure of list command at 09/02/2008 08:58:46 RMAN-03014: implicit resync of recovery catalog failed RMAN-03009: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=francispaulraj.wordpress.com&amp;blog=4701887&amp;post=6&amp;subd=francispaulraj&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">RMAN&gt; connect target </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">connected to target database: ECENTRIC (DBID=1755705917)</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">RMAN&gt; connect catalog </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">connected to recovery catalog database</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">RMAN&gt; list backup;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">starting full resync of recovery catalog</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">RMAN-00571: ==========================================================</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">RMAN-00569: ===== ERROR MESSAGE STACK FOLLOWS ===========</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">RMAN-00571: ===============================================</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">RMAN-03002: failure of list command at 09/02/2008 08:58:46</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">RMAN-03014: implicit resync of recovery catalog failed</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">RMAN-03009: failure of full resync command on default channel at 09/02/2008 08:</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">8:46</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">ORA-01653: unable to extend table RMAN.ROUT by 128 in tablespace RMAN_DATA</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">Connect to catalog database ie. Atlantis</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">SQL&gt; alter tablespace rman_data coalesce;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">Tablespace altered.</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">SQL&gt; alter database datafile &#8216;e:\oradata\atlantis\rman_data.dbf&#8217;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;"><span>  </span><span>       </span><span>  </span>autoextend on</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;"><span>    </span><span>  </span><span>     </span>maxsize unlimited;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">Database altered.</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;">RMAN&gt; crosscheck backup;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;">allocated channel: ORA_SBT_TAPE_1</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;">channel ORA_SBT_TAPE_1: sid=132 devtype=SBT_TAPE</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;">channel ORA_SBT_TAPE_1: Tivoli Data Protection for Oracle: version 5.2.0.</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;">allocated channel: ORA_SBT_TAPE_2</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;">channel ORA_SBT_TAPE_2: sid=24 devtype=SBT_TAPE</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;">channel ORA_SBT_TAPE_2: Tivoli Data Protection for Oracle: version 5.2.0.</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;">allocated channel: ORA_DISK_1</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;">channel ORA_DISK_1: sid=86 devtype=DISK</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">Crosschecked 20 objects</span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/francispaulraj.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/francispaulraj.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/francispaulraj.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/francispaulraj.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/francispaulraj.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/francispaulraj.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/francispaulraj.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/francispaulraj.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/francispaulraj.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/francispaulraj.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/francispaulraj.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/francispaulraj.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/francispaulraj.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/francispaulraj.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/francispaulraj.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/francispaulraj.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=francispaulraj.wordpress.com&amp;blog=4701887&amp;post=6&amp;subd=francispaulraj&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://francispaulraj.wordpress.com/2008/09/02/rman-tablespace-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/88df7a75c925c628b7bdb2c3c9d72821?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">francispaulraj</media:title>
		</media:content>
	</item>
		<item>
		<title>Basics of RMAN</title>
		<link>http://francispaulraj.wordpress.com/2008/09/02/basics-of-rman/</link>
		<comments>http://francispaulraj.wordpress.com/2008/09/02/basics-of-rman/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 15:53:16 +0000</pubDate>
		<dc:creator>francispaulraj</dc:creator>
				<category><![CDATA[RMAN]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[recovery catalog]]></category>
		<category><![CDATA[report]]></category>

		<guid isPermaLink="false">http://francispaulraj.wordpress.com/?p=4</guid>
		<description><![CDATA[WHAT IS RMAN ? Recovery Manager is a tool that: manages the process of creating backups and also manages the process of restoring and recovering from them. WHY USE RMAN ? No extra costs …Its available free RMAN introduced in Oracle 8 it has become simpler with newer versions and easier than user managed backups [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=francispaulraj.wordpress.com&amp;blog=4701887&amp;post=4&amp;subd=francispaulraj&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="snap_preview">
<p><strong><span style="text-decoration:underline;">WHAT IS RMAN ?</span></strong></p>
<p>Recovery Manager is a tool that: manages the process of creating backups and also manages the process of restoring and recovering from them.</p>
<p><strong><span style="text-decoration:underline;">WHY USE RMAN ?</span></strong></p>
<ul>
<li>No extra costs …Its available free</li>
<li>RMAN introduced in Oracle 8 it has become simpler with newer versions and easier than user managed backups</li>
<li>Proper security</li>
<li>You are 100% sure your database has been backed up.</li>
<li>Its contains detail of the backups taken etc in its central repository</li>
<li>Facility for testing validity of backups also commands like crosscheck to Check the status of backup.</li>
<li>Faster backups and restores compared to backups without RMAN</li>
<li>RMAN is the only backup tool which supports incremental backups.</li>
<li>Oracle 10g has got further optimized incremental backup which has resulted in improvement of performance during backup and recovery time</li>
<li>Parallel operations are supported</li>
<li>Better querying facility for knowing different details of backup</li>
<li>No extra redo generated when backup is taken..compared to online backup without RMAN which results in saving of space in hard disk</li>
<li>RMAN an intelligent tool</li>
<li>Maintains repository of backup metadata</li>
<li>Remembers backup set location</li>
<li>Knows what need to backed up</li>
<li>Knows what is required for recovery</li>
<li>Knows what backup are redundant</li>
</ul>
<p><strong><span style="text-decoration:underline;">UNDERSTANDING THE RMAN ARCHITECTURE</span></strong></p>
<ul>
<li>An oracle RMAN comprises of RMAN EXECUTABLE This could be present and fired even through client side TARGET DATABASE This is the database which needs to be backed up</li>
<li>RECOVERY CATALOG Recovery catalog is optional otherwise backup details are stored in target database controlfile</li>
<li>It is a repository of information queried and updated by Recovery Manager</li>
<li>It is a schema or user stored in Oracle database</li>
<li>One schema can support many databases</li>
<li>It contains information about physical schema of target database datafile and archive log, backup sets and pieces</li>
</ul>
<p><strong><span style="text-decoration:underline;">Recovery catalog is a must in following scenarios</span></strong></p>
<ul>
<li>In order to store scripts</li>
<li>For tablespace point in time recovery</li>
</ul>
<p><strong><span style="text-decoration:underline;">Media Management Software</span></strong></p>
<p>Media Management software is a must if you are using RMAN for storing backup in tape drive directly.</p>
<p><strong><span style="text-decoration:underline;">Backups in RMAN</span></strong></p>
<p>Oracle backups in RMAN are of the following type</p>
<p><strong>RMAN complete backup OR RMAN incremental backup</strong></p>
<p>These backups are of RMAN proprietary nature</p>
<p><strong>IMAGE COPY</strong></p>
<p>Its again a kind of backup. The advantage of uing Image copy is its not in RMAN proprietary format.</p>
<p><span style="text-decoration:underline;">Backup Format</span></p>
<p>RMAN backup is not in oracle format but in RMAN format. Oracle backup comprises of backup sets and it consists of backup pieces. Backup sets are logical entity. In oracle 9i it gets stored in a default location.</p>
<p>There are two type of backup sets</p>
<ol>
<li>Datafile backup sets,</li>
<li>Archivelog backup sets</li>
</ol>
<p>One more important point of data file backup sets is it do not include empty blocks. A backup set would contain many backup pieces. A single backup piece consists of physical files which are in RMAN proprietary format.</p>
<p>You can go to RMAN prompt by just typing rman. RMAN executable is present in ORACLE_HOME/bin location.</p>
<p>bash-2.05$ <strong>rman</strong></p>
<div><span style="color:#0000ff;">Recovery Manager: Release 10.2.0.1.0 &#8211; Production on Mon Jul 23 02:16:55 2007Copyright (c) 1982, 2005, Oracle.  All rights reserved.</span></div>
<div><span style="color:#0000ff;"> </p>
<p></span></div>
<div><span style="color:#0000ff;"></span></div>
<p><span style="color:#0000ff;"><span style="color:#0000ff;"></p>
<div><span style="color:#0000ff;">RMAN&gt;</span></div>
<p><span style="color:#0000ff;"></span></p>
<p></span></span></p>
<div>You can use target connect to connect to database. The database it will connect to depends on the environment variable ORACLE_HOME.</div>
<p>RMAN&gt; <strong>connect target</strong></p>
<p><span style="color:#0000ff;">connected to target database: ORCL (DBID=1156435946)</span></p>
<p>Alternatively you can use “<strong>rman TARGET SYS/oracle@test NOCATALOG</strong>” to connect to the RMAN of “<strong>test</strong>” instance.</p>
<p>Here we will be using target database control file to store all the information required for RMAN, like backupsets and backup image information etc.</p>
<p><strong><span style="text-decoration:underline;">Backup Database:</span></strong></p>
<p>RMAN&gt; <strong>shutdown immediate</strong></p>
<p><span style="color:#0000ff;">using target database control file instead of recovery catalog<br />
database closed<br />
database dismounted<br />
Oracle instance shut down</span></p>
<p>RMAN&gt; <strong>startup mount;</strong></p>
<p><span style="color:#0000ff;">connected to target database (not started)<br />
Oracle instance started<br />
database mountedTotal System Global Area    1258291200 bytes</span></p>
<div></div>
<p><span style="color:#0000ff;"></p>
<div><span style="color:#0000ff;">Fixed Size                     1978336 bytes<br />
Variable Size                318771232 bytes<br />
Database Buffers             922746880 bytes<br />
Redo Buffers                  14794752 bytes</span><span style="color:#0000ff;"> </span></div>
<p>RMAN&gt; <strong>backup database</strong>;</p>
<p></span><span style="color:#0000ff;">Starting backup at 23-JUL-07<br />
allocated channel: ORA_DISK_1<br />
channel ORA_DISK_1: sid=155 devtype=DISK<br />
channel ORA_DISK_1: starting full datafile backupset<br />
channel ORA_DISK_1: specifying datafile(s) in backupset<br />
input datafile fno=00001 name=/dy/oracle/product/oradata/orcl/system01.dbf<br />
input datafile fno=00003 name=/dy/oracle/product/oradata/orcl/sysaux01.dbf<br />
input datafile fno=00005 name=/dy/oracle/product/oradata/orcl/example01.dbf<br />
input datafile fno=00002 name=/dy/oracle/product/oradata/orcl/undotbs01.dbf<br />
input datafile fno=00004 name=/dy/oracle/product/oradata/orcl/users01.dbf<br />
channel ORA_DISK_1: starting piece 1 at 23-JUL-07<br />
channel ORA_DISK_1: finished piece 1 at 23-JUL-07<br />
piece handle=/dy/oracle/product/flash_recovery_area/ORCL/backupset/2007_07_23/</span></p>
<p><span style="color:#0000ff;">o1_mf_nnndf_TAG20070723T031355_3b8zv57d_.bkp tag=TAG20070723T031355 comment=NONE<br />
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:36<br />
channel ORA_DISK_1: starting full datafile backupset<br />
channel ORA_DISK_1: specifying datafile(s) in backupset<br />
including current control file in backupset<br />
including current SPFILE in backupset<br />
channel ORA_DISK_1: starting piece 1 at 23-JUL-07<br />
channel ORA_DISK_1: finished piece 1 at 23-JUL-07<br />
piece handle=/dy/oracle/product/flash_recovery_area/ORCL/backupset/2007_07_23/</span></p>
<p><span style="color:#0000ff;">o1_mf_ncsnf_TAG20070723T031355_3b8zy7xr_.bkp tag=TAG20070723T031355 comment=NONE<br />
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:06<br />
Finished backup at 23-JUL-07</span><br />
<strong><span style="text-decoration:underline;">Creating RMAN Catalog</span></strong></p>
<p>You can also create a repository for RMAN to store all this information. Repository will be just another small database which can store the catalog information. Creating a catalog is a 3 step process</p>
<p>1) Create database which will hold the catalog. Else you can use the existing database also. All you need is to create a seperate tablespace for holding the information about RMAN catalog.</p>
<p>2) Create RMAN tablespace and RMAN user</p>
<p>SQL&gt; <strong>create tablespace rman_tbs datafile ‘/dy/oracle/product/db10g/dbf/rman01.dbf’ size 500M EXTENT MANAGEMENT LOCAL segment SPACE MANAGEMENT AUTO ;</strong></p>
<p><span style="color:#0000ff;">Tablespace created.</span></p>
<p>SQL&gt; <strong>create user rman identified by rman<br />
</strong>2  <strong>default tablespace rman_tbs<br />
</strong>3  <strong>TEMPORARY TABLESPACE TEMPTS1<br />
</strong>  4  <strong>QUOTA UNLIMITED ON rman_tbs account unlock;</strong></p>
<p><span style="color:#0000ff;">User created.</span></p>
<p>After creating user, you need to grant RECOVERY_CATALOG_OWNER role to that user.</p>
<p>SQL&gt; grant recovery_catalog_owner to rman;</p>
<p>Grant succeeded.</p>
<p>3)<strong> </strong>Now Create RMAN catalog.</p>
<p>bash-2.05$ <strong>rman catalog rman/rman@test</strong></p>
<div><span style="color:#0000ff;">Recovery Manager: Release 10.2.0.1.0 &#8211; Production on Mon Jul 23 04:37:10 2007Copyright (c) 1982, 2005, Oracle.  All rights reserved.</span></div>
<div></div>
<p><span style="color:#0000ff;"></p>
<div><span style="color:#0000ff;">connected to recovery catalog database</span><span style="color:#0000ff;"> </span></div>
<p>RMAN&gt; <strong>create catalog </strong></p>
<p></span><span style="color:#0000ff;">recovery catalog created</span></p>
<p>For registering the database, you need to get connected to database as well as catalog at the same time. Here is how you can do.</p>
<p>RMAN&gt; <strong>connect target</strong></p>
<p><span style="color:#0000ff;">RMAN-00571: ===========================================================<br />
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============<br />
RMAN-00571: ===========================================================<br />
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog</span></p>
<p>The above error is because the database we connected to is not found in the catalog database. We can register the database in catalog.</p>
<p>RMAN&gt; <strong>register database;</strong></p>
<p><span style="color:#0000ff;">database registered in recovery catalog<br />
starting full resync of recovery catalog<br />
full resync complete</span></p>
<p>Registering database will also resynch the information present in the target database control file and catalog database. Since we have taken 1 backup early, it will synchup that information with RMAN catalog. We can check the same using LIST BACKUP command at RMAN prompt.</p>
<p>RMAN&gt; <strong>list backup</strong>;</p>
<div><span style="color:#0000ff;">List of Backup Sets<br />
===================</p>
<div></div>
<p></span></div>
<div><span style="color:#0000ff;"><span style="color:#0000ff;"> </span></span></div>
</div>
<div><span style="color:#0000ff;">o1_mf_nnndf_TAG20070723T031355_3b8zv57d_.bkp<br />
List of Datafiles in backup set 18<br />
File LV Type Ckp SCN    Ckp Time  Name<br />
—- — —- ———- ——— —-<br />
1       Full 562487     23-JUL-07 /dy/oracle/product/oradata/orcl/system01.dbf<br />
2       Full 562487     23-JUL-07 /dy/oracle/product/oradata/orcl/undotbs01.dbf<br />
3       Full 562487     23-JUL-07 /dy/oracle/product/oradata/orcl/sysaux01.dbf<br />
4       Full 562487     23-JUL-07 /dy/oracle/product/oradata/orcl/users01.dbf<br />
5       Full 562487     23-JUL-07 /dy/oracle/product/oradata/orcl/example01.dbf</p>
<div><span style="color:#0000ff;">BS Key  Type LV Size       Device Type Elapsed Time Completion Time<br />
——- —- — ———- ———– ———— —————<br />
19      Full    6.80M      DISK        00:00:05     23-JUL-07<br />
BP Key: 21   Status: AVAILABLE  Compressed: NO  Tag: TAG20070723T031355<br />
Piece Name: /dy/oracle/product/flash_recovery_area/ORCL/backupset/2007_07_23/</span></div>
<p> </p>
<p></span></div>
<div><span style="color:#0000ff;">o1_mf_ncsnf_TAG20070723T031355_3b8zy7xr_.bkp<br />
Control File Included: Ckp SCN: 562487       Ckp time: 23-JUL-07<br />
SPFILE Included: Modification time: 23-JUL-07</span></div>
<p><span style="text-decoration:underline;"><strong>RMAN Command line</strong></span></p>
<p>Backing up the Controlfile and Spfile</p>
<p>The control file can be automatically backed up after each RMAN backup and database structure change as a way to protect the RMAN repository (when we are not using a seperate catalog for RMAN).<br />
RMAN&gt; <strong>configure controlfile autobackup on;</strong></p>
<p><span style="text-decoration:underline;"><span style="color:#000000;">Backing up control file</span></span></p>
<p>RMAN&gt; <strong>backup current controlfile;</strong></p>
<p><span style="text-decoration:underline;"><span style="color:#000000;">Creating Image copy of all datafiles in database</span></span></p>
<p>These are the image copies and are stored in ORACLE format and not in RMAN format. Backupsets and backuppieces are stored in internal RMAN format. Hence these image copies can be used for manual restore and recovery as well.</p>
<p>RMAN&gt; <strong>backup as copy database;</strong></p>
<p><span style="text-decoration:underline;"><span style="color:#000000;">Creating backupsets of all datafiles in database</span></span></p>
<p>If you specify BACKUP AS BACKUPSET, then RMAN stores its backups in backup sets. A backup set, consisting of one or more backup pieces, contains the physical file data being backed up.  This backupset is written in a format that only RMAN can access. Only RMAN can create and restore backup sets. Backup sets can be written to disk or tape, and they are the only type of backup which RMAN can use to write backups to tape.</p>
<p><strong>RMAN&gt; backup as backupset database;</strong></p>
<p><span style="text-decoration:underline;">Backup individual tablespace as backupsets</span></p>
<p>RMAN&gt; <strong>backup tablespace system, HTMLDB;</strong></p>
<p><span style="text-decoration:underline;">Backup individual tablespace as image copies</span></p>
<p>RMAN&gt; <strong>backup as copy tablespace system;</strong></p>
<p><span style="text-decoration:underline;">Backup individual files as image copies</span></p>
<p>RMAN&gt; <strong>backup as copy datafile ‘/dy/oracle/product/db10g/dbf/system01.dbf’;</strong></p>
<p><span style="text-decoration:underline;">Backup individual files as Backupsets</span></p>
<p>RMAN&gt; <strong>backup datafile ‘/dy/oracle/product/db10g/dbf/system01.dbf’;</strong></p>
<p><span style="text-decoration:underline;">Backup archivelogs</span></p>
<p>We can backup the archive logs according to the output of some search condition. Example we want to backup only those archivelogs which starts with “ARCH_616814159_”.</p>
<p>RMAN&gt; <strong>backup acrchivelog like ‘%ARCH_616814159_%’;</strong></p>
<p><span style="text-decoration:underline;">Copy archivelogs from some time stamp.</span></p>
<p>Suppose we want to copy the archivelogs of last 2 days, then we can use the following commands.</p>
<p>RMAN&gt; <strong>BACKUP ARCHIVELOG from time ’sysdate-2′;</strong></p>
<p><span style="text-decoration:underline;">Backup all archivelog files</span></p>
<p>RMAN&gt; <strong>Backup archivelog all;</strong></p>
<p><span style="text-decoration:underline;">Backup archivelog between some time.</span></p>
<p>RMAN&gt; <strong>BACKUP ARCHIVELOG FROM TIME ‘SYSDATE-30′ UNTIL TIME ‘SYSDATE-7′;</strong></p>
<p><span style="text-decoration:underline;">Specifying copies while backing up.</span></p>
<p>RMAN&gt; <strong>backup copies 2 datafile ‘/dy/oracle/product/db10g/dbf/cs_tbs01.dbf’;</strong></p>
<p>Remember that copies option cannot be used with image copies. It can be used only with backupsets.</p>
<p><span style="text-decoration:underline;">Giving tags to backups</span></p>
<p>RMAN&gt; <strong>BACKUP TAG ‘weekly_full_db_bkup’ DATABASE MAXSETSIZE 100M; </strong></p>
<p>Backing up backupsets<br />
RMAN&gt; BACKUP BACKUPSET ALL;</p>
<p><span style="text-decoration:underline;">Backup imagecopies</span></p>
<p>RMAN&gt; <strong>Backup as copy backupset all;</strong></p>
<p><span style="text-decoration:underline;">List Imagecopies</span></p>
<p>RMAN&gt; <strong>list copy;</strong></p>
<p><span style="text-decoration:underline;">List Backupsets</span></p>
<p>RMAN&gt; <strong>list backup;</strong></p>
<p><span style="text-decoration:underline;"><strong>Restoring and Recovering the database</strong></span></p>
<p>Use the RESTORE and RECOVER commands for RMAN restore and recovery of physical database files.</p>
<p>RMAN&gt; <strong>STARTUP FORCE MOUNT;<br />
RESTORE DATABASE;<br />
RECOVER DATABASE;<br />
ALTER DATABASE OPEN;</strong></p>
<p><span style="text-decoration:underline;">Recovering Current Tablespaces</span></p>
<p>RMAN&gt; <strong>SQL ‘ALTER TABLESPACE users OFFLINE’;<br />
RESTORE TABLESPACE users;<br />
RECOVER TABLESPACE users;<br />
SQL ‘ALTER TABLESPACE users ONLINE;</strong></p>
<p><span style="text-decoration:underline;">Recovering Current Datafiles</span></p>
<p>RMAN&gt; <strong>SQL ‘ALTER DATABASE DATAFILE 7 OFFLINE’;<br />
RESTORE DATAFILE 7;<br />
RECOVER DATAFILE 7;<br />
SQL ‘ALTER DATABASE DATAFILE 7 ONLINE’;</strong></p>
<p><span style="text-decoration:underline;">Recovering Individual Data Blocks </span></p>
<p>RMAN can recover individual corrupted datafile blocks. When RMAN performs a complete scan of a file for a backup, any corrupted blocks are listed in V$DATABASE_BLOCK_CORRUPTION. Corruption is usually reported in alert logs, trace files or results of SQL queries. Use BLOCKRECOVER to repair all corrupted blocks:</p>
<p>RMAN&gt; <strong>BLOCKRECOVER CORRUPTION LIST;</strong></p>
<p>You can also recover individual blocks, as shown in this example:<br />
RMAN&gt; BLOCKRECOVER DATAFILE 7 BLOCK 233, 235 DATAFILE 4 BLOCK 101;</p>
<p><span style="text-decoration:underline;"><strong>Managing RMAN repository</strong></span></p>
<p>As you know that if you do not use a recovery catalog, then control file of the target database is used as RMAN repository and eventually after some time the control file records for RMAN information will get overwritten.<br />
Set this initialization parameter in the parameter file of the target database to determine how long records are kept:</p>
<p>CONTROL_FILE_RECORD_KEEP_TIME = &lt;number_of_days_to_keep&gt;</p>
<p>You can configure a retention policy to be used by RMAN to determine which backups are considered obsolete.  This allows you to remove files from the repository that are no longer needed to meet your retention requirements.  This policy can be based on a recovery window (the maximum number of days into the past for which you can recover) or redundancy (how many copies of each backed-up file to keep).</p>
<p><span style="text-decoration:underline;">Two Parameters are used to set retention policies.</span></p>
<p>You can specify the days days between the current time and the earliest point of recoverability, this is called <strong>RECOVERY WINDOW</strong>. RMAN does not consider any full or level 0 incremental backup as obsolete if it falls within the recovery window.<br />
Alternatively the <strong>REDUNDANCY </strong>parameter will instruct to store the number of copies of backup in RMAN repository. If the number of backups for a specific datafile or control file exceeds the REDUNDANCY setting considers the extra backups as obsolete.</p>
<p>RMAN&gt; <strong>CONFIGURE RETENTION POLICY TO REDUNDANCY 3;</strong></p>
<p>This will make the REDUNDANCY setting to 3. Meaning that it will at max store 3 copies of backups and ikmages of datafile. Any more images or backups are consider obsolete.</p>
<p>When we run the below command</p>
<p>RMAN&gt; <strong>CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;</strong></p>
<p>it will configure new retention policy based on the RECOVERY WINDOW of 7 days. This means that all the backups which falls outside this window will be considered obsolute. So in this case you need to have backup scheduled every week to have atleast 1 valid backup.</p>
<p>Remember that at any point of time, only one policy can be active. It can be either REDUNDANCY or RECOVERY WINDOW.</p>
<p>When you change the retention policy to another one, it will suspend the previous policy as shown below.</p>
<p>RMAN&gt; <strong>CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;</strong></p>
<p><span style="color:#0000ff;">old RMAN configuration parameters:<br />
CONFIGURE RETENTION POLICY TO REDUNDANCY 3;<br />
new RMAN configuration parameters:<br />
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;<br />
new RMAN configuration parameters are successfully stored<br />
starting full resync of recovery catalog<br />
full resync complete</span></p>
<p><strong><span style="text-decoration:underline;">Cross checking the available backups</span></strong></p>
<p>RMAN&gt; <strong>CROSSCHECK BACKUP;</strong></p>
<p>Crosscheck is needed when an archivelog file or backup is manually removed, i.e., not deleted by RMAN.  This command ensures that data about backups in the recovery catalog or control file is synchronized with corresponding data on disk or in the media management catalog.  The CROSSCHECK command operates only on files that are recorded in the recovery catalog or the control file.</p>
<p>The CROSSCHECK command does not delete any files that it is unable to find, but updates their repository records to EXPIRED. Then, you can run DELETE EXPIRED to remove the repository records for all expired files as well as any existing physical files whose records show the status EXPIRED.</p>
<p>If some backup pieces or copies were erroneously marked as EXPIRED, for example, because the media manager was misconfigured, then after ensuring that the files really do exist in the media manager, run the CROSSCHECK BACKUP command again to restore those files to AVAILABLE status.</p>
<p>RMAN&gt; <strong>CROSSCHECK COPY;</strong></p>
<p>This will validate the image copies.</p>
<p><strong><span style="text-decoration:underline;">Deleting the backups</span></strong></p>
<p>The DELETE command removes RMAN backups and copies from DISK marks the records in control file as DELETED or removes the records from the recovery catalog (if you use a catalog).</p>
<p>RMAN&gt; <strong>DELETE BACKUPSET 101, 102, 103; </strong></p>
<p>RMAN&gt; <strong>delete controlfilecopy ‘%ctl’;  # </strong>Pattern search is allowed.</p>
<p>RMAN&gt; <strong>delete archivelog until sequence 20;</strong></p>
<p>This will delete all the archives from the oldest one till the sequence we have specified.</p>
<p>RMAN&gt; <strong>delete backup of tablespace system;</strong></p>
<p>RMAN&gt; <strong>DELETE ARCHIVELOG ALL BACKED UP 2 TIMES TO DEVICE TYPE DISK;</strong></p>
<p><span style="text-decoration:underline;"><strong>List commands</strong></span></p>
<p>RMAN&gt; <strong>list backup;</strong></p>
<p>RMAN&gt; <strong>list copy;</strong></p>
<p>RMAN&gt; <strong>list incarnation of database;</strong></p>
<p>RMAN&gt; <strong>list expired backupset;</strong></p>
<p>RMAN&gt;<strong> list expired copy;</strong></p>
<p>RMAN&gt; <strong>list backup of tablespace sysaux;</strong></p>
<p>RMAN&gt; <strong>list copy of datafile 3;</strong></p>
<p><span style="text-decoration:underline;"><strong>Reporting in RMAN</strong></span></p>
<p>RMAN&gt; <strong>report need backup;</strong></p>
<p>Reports which database files need to be backed up to meet a configured or specified retention policy</p>
<p>RMAN&gt; <strong>report unrecoverable;</strong></p>
<p>Reports which database files require backup because they have been affected by some NOLOGGING operation such as a direct-path insert</p>
<p>RMAN&gt; <strong>report need backup recovery window of 7 days;</strong></p>
<p>Displays objects requiring backup to satisfy a recovery window-based retention policy.</p>
<p>Suppose in the above command we want to skip a perticular tablespace like perfstat then we can use the below command.</p>
<p>RMAN&gt; <strong>report need backup recovery window of 2 days database skip tablespace perfstat;</strong></p>
<p>RMAN&gt; <strong>report need backup redundancy 3;</strong></p>
<p>Displays objects requiring backup to satisfy a redundancy-based retention policy.</p>
<p>RMAN&gt; <strong>report need backup days 7;</strong></p>
<p>Displays files that require more than n days’ worth of archived redo log files for recovery.</p>
<p>RMAN&gt; <strong>report need backup incremental 7;</strong></p>
<p>Displays files that require application of more than n incremental backups for recovery.</p>
<p>RMAN&gt; <strong>report need backup redundancy 2 datafile 3;</strong></p>
<p>Gives report of files with less than 2 redundant backups.</p>
<p>RMAN&gt; <strong>report need backup tablespace htmldb;</strong></p>
<p>Report of files that must be backed up to satisfy current retention policy for this tablespace (htmldb)</p>
<p>RMAN&gt; <strong>report need backup incremental 2;</strong></p>
<p>Report of files that need more than 2 incrementals during recovery</p>
<p>RMAN&gt;<strong> report need backup device type disk;</strong></p>
<p>Report of files that must be backed up to satisfy current retention policy for database</p>
<p>RMAN&gt; <strong>report obsolete;</strong><br />
Shows backups that are obsolete according to the current retention policy.</p>
<p>You can add the options RECOVERY WINDOW and REDUNDANCY with this command as given below.</p>
<p>RMAN&gt; <strong>report obsolete recovery window of 3 days;</strong></p>
<p>RMAN&gt; <strong>report obsolete redundancy 2;</strong></p>
<p>RMAN&gt; <strong>report schema;<br />
</strong></p>
<p>This command lists and displays information about the database files.</p>
<p>RMAN&gt; <strong>report schema at time ’sysdate &#8211; 14′;</strong></p>
<p>This command gives report on schema 14 days ago.</p>
<p>RMAN&gt; <strong>report schema at SCN 10000;</strong></p>
<p>This gives report on schema at scn 10000.</p>
<p>RMAN&gt; <strong>report schema at sequence 55 thread 1;</strong></p>
<p>Gives report of schema at sequence 55.</p>
<p><span style="text-decoration:underline;"><strong>RMAN configuration</strong></span></p>
<p>RMAN&gt;<strong> show all;</strong></p>
<p><span style="color:#0000ff;">RMAN configuration parameters are:<br />
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default<br />
CONFIGURE BACKUP OPTIMIZATION OFF; # default<br />
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default<br />
CONFIGURE CONTROLFILE AUTOBACKUP ON;<br />
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘%F’; # default<br />
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default<br />
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default<br />
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default<br />
CONFIGURE MAXSETSIZE TO UNLIMITED; # default<br />
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default<br />
CONFIGURE ENCRYPTION ALGORITHM ‘AES128′; # default<br />
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default<br />
CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘/dy/oracle/product/db10g/dbs/snapcf_test.f’; # default</span></p>
<p>We can change each of these parameters as per our requirements.</p>
<p>You can return any setting to its default value by using CONFIGURE… CLEAR</p>
<p>RMAN&gt; <strong>CONFIGURE BACKUP OPTIMIZATION CLEAR;</strong></p>
<p>RMAN&gt; <strong>CONFIGURE RETENTION POLICY CLEAR;</strong></p>
<p>By default, RMAN sends all backups to an operating system specific directory on disk. So default setting for DEVICE TYPE is DISK. You can configure to make backups by default on tape or any other device as given below.</p>
<p>RMAN&gt;<strong> CONFIGURE DEFAULT DEVICE TYPE TO sbt;</strong></p>
<p>You can configure backup sets or image copies as the default for a perticular device type, using either of the following commands:</p>
<p>RMAN&gt; <strong>CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COPY;</strong> # Default becomes image copies<br />
RMAN&gt; <strong>CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET;</strong> # Default becomes uncompressed</p>
<p>You can configure RMAN to use compressed backupsets by default on a particular device type, by using the CONFIGURE DEVICE TYPE command with the BACKUP TYPE TO COMPRESSED BACKUPSET option, as shown in the following examples.</p>
<p>RMAN&gt; <strong>CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET; </strong></p>
<p>RMAN&gt; <strong>CONFIGURE DEVICE TYPE sbt BACKUP TYPE TO COMPRESSED BACKUPSET;</strong></p>
<p>To disable compression you can use below command</p>
<p>RMAN&gt; <strong>CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET; </strong></p>
<p>RMAN&gt; <strong>CONFIGURE DEVICE TYPE sbt BACKUP TYPE TO BACKUPSET; </strong></p>
<p>You can configure the parallelism for a device type.</p>
<p>RMAM&gt; <strong>CONFIGURE DEVICE TYPE sbt PARALLELISM 2;</strong></p>
<p>You can turn on/off controlfile autobackup using</p>
<p>RMAN&gt; <strong>configure controlfile autobackup off;</strong></p>
<p>RMAN&gt; <strong>configure controlfile autobackup on;</strong></p>
<p>We can configure RMAN channel to write backups and images in a specific format.</p>
<p>The following command configures RMAN to write disk backups to the /backup directory</p>
<p><strong>CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT ‘/backup/ora_df%t_s%s_s%p’;</strong></p>
<p>%t is replaced with a four byte time stamp,<br />
%s with the backup set number, and<br />
%p with the backup piece number.</p>
<p>You can also configure format for controlfile autobackup as well.<br />
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE deviceSpecifier TO ’string’;</p>
<p>For example, you can run the following command:</p>
<p><strong>CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘?/oradata/cf_%F’;</strong></p>
<p>Here %F will be replaced by following</p>
<p>c-IIIIIIIIII-YYYYMMDD-QQ, where:</p>
<p>IIIIIIIIII stands for the DBID.<br />
YYYYMMDD is a time stamp of the day the backup is generated<br />
QQ is the hex sequence that starts with 00 and has a maximum of FF</p>
<p>You can clear the format using following command.<br />
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR;</p>
<p><span style="text-decoration:underline;"><strong>References:</strong></span></p>
<p>Metalink Note ID: 360416.1</p>
<p><a href="http://www.iselfschooling.com/Free_Oracle_Training/03_DBAs/01_Fundamentals_2/lesson22.html"><span style="color:#b54141;">iselfschooling</span></a></p>
<p>http://download-uk.oracle.com/docs/cd/B19306_01/backup.102/b14192/toc.htm</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/francispaulraj.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/francispaulraj.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/francispaulraj.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/francispaulraj.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/francispaulraj.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/francispaulraj.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/francispaulraj.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/francispaulraj.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/francispaulraj.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/francispaulraj.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/francispaulraj.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/francispaulraj.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/francispaulraj.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/francispaulraj.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/francispaulraj.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/francispaulraj.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=francispaulraj.wordpress.com&amp;blog=4701887&amp;post=4&amp;subd=francispaulraj&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://francispaulraj.wordpress.com/2008/09/02/basics-of-rman/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/88df7a75c925c628b7bdb2c3c9d72821?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">francispaulraj</media:title>
		</media:content>
	</item>
	</channel>
</rss>
