<?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>Naveen Kumar S.R.</title>
	<atom:link href="http://naveenkumarsr.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://naveenkumarsr.wordpress.com</link>
	<description>. . . An array of mirror, enjoy the change</description>
	<lastBuildDate>Tue, 17 Jan 2012 07:06:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='naveenkumarsr.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/3def7741a6791df9a6636ad9f2d3f00f?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Naveen Kumar S.R.</title>
		<link>http://naveenkumarsr.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://naveenkumarsr.wordpress.com/osd.xml" title="Naveen Kumar S.R." />
	<atom:link rel='hub' href='http://naveenkumarsr.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Adding datafiles using BRTOOLS in Oracle</title>
		<link>http://naveenkumarsr.wordpress.com/2011/10/27/adding-datafiles-using-brtools-in-oracle/</link>
		<comments>http://naveenkumarsr.wordpress.com/2011/10/27/adding-datafiles-using-brtools-in-oracle/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 03:28:51 +0000</pubDate>
		<dc:creator>Naveen K. SR</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://naveenkumarsr.wordpress.com/?p=317</guid>
		<description><![CDATA[BRTOOLS are very useful tool to manage tablespaces and datafiles for the SAP-Oracle databases. Login to the oracle database user and execute the command as follows: oracle&#62; brtools BR0651I BRTOOLS 7.10 (39) &#160; BR0280I BRTOOLS time stamp: 2011-10-26 20.01.37 BR0656I Choice menu 1 &#8211; please make a selection &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- BR*Tools main menu &#160; 1 = [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=317&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>
<div>
<p>BRTOOLS are very useful tool to manage tablespaces and datafiles for the SAP-Oracle databases.</p>
<p>Login to the oracle database user and execute the command as follows:</p>
<p>oracle&gt; brtools</p>
</div>
<p>BR0651I BRTOOLS 7.10 (39)</p>
<p>&nbsp;</p>
<p>BR0280I BRTOOLS time stamp: 2011-10-26 20.01.37</p>
<p>BR0656I Choice menu 1 &#8211; please make a selection</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>BR*Tools main menu</p>
<p>&nbsp;</p>
<p>1 = Instance management</p>
<p><strong><em>2 &#8211; Space management</em></strong></p>
<p>3 &#8211; Segment management</p>
<p>4 &#8211; Backup and database copy</p>
<p>5 &#8211; Restore and recovery</p>
<p>6 &#8211; Check and verification</p>
<p>7 &#8211; Database statistics</p>
<p>8 &#8211; Additional functions</p>
<p>9 &#8211; Exit program</p>
<p>&nbsp;</p>
<p>Standard keys: c &#8211; cont, b &#8211; back, s &#8211; stop, r &#8211; refr, h &#8211; help</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>BR0662I Enter your choice:</p>
<p><strong><em>2</em></strong></p>
<p>BR0280I BRTOOLS time stamp: 2011-10-26 20.01.50</p>
<p>BR0663I Your choice: &#8217;2&#8242;</p>
<p>&nbsp;</p>
<p>BR0280I BRTOOLS time stamp: 2011-10-26 20.01.50</p>
<p>BR0656I Choice menu 5 &#8211; please make a selection</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Database space management</p>
<p>&nbsp;</p>
<p><strong><em> 1 = Extend tablespace</em></strong></p>
<p>2 &#8211; Create tablespace</p>
<p>3 &#8211; Drop tablespace</p>
<p>4 &#8211; Alter tablespace</p>
<p>5 &#8211; Alter data file</p>
<p>6 &#8211; Move data file</p>
<p>7 &#8211; Additional space functions</p>
<p>8 &#8211; Reset program status</p>
<p>&nbsp;</p>
<p>Standard keys: c &#8211; cont, b &#8211; back, s &#8211; stop, r &#8211; refr, h &#8211; help</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>BR0662I Enter your choice:</p>
<p><strong><em>1</em></strong></p>
<p>BR0280I BRTOOLS time stamp: 2011-10-26 20.01.53</p>
<p>BR0663I Your choice: &#8217;1&#8242;</p>
<p>&nbsp;</p>
<p>BR0280I BRTOOLS time stamp: 2011-10-26 20.01.53</p>
<p>BR0657I Input menu 81 &#8211; please enter/check input values</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>BRSPACE options for tablespace extension</p>
<p>&nbsp;</p>
<p>1 &#8211; BRSPACE profile (profile) &#8230;&#8230; [initP16.sap]</p>
<p>2 &#8211; Database user/password (user) .. [/]</p>
<p><strong><em> 3 ~ Tablespace name (tablespace) &#8230; []</em></strong></p>
<p>4 &#8211; Confirmation mode (confirm) &#8230;. [yes]</p>
<p>5 &#8211; Scrolling line count (scroll) .. [20]</p>
<p>6 &#8211; Message language (language) &#8230;. [E]</p>
<p>7 &#8211; BRSPACE command line (command) . [-p initP16.sap -s 20 -l E -f tsextend]</p>
<p>&nbsp;</p>
<p>Standard keys: c &#8211; cont, b &#8211; back, s &#8211; stop, r &#8211; refr, h &#8211; help</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>BR0662I Enter your choice:</p>
<p><strong><em>3</em></strong></p>
<p>BR0280I BRTOOLS time stamp: 2011-10-26 20.01.59</p>
<p>BR0663I Your choice: &#8217;3&#8242;</p>
<p>BR0681I Enter string value for &#8220;tablespace&#8221; []:</p>
<p><strong><em>PSAPZFIGL</em></strong></p>
<p>BR0280I BRTOOLS time stamp: 2011-10-26 20.02.21</p>
<p>BR0683I New value for &#8220;tablespace&#8221;: &#8216;PSAPZFIGL&#8217;</p>
<p>&nbsp;</p>
<p>BR0280I BRTOOLS time stamp: 2011-10-26 20.02.21</p>
<p>BR0657I Input menu 81 &#8211; please enter/check input values</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>BRSPACE options for tablespace extension</p>
<p>&nbsp;</p>
<p>1 &#8211; BRSPACE profile (profile) &#8230;&#8230; [initP16.sap]</p>
<p>2 &#8211; Database user/password (user) .. [/]</p>
<p>3 ~ Tablespace name (tablespace) &#8230; [PSAPZFIGL]</p>
<p>4 &#8211; Confirmation mode (confirm) &#8230;. [yes]</p>
<p>5 &#8211; Scrolling line count (scroll) .. [20]</p>
<p>6 &#8211; Message language (language) &#8230;. [E]</p>
<p>7 &#8211; BRSPACE command line (command) . [-p initP16.sap -s 20 -l E -f tsextend -t PSAPZFIGL]</p>
<p>&nbsp;</p>
<p>Standard keys: <strong><em>c &#8211; cont</em></strong>, b &#8211; back, s &#8211; stop, r &#8211; refr, h &#8211; help</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>BR0662I Enter your choice:</p>
<p><strong><em>c</em></strong></p>
<p>BR0280I BRTOOLS time stamp: 2011-10-26 20.02.29</p>
<p>BR0663I Your choice: &#8216;c&#8217;</p>
<p>BR0259I Program execution will be continued&#8230;</p>
<p>&nbsp;</p>
<p>BR0291I BRSPACE will be started with options &#8216;-p initP16.sap -s 20 -l E -f tsextend -t PSAPZFIGL&#8217;</p>
<p>&nbsp;</p>
<p>BR0280I BRTOOLS time stamp: 2011-10-26 20.02.29</p>
<p>BR0670I Enter <strong><em>&#8216;c[ont]</em></strong>&#8216; to continue, &#8216;b[ack]&#8216; to go back, &#8216;s[top]&#8216; to abort:</p>
<p><strong><em>c</em></strong></p>
<p>BR0280I BRTOOLS time stamp: 2011-10-26 20.02.38</p>
<p>BR0257I Your reply: &#8216;c&#8217;</p>
<p>BR0259I Program execution will be continued&#8230;</p>
<p>&nbsp;</p>
<p>###############################################################################</p>
<p>&nbsp;</p>
<p>BR1001I BRSPACE 7.10 (39)</p>
<p>BR1002I Start of BRSPACE processing: sehbwmck.tse 2011-10-26 20.02.38</p>
<p>BR0484I BRSPACE log file: /oracle/P16/sapreorg/sehbwmck.tse</p>
<p>&nbsp;</p>
<p>BR0280I BRSPACE time stamp: 2011-10-26 20.02.45</p>
<p>BR1009I Name of database instance: P16</p>
<p>BR1010I BRSPACE action ID: sehbwmck</p>
<p>BR1011I BRSPACE function ID: tse</p>
<p>BR1012I BRSPACE function: tsextend</p>
<p>&nbsp;</p>
<p>BR0280I BRSPACE time stamp: 2011-10-26 20.03.36</p>
<p>BR0657I Input menu 303 &#8211; please enter/check input values</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Options for extension of tablespace PSAPZFIGL (1. file)</p>
<p>&nbsp;</p>
<p>1 * Last added file name (lastfile) &#8230;&#8230;. [/oracle/P16/sapdata10/zfigl_76/zfig1.data76]</p>
<p>2 * Last added file size in MB (lastsize) . [4096]</p>
<p>3 &#8211; New file to be added (file) &#8230;&#8230;&#8230;.. [/oracle/P16/sapdata10/zfigl_77/zfig1.data77]</p>
<p>4 ~ Raw disk / link target (rawlink) &#8230;&#8230; []</p>
<p>5 &#8211; Size of the new file in MB (size) &#8230;.. [4096]</p>
<p>6 &#8211; File autoextend mode (autoextend) &#8230;.. [no]</p>
<p>7 # Maximum file size in MB (maxsize) &#8230;.. []</p>
<p>8 # File increment size in MB (incrsize) .. []</p>
<p>9 &#8211; SQL command (command) &#8230;&#8230;&#8230;&#8230;&#8230;.. [alter tablespace PSAPZFIGL add datafile '/oracle/P16/sapdata10/zfigl_77/zfig1.data77' size 4096M autoextend off]</p>
<p>&nbsp;</p>
<p>Standard keys: <strong><em>c &#8211; cont</em></strong>, b &#8211; back, s &#8211; stop, r &#8211; refr, h &#8211; help</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>BR0662I Enter your choice:</p>
<p><strong><em>c</em></strong></p>
<p>BR0280I BRSPACE time stamp: 2011-10-26 20.03.56</p>
<p>BR0663I Your choice: &#8216;c&#8217;</p>
<p>BR0259I Program execution will be continued&#8230;</p>
<p>&nbsp;</p>
<p>BR1091I Next data file can be specified now</p>
<p>&nbsp;</p>
<p>BR0280I BRSPACE time stamp: 2011-10-26 20.03.56</p>
<p>BR0675I This is a optional action &#8211; do you want to execute it now?</p>
<p>BR0676I Enter &#8216;y[es]&#8216; to execute the action, <strong><em>&#8216;n[o]/c[ont]</em></strong>&#8216; to skip it, &#8216;s[top]&#8216; to abort:</p>
<p><strong><em>n</em></strong></p>
<p>BR0280I BRSPACE time stamp: 2011-10-26 20.04.06</p>
<p>BR0257I Your reply: &#8216;n&#8217;</p>
<p>BR0678I The action will be skipped&#8230;</p>
<p>&nbsp;</p>
<p>BR0280I BRSPACE time stamp: 2011-10-26 20.04.06</p>
<p>BR0370I Directory /oracle/P16/sapreorg/sehbwmck created</p>
<p>&nbsp;</p>
<p>BR0280I BRSPACE time stamp: 2011-10-26 20.04.12</p>
<p>BR0319I Control file copy created: /oracle/P16/sapreorg/sehbwmck/cntrlP16.old 81149952</p>
<p>&nbsp;</p>
<p>BR0280I BRSPACE time stamp: 2011-10-26 20.04.12</p>
<p>BR0370I Directory /oracle/P16/sapdata10/zfigl_77 created</p>
<p>&nbsp;</p>
<p>BR0280I BRSPACE time stamp: 2011-10-26 20.04.12</p>
<p>BR1088I Extending tablespace PSAPZFIGL &#8230;</p>
<p>&nbsp;</p>
<p>BR0280I BRSPACE time stamp: 2011-10-26 20.05.14</p>
<p>BR1016I SQL statement &#8216;alter tablespace PSAPZFIGL add datafile &#8216;/oracle/P16/sapdata10/zfigl_77/zfig1.data77&#8242; size 4096M autoextend off&#8217; executed successfully</p>
<p>BR1051I Tablespace PSAPZFIGL extended successfully with file: /oracle/P16/sapdata10/zfigl_77/zfig1.data77 4096M</p>
<p>&nbsp;</p>
<p>BR0280I BRSPACE time stamp: 2011-10-26 20.05.14</p>
<p>BR0340I Switching to next online redolog file for database instance P16 &#8230;</p>
<p>BR0321I Switch to next online redolog file for database instance P16 successful</p>
<p>&nbsp;</p>
<p>BR0280I BRSPACE time stamp: 2011-10-26 20.05.18</p>
<p>BR0319I Control file copy created: /oracle/P16/sapreorg/sehbwmck/cntrlP16.new 81149952</p>
<p>&nbsp;</p>
<p>BR0280I BRSPACE time stamp: 2011-10-26 20.05.18</p>
<p>BR0670I Enter <strong><em>&#8216;c[ont]</em></strong>&#8216; to continue, &#8216;b[ack]&#8216; to go back, &#8216;s[top]&#8216; to abort:</p>
<p><strong><em>c</em></strong></p>
<p>BR0280I BRSPACE time stamp: 2011-10-26 20.05.25</p>
<p>BR0257I Your reply: &#8216;c&#8217;</p>
<p>BR0259I Program execution will be continued&#8230;</p>
<p>&nbsp;</p>
<p>BR0280I BRSPACE time stamp: 2011-10-26 20.05.25</p>
<p>BR1020I Number of tablespaces processed: 1</p>
<p>BR1003I BRSPACE function &#8216;tsextend&#8217; completed</p>
<p>&nbsp;</p>
<p>BR1008I End of BRSPACE processing: sehbwmck.tse 2011-10-26 20.05.25</p>
<p>BR0280I BRSPACE time stamp: 2011-10-26 20.05.25</p>
<p>BR1005I BRSPACE completed successfully</p>
<p>&nbsp;</p>
<p>###############################################################################</p>
<p>&nbsp;</p>
<p>BR0292I Execution of BRSPACE finished with return code 0</p>
<p>&nbsp;</p>
<p>BR0280I BRTOOLS time stamp: 2011-10-26 20.05.25</p>
<p>BR0256I Enter &#8216;c[ont]&#8216; to continue, <strong><em>&#8216;s[top]</em></strong>&#8216; to cancel BRTOOLS:</p>
<p><strong><em>s</em></strong></p>
<p>BR0280I BRTOOLS time stamp: 2011-10-26 20.05.29</p>
<p>BR0257I Your reply: &#8216;s&#8217;</p>
<p>BR0679I Do you really want to cancel BRTOOLS? Enter <strong><em>y[es]/</em></strong>n[o]:</p>
<p><strong><em>y</em></strong></p>
<p>BR0280I BRTOOLS time stamp: 2011-10-26 20.05.33</p>
<p>BR0257I Your reply: &#8216;y&#8217;</p>
<p>BR0260E BRTOOLS cancelled by user</p>
<p>&nbsp;</p>
<p>BR0280I BRTOOLS time stamp: 2011-10-26 20.05.33</p>
<p>BR0654I BRTOOLS terminated with errors</p>
<p>&nbsp;</p>
<p>oracle&gt;</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/naveenkumarsr.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/naveenkumarsr.wordpress.com/317/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/naveenkumarsr.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/naveenkumarsr.wordpress.com/317/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/naveenkumarsr.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/naveenkumarsr.wordpress.com/317/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/naveenkumarsr.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/naveenkumarsr.wordpress.com/317/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/naveenkumarsr.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/naveenkumarsr.wordpress.com/317/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/naveenkumarsr.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/naveenkumarsr.wordpress.com/317/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/naveenkumarsr.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/naveenkumarsr.wordpress.com/317/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=317&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://naveenkumarsr.wordpress.com/2011/10/27/adding-datafiles-using-brtools-in-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c771c1c79abc1e3be4754f9e87f210a?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">Naveen Kumar S.R.</media:title>
		</media:content>
	</item>
		<item>
		<title>Manually Corrupting Oracle Data Block</title>
		<link>http://naveenkumarsr.wordpress.com/2011/03/29/corrupting-oracle-blocks/</link>
		<comments>http://naveenkumarsr.wordpress.com/2011/03/29/corrupting-oracle-blocks/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 02:50:00 +0000</pubDate>
		<dc:creator>Naveen K. SR</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://naveenkumarsr.wordpress.com/?p=285</guid>
		<description><![CDATA[Manually Corrupting Oracle Data Block When we&#8217;re practicing the backup and recovery scenarios, we come-up with the block corruption recovery cases. So how to make the blocks to get corrupt? And how the recoveries can be done? And here is the solution for how to make the Oracle data blocks to get corrupted. At the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=285&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } 		H2 { margin-bottom: 0.08in } 		H2.western { font-family: "Nimbus Sans L", sans-serif; font-size: 14pt; font-style: italic } 		H2.cjk { font-size: 14pt; font-style: italic } 		H2.ctl { font-family: "Akshar Unicode"; font-size: 14pt; font-style: italic } 		A:link { so-language: zxx } --></p>
<h2><strong><span style="font-size:medium;">Manually Corrupting Oracle Data Block</span></strong></h2>
<p>When we&#8217;re practicing the backup and recovery scenarios, we come-up with the block corruption recovery cases. So how to make the blocks to get corrupt? And how the recoveries can be done? And here is the solution for how to make the Oracle data blocks to get corrupted.</p>
<p>At the same time, this will also help us to recover the corrupted blocks from the production databases.</p>
<h2><strong>Before we begin:</strong></h2>
<p>This is only for the learning, practicing, and educational purpose, please do not try these methods on the production, testing, and/or development databases.</p>
<p>The way we corrupt the Oracle data blocks that allows the learners&#8217; to practice the scenarios on backup and recoveries. That makes when the actual database block level corruption has occurred, we will be in a position to recover in the block level.</p>
<p>1. For the purpose of this practice, will create a separate tablespace and a new schema user.</p>
<p>a. Create a Tablespace say “test_corrupt”</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; create tablespace test_corrupt</span></p>
<p><span style="font-family:Courier,monospace;">2  datafile &#8216;/u01/app/oracle/oradata/orcl/test_corrupt01.dbf&#8217; size 10m;</span></p>
<p><span style="font-family:Courier,monospace;">Tablespace created.</span></p>
<p><span style="font-family:Nimbus Roman No9 L,serif;">b. Create an user say “test” and assign quota to the “test_corrupt” tablespace</span></p>
<p><span style="font-family:Courier,monospace;">SQL&gt; create user test identified by test123</span></p>
<p><span style="font-family:Courier,monospace;">2  default tablespace test_corrupt</span></p>
<p><span style="font-family:Courier,monospace;">3  quota unlimited on test_corrupt;</span></p>
<p><span style="font-family:Courier,monospace;">User created.</span></p>
<p><span style="font-family:Nimbus Roman No9 L,serif;">c. Grant the necessary privileges</span></p>
<p><span style="font-family:Courier,monospace;">SQL&gt; grant create session, resource to test;</span></p>
<p><span style="font-family:Courier,monospace;">Grant succeeded.</span></p>
<p><span style="font-family:Nimbus Roman No9 L,serif;">2. Create a table as test user </span></p>
<p><span style="font-family:Courier,monospace;">SQL&gt; conn test/test123</span></p>
<p><span style="font-family:Courier,monospace;">Connected.</span></p>
<p><span style="font-family:Courier,monospace;">SQL&gt; create table emp(eno number(7))</span></p>
<p><span style="font-family:Courier,monospace;">2  tablespace test_corrupt;</span></p>
<p><span style="font-family:Courier,monospace;">Table created.</span></p>
<p>3. Insert some dummy records into the table by writing a simple &#8216;for loop&#8217; block as shown:</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; begin</span></p>
<p><span style="font-family:Courier,monospace;">2  for i in 1..10000</span></p>
<p><span style="font-family:Courier,monospace;">3  loop</span></p>
<p><span style="font-family:Courier,monospace;">4  insert into emp values(i);</span></p>
<p><span style="font-family:Courier,monospace;">5  end loop;</span></p>
<p><span style="font-family:Courier,monospace;">6  end;</span></p>
<p><span style="font-family:Courier,monospace;">8  /</span></p>
<p><span style="font-family:Courier,monospace;">PL/SQL procedure successfully completed.</span></p>
<p><span style="font-family:Courier,monospace;">SQL&gt; select count(*) from emp;</span></p>
<p><span style="font-family:Courier,monospace;">COUNT(*)</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;&#8212;&#8212;-</span></p>
<p><span style="font-family:Courier,monospace;">10000</span></p>
<p>4. Take the RMAN backup, either full database or tablespace level backup before corrupting the block.</p>
<p><span style="font-family:Nimbus Roman No9 L,serif;">Connect to the RMAN</span></p>
<p><span style="font-family:Courier,monospace;">$ rman target / catalog scott/tiger@rc</span></p>
<p><span style="font-family:Courier,monospace;">Recovery Manager: Release 11.2.0.1.0 &#8211; Production on Mon Mar 28 16:00:39 2011</span></p>
<p><span style="font-family:Courier,monospace;">Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.</span></p>
<p><span style="font-family:Courier,monospace;">connected to target database: ORCL (DBID=1272957858)</span></p>
<p><span style="font-family:Courier,monospace;">connected to recovery catalog database</span></p>
<p><span style="font-family:Nimbus Roman No9 L,serif;">Report the schema to know about the target database</span></p>
<p><span style="font-family:Courier,monospace;">RMAN&gt; report schema;</span></p>
<p><span style="font-family:Courier,monospace;">Report of database schema for database with db_unique_name ORCL</span></p>
<p><span style="font-family:Courier,monospace;">List of Permanent Datafiles</span></p>
<p><span style="font-family:Courier,monospace;">===========================</span></p>
<p><span style="font-family:Courier,monospace;">File Size(MB) Tablespace           RB segs Datafile Name</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;- &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p><span style="font-family:Courier,monospace;">1    690      SYSTEM               YES     /u01/app/oracle/oradata/orcl/system01.dbf</span></p>
<p><span style="font-family:Courier,monospace;">2    540      SYSAUX               NO      /u01/app/oracle/oradata/orcl/sysaux01.dbf</span></p>
<p><span style="font-family:Courier,monospace;">3    80       UNDOTBS1             YES     /u01/app/oracle/oradata/orcl/undotbs01.dbf</span></p>
<p><span style="font-family:Courier,monospace;">4    10       TEST_CORRUPT         NO      /u01/app/oracle/oradata/orcl/test_corrupt01.dbf</span></p>
<p><span style="font-family:Courier,monospace;">6    20       DEF_PERM             NO      /u01/app/oracle/oradata/orcl/def_perm01.dbf</span></p>
<p><span style="font-family:Courier,monospace;">List of Temporary Files</span></p>
<p><span style="font-family:Courier,monospace;">=======================</span></p>
<p><span style="font-family:Courier,monospace;">File Size(MB) Tablespace           Maxsize(MB) Tempfile Name</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;- &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p><span style="font-family:Courier,monospace;">1    33       TEMP                 32767       /u01/app/oracle/oradata/orcl/temp01.dbf</span></p>
<p><span style="font-family:Nimbus Roman No9 L,serif;">Take the backup of the tablespace</span></p>
<p><span style="font-family:Courier,monospace;">RMAN&gt; backup tablespace test_corrupt;</span></p>
<p><span style="font-family:Courier,monospace;">Starting backup at 28-MAR-11</span></p>
<p><span style="font-family:Courier,monospace;">using channel ORA_DISK_1</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: starting full datafile backup set</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: specifying datafile(s) in backup set</span></p>
<p><span style="font-family:Courier,monospace;">input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/test_corrupt01.dbf</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: starting piece 1 at 28-MAR-11</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: finished piece 1 at 28-MAR-11</span></p>
<p><span style="font-family:Courier,monospace;">piece handle=/backup/rman_backups/rman_ORCL_0um8c6ve tag=TAG20110328T161437 comment=NONE</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01</span></p>
<p><span style="font-family:Courier,monospace;">Finished backup at 28-MAR-11</span></p>
<p>5. Take the tablespace offline so that we can make changes to the datafile.</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; conn / as sysdba</span></p>
<p><span style="font-family:Courier,monospace;"> connected</span></p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter tablespace test1 offline;</span></p>
<p><span style="font-family:Courier,monospace;">Tablespace altered.</span></p>
<p>6. To corrupt a datafile, there are many freeware editors available. Here we are using UltraEdit GUI editor (Available for both <a title="http://www.ultraedit.com/downloads/ultraedit_download.html" href="http://www.ultraedit.com/downloads/ultraedit_download.html" target="_blank"><strong>Windows</strong></a> and <a title="http://www.ultraedit.com/downloads/uex.html" href="http://www.ultraedit.com/downloads/uex.html" target="_blank"><strong>Linux</strong></a> Versions) to make changes in the datafile.</p>
<p>Download from the websites and install it. Once the installation has been completed, the files can be edited by using UltraEdit with the help of executable called <em>uex</em></p>
<p>Open the datafile “/u01/app/oracle/orada<span style="font-family:Nimbus Roman No9 L,serif;">ta/orcl/test_corrupt01.dbf</span>” using UltraEdit</p>
<p><span style="font-family:Courier,monospace;">$ uex /u01/app/oracle/oradata/orcl/test_corrupt01.dbf</span></p>
<p>The screen will look as like below:</p>
<p>Do not try to edit the file in the beginning, because those portion of the file will contain the datafile header information. Modifying the header file will corrupt the whole file itself.</p>
<p>So, scroll down to find out the blocks where the data is present, try to type some blunders in the space wherever the mouse pointer is blinking. Once the change has been completed, save the file.</p>
<p><a href="http://naveenkumarsr.files.wordpress.com/2011/03/ultraedit.png"><img class="size-medium wp-image-286 alignnone" title="UltraEdit" src="http://naveenkumarsr.files.wordpress.com/2011/03/ultraedit.png?w=543&#038;h=370" alt="" width="543" height="370" /></a></p>
<p>7. After corrupting the blocks, bring back the tablespace to online</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter tablespace test online;</span></p>
<p><span style="font-family:Courier,monospace;">Tablespace altered.</span></p>
<p>You can notice that Oracle doesn’t through any errors when we brought tablespace online, because we had not modified the datafile header. If in case we had done, then that will through an errors while bringing back the tablespace to online. Oracle will through an error only when it tries to access the data from corrupted blocks.</p>
<p>8. To query the data, connect to the “test” user and query the table “emp”</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; conn test/test123</span></p>
<p><span style="font-family:Courier,monospace;">Connected</span></p>
<p><span style="font-family:Courier,monospace;">SQL&gt; select * from emp;</span></p>
<p><span style="font-family:Courier,monospace;">ENO</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;&#8212;&#8212;-</span></p>
<p><span style="font-family:Courier,monospace;">661</span></p>
<p><span style="font-family:Courier,monospace;">662</span></p>
<p><span style="font-family:Courier,monospace;">663</span></p>
<p><span style="font-family:Courier,monospace;">664</span></p>
<p>…</p>
<p>…</p>
<p>…</p>
<p><span style="font-family:Courier,monospace;">7903</span></p>
<p><span style="font-family:Courier,monospace;">7904</span></p>
<p><span style="font-family:Courier,monospace;">7905</span></p>
<p><span style="font-family:Courier,monospace;">ERROR:</span></p>
<p><span style="font-family:Courier,monospace;">ORA-01578: ORACLE data block corrupted (file # 4, block # 142)</span></p>
<p><span style="font-family:Courier,monospace;">ORA-01110: data file 4: &#8216;/u01/app/oracle/oradata/orcl/test_corrupt01.dbf&#8217;</span></p>
<p><span style="font-family:Courier,monospace;">4605 rows selected.</span></p>
<p>The query returns 4605 records and then complains of block corruption in file 4, and the block numbered 142 is being reported as corrupt.</p>
<p>This is the methods to be followed in order to corrupt the Oracle data blocks.</p>
<p>Lets us see, how to identify the corrupted blocks and recover them.</p>
<p>9. Let us see what are the blocks are corrupted in “<span style="font-family:Courier,monospace;">test_corrupt01.dbf</span>” datafile by running dbv utility.</p>
<p><span style="font-family:Courier,monospace;">$ which dbv</span></p>
<p><span style="font-family:Courier,monospace;">/u01/app/oracle/product/11.2.0/dbhome_1/bin/dbv</span></p>
<p><span style="font-family:Courier,monospace;">$ dbv file=/u01/app/oracle/oradata/orcl/test_corrupt01.dbf</span></p>
<p><span style="font-family:Courier,monospace;">DBVERIFY: Release 11.2.0.1.0 &#8211; Production on Mon Mar 28 15:51:01 2011</span></p>
<p><span style="font-family:Courier,monospace;">Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.</span></p>
<p><span style="font-family:Courier,monospace;">DBVERIFY &#8211; Verification starting : FILE = /u01/app/oracle/oradata/orcl/test_corrupt01.dbf</span></p>
<p><span style="font-family:Courier,monospace;">Page 142 is marked corrupt</span></p>
<p><span style="font-family:Courier,monospace;">Corrupt block relative dba: 0x0100008e (file 4, block 142)</span></p>
<p><span style="font-family:Courier,monospace;">Bad check value found during dbv:</span></p>
<p><span style="font-family:Courier,monospace;">Data in bad block:</span></p>
<p><span style="font-family:Courier,monospace;">type: 6 format: 2 rdba: 0x0100008e</span></p>
<p><span style="font-family:Courier,monospace;">last change scn: 0&#215;0000.00134653 seq: 0&#215;1 flg: 0&#215;06</span></p>
<p><span style="font-family:Courier,monospace;">spare1: 0&#215;0 spare2: 0&#215;0 spare3: 0&#215;0</span></p>
<p><span style="font-family:Courier,monospace;">consistency value in tail: 0&#215;46530601</span></p>
<p><span style="font-family:Courier,monospace;">check value in block header: 0xe6bd</span></p>
<p><span style="font-family:Courier,monospace;">computed block checksum: 0xcc0a</span></p>
<p><span style="font-family:Courier,monospace;">DBVERIFY &#8211; Verification complete</span></p>
<p><span style="font-family:Courier,monospace;">Total Pages Examined         : 1280</span></p>
<p><span style="font-family:Courier,monospace;">Total Pages Processed (Data) : 19</span></p>
<p><span style="font-family:Courier,monospace;">Total Pages Failing   (Data) : 0</span></p>
<p><span style="font-family:Courier,monospace;">Total Pages Processed (Index): 0</span></p>
<p><span style="font-family:Courier,monospace;">Total Pages Failing   (Index): 0</span></p>
<p><span style="font-family:Courier,monospace;">Total Pages Processed (Other): 131</span></p>
<p><span style="font-family:Courier,monospace;">Total Pages Processed (Seg)  : 0</span></p>
<p><span style="font-family:Courier,monospace;">Total Pages Failing   (Seg)  : 0</span></p>
<p><span style="font-family:Courier,monospace;">Total Pages Empty            : 1129</span></p>
<p><span style="font-family:Courier,monospace;">Total Pages Marked Corrupt   : 1</span></p>
<p><span style="font-family:Courier,monospace;">Total Pages Influx           : 0</span></p>
<p><span style="font-family:Courier,monospace;">Total Pages Encrypted        : 0</span></p>
<p><span style="font-family:Courier,monospace;">Highest block SCN            : 1263187 (0.1263187)</span></p>
<p>This utility scans all the blocks in a given datafile and outputs the corrupt blocks. In this case, there was only one block marked as corrupt. Make a note of all the corrupted blocks as we need to recover them to previous state.</p>
<p>10. Start RMAN session and recover all the corrupted blocks.</p>
<p>The beauty of RMAN is that it recovers only corrupted blocks and we need to recover only those corrupt blocks instead of entire datafile.</p>
<p><span style="font-family:Courier,monospace;">$ rman target / catalog scott/tiger@rc</span></p>
<p><span style="font-family:Courier,monospace;">Recovery Manager: Release 11.2.0.1.0 &#8211; Production on Mon Mar 28 16:00:39 2011</span></p>
<p><span style="font-family:Courier,monospace;">Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.</span></p>
<p><span style="font-family:Courier,monospace;">connected to target database: ORCL (DBID=1272957858)</span></p>
<p><span style="font-family:Courier,monospace;">connected to recovery catalog database</span></p>
<p><span style="font-family:Nimbus Roman No9 L,serif;">Report the Schema to know the status of target database, gathers the information from control file</span></p>
<p><span style="font-family:Courier,monospace;">RMAN&gt; report schema;</span></p>
<p><span style="font-family:Courier,monospace;">Report of database schema for database with db_unique_name ORCL</span></p>
<p><span style="font-family:Courier,monospace;">List of Permanent Datafiles</span></p>
<p><span style="font-family:Courier,monospace;">===========================</span></p>
<p><span style="font-family:Courier,monospace;">File Size(MB) Tablespace           RB segs Datafile Name</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;- &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p><span style="font-family:Courier,monospace;">1    690      SYSTEM               YES     /u01/app/oracle/oradata/orcl/system01.dbf</span></p>
<p><span style="font-family:Courier,monospace;">2    540      SYSAUX               NO      /u01/app/oracle/oradata/orcl/sysaux01.dbf</span></p>
<p><span style="font-family:Courier,monospace;">3    80       UNDOTBS1             YES     /u01/app/oracle/oradata/orcl/undotbs01.dbf</span></p>
<p><span style="font-family:Courier,monospace;">4    10       TEST_CORRUPT         NO      /u01/app/oracle/oradata/orcl/test_corrupt01.dbf</span></p>
<p><span style="font-family:Courier,monospace;">6    20       DEF_PERM             NO      /u01/app/oracle/oradata/orcl/def_perm01.dbf</span></p>
<p><span style="font-family:Courier,monospace;">List of Temporary Files</span></p>
<p><span style="font-family:Courier,monospace;">=======================</span></p>
<p><span style="font-family:Courier,monospace;">File Size(MB) Tablespace           Maxsize(MB) Tempfile Name</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;- &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p><span style="font-family:Courier,monospace;">1    33       TEMP                 32767       /u01/app/oracle/oradata/orcl/temp01.dbf</span></p>
<p><span style="font-family:Nimbus Roman No9 L,serif;">11. Recover the corrupted blocks using recover command</span></p>
<p><span style="font-family:Courier,monospace;">RMAN&gt; recover datafile 4 block 134;</span></p>
<p><span style="font-family:Courier,monospace;">Starting recover at 28-MAR-11</span></p>
<p><span style="font-family:Courier,monospace;">starting full resync of recovery catalog</span></p>
<p><span style="font-family:Courier,monospace;">full resync complete</span></p>
<p><span style="font-family:Courier,monospace;">using channel ORA_DISK_1</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: restoring block(s)</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: specifying block(s) to restore from backup set</span></p>
<p><span style="font-family:Courier,monospace;">restoring blocks of datafile 00004</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: reading from backup piece /backup/rman_backups/rman_ORCL_0vm8c862</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: piece handle=/backup/rman_backups/rman_ORCL_0vm8c862 tag=TAG20110328T163513</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: restored block(s) from backup piece 1</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: block restore complete, elapsed time: 00:00:01</span></p>
<p><span style="font-family:Courier,monospace;">starting media recovery</span></p>
<p><span style="font-family:Courier,monospace;">media recovery complete, elapsed time: 00:00:01</span></p>
<p><span style="font-family:Courier,monospace;">Finished recover at 28-MAR-11</span></p>
<p><span style="font-family:Courier,monospace;">RMAN reports success of block recovery command.</span></p>
<p>12. Will query the table again by logging in to the SQL*Plus:</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; conn test/test123</span></p>
<p><span style="font-family:Courier,monospace;">Connected.</span></p>
<p><span style="font-family:Courier,monospace;">SQL&gt; select * from emp order by eno;</span></p>
<p><span style="font-family:Courier,monospace;">ENO</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;&#8212;&#8212;-</span></p>
<p><span style="font-family:Courier,monospace;">1</span></p>
<p><span style="font-family:Courier,monospace;">2</span></p>
<p><span style="font-family:Courier,monospace;">3</span></p>
<p>…</p>
<p>…</p>
<p>…</p>
<p><span style="font-family:Courier,monospace;">9997</span></p>
<p><span style="font-family:Courier,monospace;">9998</span></p>
<p><span style="font-family:Courier,monospace;">9999</span></p>
<p><span style="font-family:Courier,monospace;">10000</span></p>
<p><span style="font-family:Courier,monospace;">10000 rows selected.</span></p>
<p><span style="font-family:Courier,monospace;">SQL&gt; select count(*) from emp;</span></p>
<p><span style="font-family:Courier,monospace;">COUNT(*)</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;&#8212;&#8212;-</span></p>
<p><span style="font-family:Courier,monospace;">10000</span></p>
<p>This will executes successfully and the records will be restored back to the table.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/naveenkumarsr.wordpress.com/285/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/naveenkumarsr.wordpress.com/285/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/naveenkumarsr.wordpress.com/285/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/naveenkumarsr.wordpress.com/285/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/naveenkumarsr.wordpress.com/285/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/naveenkumarsr.wordpress.com/285/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/naveenkumarsr.wordpress.com/285/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/naveenkumarsr.wordpress.com/285/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/naveenkumarsr.wordpress.com/285/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/naveenkumarsr.wordpress.com/285/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/naveenkumarsr.wordpress.com/285/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/naveenkumarsr.wordpress.com/285/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/naveenkumarsr.wordpress.com/285/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/naveenkumarsr.wordpress.com/285/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=285&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://naveenkumarsr.wordpress.com/2011/03/29/corrupting-oracle-blocks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c771c1c79abc1e3be4754f9e87f210a?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">Naveen Kumar S.R.</media:title>
		</media:content>

		<media:content url="http://naveenkumarsr.files.wordpress.com/2011/03/ultraedit.png?w=300" medium="image">
			<media:title type="html">UltraEdit</media:title>
		</media:content>
	</item>
		<item>
		<title>Changing the DBID in Oracle Databases</title>
		<link>http://naveenkumarsr.wordpress.com/2011/03/25/change-oracle-dbid/</link>
		<comments>http://naveenkumarsr.wordpress.com/2011/03/25/change-oracle-dbid/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 11:28:46 +0000</pubDate>
		<dc:creator>Naveen K. SR</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://naveenkumarsr.wordpress.com/?p=281</guid>
		<description><![CDATA[Changing DB ID for the Oracle Database When you clone the database, the DB ID remains same as like the source database, if you need to change to the different DB ID, then this note will be useful. This is very much useful as in the case of working with RMAN. Follow the below steps [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=281&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>Changing DB ID for the Oracle Database</h1>
<p>When you clone the database, the DB ID remains same as like the source database, if you need to change to the different DB ID, then this note will be useful.  This is very much useful as in the case of working with RMAN.</p>
<p>Follow the below steps to change the DB ID  in Oracle10g and Oracle11g databases:</p>
<p>&nbsp;</p>
<p>1. Identify the DBID of the database</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; select dbid from v$database;</span></p>
<p><span style="font-family:Courier,monospace;">DBID</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;&#8212;&#8212;-</span></p>
<p><span style="font-family:Courier,monospace;">1272957858</span></p>
<p>&nbsp;</p>
<p>2. Shutdown the database in normal mode</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; shutdown immediate</span></p>
<p><span style="font-family:Courier,monospace;">Database closed.</span></p>
<p><span style="font-family:Courier,monospace;">Database dismounted.</span></p>
<p><span style="font-family:Courier,monospace;">ORACLE instance shut down.</span></p>
<p>&nbsp;</p>
<p>3. Start the database to mount phase</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; startup mount</span></p>
<p><span style="font-family:Courier,monospace;">ORACLE instance started.</span></p>
<p><span style="font-family:Courier,monospace;">Total System Global Area     150667264 bytes</span></p>
<p><span style="font-family:Courier,monospace;">Fixed Size                                     1335080 bytes</span></p>
<p><span style="font-family:Courier,monospace;">Variable Size                            92274904 bytes</span></p>
<p><span style="font-family:Courier,monospace;">Database Buffers             50331648 bytes</span></p>
<p><span style="font-family:Courier,monospace;">Redo Buffers                                 6725632 bytes</span></p>
<p><span style="font-family:Courier,monospace;">Database mounted.</span></p>
<p><span style="font-family:Courier,monospace;">SQL&gt; exit</span></p>
<p><span style="font-family:Courier,monospace;">Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 &#8211; Production</span></p>
<p><span style="font-family:Courier,monospace;">With the Partitioning, OLAP, Data Mining and Real Application Testing options</span></p>
<p>&nbsp;</p>
<p>4. In the Terminal Window, execute the <em>nid </em>command</p>
<p><span style="font-family:Courier,monospace;">[oracle@apps ~]$ which nid</span></p>
<p><span style="font-family:Courier,monospace;">/u01/app/oracle/product/11.2.0/dbhome_1/bin/nid</span></p>
<p><span style="font-family:Courier,monospace;">[oracle@apps ~]$ nid target=/</span></p>
<p><span style="font-family:Courier,monospace;">DBNEWID: Release 11.2.0.1.0 &#8211; Production on Fri Mar 25 16:32:17 2011</span></p>
<p><span style="font-family:Courier,monospace;">Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.</span></p>
<p><span style="font-family:Courier,monospace;">Connected to database RC (DBID=1272957858)</span></p>
<p><span style="font-family:Courier,monospace;">Connected to server version 11.2.0</span></p>
<p><span style="font-family:Courier,monospace;">Control Files in database:</span></p>
<p><span style="font-family:Courier,monospace;">/u01/app/oracle/oradata/rc/control01.ctl</span></p>
<p><span style="font-family:Courier,monospace;">/u01/app/oracle/oradata/rc/control02.ctl</span></p>
<p><span style="font-family:Courier,monospace;">Change database ID of database RC? (Y/[N]) =&gt; Y</span></p>
<p><span style="font-family:Courier,monospace;">Proceeding with operation</span></p>
<p><span style="font-family:Courier,monospace;">Changing database ID from 1272957858 to 2943969233</span></p>
<p><span style="font-family:Courier,monospace;">Control File /u01/app/oracle/oradata/rc/control01.ctl &#8211; modified</span></p>
<p><span style="font-family:Courier,monospace;">Control File /u01/app/oracle/oradata/rc/control02.ctl &#8211; modified</span></p>
<p><span style="font-family:Courier,monospace;">Datafile /u01/app/oracle/oradata/rc/system01.db &#8211; dbid changed</span></p>
<p><span style="font-family:Courier,monospace;">Datafile /u01/app/oracle/oradata/rc/sysaux01.db &#8211; dbid changed</span></p>
<p><span style="font-family:Courier,monospace;">Datafile /u01/app/oracle/oradata/rc/undotbs01.db &#8211; dbid changed</span></p>
<p><span style="font-family:Courier,monospace;">Datafile /u01/app/oracle/oradata/rc/def_perm01.db &#8211; dbid changed</span></p>
<p><span style="font-family:Courier,monospace;">Control File /u01/app/oracle/oradata/rc/control01.ctl &#8211; dbid changed</span></p>
<p><span style="font-family:Courier,monospace;">Control File /u01/app/oracle/oradata/rc/control02.ctl &#8211; dbid changed</span></p>
<p><span style="font-family:Courier,monospace;">Instance shut down</span></p>
<p><span style="font-family:Courier,monospace;">Database ID for database RC changed to 2943969233.</span></p>
<p><span style="font-family:Courier,monospace;">All previous backups and archived redo logs for this database are unusable.</span></p>
<p><span style="font-family:Courier,monospace;">Database has been shutdown, open database with RESETLOGS option.</span></p>
<p><span style="font-family:Courier,monospace;">Succesfully changed database ID.</span></p>
<p><span style="font-family:Courier,monospace;">DBNEWID &#8211; Completed succesfully.</span></p>
<p>&nbsp;</p>
<p>5. Bounce back the database to mount phase</p>
<p><span style="font-family:Courier,monospace;">[oracle@apps ~]$ sqlplus / as sysdba</span></p>
<p><span style="font-family:Courier,monospace;">SQL*Plus: Release 11.2.0.1.0 Production on Fri Mar 25 16:33:14 2011</span></p>
<p><span style="font-family:Courier,monospace;">Copyright (c) 1982, 2009, Oracle.  All rights reserved.</span></p>
<p><span style="font-family:Courier,monospace;">Connected to an idle instance.</span></p>
<p><span style="font-family:Courier,monospace;">SQL&gt; startup mount</span></p>
<p><span style="font-family:Courier,monospace;">ORACLE instance started.</span></p>
<p><span style="font-family:Courier,monospace;">Total System Global Area     150667264 bytes</span></p>
<p><span style="font-family:Courier,monospace;">Fixed Size                                     1335080 bytes</span></p>
<p><span style="font-family:Courier,monospace;">Variable Size                92274904 bytes</span></p>
<p><span style="font-family:Courier,monospace;">Database Buffers                       50331648 bytes</span></p>
<p><span style="font-family:Courier,monospace;">Redo Buffers                                 6725632 bytes</span></p>
<p><span style="font-family:Courier,monospace;">Database mounted.</span></p>
<p>&nbsp;</p>
<p>6. Open the database with resetlog option</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter database open resetlogs ;</span></p>
<p><span style="font-family:Courier,monospace;">Database altered.</span></p>
<p><span style="font-family:Courier,monospace;">SQL&gt;</span></p>
<p>&nbsp;</p>
<p>7. Identify the new changed DBID</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; select dbid from v$database;</span></p>
<p><span style="font-family:Courier,monospace;">DBID</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;&#8212;&#8212;-</span></p>
<p><span style="font-family:Courier,monospace;">2943969233</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/naveenkumarsr.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/naveenkumarsr.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/naveenkumarsr.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/naveenkumarsr.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/naveenkumarsr.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/naveenkumarsr.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/naveenkumarsr.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/naveenkumarsr.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/naveenkumarsr.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/naveenkumarsr.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/naveenkumarsr.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/naveenkumarsr.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/naveenkumarsr.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/naveenkumarsr.wordpress.com/281/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=281&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://naveenkumarsr.wordpress.com/2011/03/25/change-oracle-dbid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c771c1c79abc1e3be4754f9e87f210a?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">Naveen Kumar S.R.</media:title>
		</media:content>
	</item>
		<item>
		<title>Oracle11g Tables</title>
		<link>http://naveenkumarsr.wordpress.com/2011/03/21/oracle11g-tables/</link>
		<comments>http://naveenkumarsr.wordpress.com/2011/03/21/oracle11g-tables/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 07:37:53 +0000</pubDate>
		<dc:creator>Naveen K. SR</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://naveenkumarsr.wordpress.com/?p=273</guid>
		<description><![CDATA[Interval Partition SQL&#62; create table interval_part(eno number(4),ename varchar2(20),salary number(6)) 2 partition by range(eno) 3 interval(1000) 4    (partition part1 values less than (1000), 5     partition part2 values less than (2000), 6     partition part3 values less than (3000), 7     partition part4 values less than (4000)); Table created. System Partition SQL&#62; create [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=273&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } 		H3 { margin-bottom: 0.08in } 		H3.western { font-family: "Nimbus Sans L", sans-serif } 		H3.ctl { font-family: "Akshar Unicode" } --></p>
<h3>Interval Partition</h3>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">SQL&gt; create table interval_part(eno number(4),ename varchar2(20),salary number(6))</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">2  partition by range(eno)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">3  interval(1000)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">4     (partition part1 values less than (1000),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">5     partition part2 values less than (2000),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">6     partition part3 values less than (3000),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">7     partition part4 values less than (4000));</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">Table created.</span></span></p>
<h3>System Partition</h3>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">SQL&gt; create table system_part(eno number(4), ename varchar2(20), salary number(6))</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">2  partition by system</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">3     (partition part1,</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">4     partition part2,</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">5     partition part3,</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">6      partition part4);</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">Table created.</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">SQL&gt; insert into system_part partition(part1) values (1, &#8216;aaa&#8217;, 35000);</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">1 row created.</span></span></p>
<h3>Virtual Column-Based Partition</h3>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">SQL&gt; create table virtual_part(eno number(2), salary number(7), incentives number(6), tot_salary generated always as(salary+(0.50*incentives)) virtual)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">2  partition by range(tot_salary)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">3     (partition part1 values less than (5000),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">4     partition part2 values less than (10000),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">5      partition part3 values less than (15000),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">6      partition part4 values less than (20000),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">7      partition part5 values less than (maxvalue));</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">Table created.</span></span></p>
<h3><span style="font-size:medium;">Composite Partitions</span></h3>
<h3>Range-Range: Single-Column Partition and Single-Column Subpartition</h3>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">SQL&gt; create table range_range(eno number(4), ename varchar2(12), deptno number(3))</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">2  partition by range(eno)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">3  subpartition by range(eno)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">4     (partition part1 values less than (1000)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">5           (subpartition sub_part1 values less than(500),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">6             subpartition sub_part2 values less than(1000)),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">7     partition part2 values less than (2000)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">8           (subpartition sub_part3 values less than(1500),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">9            subpartition sub_part4 values less than(2000)));</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">Table created.</span></span></p>
<h3>Range-Range: Multi-Column Partition and Single-Column Subpartition</h3>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">SQL&gt; create table range_range(eno number(4), ename varchar2(12), deptno number(3))</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">2  partition by range(eno,deptno)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">3  subpartition by range(eno)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">4    (partition part1 values less than (1000,10)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">5             (subpartition sub_part1 values less than(500),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">6               subpartition sub_part2 values less than(1000)),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">7      partition part2 values less than (2000,20)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">8             (subpartition sub_part3 values less than(1500),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">9               subpartition sub_part4 values less than(2000)));</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">Table created.</span></span></p>
<h3>Range-Range: Single-Column Partition and Multi-Column Subpartition</h3>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">SQL&gt; create table range_range(eno number(4), ename varchar2(12), deptno number(3))</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">2  partition by range(eno)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">3  subpartition by range(eno,deptno)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">4     (partition part1 values less than (1000)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">5       (subpartition sub_part1 values less than(500,10),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">6               subpartition sub_part2 values less than(1000,20)),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">7      partition part2 values less than (2000)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">8             (subpartition sub_part3 values less than(1500,30),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">9               subpartition sub_part4 values less than(2000,40)));</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">Table created.</span></span></p>
<h3>Range-Range: Multi-Column Partition and Multi-Column Subpartition</h3>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">SQL&gt; create table range_range(eno number(4), ename varchar2(12), deptno number(3))</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">2  partition by range(eno,deptno)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">3  subpartition by range(eno,deptno)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">4     (partition part1 values less than (1000,10)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">5             (subpartition sub_part1 values less than(500,5),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">6               subpartition sub_part2 values less than(1000,10)),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">7      partition part2 values less than (2000,20)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">8             (subpartition sub_part3 values less than(1500,15),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">9               subpartition sub_part4 values less than(2000,20)));</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">Table created.</span></span></p>
<h3>Composite: List-List Partition</h3>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">SQL&gt; create table telecom_list_list(no number(10),provider varchar2(20),state varchar2(5))</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">2  partition by list(state)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">3  subpartition by list(provider)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">4    (partition south values(&#8216;KAR&#8217;,'TMN&#8217;,'KER&#8217;)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">5            (subpartition sub_part1 values (&#8216;ARTL&#8217;,'VDFN&#8217;,'TATA&#8217;),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">6              subpartition sub_part2 values (&#8216;ARCL&#8217;,'BSNL&#8217;,'UNOR&#8217;)),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">7     partition north values(&#8216;DLH&#8217;,'HR&#8217;,'UP&#8217;)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">8            (subpartition sub_part3 values (&#8216;ARTL&#8217;,'VDFN&#8217;,'TATA&#8217;),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">9              subpartition sub_part4 values (&#8216;ARCL&#8217;,'BSNL&#8217;,'UNOR&#8217;)),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">10     partition west values(&#8216;RJ&#8217;,'GOA&#8217;,'PNJ&#8217;)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">11      (subpartition sub_part5 values (&#8216;ARTL&#8217;,'VDFN&#8217;,'TATA&#8217;),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">12             subpartition sub_part6 values (&#8216;ARCL&#8217;,'BSNL&#8217;,'UNOR&#8217;)),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">13     partition east values(&#8216;BNG&#8217;,'ORS&#8217;,'ASM&#8217;)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">14           (subpartition sub_part7 values (&#8216;ARTL&#8217;,'VDFN&#8217;,'TATA&#8217;),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">15             subpartition sub_part8 values (&#8216;ARCL&#8217;,'BSNL&#8217;,'UNOR&#8217;)));</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">Table created.</span></span></p>
<h3>Composite: List-Hash Partition</h3>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">SQL&gt; create table telecom_list_hash(no number(10),provider varchar2(20),state varchar2(5))</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">2  partition by list(state)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">3  subpartition by hash(provider)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">4      (partition south values(&#8216;KAR&#8217;,'TMN&#8217;,'KER&#8217;)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">5              (subpartition sub_part1,</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">6               subpartition sub_part2),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">7       partition north values(&#8216;DLH&#8217;,'HR&#8217;,'UP&#8217;)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">8              (subpartition sub_part3,</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">9               subpartition sub_part4),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">10    partition west values(&#8216;RJ&#8217;,'GOA&#8217;,'PNJ&#8217;)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">11             (subpartition sub_part5,</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">12               subpartition sub_part6),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">13      partition east values(&#8216;BNG&#8217;,'ORS&#8217;,'ASM&#8217;)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">14             (subpartition sub_part7,</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">15              subpartition sub_part8));</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">Table created.</span></span></p>
<h3>Composite: List-Range Partition</h3>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">SQL&gt; create table telecom_list_range(no number(10),free_sms number(10),state varchar2(5))</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">2  partition by list(state)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">3  subpartition by range(free_sms)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">4        (partition south values(&#8216;KAR&#8217;,'TMN&#8217;,'KER&#8217;)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">5                (subpartition sub_part1 values less than (100),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">6                  subpartition sub_part2 values less than (200)),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">7          partition north values(&#8216;DLH&#8217;,'HR&#8217;,'UP&#8217;)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">8       (subpartition sub_part3 values less than (100),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">9                  subpartition sub_part4 values less than (200)),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">10        partition west values(&#8216;RJ&#8217;,'GOA&#8217;,'PNJ&#8217;)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">11               (subpartition sub_part5 values less than (100),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">12                subpartition sub_part6 values less than (200)),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">13        partition east values(&#8216;BNG&#8217;,'ORS&#8217;,'ASM&#8217;)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">14               (subpartition sub_part7 values less than (100),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">15                 subpartition sub_part8 values less than (200)));</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">Table created.</span></span></p>
<h3>Composite: Interval-Range: Range Single-Column Subpartition</h3>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">SQL&gt; create table interval_range(eno number(4),ename varchar2(12),deptno number(3))</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">2  partition by range(eno)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">3  interval(500)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">4  subpartition by range(deptno)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">5     (partition part1 values less than (1000)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">6             (subpartition sub_part1 values less than(5),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">7               subpartition sub_part2 values less than(10)),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">8      partition part2 values less than (2000)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">9             (subpartition sub_part3 values less than(15),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">10              subpartition sub_part4 values less than(20)));</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">Table created.</span></span></p>
<h3>Composite: Interval-Range: Range Multi-Column Subpartition</h3>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">SQL&gt; create table interval_range(eno number(4),ename varchar2(12),deptno number(3))</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">2  partition by range(eno)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">3  interval(500)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">4  subpartition by range(eno,deptno)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">5       (partition part1 values less than (1000)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">6              (subpartition sub_part1 values less than(500,5),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">7                subpartition sub_part2 values less than(1000,10)),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">8        partition part2 values less than (2000)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">9              (subpartition sub_part3 values less than(1500,15),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">10               subpartition sub_part4 values less than(2000,20)));</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">Table created.</span></span></p>
<h3>Composite: Interval-Hash Partition</h3>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">SQL&gt; create table interval_hash(eno number(4),ename varchar2(12),deptno number(3))</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">2  partition by range(eno)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">3  interval(500)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">4  subpartition by hash(deptno)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">5       (partition part1 values less than (1000)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">6                (subpartition sub_part1,</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">7                  subpartition sub_part2),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">8         partition part2 values less than (2000)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">9                (subpartition sub_part3,</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">10                subpartition sub_part4));</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">Table created.</span></span></p>
<h3>Composite: Interval-List Partition</h3>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">SQL&gt; create table interval_list(eno number(4),ename varchar2(12),deptno number(3))</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">2  partition by range(eno)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">3  interval(500)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">4  subpartition by list(deptno)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">5       (partition part1 values less than (1000)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">6                (subpartition sub_part1 values (&#8217;10&#8242;,&#8217;20&#8242;),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">7                  subpartition sub_part2 values (&#8217;30&#8242;,&#8217;40&#8242;)),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">8        partition part2 values less than (2000)</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">9       (subpartition sub_part3 values (&#8217;50&#8242;,&#8217;60&#8242;),</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">10                subpartition sub_part4 values (&#8217;70&#8242;,&#8217;80&#8242;)));</span></span></p>
<p><span style="font-family:Courier,monospace;"><span style="font-size:small;">Table created.</span></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/naveenkumarsr.wordpress.com/273/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/naveenkumarsr.wordpress.com/273/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/naveenkumarsr.wordpress.com/273/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/naveenkumarsr.wordpress.com/273/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/naveenkumarsr.wordpress.com/273/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/naveenkumarsr.wordpress.com/273/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/naveenkumarsr.wordpress.com/273/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/naveenkumarsr.wordpress.com/273/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/naveenkumarsr.wordpress.com/273/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/naveenkumarsr.wordpress.com/273/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/naveenkumarsr.wordpress.com/273/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/naveenkumarsr.wordpress.com/273/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/naveenkumarsr.wordpress.com/273/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/naveenkumarsr.wordpress.com/273/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=273&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://naveenkumarsr.wordpress.com/2011/03/21/oracle11g-tables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c771c1c79abc1e3be4754f9e87f210a?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">Naveen Kumar S.R.</media:title>
		</media:content>
	</item>
		<item>
		<title>Upgrading Oracle 10.2.0.1 to 11.1.0.6</title>
		<link>http://naveenkumarsr.wordpress.com/2011/02/16/upgrad-oracle/</link>
		<comments>http://naveenkumarsr.wordpress.com/2011/02/16/upgrad-oracle/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 11:45:34 +0000</pubDate>
		<dc:creator>Naveen K. SR</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://naveenkumarsr.wordpress.com/?p=223</guid>
		<description><![CDATA[Upgrading from Oracle 10.2.0.1 to 11.1.0.6 . What is Oracle Database Upgrade? Oracle Upgrade is a process of changing the environment of the database without modifying the existing data and configurations to avail a robust features in the latest version and releases of the Oracle product, that internally will delivers more automation, new features, and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=223&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>Upgrading from Oracle 10.2.0.1 to 11.1.0.6</h1>
<p>.</p>
<h1>What is Oracle Database Upgrade?</h1>
<p>Oracle Upgrade is a process of changing the environment of the database without modifying the existing data and configurations to avail a robust features in the latest version and releases of the Oracle product, that internally will delivers more automation, new features, and flexibilities so that the data can be secure</p>
<p>Technically, Oracle Upgrade means changing the versions or the releases of the Oracle database within the same or in different servers or with different OS platforms (ex: version 9i to 10g, 10g to 11g, and also the release 10.1 to 10.2, 11.1 to 11.2) to the higher version/release that intern will upgrade the existing physical files state to the newer release/version</p>
<p>For upgrading, we will be using <strong>startup upgrade</strong> command. The <strong>startup migrate</strong> is deprecated from Oracle 10g for migration (Migration means moving the database from one OS platform to another, or from lower version/release to higer version/release as like upgrade, but the main difference here is we are logically extracting the physical files contents of data and we are loading it back to the higer version/release within the same or across the differnt OS servers, here the physcial files state doesnot change as like upgrade)</p>
<p>To know more about Version, release, and patch &#8230;</p>
<p style="text-align:left;"><a href="http://naveenkumarsr.files.wordpress.com/2011/02/ver1.png"><img class="size-medium wp-image-266 alignnone" title="ver" src="http://naveenkumarsr.files.wordpress.com/2011/02/ver1.png?w=300&#038;h=144" alt="" width="300" height="144" /></a></p>
<p><img src="/Users/NAVEEN%7E1.SR/AppData/Local/Temp/moz-screenshot.png" alt="" />If you upgrade/migrate the database, the <strong>FIRST</strong> number and the <strong>SECOND</strong> number will changes. The <strong>FOURTH</strong> digit indicate the patchset number, this number will change whenever you apply the patchsets to the database.</p>
<h1>Why the upgrading is needed?</h1>
<p>Upgrading to Oracle Database 11g provides the latest in efficient, reliable, secure data management for mission-critical on-line transaction processing applications, query-intensive data warehouses, and content management and Web2.0 applications. The right planning, preparation, and upgrade steps will make the upgrade process simpler, faster, and more predictable from start to finish.</p>
<h1>Types of upgrading</h1>
<p>You can do the upgrading the databases in two methods like</p>
<p>1. Manual Upgrading by running the scripts manually in proper order</p>
<p>2. Using Database Upgrade Assistant (DBUA) utility, Oracle recommends to go with this</p>
<h1>Compatibility Matrix</h1>
<p>Minimum Version of the database that can be directly upgraded to Oracle 11g Release 1</p>
<dl>
<dd>
<table border="1" cellspacing="0" cellpadding="4" width="100%">
<col width="134"></col>
<col width="122"></col>
<tbody>
<tr valign="top">
<td width="52%"><strong>Source 				Database</strong></td>
<td width="48%"><strong>Target 				Database</strong></td>
</tr>
<tr valign="top">
<td width="52%"><em>9.2.0.4.0 OR 				higher</em></td>
<td width="48%"><em>11.1.x</em></td>
</tr>
<tr valign="top">
<td width="52%"><em>10.1.0.2.0 OR 				higher</em></td>
<td width="48%"><em>11.1.x</em></td>
</tr>
<tr valign="top">
<td width="52%"><em>10.2.0.1.0 OR 				higher</em></td>
<td width="48%"><em>11.1.x</em></td>
</tr>
</tbody>
</table>
</dd>
</dl>
<h1>Choosing an upgrade method</h1>
<p>The first method is called a manual upgrade. The manual upgrade approach gives you a great deal of control, but it also adds to the level of risk in the upgrade because you must perform the steps in the proper order.</p>
<p>The second method relies on the Database Upgrade Assistant (DBUA). DBUA is an interactive tool that guides you through the upgrade process. DBUA evaluates your present database configuration and recommends modifications that can be implemented during the upgrade process. These recommendations may include the sizing of files and the specifications for the new SYSAUX tablespace (if upgrading from a pre-Oracle 10g database). After you accept the recommendations, DBUA performs the upgrade in the background while a progress panel is displayed. DBUA is very similar in approach to Database Configuration Assistant (DBCA).</p>
<p>Selecting the proper upgrade method requires you to evaluate the technical expertise of your team, the data that is to be migrated, and the allowable downtime for the database during the migration. In general, using DBUA will be the method of choice for very large databases, whereas smaller databases may use an indirect method.</p>
<h1>Before upgrading</h1>
<p>Prior to beginning the migration, you should back up the existing database and database software. If the upgrades fails for some reason and you are unable to revert the database or software to its earlier version, you will be able to restore your backup and re-create your database.</p>
<p>You should develop and test scripts that will allow you to evaluate the performance and  functionality of the database following the upgrade. This evaluation may include the performance of specific database operations or the overall performance of the database under a significant user load.</p>
<p>Prior to executing the upgrade process on a production database, you should attempt the upgrade on a test database so that any missing components (such as operating system patches) can be identified and the time required for the upgrade can be measured.</p>
<p>Prior to performing a upgrade, you should analyze the data dictionary tables. During the upgrade process to Oracle Database 11g, the data dictionary will be analyzed if it has not been analyzed already, so performing this step in advance will aid the performance of the upgrade.</p>
<h1>Upgrading from Oracle 10.2.0.1 to 11.1.0.6</h1>
<h2>Prerequisites</h2>
<p>Install the Oracle 11g Release 1 software</p>
<p>Throughout this documentation, we have used the following standards</p>
<table border="1" cellspacing="0" cellpadding="4" width="100%">
<col width="53"></col>
<col width="102"></col>
<col width="101"></col>
<tbody>
<tr valign="top">
<td width="21%"></td>
<td width="40%"><strong>Source: Oracle 10g (10.2.0.1.0)</strong></td>
<td width="40%"><strong>Target: Oracle 11g (11.1.0.6.0)</strong></td>
</tr>
<tr valign="top">
<td width="21%"><strong>OS Platform</strong></td>
<td width="40%"><em>RHEL AS 4 Update 2</em></td>
<td width="40%"><em>RHEL AS 4 Update 2</em></td>
</tr>
<tr valign="top">
<td width="21%"><strong>OS User</strong></td>
<td width="40%"><em>oracle</em></td>
<td width="40%"><em>oracle</em></td>
</tr>
<tr valign="top">
<td width="21%"><strong>DB_NAME</strong></td>
<td width="40%"><em>orcl</em></td>
<td width="40%"><em>orcl</em></td>
</tr>
<tr valign="top">
<td width="21%"><strong>ORACLE_BASE</strong></td>
<td width="40%"><em>/u01/app/o10g</em></td>
<td width="40%"><em>/u01/app/o11g</em></td>
</tr>
<tr valign="top">
<td width="21%"><strong>ORACLE_HOME</strong></td>
<td width="40%"><em>/u01/app/o10g/product/10.2.0/db_1</em></td>
<td width="40%"><em>/u01/app/o11g/product/11.1.0/db_1</em></td>
</tr>
</tbody>
</table>
<h1>Manually Upgrading</h1>
<p>The manual upgrading the database includes:</p>
<p>1. Run pre-upgrading script &#8216;<em>utlu111i.sql</em>&#8216;; if found problems, fix them</p>
<p>2. Backup of Oracle10g database</p>
<p>3. Bounce the Oracle11g database to &#8216;<em>startup upgrade</em>&#8216; and run &#8216;<em>catupgrd.sql</em>&#8216; script</p>
<p>4. Run post-upgrade script &#8216;<em>utlu111s.sql</em>&#8216;</p>
<p>5. Change the database from upgrade mode to normal mode by running &#8216;<em>catuppst.sql</em>&#8216;</p>
<p>6. Check for invalid objects; if found, run &#8216;<em>utlrp.sql</em>&#8216;</p>
<h2>1. Running the Pre-Upgrade tool</h2>
<p>The Pre-Upgrade Information Tool is a SQL script that ships with Oracle Database 11g and must be copied to and run from the environment of the database being upgraded. Complete the following steps to run the Pre-Upgrade Information Tool:</p>
<p>1. Log into the system as the owner of the Oracle Database 11g</p>
<p>2. Copy the Pre-Upgrade Information Tool (<em>utlu111i.sql</em>) from the Oracle 11g&#8217;s <em>ORACLE_HOME/rdbms/admin</em> directory to a directory outside of the Oracle Home, such as the temporary directory on your system. Make a note of the new location of this file</p>
<p>3. Log into the system as the owner of the Oracle Database 10g, the database to be upgraded</p>
<p>4. Start SQL*Plus with <em>sysdba</em> privilege</p>
<p>5. Bounce the database to open phase</p>
<p>6. Set the system to spool results to a log file for later analysis and to gather the information</p>
<p>SQL&gt; SPOOL pre_upgrade_info.log</p>
<p>7. Run the Pre-Upgrade Information Tool:</p>
<p>SQL&gt; @/tmp/utlu111i.sql</p>
<p>8. Turn off the spooling of script results to the log file:</p>
<p>SQL&gt; SPOOL OFF</p>
<p>Check the output of the Pre-Upgrade Information Tool in <em>pre_upgrade_info.log</em> for any identified problems prior to the upgrade.</p>
<p>9. Edit the <em>pre_upgrade_info.log</em> file to troubleshoot the problems</p>
<p>$ cat ~/pre_upgrade_info.log</p>
<p><span style="font-size:x-small;">SQL&gt; @/tmp/utlu111i.sql</span></p>
<p><span style="font-size:x-small;">Oracle Database 11.1 Pre-Upgrade Information Tool    02-11-2011 16:16:52</span></p>
<p><span style="font-size:x-small;">.</span></p>
<p><span style="font-size:x-small;">**********************************************************************</span></p>
<p><span style="font-size:x-small;">Database:</span></p>
<p><span style="font-size:x-small;">**********************************************************************</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; name:          ORCL</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; version:       10.2.0.1.0</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; compatible:    10.2.0.1.0</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; blocksize:     8192</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; platform:      Linux IA (32-bit)</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; timezone file: V2</span></p>
<p><span style="font-size:x-small;">.</span></p>
<p><span style="font-size:x-small;">**********************************************************************</span></p>
<p><span style="font-size:x-small;">Tablespaces: [make adjustments in the current environment]</span></p>
<p><span style="font-size:x-small;">**********************************************************************</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; SYSTEM tablespace is adequate for the upgrade.</span></p>
<p><span style="font-size:x-small;">&#8230;. minimum required size: 693 MB</span></p>
<p><span style="font-size:x-small;">&#8230;. AUTOEXTEND additional space required: 243 MB</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; UNDOTBS1 tablespace is adequate for the upgrade.</span></p>
<p><span style="font-size:x-small;">&#8230;. minimum required size: 262 MB</span></p>
<p><span style="font-size:x-small;">&#8230;. AUTOEXTEND additional space required: 62 MB</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; SYSAUX tablespace is adequate for the upgrade.</span></p>
<p><span style="font-size:x-small;">&#8230;. minimum required size: 438 MB</span></p>
<p><span style="font-size:x-small;">&#8230;. AUTOEXTEND additional space required: 178 MB</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; DEF_TEMP tablespace is adequate for the upgrade.</span></p>
<p><span style="font-size:x-small;">&#8230;. minimum required size: 61 MB</span></p>
<p><span style="font-size:x-small;">.</span></p>
<p><span style="font-size:x-small;">**********************************************************************</span></p>
<p><span style="font-size:x-small;">Update Parameters: [Update Oracle Database 11.1 init.ora or spfile]</span></p>
<p><span style="font-size:x-small;">**********************************************************************</span></p>
<p><span style="font-size:x-small;">&#8211; No update parameter changes are required.</span></p>
<p><span style="font-size:x-small;">.</span></p>
<p><span style="font-size:x-small;">**********************************************************************</span></p>
<p><span style="font-size:x-small;">Renamed Parameters: [Update Oracle Database 11.1 init.ora or spfile]</span></p>
<p><span style="font-size:x-small;">**********************************************************************</span></p>
<p><span style="font-size:x-small;">&#8211; No renamed parameters found. No changes are required.</span></p>
<p><span style="font-size:x-small;">.</span></p>
<p><span style="font-size:x-small;">**********************************************************************</span></p>
<p><span style="font-size:x-small;">Obsolete/Deprecated Parameters:[Update Oracle Database11.1 init.ora or spfile]</span></p>
<p><span style="font-size:x-small;">**********************************************************************</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; &#8220;background_dump_dest&#8221; replaced by  &#8220;diagnostic_dest&#8221;</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; &#8220;user_dump_dest&#8221; replaced by  &#8220;diagnostic_dest&#8221;</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; &#8220;core_dump_dest&#8221; replaced by  &#8220;diagnostic_dest&#8221;</span></p>
<p><span style="font-size:x-small;">.</span></p>
<p><span style="font-size:x-small;">**********************************************************************</span></p>
<p><span style="font-size:x-small;">Components: [The following database components will be upgraded or installed]</span></p>
<p><span style="font-size:x-small;">**********************************************************************</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; Oracle Catalog Views         [upgrade]  VALID</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; Oracle Packages and Types    [upgrade]  VALID</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; JServer JAVA Virtual Machine [upgrade]  VALID</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; Oracle XDK for Java          [upgrade]  VALID</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; Oracle Workspace Manager     [upgrade]  VALID</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; OLAP Analytic Workspace      [upgrade]  VALID</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; OLAP Catalog                 [upgrade]  VALID</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; EM Repository                [upgrade]  VALID</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; Oracle Text                  [upgrade]  VALID</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; Oracle XML Database          [upgrade]  VALID</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; Oracle Java Packages         [upgrade]  VALID</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; Oracle interMedia            [upgrade]  VALID</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; Spatial                      [upgrade]  VALID</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; Data Mining                  [upgrade]  VALID</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; Expression Filter            [upgrade]  VALID</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; Rule Manager                 [upgrade]  VALID</span></p>
<p><span style="font-size:x-small;">&#8211;&gt; Oracle OLAP API              [upgrade]  VALID</span></p>
<p><span style="font-size:x-small;">.</span></p>
<p><span style="font-size:x-small;">**********************************************************************</span></p>
<p><span style="font-size:x-small;">Miscellaneous Warnings</span></p>
<p><span style="font-size:x-small;">**********************************************************************</span></p>
<p><span style="font-size:x-small;">WARNING: &#8211;&gt; Database is using an old timezone file version.</span></p>
<p><span style="font-size:x-small;">&#8230;. Patch the 10.2.0.1.0 database to timezone file version 4</span></p>
<p><span style="font-size:x-small;">&#8230;. BEFORE upgrading the database.  Re-run utlu111i.sql after</span></p>
<p><span style="font-size:x-small;">&#8230;. patching the database to record the new timezone file version.</span></p>
<p><span style="font-size:x-small;">WARNING: &#8211;&gt; Database contains stale optimizer statistics.</span></p>
<p><span style="font-size:x-small;">&#8230;. Refer to the 11g Upgrade Guide for instructions to update</span></p>
<p><span style="font-size:x-small;">&#8230;. statistics prior to upgrading the database.</span></p>
<p><span style="font-size:x-small;">&#8230;. Component Schemas with stale statistics:</span></p>
<p><span style="font-size:x-small;">&#8230;.   SYS</span></p>
<p><span style="font-size:x-small;">&#8230;.   OLAPSYS</span></p>
<p><span style="font-size:x-small;">&#8230;.   SYSMAN</span></p>
<p><span style="font-size:x-small;">WARNING: &#8211;&gt; Database contains schemas with objects dependent on network</span></p>
<p><span style="font-size:x-small;">packages.</span></p>
<p><span style="font-size:x-small;">&#8230;. Refer to the 11g Upgrade Guide for instructions to configure Network ACLs.</span></p>
<p><span style="font-size:x-small;">&#8230;. USER SYSMAN has dependent objects.</span></p>
<p><span style="font-size:x-small;">WARNING: &#8211;&gt; EM Database Control Repository exists in the database.</span></p>
<p><span style="font-size:x-small;">&#8230;. Direct downgrade of EM Database Control is not supported. Refer to the</span></p>
<p><span style="font-size:x-small;">&#8230;. 11g Upgrade Guide for instructions to save the EM data prior to upgrade.</span></p>
<p><span style="font-size:x-small;">.</span></p>
<p><span style="font-size:x-small;">PL/SQL procedure successfully completed.</span></p>
<p>This scripts will generates to check whether all the properties will match during upgradings,</p>
<p><strong>Tablespaces: </strong>Verifies that the tablespaces are suitable to upgrade, if any problems of space, increase the size of tablespaces</p>
<p><strong>Update parameters:</strong> Check the update parameters from 10.2.0.1 to 11.1.0.6</p>
<p><strong>Renamed Parameters:</strong> Check the renamed parameters in 11.1.0.6</p>
<p><strong>Obsolete/Deprecated parameters:</strong> Remove the parameters which are deprecated in the 11.1.0.6 version. More about the deprecated parameters, refer the Oracle 11g documentation</p>
<p><strong>Components:</strong> Verify all the components are VALID, if they show INVALID, run &#8216;<em>utlrp.sql</em>&#8216; from Oracle10g&#8217;s ORACLE_HOME to make them VALID.</p>
<p><strong>Miscellaneous Warnings:</strong> The timezone file version should be upgraded from 2 to 4.</p>
<p>The remaining miscellaneous warnings can be ignored.</p>
<h2>Upgrading the timezone file version from 2 to 4</h2>
<p>Following are the critical steps to be executed based on above warnings. These commands are to be executed while connecting to database from 10g Oracle Home</p>
<p><strong>WARNING: –&gt; Database is using an old timezone file version.</strong></p>
<p>…<strong>. Patch the 10.2.0.1.0 database to timezone file version 4</strong></p>
<p>…<strong>. BEFORE upgrading the database. Re-run utlu111i.sql after</strong></p>
<p>…<strong>. patching the database to record the new timezone file version.</strong></p>
<p>Finding the Version of existing timezone files in Oracle 10g:</p>
<p><span style="font-size:small;">SQL&gt; select * from v$timezone_file;</span></p>
<p><span style="font-size:small;">FILENAME        VERSION</span></p>
<p><span style="font-size:small;">&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;-</span></p>
<p><span style="font-size:small;">timezlrg.dat 		  2</span></p>
<p>For 10.2.0.1, check the metalink note <em>ID 413671.1</em>. The table which defines the patch to be applied to upgrade the timezone.</p>
<p>If there is no official patchset for the version you are currently having then you can Identify patch for a different patchset, but with same release.</p>
<p>For example if you run 10.2.0.1 and there is no particular patch release. In this case we can make use of patch 5632264 for 10.2.0.2 and 10.2.0.3, and this will be applicable to 10.2.0.1 as well.</p>
<p>Please follow the metalink note <em>ID 396387.1</em></p>
<p>Once you identify the correct patchset (5632264 for 10.2.X), download the same and unzip it.</p>
<p>1. Unzip the patch file <em>p5632264_10203_Linux-x86-64.zip</em></p>
<p>$ unzip p5632264_10203_Linux-x86-64.zip</p>
<p>2. Change directory to the 5632264 and list, which will contain the timezone files</p>
<p>3. Backup the existing timezone files in the Oracle10g&#8217;s ORACLE_HOME, these will be present under <em>$ORACLE_HOME/oracore/zoneinfo</em> directory</p>
<p>4. Copy the newly extracted files to the ORACLE_HOME path</p>
<p>$ cp -r 5632264/files/oracore/zoneinfo $ORACLE_HOME/oracore/zoneinfo</p>
<p>5. If the new timezone changes has to come to an effect, restart the database and select the timezone</p>
<p>SQL&gt; select * from v$timezone_file;</p>
<p>FILENAME        VERSION</p>
<p>&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;-</p>
<p>timezlrg.dat          4</p>
<p><strong>NOTE:</strong></p>
<p>Do not follow this method of applying the patch for all the patch-sets. That will corrupt the ORACLE_HOME path and may need to reinstall the software again. For each individual patch installation, please refer to the Oracle Patchset Documentation&#8217;s</p>
<h3>To Solve Stale Optimizer Statistics Warning</h3>
<p><span style="font-size:small;"><strong>WARNING: &#8211;&gt; Database contains stale optimizer statistics.</strong></span></p>
<p><span style="font-size:small;"><strong>&#8230;. Refer to the 11g Upgrade Guide for instructions to update</strong></span></p>
<p><span style="font-size:small;"><strong>&#8230;. statistics prior to upgrading the database.</strong></span></p>
<p><span style="font-size:small;"><strong>&#8230;. Component Schemas with stale statistics:</strong></span></p>
<p><span style="font-size:small;"><strong>&#8230;.   SYS</strong></span></p>
<p><span style="font-size:small;"><strong>&#8230;.   OLAPSYS</strong></span></p>
<p><span style="font-size:small;"><strong>&#8230;.   SYSMAN</strong></span></p>
<p>Gather the dictionary statistics by executing the PL/SQL blocks</p>
<p>SQL&gt; EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;</p>
<p>PL/SQL procedure successfully completed.</p>
<p>SQL&gt; EXEC DBMS_STATS.GATHER_SCHEMA_STATS(&#8216;SYS&#8217;);</p>
<p>PL/SQL procedure successfully completed.</p>
<p>SQL&gt; EXEC DBMS_STA<span style="font-size:small;">TS.GATHER_SCHEMA_STATS(&#8216;OLAPSYS&#8217;);</span></p>
<p>PL/SQL procedure successfully completed.</p>
<p>SQL&gt; EXEC DBMS_STATS.GATHER_SCHEMA_STATS(&#8216;SYSMAN&#8217;);</p>
<p>PL/SQL procedure successfully completed.</p>
<h3>NOTE:</h3>
<p>Gather the dictionary statistics by executing DBMS_STATS.GATHER_SCHEMA_STATS for all the users as per the warning.</p>
<h3>Re-run the pre-upgrade script again</h3>
<p>1. Log into the system as the owner of the Oracle Database 11g</p>
<p>2. Copy the Pre-Upgrade Information Tool (<em>utlu111i.sql</em>) from the Oracle 11g&#8217;s <em>ORACLE_HOME/rdbms/admin</em> directory to a directory outside of the Oracle Home, such as the temporary directory on your system. Make a note of the new location of this file</p>
<p>3. Log into the system as the owner of the Oracle Database 10g, the database to be upgraded</p>
<p>4. Start SQL*Plus with <em>sysdba</em> privilege</p>
<p>5. Bounce the database to open phase</p>
<p>6. Set the system to spool results to a log file for later analysis and to gather the information</p>
<p>7. Run the Pre-Upgrade Information Tool:</p>
<p>SQL&gt; @/tmp/utlu111i.sql</p>
<p>8. Turn off the spooling of script results to the log file:</p>
<p>9. Check for upgrading warnings again</p>
<p>$ cat pre_upgrade_info.log</p>
<p>SQL&gt; @/tmp/utlu111i.sql</p>
<p><span style="font-size:x-small;">.</span></p>
<p><span style="font-size:x-small;">.</span></p>
<p><span style="font-size:x-small;">.</span></p>
<p><span style="font-size:x-small;">**********************************************************************</span></p>
<p><span style="font-size:x-small;">Miscellaneous Warnings</span></p>
<p><span style="font-size:x-small;">**********************************************************************</span></p>
<p><span style="font-size:x-small;">WARNING: &#8211;&gt; Database contains schemas with objects dependent on network</span></p>
<p><span style="font-size:x-small;">packages.</span></p>
<p><span style="font-size:x-small;">&#8230;. Refer to the 11g Upgrade Guide for instructions to configure Network ACLs.</span></p>
<p><span style="font-size:x-small;">&#8230;. USER SYSMAN has dependent objects.</span></p>
<p><span style="font-size:x-small;">WARNING: &#8211;&gt; EM Database Control Repository exists in the database.</span></p>
<p><span style="font-size:x-small;">&#8230;. Direct downgrade of EM Database Control is not supported. Refer to the</span></p>
<p><span style="font-size:x-small;">&#8230;. 11g Upgrade Guide for instructions to save the EM data prior to upgrade.</span></p>
<p><span style="font-size:x-small;">.</span></p>
<p><span style="font-size:x-small;"><br />
</span></p>
<h2>2. Backup the Oracle 10g database</h2>
<p>Perform the Oracle 10g database backup in any of the methods like cold backup, hot backup or RMAN backups</p>
<p>Backup the ORACLE_HOME software path too.</p>
<h2>3. Create parameter file for Oracle 11g</h2>
<p>Backup the Oracle10g&#8217;s parameter file and paste under Oracle11g&#8217;s default path</p>
<p>$ cp /u01/app/o10g/product/10.2.0/db_1/dbs/initorcl.ora /u01/app/o11g/product/11.1.0/db_1/dbs/initorcl.ora</p>
<p>Edit the Oracle 11g&#8217;s parameter file to remove the Obsolete/Deprecated parameters, as listed in the <em>pre_upgrade_info.lo</em>g file</p>
<h2>4. Upgrade the database</h2>
<p>1. If the Oracle10g database is still running, shutdown the database</p>
<p>2. Export the variables for Oracle 11g</p>
<p>$ export ORACLE_SID=orcl</p>
<p>$ export ORACLE_BASE=/u01/app/o11g</p>
<p>$ export ORACLE_HOME=/u01/app/o11g/product/11.1.0/db_1</p>
<p>$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH</p>
<p>$ export PATH=$ORACLE_HOME/bin:$PATH</p>
<p>3. Start the SQL*Plus with <em>sysdba</em> privilege</p>
<p>4. Start the Oracle11g database using the &#8216;<em>startup upgrade</em>&#8216;</p>
<p>SQL&gt; startup upgrade</p>
<p>5. Verify the version of Oracle</p>
<p>SQL&gt; select * from v$version;</p>
<p>BANNER</p>
<p><span style="font-size:small;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p><span style="font-size:small;">Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 &#8211; Production</span></p>
<p><span style="font-size:small;">PL/SQL Release 11.1.0.6.0 &#8211; Production</span></p>
<p><span style="font-size:small;">CORE    11.1.0.6.0      Production</span></p>
<p><span style="font-size:small;">TNS for Linux: Version 11.1.0.6.0 &#8211; Production</span></p>
<p>NLSRTL Version 11.1.0.6.0 &#8211; Production</p>
<p>6. Upgrade the data dictionary tables via the <em>catupgrd.sql</em> script.</p>
<p>SQL&gt; @$ORACLE_HOME/rdbms/admin/catupgrd.sql</p>
<p>From hereafter the database downtime will starts and the upgrading a database will take its own time to completes depending upon the size of the database and environment.</p>
<p>Once the upgrades completes, the database will shutdown automatically</p>
<h2>5. Post Upgrading Steps</h2>
<p>1. Once the upgrade completed, reinitialize the system parameters for normal startup and bounce back the database by login again as <em>sys</em> with <em>sysdba</em> privilege, and start the database to normal mode</p>
<p>SQL&gt; startup</p>
<p>2. Check the dba_registry for the components and its status</p>
<p>SQL&gt; select comp_name, status, version from dba_registry;</p>
<p>3. Run &#8216;<em>utlu111s.sql</em>&#8216; script to display the results of the upgrade</p>
<p>SQL&gt; @$ORACLE_HOME/rdbms/admin/utlu111s.sql</p>
<p>4. Run &#8216;<em>catuppst.sql</em>&#8216; script from<em> $ORACLE_HOME/rdbms/admin</em> directory, to perform upgrade actions that change the database from UPGRADE mode to the NORMAL mode</p>
<p>SQL&gt; @$ORACLE_HOME/rdbms/admin/catuppst.sql</p>
<p>5. Find for the invalid objects after the upgrade</p>
<p>SQL&gt; select count(*) from dba_objects where status=&#8217;INVALID&#8217;;</p>
<p>COUNT(*)</p>
<p>&#8212;&#8212;&#8212;</p>
<p>1572</p>
<p>6. Run &#8216;<em>$ORACLE_HOME/rdbms/admin/utlrp.sql</em>&#8216; script to recompile the INVALID objects</p>
<p>SQL&gt; @$ORACLE_HOME/rdbms/admin/utlrp.sql</p>
<p>7. Again find the status for invalid objects after recompiling them</p>
<p>SQL&gt; select count(*) from dba_objects where status=&#8217;INVALID&#8217;;</p>
<p>COUNT(*)</p>
<p>&#8212;&#8212;&#8212;-</p>
<p>0</p>
<h2>This will completes the manually upgrading the Oracle database from 10.2.0.1 to 11.1.0.6</h2>
<h1>Using the Database Upgrade Assistant (DBUA)</h1>
<p>You can start the Database Upgrade Assistant (DBUA) via the shipped utility in Oracle 11g, the <strong>dbua </strong>command (in UNIX environments) or by selecting ªDatabase Upgrade Assistantº from the Oracle Configuration and Migration Tools menu option (in Windows environments).</p>
<p>The scripts we had executing in the Manually in the previous method will be executed and taken care by the DBUA utility</p>
<p>Follow the steps to upgrade the Oracle 10.2.0.1 database to 11.1.0.6:</p>
<p>1. Login in as Oracle 11g user, and initiate all the variables need for the environment</p>
<p>$ export ORACLE_BASE=/u01/app/o11g</p>
<p>$ export ORACLE_HOME=/u01/app/o11g/product/11.1.0/db_1</p>
<p>$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH</p>
<p>$ export PATH=$ORACLE_HOME/bin:$PATH</p>
<p>2. Confirm the Oracle 10g database name and ORACLE_HOME path is entered in /etc/oratab file</p>
<p>$ cat /etc/oratab</p>
<p>orcl:/u01/app/o10g/product/10.2.0/db_1:N</p>
<p>3. Execute the dbca utility from Oracle 11g&#8217;s path</p>
<p>$ $ORACLE_HOME/bin/dbua</p>
<p>4. A Welcome screen will appear, click Next</p>
<p><a href="http://naveenkumarsr.files.wordpress.com/2011/02/01.png"><img class="alignnone size-medium wp-image-249" title="01" src="http://naveenkumarsr.files.wordpress.com/2011/02/01.png?w=300&#038;h=210" alt="" width="300" height="210" /></a></p>
<p>5. Select the database you want to upgrade from the list of available databases. You can upgrade only one database at a time. For all the list of databases, the database names should be listed in /etc/oratab file (Step 2). Click Next</p>
<p><a href="http://naveenkumarsr.files.wordpress.com/2011/02/02.png"><img class="alignnone size-medium wp-image-250" title="02" src="http://naveenkumarsr.files.wordpress.com/2011/02/02.png?w=300&#038;h=210" alt="" width="300" height="210" /></a></p>
<p>6. The dbua utility will check the warnings should be taken care during the upgrading</p>
<p><a href="http://naveenkumarsr.files.wordpress.com/2011/02/03.png"><img class="alignnone size-medium wp-image-251" title="03" src="http://naveenkumarsr.files.wordpress.com/2011/02/03.png?w=300&#038;h=172" alt="" width="300" height="172" /></a></p>
<p>Here again we need to solve the warning like update the timezone file version as a critical warning, and remaining warning you can skip. If you continue with this screen, at the point of in time the dbua will through an error and the upgrading the database will fail.</p>
<p>Its a better practice to solve the warnings.</p>
<h2>Upgrading the timezone file version from 2 to 4</h2>
<p>Following are the critical steps to be executed based on above warnings. These commands are to be executed while connecting to database from 10g Oracle Home</p>
<p><strong>WARNING: –&gt; Database is using an old timezone file version.</strong></p>
<p>…<strong>. Patch the 10.2.0.1.0 database to timezone file version 4</strong></p>
<p>…<strong>. BEFORE upgrading the database. Re-run utlu111i.sql after</strong></p>
<p>…<strong>. patching the database to record the new timezone file version.</strong></p>
<p>Finding the Version of existing timezone files in Oracle 10g:</p>
<p><span style="font-size:small;">SQL&gt; select * from v$timezone_file;</span></p>
<p><span style="font-size:small;">FILENAME        VERSION</span></p>
<p><span style="font-size:small;">&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;-</span></p>
<p><span style="font-size:small;">timezlrg.dat 		  2</span></p>
<p>For 10.2.0.1, check the metalink note <em>ID 413671.1</em>. The table which defines the patch to be applied to upgrade the timezone.</p>
<p>If there is no official patchset for the version you are currently having then you can Identify patch for a different patchset, but with same release.</p>
<p>For example if you run 10.2.0.1 and there is no particular patch release. In this case we can make use of patch 5632264 for 10.2.0.2 and 10.2.0.3, and this will be applicable to 10.2.0.1 as well.</p>
<p>Please follow the metalink note <em>ID 396387.1</em></p>
<p>Once you identify the correct patchset (5632264 for 10.2.X), download the same and unzip it.</p>
<p>1. Unzip the patch file <em>p5632264_10203_Linux-x86-64.zip</em></p>
<p>$ unzip p5632264_10203_Linux-x86-64.zip</p>
<p>2. Change directory to the 5632264 and list, which will contain the timezone files</p>
<p>3. Backup the existing timezone files in the Oracle10g&#8217;s ORACLE_HOME, these will be present under <em>$ORACLE_HOME/oracore/zoneinfo</em> directory</p>
<p>4. Copy the newly extracted files to the ORACLE_HOME path</p>
<p>$ cp -r 5632264/files/oracore/zoneinfo $ORACLE_HOME/oracore/zoneinfo</p>
<p>5. If the new timezone changes has to come to an effect, restart the database and select the timezone</p>
<p>SQL&gt; select * from v$timezone_file;</p>
<p>FILENAME        VERSION</p>
<p>&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;-</p>
<p>timezlrg.dat          4</p>
<p><strong>NOTE:</strong></p>
<p>Do not follow this method of applying the patch for all the patch-sets. That will corrupt the ORACLE_HOME path and may need to reinstall the software again. For each individual patch installation, please refer to the Oracle Patchset Documentation&#8217;s</p>
<h3>To Solve Stale Optimizer Statistics Warning</h3>
<p><span style="font-size:small;"><strong>WARNING: &#8211;&gt; Database contains stale optimizer statistics.</strong></span></p>
<p><span style="font-size:small;"><strong>&#8230;. Refer to the 11g Upgrade Guide for instructions to update</strong></span></p>
<p><span style="font-size:small;"><strong>&#8230;. statistics prior to upgrading the database.</strong></span></p>
<p><span style="font-size:small;"><strong>&#8230;. Component Schemas with stale statistics:</strong></span></p>
<p><span style="font-size:small;"><strong>&#8230;.   SYS</strong></span></p>
<p><span style="font-size:small;"><strong>&#8230;.   OLAPSYS</strong></span></p>
<p><strong>&#8230;.   SYSMAN</strong></p>
<p>Gather the dictionary statistics by executing the PL/SQL blocks</p>
<p>SQL&gt; EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;</p>
<p>PL/SQL procedure successfully completed.</p>
<p>SQL&gt; EXEC DBMS_STATS.GATHER_SCHEMA_STATS(&#8216;SYS&#8217;);</p>
<p>PL/SQL procedure successfully completed.</p>
<p>SQL&gt; EXEC DBMS_STA<span style="font-size:small;">TS.GATHER_SCHEMA_STATS(&#8216;OLAPSYS&#8217;);</span></p>
<p>PL/SQL procedure successfully completed.</p>
<p>SQL&gt; EXEC DBMS_STATS.GATHER_SCHEMA_STATS(&#8216;SYSMAN&#8217;);</p>
<p>PL/SQL procedure successfully completed.</p>
<h3>NOTE:</h3>
<p>Gather the dictionary statistics by executing DBMS_STATS.GATHER_SCHEMA_STATS for all the users as per the .warning.</p>
<p>This will solve the main warnings that got from the above step, the remaining warning can be ignored.</p>
<p>Rerun the <strong>dbua</strong> utility again and clear the previous steps, now the warnings will be ease to upgrading the database,  you can ignore these warnings</p>
<p><a href="http://naveenkumarsr.files.wordpress.com/2011/02/04.png"><img class="alignnone size-medium wp-image-252" title="04" src="http://naveenkumarsr.files.wordpress.com/2011/02/04.png?w=300&#038;h=211" alt="" width="300" height="211" /></a></p>
<p>Click &#8216;Yes&#8217;, this will continue with the further steps of upgrading.</p>
<p>7. The next screen will allow to select the ORACLE_BASE and the Diagnostic Destination, Click Next</p>
<p><a href="http://naveenkumarsr.files.wordpress.com/2011/02/05.png"><img class="alignnone size-medium wp-image-253" title="05" src="http://naveenkumarsr.files.wordpress.com/2011/02/05.png?w=300&#038;h=210" alt="" width="300" height="210" /></a></p>
<p>8. You can then select to have your database files moved during the upgrade process. Click Next</p>
<p><a href="http://naveenkumarsr.files.wordpress.com/2011/02/08.png"><img class="alignnone size-medium wp-image-254" title="08" src="http://naveenkumarsr.files.wordpress.com/2011/02/08.png?w=300&#038;h=210" alt="" width="300" height="210" /></a></p>
<p>9. DBUA will then prompt you for a flash recovery area destination for the storage of backup and-recovery-related files. Click Next</p>
<p><a href="http://naveenkumarsr.files.wordpress.com/2011/02/09.png"><img class="alignnone size-medium wp-image-255" title="09" src="http://naveenkumarsr.files.wordpress.com/2011/02/09.png?w=300&#038;h=210" alt="" width="300" height="210" /></a></p>
<p><span style="font-size:small;">10. DBUA will then prompt you to recompile invalid PL/SQL objects following the upgrade. If you do not recompile these objects after the upgrade, the first user of these objects will be forced to wait while Oracle performs a run-time recompilation. Click Next</span></p>
<p><span style="font-size:small;"><a href="http://naveenkumarsr.files.wordpress.com/2011/02/10.png"><img class="alignnone size-medium wp-image-256" title="10" src="http://naveenkumarsr.files.wordpress.com/2011/02/10.png?w=300&#038;h=210" alt="" width="300" height="210" /></a><br />
</span></p>
<p><span style="font-size:small;">11. DBUA will prompt for back up the database as part of the upgrade process. If already backed up the database prior to starting DBUA, elect to skip this step. If you choose to have DBUA back up the database, it will shut down the database and perform an offline backup. DBUA will also create a batch file in that directory to automate the restoration of those files to their earlier locations. Click Next</span></p>
<p><span style="font-size:small;"><a href="http://naveenkumarsr.files.wordpress.com/2011/02/11.png"><img class="alignnone size-medium wp-image-257" title="11" src="http://naveenkumarsr.files.wordpress.com/2011/02/11.png?w=300&#038;h=210" alt="" width="300" height="210" /></a><br />
</span></p>
<p>12. If Oracle detects multiple Oracle Net listeners on the server, you will then be prompted to select a listener for your database, and the network configuration details will be displayed for your review and editing. Click Continue</p>
<p><a href="http://naveenkumarsr.files.wordpress.com/2011/02/12.png"><img class="alignnone size-medium wp-image-258" title="12" src="http://naveenkumarsr.files.wordpress.com/2011/02/12.png?w=300&#038;h=142" alt="" width="300" height="142" /></a></p>
<p>13. A final summary screen displays your choices for the upgrade, and the upgrade starts when you accept them.  Click Finish</p>
<p><a href="http://naveenkumarsr.files.wordpress.com/2011/02/13.png"><img class="alignnone size-medium wp-image-259" title="13" src="http://naveenkumarsr.files.wordpress.com/2011/02/13.png?w=300&#038;h=210" alt="" width="300" height="210" /></a><br />
14. The DBUA will start upgrading the database, the upgrading logs can be read in the ORACLE_BASE path</p>
<p><a href="http://naveenkumarsr.files.wordpress.com/2011/02/14.png"><img class="alignnone size-medium wp-image-260" title="14" src="http://naveenkumarsr.files.wordpress.com/2011/02/14.png?w=300&#038;h=211" alt="" width="300" height="211" /></a></p>
<p>15. The DBUA will complete the upgrading the database, Click &#8216;OK&#8217;</p>
<p><a href="http://naveenkumarsr.files.wordpress.com/2011/02/15.png"><img class="alignnone size-medium wp-image-261" title="15" src="http://naveenkumarsr.files.wordpress.com/2011/02/15.png?w=300&#038;h=211" alt="" width="300" height="211" /></a></p>
<p>16. After the upgrade has completed, DBUA will display the Upgrade Results screen, showing the steps performed, the related log files, and the status.</p>
<p><a href="http://naveenkumarsr.files.wordpress.com/2011/02/16.png"><img class="alignnone size-medium wp-image-262" title="16" src="http://naveenkumarsr.files.wordpress.com/2011/02/16.png?w=300&#038;h=272" alt="" width="300" height="272" /></a></p>
<p>17. The section of the screen titled Password Management allows you to manage the passwords and the locked/unlocked status of accounts in the upgraded database.</p>
<p><a href="http://naveenkumarsr.files.wordpress.com/2011/02/17.png"><img class="alignnone size-medium wp-image-263" title="17" src="http://naveenkumarsr.files.wordpress.com/2011/02/17.png?w=300&#038;h=273" alt="" width="300" height="273" /></a></p>
<p>If you are not satisfied with the upgrade results, you can choose the Restore option. If you used DBUA to perform the backup, the restoration will be performed automatically; otherwise, you will need to perform the restoration manually.</p>
<p>When you exit DBUA after successfully upgrading the database, DBUA removes the old database&#8217;s entry in the network listener configuration file, inserts an entry for the upgraded database, and reloads the file.</p>
<h1>After Upgrading</h1>
<p>Following the upgrade, you should double-check the configuration and parameter files related to the database, particularly if the instance name changed in the migration process. These files include</p>
<p>The tnsnames.ora file</p>
<p>The listener.ora file</p>
<h3>NOTE:</h3>
<p>You will need to manually reload the modified listener.ora file if you are not using DBUA to perform the upgrade.</p>
<p>Additional post-upgrade steps should include verifying the values for all environment variables (such as ORACLE_HOME and PATH) and upgrading the recovery catalog.</p>
<p>You should review your database initialization parameters to make sure deprecated and obsolete parameters have been removed; these should have been identified during the migration process. Be sure to recompile any programs you have written that rely on the database software libraries.</p>
<p>Once the upgrade has completed, perform the functional and performance tests identified before the upgrade began. If there are issues with the database functionality, attempt to identify any parameter settings or missing objects that may be impacting the test results. If the problem cannot be resolved, you may need to revert to the prior release.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/naveenkumarsr.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/naveenkumarsr.wordpress.com/223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/naveenkumarsr.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/naveenkumarsr.wordpress.com/223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/naveenkumarsr.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/naveenkumarsr.wordpress.com/223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/naveenkumarsr.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/naveenkumarsr.wordpress.com/223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/naveenkumarsr.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/naveenkumarsr.wordpress.com/223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/naveenkumarsr.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/naveenkumarsr.wordpress.com/223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/naveenkumarsr.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/naveenkumarsr.wordpress.com/223/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=223&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://naveenkumarsr.wordpress.com/2011/02/16/upgrad-oracle/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c771c1c79abc1e3be4754f9e87f210a?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">Naveen Kumar S.R.</media:title>
		</media:content>

		<media:content url="http://naveenkumarsr.files.wordpress.com/2011/02/ver1.png?w=300" medium="image">
			<media:title type="html">ver</media:title>
		</media:content>

		<media:content url="http://naveenkumarsr.files.wordpress.com/2011/02/01.png?w=300" medium="image">
			<media:title type="html">01</media:title>
		</media:content>

		<media:content url="http://naveenkumarsr.files.wordpress.com/2011/02/02.png?w=300" medium="image">
			<media:title type="html">02</media:title>
		</media:content>

		<media:content url="http://naveenkumarsr.files.wordpress.com/2011/02/03.png?w=300" medium="image">
			<media:title type="html">03</media:title>
		</media:content>

		<media:content url="http://naveenkumarsr.files.wordpress.com/2011/02/04.png?w=300" medium="image">
			<media:title type="html">04</media:title>
		</media:content>

		<media:content url="http://naveenkumarsr.files.wordpress.com/2011/02/05.png?w=300" medium="image">
			<media:title type="html">05</media:title>
		</media:content>

		<media:content url="http://naveenkumarsr.files.wordpress.com/2011/02/08.png?w=300" medium="image">
			<media:title type="html">08</media:title>
		</media:content>

		<media:content url="http://naveenkumarsr.files.wordpress.com/2011/02/09.png?w=300" medium="image">
			<media:title type="html">09</media:title>
		</media:content>

		<media:content url="http://naveenkumarsr.files.wordpress.com/2011/02/10.png?w=300" medium="image">
			<media:title type="html">10</media:title>
		</media:content>

		<media:content url="http://naveenkumarsr.files.wordpress.com/2011/02/11.png?w=300" medium="image">
			<media:title type="html">11</media:title>
		</media:content>

		<media:content url="http://naveenkumarsr.files.wordpress.com/2011/02/12.png?w=300" medium="image">
			<media:title type="html">12</media:title>
		</media:content>

		<media:content url="http://naveenkumarsr.files.wordpress.com/2011/02/13.png?w=300" medium="image">
			<media:title type="html">13</media:title>
		</media:content>

		<media:content url="http://naveenkumarsr.files.wordpress.com/2011/02/14.png?w=300" medium="image">
			<media:title type="html">14</media:title>
		</media:content>

		<media:content url="http://naveenkumarsr.files.wordpress.com/2011/02/15.png?w=300" medium="image">
			<media:title type="html">15</media:title>
		</media:content>

		<media:content url="http://naveenkumarsr.files.wordpress.com/2011/02/16.png?w=300" medium="image">
			<media:title type="html">16</media:title>
		</media:content>

		<media:content url="http://naveenkumarsr.files.wordpress.com/2011/02/17.png?w=300" medium="image">
			<media:title type="html">17</media:title>
		</media:content>
	</item>
		<item>
		<title>ASM to Non-ASM</title>
		<link>http://naveenkumarsr.wordpress.com/2010/12/16/asm-to-nonasm/</link>
		<comments>http://naveenkumarsr.wordpress.com/2010/12/16/asm-to-nonasm/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 13:11:38 +0000</pubDate>
		<dc:creator>Naveen K. SR</dc:creator>
				<category><![CDATA[ASM]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://naveenkumarsr.wordpress.com/?p=218</guid>
		<description><![CDATA[Migrating ASM Database to Non-ASM 1.Find the actual paths of all the files like spfile, controlfile, datafiles, tempfiles, and onlinelog files. 2.Create the parameterfile: A parameterfile can be created from spfile which has been stored in ASM diskgroup SQL&#62; create pfile from spfile=&#8217;+dg1/orcl/parameterfile/spfile.260.737833097&#8242;; File created. 3.Shutdown the database SQL&#62; shu immediate 4.Make the parameter file [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=218&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } 		H1 { margin-bottom: 0.08in } 		H1.western { font-family: "Nimbus Sans L", sans-serif; font-size: 16pt } 		H1.cjk { font-family: "Luxi Sans"; font-size: 16pt } 		H1.ctl { font-family: "Luxi Sans"; font-size: 16pt } --></p>
<h1>Migrating ASM Database to Non-ASM</h1>
<p>1.Find the actual paths of all the files like spfile, controlfile, datafiles, tempfiles, and onlinelog files.</p>
<p>2.Create the parameterfile: A parameterfile can be created from spfile which has been stored in ASM diskgroup</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; create pfile from spfile=&#8217;+dg1/orcl/parameterfile/spfile.260.737833097&#8242;;</span></p>
<p><span style="font-family:Courier,monospace;">File created.</span></p>
<p>3.Shutdown the database</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; shu immediate</span></p>
<p>4.Make the parameter file ready:</p>
<p>Edit the created pfile</p>
<p><span style="font-family:Courier,monospace;">$ vi $ORACLE_HOME/dbs/initorcl.ora</span></p>
<p>Make the necessary changes</p>
<p><span style="font-family:Courier,monospace;">*.control_files=&#8217;/u01/oracle/oradata/&#8217;</span></p>
<p><span style="font-family:Courier,monospace;">*.db_create_file_dest=&#8217;/u01/oracle/oradata&#8217;</span></p>
<p><span style="font-family:Courier,monospace;">*.db_create_online_log_dest_1=&#8217;/u01/oracle/oradata&#8217;</span></p>
<p>Save and create</p>
<p>5.Connect to RMAN</p>
<p><span style="font-family:Courier,monospace;">$ rman target /</span></p>
<p><span style="font-family:Courier,monospace;">Recovery Manager: Release 10.2.0.1.0 &#8211; Production on Thu Dec 16 14:50:07 2010</span></p>
<p><span style="font-family:Courier,monospace;">Copyright (c) 1982, 2005, Oracle.  All rights reserved.</span></p>
<p><span style="font-family:Courier,monospace;">connected to target database (not started)</span></p>
<p>6.Start the database in NOMOUNT phase usind RMAN</p>
<p><span style="font-family:Courier,monospace;">RMAN&gt; startup nomount</span></p>
<p><span style="font-family:Courier,monospace;">Oracle instance started</span></p>
<p><span style="font-family:Courier,monospace;">Total System Global Area	629145600 bytes</span></p>
<p><span style="font-family:Courier,monospace;">Fixed Size                			1220964 bytes</span></p>
<p><span style="font-family:Courier,monospace;">Variable Size           			176164508 bytes</span></p>
<p><span style="font-family:Courier,monospace;">Database Buffers        		448790528 bytes</span></p>
<p><span style="font-family:Courier,monospace;">Redo Buffers              			2969600 bytes</span></p>
<p>Now the database instance has been started with the new parameter file</p>
<p>7.Create the Controlfile: Controlfile can be created using RMAN</p>
<p><span style="font-family:Courier,monospace;">RMAN&gt; restore controlfile from &#8216;+dg1/orcl/controlfile/backup.268.737822625&#8242;;</span></p>
<p><span style="font-family:Courier,monospace;">Starting restore at 16-DEC-10</span></p>
<p><span style="font-family:Courier,monospace;">using channel ORA_DISK_1</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: copied control file copy</span></p>
<p><span style="font-family:Courier,monospace;">output filename=/u01/oracle/oradata/ORCL/controlfile/o1_mf_6jmpkwff_.ctl</span></p>
<p><span style="font-family:Courier,monospace;">Finished restore at 16-DEC-10</span></p>
<p>8.Mount the database: Using the created controlfile mount the database using RMAN</p>
<p><span style="font-family:Courier,monospace;">RMAN&gt; alter database mount;</span></p>
<p><span style="font-family:Courier,monospace;">database mounted</span></p>
<p><span style="font-family:Courier,monospace;">released channel: ORA_DISK_1</span></p>
<p>9.Backup the datafiles: Backup of datafiles can be done using RMAN</p>
<p><span style="font-family:Courier,monospace;">RMAN&gt; backup as copy database format &#8216;/u01/oracle/oradata/ORCL/datafile/%U&#8217;;</span></p>
<p><span style="font-family:Courier,monospace;">Starting backup at 16-DEC-10</span></p>
<p><span style="font-family:Courier,monospace;">using channel ORA_DISK_1</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: starting datafile copy</span></p>
<p><span style="font-family:Courier,monospace;">input datafile fno=00003 name=+DG1/orcl/datafile/sysaux.258.737822695</span></p>
<p><span style="font-family:Courier,monospace;">output filename=/u01/oracle/oradata/ORCL/datafile/data_D-ORCL_I-1265601965_TS-SYSAUX_FNO-3_0alvn73i tag=TAG20101216T145754 recid=11 stamp=737909932</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:05</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: starting datafile copy</span></p>
<p><span style="font-family:Courier,monospace;">input datafile fno=00001 name=+DG1/orcl/datafile/system.257.737822751</span></p>
<p><span style="font-family:Courier,monospace;">output filename=/u01/oracle/oradata/ORCL/datafile/data_D-ORCL_I-1265601965_TS-SYSTEM_FNO-1_0blvn75j tag=TAG20101216T145754 recid=12 stamp=737909992</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:56</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: starting datafile copy</span></p>
<p><span style="font-family:Courier,monospace;">input datafile fno=00002 name=+DG1/orcl/datafile/undotbs.261.737822817</span></p>
<p><span style="font-family:Courier,monospace;">output filename=/u01/oracle/oradata/ORCL/datafile/data_D-ORCL_I-1265601965_TS-UNDOTBS_FNO-2_0clvn77b tag=TAG20101216T145754 recid=13 stamp=737910007</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: starting datafile copy</span></p>
<p><span style="font-family:Courier,monospace;">input datafile fno=00004 name=+DG1/orcl/datafile/def_perm.256.737822843</span></p>
<p><span style="font-family:Courier,monospace;">output filename=/u01/oracle/oradata/ORCL/datafile/data_D-ORCL_I-1265601965_TS-DEF_PERM_FNO-4_0dlvn77q tag=TAG20101216T145754 recid=14 stamp=737910016</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:08</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: starting datafile copy</span></p>
<p><span style="font-family:Courier,monospace;">input datafile fno=00005 name=+DG1/orcl/datafile/tbs1.262.737823963</span></p>
<p><span style="font-family:Courier,monospace;">output filename=/u01/oracle/oradata/ORCL/datafile/data_D-ORCL_I-1265601965_TS-TBS1_FNO-5_0elvn782 tag=TAG20101216T145754 recid=15 stamp=737910021</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: starting datafile copy</span></p>
<p><span style="font-family:Courier,monospace;">copying current control file</span></p>
<p><span style="font-family:Courier,monospace;">output filename=/u01/oracle/oradata/ORCL/datafile/cf_D-ORCL_id-1265601965_0flvn789 tag=TAG20101216T145754 recid=16 stamp=737910027</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:04</span></p>
<p><span style="font-family:Courier,monospace;">Finished backup at 16-DEC-10</span></p>
<p>10.Switch the database: Switch the database to the copy of datafiles created in the last step</p>
<p><span style="font-family:Courier,monospace;">RMAN&gt; switch database to copy;</span></p>
<p><span style="font-family:Courier,monospace;">datafile 1 switched to datafile copy &#8220;/u01/oracle/oradata/ORCL/datafile/data_D-ORCL_I-1265601965_TS-SYSTEM_FNO-1_0blvn75j&#8221;</span></p>
<p><span style="font-family:Courier,monospace;">datafile 2 switched to datafile copy &#8220;/u01/oracle/oradata/ORCL/datafile/data_D-ORCL_I-1265601965_TS-UNDOTBS_FNO-2_0clvn77b&#8221;</span></p>
<p><span style="font-family:Courier,monospace;">datafile 3 switched to datafile copy &#8220;/u01/oracle/oradata/ORCL/datafile/data_D-ORCL_I-1265601965_TS-SYSAUX_FNO-3_0alvn73i&#8221;</span></p>
<p><span style="font-family:Courier,monospace;">datafile 4 switched to datafile copy &#8220;/u01/oracle/oradata/ORCL/datafile/data_D-ORCL_I-1265601965_TS-DEF_PERM_FNO-4_0dlvn77q&#8221;</span></p>
<p><span style="font-family:Courier,monospace;">datafile 5 switched to datafile copy &#8220;/u01/oracle/oradata/ORCL/datafile/data_D-ORCL_I-1265601965_TS-TBS1_FNO-5_0elvn782&#8243;</span></p>
<p>11.Open the database: Open the database using backup controlfile</p>
<p>Connect to the SQL prompt</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; recover database using backup controlfile until cancel;</span></p>
<p><span style="font-family:Courier,monospace;">ORA-00279: change 186477 generated at 12/16/2010 14:46:06 needed for thread 1</span></p>
<p><span style="font-family:Courier,monospace;">ORA-00289: suggestion :</span></p>
<p><span style="font-family:Courier,monospace;">/u01/oracle/product/10.2.0/db_1/dbs/arch1_87_737821229.dbf</span></p>
<p><span style="font-family:Courier,monospace;">ORA-00280: change 186477 for thread 1 is in sequence #87</span></p>
<p>&nbsp;</p>
<p><span style="font-family:Courier,monospace;">Specify log: {&lt;RET&gt;=suggested | filename | AUTO | CANCEL}</span></p>
<p><strong><span style="font-family:Courier,monospace;">cancel</span></strong></p>
<p><span style="font-family:Courier,monospace;">Media recovery cancelled.</span></p>
<p>12.Open the database: Open the database with resetlogs</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter database open resetlogs;</span></p>
<p><span style="font-family:Courier,monospace;">Database altered.</span></p>
<p>13.Create the TEMP files: Though the RMAN will backup only the datafiles, we need to manually update the temporary tablespaces by adding the tempfiles</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter tablespace def_temp add tempfile;</span></p>
<p><span style="font-family:Courier,monospace;">Tablespace altered.</span></p>
<p>&nbsp;</p>
<p>Identify the No, of tempfiles</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; select name from v$tempfile;</span></p>
<p><span style="font-family:Courier,monospace;">NAME</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+DG1/orcl/tempfile/def_temp.264.737822965</span></p>
<p><span style="font-family:Courier,monospace;">/u01/oracle/oradata/ORCL/datafile/o1_mf_def_temp_6jmqf6q4_.tmp</span></p>
<p>Remove the tempfile which is part of ASM diskgroup</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter tablespace def_temp drop tempfile &#8216;+DG1/orcl/tempfile/def_temp.264.737822965&#8242;;</span></p>
<p><span style="font-family:Courier,monospace;">Tablespace altered.</span></p>
<p>14.Adding onlinelog files:</p>
<p>Identify the existing onlinelog files and they status</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; select group#, status from v$log;</span></p>
<p><span style="font-family:Courier,monospace;">GROUP# STATUS</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p><span style="font-family:Courier,monospace;">1      ACTIVE<br />
</span></p>
<p><span style="font-family:Courier,monospace;">2      CURRENT</span></p>
<p>&nbsp;</p>
<p>Add some more logfile group</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter database add logfile size 5m;</span></p>
<p><span style="font-family:Courier,monospace;">Database altered.</span></p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter database add logfile size 5m;</span></p>
<p><span style="font-family:Courier,monospace;">Database altered.</span></p>
<p>15.Identify the Logfile group status and and start removing the groups which are part of ASM diskgroup</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; select group#, status from v$log; </span></p>
<p><span style="font-family:Courier,monospace;">GROUP# STATUS</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p><span style="font-family:Courier,monospace;">1      ACTIVE<br />
</span></p>
<p><span style="font-family:Courier,monospace;">2      CURRENT</span></p>
<p><span style="font-family:Courier,monospace;">3      UNUSED</span></p>
<p><span style="font-family:Courier,monospace;">4      UNUSED<br />
</span></p>
<p>16.Perform the manual logswitch so that the logfiles which are part of ASM diskgroup becomes INACTIVE</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter system switch logfile;</span></p>
<p><span style="font-family:Courier,monospace;">System altered.</span></p>
<p>17.Remove the INACTIVE groups which are part of ASM diskgroup</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; select group#, status from v$log;</span></p>
<p><span style="font-family:Courier,monospace;">GROUP# STATUS</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p><span style="font-family:Courier,monospace;">1      INACTIVE</span></p>
<p><span style="font-family:Courier,monospace;">2      INACTIVE</span></p>
<p><span style="font-family:Courier,monospace;">3      INACTIVE</span></p>
<p><span style="font-family:Courier,monospace;">4      CURRENT</span></p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter database drop logfile group 1;</span></p>
<p><span style="font-family:Courier,monospace;">Database altered.</span></p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter database drop logfile group 2;</span></p>
<p><span style="font-family:Courier,monospace;">Database altered.</span></p>
<p>18.Identify the proper onlinelog files which are part of filesystem</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; select group#, member from v$logfile;</span></p>
<p><span style="font-family:Courier,monospace;">GROUP#  MEMBER</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;&#8212;&#8212;-  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p><span style="font-family:Courier,monospace;">1       /u01/oracle/oradata/ORCL/onlinelog/o1_mf_1_6jmqhsl8_.log</span></p>
<p><span style="font-family:Courier,monospace;">2             /u01/oracle/oradata/ORCL/onlinelog/o1_mf_2_6jmqhxdr_.log</span></p>
<p>19.Delete the ASM diskgroup files: If you want to delete the ASM diskgroup files that can be done by using RMAN</p>
<p><span style="font-family:Courier,monospace;">RMAN&gt; delete noprompt force copy;</span></p>
<p><span style="font-family:Courier,monospace;">using target database control file instead of recovery catalog</span></p>
<p><span style="font-family:Courier,monospace;">allocated channel: ORA_DISK_1</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: sid=27 devtype=DISK</span></p>
<p><span style="font-family:Courier,monospace;">specification does not match any archive log in the recovery catalog</span></p>
<p><span style="font-family:Courier,monospace;">List of Datafile Copies</span></p>
<p><span style="font-family:Courier,monospace;">Key     File S Completion Time Ckp SCN    Ckp Time        Name</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;&#8212;- &#8212;- &#8211; &#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212; &#8212;-</span></p>
<p><span style="font-family:Courier,monospace;">17      1    A 16-DEC-10       186477     16-DEC-10       +DG1/orcl/datafile/system.257.737822751</span></p>
<p><span style="font-family:Courier,monospace;">18      2    A 16-DEC-10       186477     16-DEC-10       +DG1/orcl/datafile/undotbs.261.737822817</span></p>
<p><span style="font-family:Courier,monospace;">19      3    A 16-DEC-10       186477     16-DEC-10       +DG1/orcl/datafile/sysaux.258.737822695</span></p>
<p><span style="font-family:Courier,monospace;">20      4    A 16-DEC-10       186477     16-DEC-10       +DG1/orcl/datafile/def_perm.256.737822843</span></p>
<p><span style="font-family:Courier,monospace;">21      5    A 16-DEC-10       186477     16-DEC-10       +DG1/orcl/datafile/tbs1.262.737823963</span></p>
<p><span style="font-family:Courier,monospace;">List of Control File Copies</span></p>
<p><span style="font-family:Courier,monospace;">Key     S Completion Time Ckp SCN    Ckp Time        Name</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;&#8212;- &#8211; &#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212; &#8212;-</span></p>
<p><span style="font-family:Courier,monospace;">16      A 16-DEC-10       186477     16-DEC-10       /u01/oracle/oradata/ORCL/datafile/cf_D-ORCL_id-1265601965_0flvn789</span></p>
<p><span style="font-family:Courier,monospace;">deleted datafile copy</span></p>
<p><span style="font-family:Courier,monospace;">datafile copy filename=+DG1/orcl/datafile/system.257.737822751 recid=17 stamp=737910182</span></p>
<p><span style="font-family:Courier,monospace;">deleted datafile copy</span></p>
<p><span style="font-family:Courier,monospace;">datafile copy filename=+DG1/orcl/datafile/undotbs.261.737822817 recid=18 stamp=737910182</span></p>
<p><span style="font-family:Courier,monospace;">deleted datafile copy</span></p>
<p><span style="font-family:Courier,monospace;">datafile copy filename=+DG1/orcl/datafile/sysaux.258.737822695 recid=19 stamp=737910182</span></p>
<p><span style="font-family:Courier,monospace;">deleted datafile copy</span></p>
<p><span style="font-family:Courier,monospace;">datafile copy filename=+DG1/orcl/datafile/def_perm.256.737822843 recid=20 stamp=737910182</span></p>
<p><span style="font-family:Courier,monospace;">deleted datafile copy</span></p>
<p><span style="font-family:Courier,monospace;">datafile copy filename=+DG1/orcl/datafile/tbs1.262.737823963 recid=21 stamp=737910182</span></p>
<p><span style="font-family:Courier,monospace;">deleted control file copy</span></p>
<p><span style="font-family:Courier,monospace;">Deleted 5 objects</span></p>
<p>20.Delete the necessary files which are part of ASM diskgroup by connect to &#8216;asmcmd&#8217; interactive mode</p>
<p>Now entire database is placed out of the ASM diskgroup</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/naveenkumarsr.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/naveenkumarsr.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/naveenkumarsr.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/naveenkumarsr.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/naveenkumarsr.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/naveenkumarsr.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/naveenkumarsr.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/naveenkumarsr.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/naveenkumarsr.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/naveenkumarsr.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/naveenkumarsr.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/naveenkumarsr.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/naveenkumarsr.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/naveenkumarsr.wordpress.com/218/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=218&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://naveenkumarsr.wordpress.com/2010/12/16/asm-to-nonasm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c771c1c79abc1e3be4754f9e87f210a?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">Naveen Kumar S.R.</media:title>
		</media:content>
	</item>
		<item>
		<title>Non ASM to ASM</title>
		<link>http://naveenkumarsr.wordpress.com/2010/12/15/nonasm-to-asm/</link>
		<comments>http://naveenkumarsr.wordpress.com/2010/12/15/nonasm-to-asm/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 12:16:37 +0000</pubDate>
		<dc:creator>Naveen K. SR</dc:creator>
				<category><![CDATA[ASM]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://naveenkumarsr.wordpress.com/?p=213</guid>
		<description><![CDATA[Converting Non-ASM Database to ASM Database 1.Create the ASM instance and start the instance. Add the diskgroups say DG1. DG1 is used for datafile, controlfile, redologfile, and tempfiles. 2.Create a database &#8216;ORCL&#8217; in &#8216;/u01/oracle/oradata/&#8217; 3.Shutdown the database if it is running using normal mode SQL&#62; shu 4.If your database was running in spfile, create pfile [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=213&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } 		H1 { margin-bottom: 0.08in } 		H1.western { font-family: "Nimbus Sans L", sans-serif; font-size: 16pt } 		H1.cjk { font-family: "Luxi Sans"; font-size: 16pt } 		H1.ctl { font-family: "Luxi Sans"; font-size: 16pt } --></p>
<h1>Converting Non-ASM Database to ASM Database</h1>
<p>1.Create the ASM instance and start the instance.  Add the diskgroups say DG1. DG1 is used for datafile, controlfile, redologfile, and tempfiles.</p>
<p>2.Create a database &#8216;ORCL&#8217; in &#8216;<span style="font-family:Courier,monospace;">/u01/oracle/oradata/&#8217;</span></p>
<p>3.Shutdown the database if it is running using normal mode</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; shu</span></p>
<p>4.If your database was running in spfile, create pfile from spfile</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; create pfile from spfile;</span></p>
<p>5.Edit the pfile</p>
<p><span style="font-family:Courier,monospace;">$ vi $ORACLE_HOME/dbs/initORCL.ora</span></p>
<p>6.Make the necessary changes</p>
<p><span style="font-family:Courier,monospace;">CONTROL_FILES= &#8216;+DG1&#8242;</span></p>
<p><span style="font-family:Courier,monospace;">DB_CREATE_FILE_DEST=&#8217;DG1&#8242;</span></p>
<p><span style="font-family:Courier,monospace;">DB_CREATE_ONLINE_LOG_DEST_1=&#8217;DG1&#8242;</span></p>
<p><span style="font-family:Courier,monospace;">&#8230;&#8230;</span></p>
<p>7.Execute the RMAN utility,</p>
<p><span style="font-family:Courier,monospace;">$ export ORACLE_SID=ORCL</span></p>
<p><span style="font-family:Courier,monospace;">$ rman target /</span></p>
<p><span style="font-family:Courier,monospace;">Recovery Manager: Release 10.2.0.1.0 &#8211; Production on Thu Dec 9 14:01:50 2010</span></p>
<p><span style="font-family:Courier,monospace;">Copyright (c) 1982, 2005, Oracle.  All rights reserved.</span></p>
<p><span style="font-family:Courier,monospace;">connected to target database (not started)</span></p>
<p><span style="font-family:Courier,monospace;">RMAN&gt;</span></p>
<p>8.Start the RDBMS instance to nomount phase using RMAN</p>
<p><span style="font-family:Courier,monospace;">RMAN&gt; startup nomount</span></p>
<p><span style="font-family:Courier,monospace;">Oracle instance started</span></p>
<p><span style="font-family:Courier,monospace;">Total System Global Area     629145600 bytes</span></p>
<p><span style="font-family:Courier,monospace;">Fixed Size                                 1220964 bytes</span></p>
<p><span style="font-family:Courier,monospace;">Variable Size            171970204 bytes</span></p>
<p><span style="font-family:Courier,monospace;">Database Buffers                 452984832 bytes</span></p>
<p><span style="font-family:Courier,monospace;">Redo Buffers                                                             2969600 bytes</span></p>
<p>9.Restore the controlfile from the existing path using the RMAN</p>
<p><span style="font-family:Courier,monospace;">RMAN&gt; restore controlfile from &#8216;/u01/oracle/oradata/controlfile/cntrl_01.ctl&#8217;;</span></p>
<p><span style="font-family:Courier,monospace;">Starting restore at 09-DEC-10</span></p>
<p><span style="font-family:Courier,monospace;">using target database control file instead of recovery catalog</span></p>
<p><span style="font-family:Courier,monospace;">allocated channel: ORA_DISK_1</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: sid=36 devtype=DISK</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: copied control file copy</span></p>
<p><span style="font-family:Courier,monospace;">output filename=+DG1/orcl/controlfile/backup.256.737301987</span></p>
<p><span style="font-family:Courier,monospace;">Finished restore at 09-DEC-10</span></p>
<p>This will create a copy of controfile in +DG1 diskgroup. You can verify this creation by using</p>
<p><span style="font-family:Courier,monospace;">$ export ORACLE_SID=+ASM</span></p>
<p><span style="font-family:Courier,monospace;">$ asmcmd -p</span></p>
<p><span style="font-family:Courier,monospace;">ASMCMD [+] &gt;  ls</span></p>
<p><span style="font-family:Courier,monospace;">DG1</span></p>
<p><span style="font-family:Courier,monospace;">ASMCMD [+] &gt; cd DG1/ORCL/CONTROLFILE/</span></p>
<p><span style="font-family:Courier,monospace;">ASMCMD [+DG1/ORCL/CONTROLFILE] &gt; ls -l</span></p>
<p><span style="font-family:Courier,monospace;">Type         Redund  Striped  Time             Sys  Name</span></p>
<p><span style="font-family:Courier,monospace;">CONTROLFILE  HIGH    FINE     DEC 09 14:00:00  Y    Backup.261.737302375</span></p>
<p>10.Alter the database to mount stage using RMAN</p>
<p><span style="font-family:Courier,monospace;">RMAN&gt; alter database mount;</span></p>
<p><span style="font-family:Courier,monospace;">database mounted</span></p>
<p><span style="font-family:Courier,monospace;">released channel: ORA_DISK_1</span></p>
<p>Database brought to the mount state by using the controlfile which had been created in the ASM diskgroup, you can examine this by</p>
<p><span style="font-family:Courier,monospace;">$ export ORACLE_SID=ORCL</span></p>
<p><span style="font-family:Courier,monospace;">$ sqlplus / as sysdba</span></p>
<p><span style="font-family:Courier,monospace;">SQL&gt; select name from v$controlfile;</span></p>
<p><span style="font-family:Courier,monospace;">NAME</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p><span style="font-family:Courier,monospace;">DG1/orcl/controlfile/backup.261.737302375</span></p>
<p>11.Backup the database using the RMAN to the diskgroup &#8216;+DG1&#8242;</p>
<p><span style="font-family:Courier,monospace;">RMAN&gt; backup as copy database format &#8216;+dg1&#8242;;</span></p>
<p><span style="font-family:Courier,monospace;">Starting backup at 09-DEC-10</span></p>
<p><span style="font-family:Courier,monospace;">allocated channel: ORA_DISK_1</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: sid=32 devtype=DISK</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: starting datafile copy</span></p>
<p><span style="font-family:Courier,monospace;">input datafile fno=00003 name=/u01/oracle/oradata/datafile/SYSAUX01.dbf</span></p>
<p><span style="font-family:Courier,monospace;">output filename=+DG1/orcl/datafile/sysaux.257.737302111 tag=TAG20101209T140830 recid=1 stamp=737302214</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:46</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: starting datafile copy</span></p>
<p><span style="font-family:Courier,monospace;">input datafile fno=00001 name=/u01/oracle/oradata/datafile/SYSTEM01.dbf</span></p>
<p><span style="font-family:Courier,monospace;">output filename=+DG1/orcl/datafile/system.258.737302219 tag=TAG20101209T140830 recid=2 stamp=737302318</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:45</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: starting datafile copy</span></p>
<p><span style="font-family:Courier,monospace;">input datafile fno=00002 name=/u01/oracle/oradata/datafile/UNDOTBS01.dbf</span></p>
<p><span style="font-family:Courier,monospace;">output filename=+DG1/orcl/datafile/undotbs.259.737302325 tag=TAG20101209T140830 recid=3 stamp=737302340</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: starting datafile copy</span></p>
<p><span style="font-family:Courier,monospace;">input datafile fno=00004 name=/u01/oracle/oradata/datafile/DEF_PERM01.dbf</span></p>
<p><span style="font-family:Courier,monospace;">output filename=+DG1/orcl/datafile/def_perm.260.737302349 tag=TAG20101209T140830 recid=4 stamp=737302365</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: starting datafile copy</span></p>
<p><span style="font-family:Courier,monospace;">copying current control file</span></p>
<p><span style="font-family:Courier,monospace;">output filename=+DG1/orcl/controlfile/backup.261.737302375 tag=TAG20101209T140830 recid=5 stamp=737302378</span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07</span></p>
<p><span style="font-family:Courier,monospace;">Finished backup at 09-DEC-10</span></p>
<p>Now RMAN has created the copy of the database.</p>
<p>12.Switch the database files path from existing path to the new ASM diskgroup path</p>
<p><span style="font-family:Courier,monospace;">RMAN&gt; switch database to copy;</span></p>
<p><span style="font-family:Courier,monospace;">datafile 1 switched to datafile copy &#8220;+DG1/orcl/datafile/system.258.737302219&#8243;</span></p>
<p><span style="font-family:Courier,monospace;">datafile 2 switched to datafile copy &#8220;+DG1/orcl/datafile/undotbs.259.737302325&#8243;</span></p>
<p><span style="font-family:Courier,monospace;">datafile 3 switched to datafile copy &#8220;+DG1/orcl/datafile/sysaux.257.737302111&#8243;</span></p>
<p><span style="font-family:Courier,monospace;">datafile 4 switched to datafile copy &#8220;+DG1/orcl/datafile/def_perm.260.737302349&#8243;</span></p>
<p>13.<span style="font-family:Nimbus Roman No9 L,serif;">Perform incomplete recovery and open the database with the RESETLOGS option </span></p>
<p><span style="font-family:Courier,monospace;">SQL&gt; recover database using backup controlfile until cancel;</span></p>
<p><span style="font-family:Courier,monospace;">ORA-00279: change 7937583 generated at 12/09/2010 20:33:55 needed for thread 1</span></p>
<p><span style="font-family:Courier,monospace;">ORA-00289: suggestion : +DG1</span></p>
<p><span style="font-family:Courier,monospace;">ORA-00280: change 7937583 for thread 1 is in sequence #36</span></p>
<p><span style="font-family:Courier,monospace;">Specify log: {&lt;RET&gt;=suggested | filename | AUTO | CANCEL}</span></p>
<p><span style="font-family:Courier,monospace;"><strong>CANCEL</strong></span></p>
<p><span style="font-family:Courier,monospace;">Media recovery cancelled.</span></p>
<p><span style="font-family:Nimbus Roman No9 L,serif;">Then, bring the database to open phase with resetlogs option</span></p>
<p><span style="font-family:Courier,monospace;">RMAN&gt; alter database open resetlogs;</span></p>
<p><span style="font-family:Courier,monospace;">database opened</span></p>
<p>You can verify the datafile paths for the tablespaces using the views like dba_data_files or v$datafile</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; select tablespace_name, file_name from dba_data_files;</span></p>
<p><span style="font-family:Courier,monospace;">TABLESPACE_NAME	FILE_NAME</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;&#8212;&#8212;&#8212;&#8212;-	&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p><span style="font-family:Courier,monospace;">SYSTEM                  			+DG1/orcl/datafile/system.258.737302219</span></p>
<p><span style="font-family:Courier,monospace;">UNDOTBS                			+DG1/orcl/datafile/undotbs.259.737302325</span></p>
<p><span style="font-family:Courier,monospace;">SYSAUX                  			+DG1/orcl/datafile/sysaux.257.737302111</span></p>
<p><span style="font-family:Courier,monospace;">DEF_PERM              			+DG1/orcl/datafile/def_perm.260.737302349</span></p>
<p>We had one more tablespace DEF_TEMP is a default temporary tablespace made up of tempfiles. RMAN will take the structure copy of the temporary tablespaces but not the tempfile, Will see more about how to restore the tempfile in step 15</p>
<p>14.If you want to delete the old copy of datafiles, you can delete them using RMAN</p>
<p><span style="font-family:Courier,monospace;">RMAN&gt; delete copy of database;</span></p>
<p><span style="font-family:Courier,monospace;">released channel: ORA_DISK_1 </span></p>
<p><span style="font-family:Courier,monospace;">allocated channel: ORA_DISK_1 </span></p>
<p><span style="font-family:Courier,monospace;">channel ORA_DISK_1: sid=270 devtype=DISK </span></p>
<p><span style="font-family:Courier,monospace;">List of Datafile Copies </span></p>
<p><span style="font-family:Courier,monospace;">Key File S Completion Time Ckp SCN Ckp Time Name </span></p>
<p><span style="font-family:Courier,monospace;">&#8212;&#8212;- &#8212;- &#8211; &#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212; &#8212;- </span></p>
<p><span style="font-family:Courier,monospace;"> 8 1 A 09-DEC-10 392632 09-DEC-10 /u01/oracle/oradata/system01.dbf </span></p>
<p><span style="font-family:Courier,monospace;"> 9 2 A 09-DEC-10 392632 09-DEC-10 /u01/oracle/oradata/undotbs01.dbf </span></p>
<p><span style="font-family:Courier,monospace;">10 3 A 09-DEC-10 392632 09-DEC-10 /u01/oracle/oradata/sysaux01.dbf </span></p>
<p><span style="font-family:Courier,monospace;">11 4 A 09-DEC-10 392632 09-DEC-10 /u01/oracle/oradata/def_perm01.dbf </span></p>
<p><span style="font-family:Courier,monospace;">Do you really want to delete the above objects (enter YES or NO)? <strong>YES</strong> </span></p>
<p><span style="font-family:Courier,monospace;">deleted datafile copy </span></p>
<p><span style="font-family:Courier,monospace;">datafile copy filename=/u01/oracle/oradata/system01.dbf recid=8 stamp=541172332 </span></p>
<p><span style="font-family:Courier,monospace;">deleted datafile copy </span></p>
<p><span style="font-family:Courier,monospace;">datafile copy filename=/u01/oracle/oradata/undotbs01.dbf recid=9 stamp=541172332 </span></p>
<p><span style="font-family:Courier,monospace;">deleted datafile copy </span></p>
<p><span style="font-family:Courier,monospace;">datafile copy filename=/u01/oracle/oradata/sysaux01.dbf recid=10 stamp=541172332 </span></p>
<p><span style="font-family:Courier,monospace;">deleted datafile copy </span></p>
<p><span style="font-family:Courier,monospace;">datafile copy filename=/u01/oracle/oradata/def_perm01.dbf recid=11 stamp=541172333 </span></p>
<p><span style="font-family:Courier,monospace;">Deleted 4 object </span></p>
<p>15.Add the tempfiles to the DEF_TEMP tablespace, though the RMAN doesn&#8217;t take the backup of temporary files physically.</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter tablespace def_temp add tempfile;</span></p>
<p><span style="font-family:Courier,monospace;">Tablespace altered.</span></p>
<p>Now the temporary file will be created in the ASM diskgroup, though we had set the DB_CREATE_FILE_DEST parameter. You can examine it by using v$tempfile view orif you want to examine the creation of tempfile in ASM diskgroup</p>
<p>If you want to examine the creation of tempfile</p>
<p><span style="font-family:Courier,monospace;">ASMCMD [+] &gt; cd dg1/orcl/tempfile</span></p>
<p><span style="font-family:Courier,monospace;">ASMCMD [+DG1/ORCL/TEMPFILE] &gt; ls</span></p>
<p><span style="font-family:Courier,monospace;">DEF_TEMP.265.737391815</span></p>
<p>16.We had only moved the datafiles and tempfiles till yet. To change the Non-ASM online redolog files to ASM redologs, add logfile groups</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter database add logfile;</span></p>
<p><span style="font-family:Courier,monospace;">Database altered.</span></p>
<p>Here the logfile group will be created in the ASM diskgroup with size 100m, if you want it for different size use the keyword &#8216;size&#8217;</p>
<p>17.Add somemore logfile groups</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter database add logfile;</span></p>
<p><span style="font-family:Courier,monospace;">Database altered.</span></p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter database add logfile;</span></p>
<p><span style="font-family:Courier,monospace;">Database altered.</span></p>
<p>If you want to examine the path of the redolog files</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; select group#, member from v$logfile;</span></p>
<p><span style="font-family:Courier,monospace;">GROUP# MEMBER</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p><span style="font-family:Courier,monospace;">1           /u01/oracle/oradata/redologfile/log_01_01.log</span></p>
<p><span style="font-family:Courier,monospace;">2           /u01/oracle/oradata/redologfile/log_02_01.log</span></p>
<p><span style="font-family:Courier,monospace;">3      +DG1/orcl/onlinelog/group_3.262.737304349</span></p>
<p><span style="font-family:Courier,monospace;">4           +DG1/orcl/onlinelog/group_4.263.737304363</span></p>
<p><span style="font-family:Courier,monospace;">5           +DG1/orcl/onlinelog/group_5.264.737304371</span></p>
<p>18.Identify the status of the logfile groups</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; select group#, status from v$log;</span></p>
<p><span style="font-family:Courier,monospace;">GROUP# 	 STATUS</span></p>
<p><span style="font-family:Courier,monospace;">&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p><span style="font-family:Courier,monospace;">1           ACTIVE</span></p>
<p><span style="font-family:Courier,monospace;">2      CURRENT</span></p>
<p><span style="font-family:Courier,monospace;">3           UNUSED</span></p>
<p><span style="font-family:Courier,monospace;">4           UNUSED</span></p>
<p><span style="font-family:Courier,monospace;">5      UNUSED</span></p>
<p>19.Perform the manual log switches, so that the group 1 and group 2 turns to be INACTIVE</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter system switch logfile;</span></p>
<p><span style="font-family:Courier,monospace;">System altered.</span></p>
<p>20.Remove the group which are placed in the OS filesystems once they status turns to be INACTIVE i.e. group 1 and group 2</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter database drop logfile group 1;</span></p>
<p><span style="font-family:Courier,monospace;">Database altered.</span></p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter database drop logfile group 2;</span></p>
<p><span style="font-family:Courier,monospace;">Database altered.</span></p>
<p>21.Place the parameter file in the ASM diskgroup</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; create spfile=&#8217;+DG1&#8242; from pfile;</span></p>
<p>You can verify the creation by</p>
<p><span style="font-family:Courier,monospace;">ASMCMD [+] &gt; cd  dg1/orcl/parameterfile</span></p>
<p><span style="font-family:Courier,monospace;">ASMCMD [+dg1/orcl/parameterfile] &gt; ls</span></p>
<p><span style="font-family:Courier,monospace;">spfile.267.737406545</span></p>
<p>22.Edit the pfile and make the changes</p>
<p><span style="font-family:Courier,monospace;">$ vi $ORACLE_HOME/dbs/initORCL.ora</span></p>
<p>Commit (#) all the parameters and enter</p>
<p><span style="font-family:Courier,monospace;">spfile=&#8217;+DG1/ORCL/PARAMETERFILE/spfile.267.737406545</span></p>
<p>23.Save and quit</p>
<p>24.Restart the database, the database will start using spfile from ASM diskgroup</p>
<p><strong>Now your database is completely placed in the ASM diskgroups.</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/naveenkumarsr.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/naveenkumarsr.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/naveenkumarsr.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/naveenkumarsr.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/naveenkumarsr.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/naveenkumarsr.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/naveenkumarsr.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/naveenkumarsr.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/naveenkumarsr.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/naveenkumarsr.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/naveenkumarsr.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/naveenkumarsr.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/naveenkumarsr.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/naveenkumarsr.wordpress.com/213/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=213&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://naveenkumarsr.wordpress.com/2010/12/15/nonasm-to-asm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c771c1c79abc1e3be4754f9e87f210a?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">Naveen Kumar S.R.</media:title>
		</media:content>
	</item>
		<item>
		<title>Configuration of Samba</title>
		<link>http://naveenkumarsr.wordpress.com/2010/12/10/samba-server/</link>
		<comments>http://naveenkumarsr.wordpress.com/2010/12/10/samba-server/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 08:17:33 +0000</pubDate>
		<dc:creator>Naveen K. SR</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://naveenkumarsr.wordpress.com/?p=181</guid>
		<description><![CDATA[What is Samba? Samba is a file server that used to share the files and directories between Linux and Windows operating systems. Implementation of Samba can be done in multiple ways. Here is simple steps how the implementations can be done. Make sure that while installing Linux, you had installed Samba Server Configuration Tool from [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=181&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } 		H1 { margin-bottom: 0.08in } 		H1.western { font-family: "Nimbus Sans L", sans-serif; font-size: 16pt } 		H1.cjk { font-family: "Luxi Sans"; font-size: 16pt } 		H1.ctl { font-family: "Luxi Sans"; font-size: 16pt } 		H3 { margin-bottom: 0.08in } 		H3.western { font-family: "Nimbus Sans L", sans-serif } --></p>
<h1>What is Samba?</h1>
<p>Samba is a file server that used to share the files and directories between Linux and Windows operating systems.</p>
<p>Implementation of Samba can be done in multiple ways. Here is simple steps how the implementations can be done.</p>
<p>Make sure that while installing Linux, you had installed Samba Server Configuration Tool from Server Configuration Tools. This is the tools which helps us to build an samba service between Windows and Linux and vice-versa</p>
<p>Set the IP&#8217;s on both the systems, check the connectivity. If the things are working fine then proceed with these steps</p>
<h1>Case 1:</h1>
<p><span style="font-size:medium;"><strong>Server:</strong> Windows Machine with IP 200.168.1.2</span></p>
<p><span style="font-size:medium;"><strong>Client:</strong> Linux Machine with IP 200.168.1.3</span></p>
<h3>On Windows Machine:</h3>
<p>1.Give sharing to the folder or drive in Windows Machine and enter &#8220;Share name&#8221; as &#8216;share&#8217;</p>
<h3>On Linux Machine:</h3>
<p>2.In Linux Machine, login as root user.</p>
<p>3.copy <span style="font-family:Courier,monospace;">/etc/samba/smb.conf</span> file to <span style="font-family:Courier,monospace;">/etc/samba/smb.conf.bak</span> &#8211; to keep the original file secure</p>
<p><span style="font-family:Courier,monospace;"># cp /etc/samba/smb.conf /etc/samba/smb.conf.bak</span></p>
<p>4.Edit /etc/samba/smb.conf file and make the following changes</p>
<p><span style="font-family:Courier,monospace;"># vi /etc/samba/smb.conf</span></p>
<p>Un-comment entry like</p>
<p><span style="font-family:Courier,monospace;"># hosts allow = [Windows IP address]</span></p>
<p><span style="font-family:Courier,monospace;">hosts allow = 200.168.1.2</span><br />
At the end of the file, un-comment following lines and make the entries</p>
<p># This is the Share Name which you had given in Windows Machine. This is Mandatory</p>
<p><span style="font-family:Courier,monospace;">path = /share </span></p>
<p># Remaining things are optional, set them as per your requirement</p>
<p><span style="font-family:Courier,monospace;">comment = My Linux share</span></p>
<p><span style="font-family:Courier,monospace;">public = no </span></p>
<p><span style="font-family:Courier,monospace;">writable = yes</span></p>
<p><span style="font-family:Courier,monospace;">printable = no</span></p>
<p><span style="font-family:Courier,monospace;">create mask = 0765</span></p>
<p>&#8230;&#8230;&#8230;&#8230;</p>
<p>5.Save and exit from /etc/samba/smb.conf</p>
<p>6.Create directory on Linux Machine to view windows shared folder</p>
<p><span style="font-family:Courier,monospace;"># mkdir /WinShare</span></p>
<p>7.Start the samba (smb) service if it not started or restart the service once</p>
<p><span style="font-family:Courier,monospace;"># service smb start</span></p>
<p>OR</p>
<p><span style="font-family:Courier,monospace;"># service smb restart</span></p>
<p>8.Mount Windows share folder on Linux Machine using</p>
<p><span style="font-family:Courier,monospace;"># mount -t smbfs //200.168.1.2/share /WinShare</span></p>
<p>It will ask the Windows Machine user password, key-in the password</p>
<p>The Windows Machine share directory will mounted in the Linux Machine</p>
<p>9.Access Windows&#8217; share on Linux using</p>
<p><span style="font-family:Courier,monospace;">$ cd /WinShare</span><br />
The Windows share directory which you had mounted that will be not permanent after the restart. If you want to make it as a permanent, make an entry in <span style="font-family:Courier,monospace;">/etc/fstab</span> file</p>
<p>1.Login as root user and edit <span style="font-family:Courier,monospace;">/etc/fstab </span>file</p>
<p><span style="font-family:Courier,monospace;"># vi /etc/fstab</span></p>
<p>2.Make the entry</p>
<p><span style="font-family:Courier,monospace;">//200.168.1.2/share	  /WinShare   smbfs   defaults   1 2</span></p>
<p>3.Save and quit the <span style="font-family:Courier,monospace;">/etc/fstab </span>file</p>
<h1>Case 2:</h1>
<p><span style="font-size:medium;"><strong>Server: </strong>Linux Machine with IP 200.168.1.3</span></p>
<p><span style="font-size:medium;"><strong>Client:</strong> Windows Machine with IP 200.168.1.2</span></p>
<h3>On Linux Machine:</h3>
<p>1.Login as root user and create a user for samba service</p>
<p><span style="font-family:Courier,monospace;"># useradd -g users -d /u01/sam -s /bin/false sam</span></p>
<p><span style="font-family:Courier,monospace;"># password sam</span></p>
<p><span style="font-family:Courier,monospace;">sam123</span></p>
<p>The user&#8217;s home directory i.e., &#8216; <span style="font-family:Courier,monospace;">/u01/sam</span>&#8216; will be the sharable directory in the Windows Machine.</p>
<p>If you want to share different directories, change the home directory for the user as</p>
<p><span style="font-family:Courier,monospace;"># usermod -d /u02/otherdirectory sam</span></p>
<p>2.Add this user for samba service password file</p>
<p><span style="font-family:Courier,monospace;"># smbpasswd -a sam</span></p>
<p><span style="font-family:Courier,monospace;">sam987</span></p>
<p>This is not the OS user password (sam123). This password is for samba service (sam987). The user will get added to the<span style="font-family:Courier,monospace;"> /etc/samba/smbusers</span> file and the password will get updated to the  <span style="font-family:Courier,monospace;">/etc/samba/smbpasswd</span> file.</p>
<p>Initially both files wont be there in the directory, after executing the commands the files will be created.</p>
<p>3.Edit <span style="font-family:Courier,monospace;">/etc/samba/smb.conf</span> file</p>
<p><span style="font-family:Courier,monospace;"># vi /etc/samba/smb.conf</span></p>
<p>At the end of the file, un-comment following lines and make the entries</p>
<p># This is the share directory that will get shared from Linux to Windows 	Machine. This is Mandatory</p>
<p><span style="font-family:Courier,monospace;">path = /u01/sam</span></p>
<p># Remaining things are optional, set them as per your requirement</p>
<p><span style="font-family:Courier,monospace;">comment = My Linux share</span></p>
<p><span style="font-family:Courier,monospace;">public = no</span></p>
<p><span style="font-family:Courier,monospace;">writable = yes</span></p>
<p><span style="font-family:Courier,monospace;">printable = no</span></p>
<p><span style="font-family:Courier,monospace;">create mask = 0765</span></p>
<p>&#8230;&#8230;&#8230;&#8230;..</p>
<p>4.Start the samba service</p>
<p><span style="font-family:Courier,monospace;"># service smb start</span></p>
<p>OR</p>
<p><span style="font-family:Courier,monospace;"># service smb restart</span></p>
<h3>On Windows Machine:</h3>
<p>5.Open the Windows Explorer</p>
<p>6.Select Tools &gt; Map Network Drive</p>
<p>7.Choose the Drive alphabet</p>
<p>8.In the Folder, enter</p>
<p><span style="font-family:Courier,monospace;">\\200.168.1.3\sam</span></p>
<p>Here sam is a user name on the Linux Machine, the one which we had made as the samba user on Linux Machine</p>
<p>9.Check &#8216;Reconnect at login&#8217; (Optional)</p>
<p>10.Click on Finish</p>
<p>11.After trying to connect, Windows will pop-up connecting window. Enter</p>
<p><span style="font-family:Courier,monospace;">Username: sam</span></p>
<p><span style="font-family:Courier,monospace;">Password: sam987</span></p>
<p>Here we need to enter the samba service password i.e., sam987</p>
<p>12.Check &#8216;Remember my password&#8217; (Optional)</p>
<p>13.Now the Drive of the Linux Machine “<span style="font-family:Courier,monospace;">/u01/sam</span>” will be display as the drive in the Windows Explorer</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/naveenkumarsr.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/naveenkumarsr.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/naveenkumarsr.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/naveenkumarsr.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/naveenkumarsr.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/naveenkumarsr.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/naveenkumarsr.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/naveenkumarsr.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/naveenkumarsr.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/naveenkumarsr.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/naveenkumarsr.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/naveenkumarsr.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/naveenkumarsr.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/naveenkumarsr.wordpress.com/181/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=181&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://naveenkumarsr.wordpress.com/2010/12/10/samba-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c771c1c79abc1e3be4754f9e87f210a?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">Naveen Kumar S.R.</media:title>
		</media:content>
	</item>
		<item>
		<title>Preparing ASM Disks</title>
		<link>http://naveenkumarsr.wordpress.com/2010/12/10/preparing-asm-disks/</link>
		<comments>http://naveenkumarsr.wordpress.com/2010/12/10/preparing-asm-disks/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 07:44:19 +0000</pubDate>
		<dc:creator>Naveen K. SR</dc:creator>
				<category><![CDATA[ASM]]></category>

		<guid isPermaLink="false">http://naveenkumarsr.wordpress.com/?p=174</guid>
		<description><![CDATA[Preparing ASM Disks ASM diskgroups can be created in many ways like using ASMlibs, raw partitions, volume disks, etc&#8230; Here is an example how the raw partitions are created and can be used for the ASM instance Login as root user By using OS commands create the partitions like # fdisk /dev/sdb Create a directory [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=174&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } 		H3 { margin-bottom: 0.08in } 		H3.western { font-family: "Nimbus Sans L", sans-serif } --><span style="font-family:Nimbus Sans L,sans-serif;"><span style="font-size:large;"><strong>Preparing ASM Disks</strong></span></span></p>
<p>ASM diskgroups can be created in many ways like using ASMlibs, raw partitions, volume disks, etc&#8230;</p>
<p>Here is an example how the raw partitions are created and can be used for the ASM instance</p>
<ol>
<li>Login as root user
<p>By using OS commands create the 	partitions like</p>
<p><span style="font-family:Courier,monospace;"># 	fdisk /dev/sdb</span></li>
<li>Create a directory under /dev
<p><span style="font-family:Courier,monospace;"># 	mkdir /dev/raw</span></li>
<li>Using OS &#8216;raw&#8217; command map the 	drives as a raw partitions
<p><span style="font-family:Courier,monospace;"># raw 	/dev/raw/raw1 /dev/sdb1</span></p>
<p><span style="font-family:Courier,monospace;"># raw 	/dev/raw/raw2 /dev/sdb2</span></p>
<p><span style="font-family:Courier,monospace;"># raw 	/dev/raw/raw3 /dev/sdb3</span></p>
<p><span style="font-family:Courier,monospace;"># raw 	/dev/raw/raw4 /dev/sdb4</span></p>
<p>and so on and henceforth..</li>
<li>Change the ownership of these raw 	devices to the ASM or RDBMS owner and group (say useris oracle, and 	primary group is dba)
<p><span style="font-family:Courier,monospace;"># cd 	/dev/raw</span></p>
<p><span style="font-family:Courier,monospace;"># 	chown oracle:dba /dev/raw/raw*</span></li>
<li>Change the permissions of the raw 	files
<p><span style="font-family:Courier,monospace;"># 	chmod 660 /dev/raw/raw*</span></li>
</ol>
<p>Now these raw devices can be used for creating diskgroups in ASM</p>
<p>But once you restart your system, again you need to repeat the steps from Step-2 to Step-5, so we need to build a script for that. Will see more about this from Step-13</p>
<h3>Preparing the ASM environment:</h3>
<ol>
<li>Create a parameter file
<p><span style="font-family:Courier,monospace;">$ vi 	init+ASM.ora</span></li>
<li>Make the entries
<p><span style="font-family:Courier,monospace;">instance_name=+ASM</span></p>
<p><span style="font-family:Courier,monospace;">instance_type=ASM</span></p>
<p><span style="font-family:Courier,monospace;">asm_diskstring=&#8217;/dev/raw/raw*&#8217;</span></p>
<p><span style="font-family:Courier,monospace;">asm_diskgroups=DG1</span></p>
<p><span style="font-family:Courier,monospace;">large_pool_size=12m</span></li>
<li>Save and quit</li>
<li>Export the ASM instance name as 	ORACLE_SID
<p><span style="font-family:Courier,monospace;">$ 	export ORACLE_SID=+ASM</span></li>
<li>Connect to the sql prompt
<p><span style="font-family:Courier,monospace;">$ 	sqlplus / as sysdba</span></li>
<li>Start the ASM instance in nomount 	phase
<p><span style="font-family:Courier,monospace;">SQL&gt; 	startup nomount</span></li>
<li>Create the diskgroups
<p><span style="font-family:Courier,monospace;">SQL&gt; 	create diskgroup dg1 normal redundancy</span></p>
<p><span style="font-family:Courier,monospace;">failgroup 	fg1 disk &#8216;/dev/raw/raw1&#8242;,&#8217;/dev/raw/raw2&#8242;</span></p>
<p><span style="font-family:Courier,monospace;">failgroup 	fg2 disk &#8216;/dev/raw/raw3&#8242;,&#8217;/dev/raw/raw4&#8242;;</span></p>
<p>&nbsp;</li>
</ol>
<p>The instance now will be mounted automatically after creating the diskgroup</p>
<p>Now this diskgroup is ready to use for the RDBMS instance.</p>
<h3>Building a Script</h3>
<p>Instead of repeating the Step-2 to Step-5, you can build a script in the OS level</p>
<ol>
<li>Login as root user</li>
<li>Change the directory to 	<span style="font-family:Courier,monospace;">/etc/init.d</span></li>
<li>Create a script file say <span style="font-family:Courier,monospace;">asmdisk</span>
<p><span style="font-family:Courier,monospace;"># vi 	/etc/init.d/asmdisk</span></li>
<li>Enter the contents that are there 	in Step-2 to Step-5 as
<p><span style="font-family:Courier,monospace;">/bin/mkdir 	/dev/raw</span></p>
<p>&nbsp;</p>
<p><span style="font-family:Courier,monospace;">/usr/bin/raw 	/dev/raw/raw1 /dev/sdb1</span></p>
<p><span style="font-family:Courier,monospace;">/usr/bin/raw 	/dev/raw/raw2 /dev/sdb2</span></p>
<p><span style="font-family:Courier,monospace;">/usr/bin/raw 	/dev/raw/raw3 /dev/sdb3</span></p>
<p><span style="font-family:Courier,monospace;">/usr/bin/raw 	/dev/raw/raw4 /dev/sdb4</span></p>
<p>and so on and henceforth..</p>
<p>&nbsp;</p>
<p><span style="font-family:Courier,monospace;">/bin/chown 	oracle:dba /dev/raw/raw*</span></p>
<p>&nbsp;</p>
<p><span style="font-family:Courier,monospace;">/bin/chmod 	660 /dev/raw/raw*</span></li>
<li>Save and quit</li>
<li>Grant the execution permission for 	the <span style="font-family:Courier,monospace;">/etc/init.d/asmdisk</span> file
<p><span style="font-family:Courier,monospace;"># 	chmod 755 /etc/init.d/asmdisk</span></li>
<li>Create the symbolic link for the 	file <span style="font-family:Courier,monospace;">/etc/init.d/asmdisk</span> and 	store the link file in any of the run control directories, say 	<span style="font-family:Courier,monospace;">/etc/rc5.d</span>
<p><span style="font-family:Courier,monospace;"># ln 	-s /etc/init.d/asmdisk /etc/rc5.d/S10asmdisk</span></li>
</ol>
<p>Now even after many restarts, the ASM disks will be created automatically by this scrip. You can observe the script execution at the time of system&#8217;s OS boot.</p>
<p>&nbsp;</p>
<p>Additionally,</p>
<h3>Starting the ASM instance automatically</h3>
<ol>
<li>If you want even the ASM instance 	should be started automatically, then make use of the <span style="font-family:Courier,monospace;">/etc/oratab</span> file
<p><span style="font-family:Courier,monospace;"># vi 	/etc/oratab</span></p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;</p>
<p><span style="font-family:Courier,monospace;">+ASM:/u01/oracle/product/10.2.0/db_1:<strong>Y</strong></span></li>
<li>Then place the <span style="font-family:Courier,monospace;">/etc/init.d/asmdisk</span> scripts&#8217; symbolic link file in the <span style="font-family:Courier,monospace;">/etc/rc1.d/</span> or <span style="font-family:Courier,monospace;">/etc/rc2.d/</span>, because OS 	will read the oratab in run level 2</li>
</ol>
<p>Before the ASM instance has to begun, the ASM disks should be ready and that will be done by the script</p>
<h3>Making /etc/init.d/asmdisk as a service</h3>
<ol>
<li>If you want to make 	<span style="font-family:Courier,monospace;">/etc/init.d/asmdisk</span> itself is 	a service, login as root user</li>
<li>Using chkconfig command add this 	as a service
<p><span style="font-family:Courier,monospace;"># 	chkconfig &#8211;add asmdisk</span></li>
<li>Turn the service ON in the 	runlevels
<p><span style="font-family:Courier,monospace;"># 	chkconfig asmdisk on</span></li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/naveenkumarsr.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/naveenkumarsr.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/naveenkumarsr.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/naveenkumarsr.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/naveenkumarsr.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/naveenkumarsr.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/naveenkumarsr.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/naveenkumarsr.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/naveenkumarsr.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/naveenkumarsr.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/naveenkumarsr.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/naveenkumarsr.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/naveenkumarsr.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/naveenkumarsr.wordpress.com/174/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=174&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://naveenkumarsr.wordpress.com/2010/12/10/preparing-asm-disks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c771c1c79abc1e3be4754f9e87f210a?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">Naveen Kumar S.R.</media:title>
		</media:content>
	</item>
		<item>
		<title>Transportable Tablespaces</title>
		<link>http://naveenkumarsr.wordpress.com/2010/11/26/transportable-tablespaces/</link>
		<comments>http://naveenkumarsr.wordpress.com/2010/11/26/transportable-tablespaces/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 07:36:06 +0000</pubDate>
		<dc:creator>Naveen K. SR</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://naveenkumarsr.wordpress.com/?p=156</guid>
		<description><![CDATA[Transportable Tablespaces The tablespaces being transported can be either dictionary managed or locally managed. Starting with Oracle9i, the transported tablespaces are not required to be of the same block size as the target database standard block size. Moving data using transportable tablespaces is much faster than performing either an export/import or unload/load of the same [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=156&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } 		H1 { margin-bottom: 0.08in } 		H1.western { font-family: "Nimbus Sans L", sans-serif; font-size: 16pt } 		H1.cjk { font-family: "Luxi Sans"; font-size: 16pt } 		H1.ctl { font-family: "Luxi Sans"; font-size: 16pt } 		H3 { margin-bottom: 0.08in } 		H3.western { font-family: "Nimbus Sans L", sans-serif } --></p>
<p style="text-align:center;"><span style="font-family:Nimbus Sans L,sans-serif;"><span style="font-size:large;"><strong>Transportable Tablespaces</strong></span></span></p>
<p>The tablespaces being transported can be either dictionary managed or locally managed. Starting with Oracle9i, the transported tablespaces are not required to be of the same block size as the target database standard block size.</p>
<p>Moving data using transportable tablespaces is much faster than performing either an export/import or unload/load of the same data. This is because the datafiles containing all of the actual data are just copied to the destination location, and you use an export/import utility to transfer only the metadata of the tablespace objects to the new database.</p>
<p>There are two ways to transport a tablespace:</p>
<ul>
<li>Manually, following 	the steps described in this section. This involves issuing commands 	to SQL*Plus, RMAN, IMP/EXP and Data Pump.</li>
<li>Using the Transport 	Tablespaces Wizard in Enterprise ManageTo run the Transport Tablespaces Wizard:</li>
</ul>
<ol>
<li>Log in to Enterprise 	Manager with a user that has the EXP_FULL_DATABASE role.</li>
<li>Click the 	Maintenance link to go to the Maintenance tab.</li>
<li>Under the heading 	Move Database Files, click Transport Tablespaces.</li>
</ol>
<h1>Limitations:</h1>
<ul>
<li>The two databases 	should have a same character set and and same national character 	set. i.e., NLS_NCHAR_CHARACTERSET parameter should match in both the 	databases</li>
<li>You cannot transport 	a tablespace to a target database in which a tablespace with the 	same name already exists</li>
<li>Beginning with 	Oracle Database 10g Release 2, you can transport tablespaces that 	contain XMLTypes, but you must use the IMP and EXP utilities, not 	Data Pump. When using EXP, ensure that the CONSTRAINTS and TRIGGERS 	parameters are set to Y (the default).</li>
<li>The tablespace 	should be self-contained</li>
<li>Snapshot or 	replication, function based indexes, domain indexes containing 	tablespaces cannot be supported.</li>
<li>System, undo, 	sysaux, and temporary tablespaces cannot be transported.</li>
</ul>
<h1>Considerations</h1>
<table border="1" cellspacing="0" cellpadding="4" width="100%">
<col width="52"></col>
<col width="54"></col>
<col width="150"></col>
<tbody>
<tr valign="top">
<td width="20%" height="16" bgcolor="#ffffcc"><strong>Database</strong></td>
<td width="21%" bgcolor="#ffffcc"><strong>Tablespace</strong></td>
<td width="59%" bgcolor="#ffffcc"><strong>Datafiles 			Path</strong></td>
</tr>
<tr valign="top">
<td width="20%">orcl (source)</td>
<td width="21%">test</td>
<td width="59%">/u01/oracle/oradata/orcl/datafile/test01.dbf</td>
</tr>
<tr valign="top">
<td width="20%">rc (target)</td>
<td width="21%">test</td>
<td width="59%">/u01/oracle/oradata/rc/datafile/test01.dbf</td>
</tr>
</tbody>
</table>
<h3>Step 1: Determine if Platforms are Supported and Endianness</h3>
<p>Issue the following query on both the source and target databases. The values which will get as an output should have to match on both the cases.</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; SELECT a.PLATFORM_NAME, ENDIAN_FORMAT</span></p>
<p><span style="font-family:Courier,monospace;">2  FROM V$TRANSPORTABLE_PLATFORM a, V$DATABASE b</span></p>
<p><span style="font-family:Courier,monospace;">3  WHERE a.PLATFORM_NAME = b.PLATFORM_NAME;</span></p>
<h3>Step 2: Verify tablespace is self-contained</h3>
<p>There may be logical or physical dependencies between objects in the transportable set and those outside of the set. You can only transport a set of tablespaces that is self-contained.</p>
<p>The following statement can be used to determine whether tablespace TEST is self-contained, with referential integrity constraints taken into consideration (indicated by TRUE).</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; execute dbms_tts.transport_set_check(&#8216;TEST&#8217;, TRUE);</span></p>
<p>After invoking this PL/SQL package, you can see all violations by selecting from the TRANSPORT_SET_VIOLATIONS view.</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; SELECT * FROM TRANSPORT_SET_VIOLATIONS;</span></p>
<h3>Step3: Tablespace to READ ONLY mode</h3>
<p>Make the tablespace you would like to transport to read-only mode, so that it will prevent the users to modify the data.</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; ALTER TABLESPACE TEST READ ONLY;</span></p>
<h3>Step4: Export Metadata of TEST tablespace</h3>
<p>Export the metadata for the tablespaces, using the TRANSPORT_TABLESPACES and TABLESPACES parameters of the Oracle Export utility</p>
<p><span style="font-family:Courier,monospace;">$ expdp system/manager directory=dump_dir dumpfile=tts.dmp logfile=tts.log transport_tablespaces=test transport_full_check=y</span></p>
<h3>Step5: Copy the dumpfile and datafile for the TEST tablespace</h3>
<p>Using the OS commands copy the tablespace exported dump file (i.e., tts.dmp) and log files (i.e., tts.log) and TEST tablespace&#8217;s corresponding datafile to the target database</p>
<h3>Step6: Start the target database(RC)</h3>
<p>Start the target database in open phase, and create required schema if necessary, or remap the schemas, because import function does not create the source database users in the target database.</p>
<h3>Step7: Import the metadata and datafile</h3>
<p>At the target database using the import utility, import the metadata and the TEST tablespace&#8217;s datafile</p>
<p><span style="font-family:Courier,monospace;">$ impdp system/sys123 directory=dump_dir dumpfile=tts.dmp logfile=tts.log transport_datafiles=/u01/oracle/oradata/rc/datafile/test01.dbf</span></p>
<p>After executing this command, you can observe the tablespaces name using V$TABLESPACE and DBA_TABLESPACES. You can able to view the addition of TEST tablespace</p>
<h3>Step8: Tablespace to READ WRITE mode</h3>
<p>Even after importing the tablespace in the target database, the tablespace will be in READ ONLY mode. To change them to read-write mode.</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter tablespace TEST read write;</span></p>
<p>After you&#8217;ve made these changes, back up the control files of both the target and the source database:</p>
<p><span style="font-family:Courier,monospace;">SQL&gt; alter database backup controlfile to trace;</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/naveenkumarsr.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/naveenkumarsr.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/naveenkumarsr.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/naveenkumarsr.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/naveenkumarsr.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/naveenkumarsr.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/naveenkumarsr.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/naveenkumarsr.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/naveenkumarsr.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/naveenkumarsr.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/naveenkumarsr.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/naveenkumarsr.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/naveenkumarsr.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/naveenkumarsr.wordpress.com/156/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenkumarsr.wordpress.com&amp;blog=6459885&amp;post=156&amp;subd=naveenkumarsr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://naveenkumarsr.wordpress.com/2010/11/26/transportable-tablespaces/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c771c1c79abc1e3be4754f9e87f210a?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">Naveen Kumar S.R.</media:title>
		</media:content>
	</item>
	</channel>
</rss>
