<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>A DBA's Journey In Oracle</title>
	<atom:link href="http://anudba.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://anudba.wordpress.com</link>
	<description>Destiny is here.....</description>
	<lastBuildDate>Mon, 06 Oct 2008 09:38:55 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='anudba.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/37fa2d4d2ce690be01e714be472dad5e?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>A DBA's Journey In Oracle</title>
		<link>http://anudba.wordpress.com</link>
	</image>
			<item>
		<title>Invoking EXP &amp; IMP as “SYSDBA”</title>
		<link>http://anudba.wordpress.com/2008/09/29/invoking-exp-imp-as-%e2%80%9csysdba%e2%80%9d/</link>
		<comments>http://anudba.wordpress.com/2008/09/29/invoking-exp-imp-as-%e2%80%9csysdba%e2%80%9d/#comments</comments>
		<pubDate>Mon, 29 Sep 2008 09:15:25 +0000</pubDate>
		<dc:creator>Anupama</dc:creator>
				<category><![CDATA[Export Utility]]></category>
		<category><![CDATA[Import Utility]]></category>
		<category><![CDATA[ORACLE]]></category>

		<guid isPermaLink="false">http://anudba.wordpress.com/?p=198</guid>
		<description><![CDATA[
Here is the procedure to invoke EXP &#38; IMP as &#8221; SYSDBA &#8220;
FOR WINDOWS :
(a)Import
C:\&#62;IMP ‘username/password as sysdba’ keyword=(value1,value2,….valuen)
Example:C:\&#62;IMP ‘sys/sys as sysdba’ fromuser=hr touser=abc file=export2.dmp owner=hr
(b)Export
C:\&#62;EXP ‘username/password as sysdba’ keyword=(value1,value2,….valuen)
Example: C:\&#62;EXP sys/sys as sysdba’ file=export2.dmp owner=hr direct=y
 
FOR LINUX :
(a)Import
C:\&#62;IMP \’username/password as sysdba\’ keyword=(value1,value2,….valuen)
Example:C:\&#62;IMP \’sys/sys as sysdba\’ fromuser=hr touser=abc file=export2.dmp owner=hr
(b)Export
C:\&#62;EXP \’username/password as sysdba\’ keyword=(value1,value2,….valuen)
Example: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anudba.wordpress.com&blog=4230320&post=198&subd=anudba&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><!--[if gte mso 9]&gt;  Normal 0   false false false        MicrosoftInternetExplorer4  &lt;![endif]--><!--[if gte mso 9]&gt;   &lt;![endif]--></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>Here is the procedure to invoke EXP &amp; IMP as &#8221; SYSDBA &#8220;</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>FOR WINDOWS :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">(a)Import</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>C:\&gt;IMP ‘username/password as sysdba’ keyword=(value1,value2,….valuen)</strong></p>
<p class="MsoNormal" style="line-height:150%;">Example:<strong>C:\&gt;IMP ‘sys/sys as sysdba’</strong> <strong>fromuser=hr touser=abc file=export2.dmp owner=hr</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">(b)Export</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>C:\&gt;EXP ‘username/password as sysdba’ keyword=(value1,value2,….valuen)</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">Example:<strong> C:\&gt;EXP sys/sys as sysdba’ file=export2.dmp owner=hr direct=y</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong> </strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>FOR LINUX :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">(a)Import</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>C:\&gt;IMP \’username/password as sysdba\’ keyword=(value1,value2,….valuen)</strong></p>
<p class="MsoNormal" style="line-height:150%;">Example:<strong>C:\&gt;IMP \’sys/sys as sysdba\’</strong> <strong>fromuser=hr touser=abc file=export2.dmp owner=hr</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">(b)Export</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>C:\&gt;EXP \’username/password as sysdba\’ keyword=(value1,value2,….valuen)</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">Example:<strong> C:\&gt;EXP \’sys/sys as sysdba\’ file=export2.dmp owner=hr direct=y</strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>Note :</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>For Remote Access </strong>,we can use like this</p>
<p class="MsoNormal" style="line-height:150%;"><strong>C:\&gt;IMP ‘username/password@instance as sysdba’ keyword=(value1,value2,….valuen</strong></p>
Posted in Export Utility, Import Utility, ORACLE  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anudba.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anudba.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anudba.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anudba.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anudba.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anudba.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anudba.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anudba.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anudba.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anudba.wordpress.com/198/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anudba.wordpress.com&blog=4230320&post=198&subd=anudba&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://anudba.wordpress.com/2008/09/29/invoking-exp-imp-as-%e2%80%9csysdba%e2%80%9d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3d6c754ec275f9098adfbce702691153?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">Anu</media:title>
		</media:content>
	</item>
		<item>
		<title>Oracle 9i Import Utility</title>
		<link>http://anudba.wordpress.com/2008/09/29/oracle-9i-import-utility/</link>
		<comments>http://anudba.wordpress.com/2008/09/29/oracle-9i-import-utility/#comments</comments>
		<pubDate>Mon, 29 Sep 2008 09:09:50 +0000</pubDate>
		<dc:creator>Anupama</dc:creator>
				<category><![CDATA[Import Utility]]></category>
		<category><![CDATA[ORACLE]]></category>

		<guid isPermaLink="false">http://anudba.wordpress.com/?p=193</guid>
		<description><![CDATA[ The Import Utility can be used to
(A) Create table definitions
   It creates the table definitions since the table definitions are stored in
 the Export file.If we choose to import data without the rows then it
  will create only the table definitions.
(B) Extract data from a valid Export file 
 It will [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anudba.wordpress.com&blog=4230320&post=193&subd=anudba&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p class="MsoNormal" style="text-align:justify;line-height:150%;"><!--[if gte mso 9]&gt;  Normal 0   false false false        MicrosoftInternetExplorer4  &lt;![endif]--><!--[if gte mso 9]&gt;   &lt;![endif]--> <strong>The Import Utility can be used to</strong></p>
<p class="MsoNormal" style="margin-left:40.5pt;text-align:justify;text-indent:-22.5pt;line-height:150%;"><!--[if !supportLists]--><strong><span>(A)<span style="font-family:&quot;font-size:7pt;line-height:normal;"> </span></span></strong><!--[endif]--><strong>Create table definitions</strong></p>
<p class="MsoNormal" style="line-height:150%;"><span> </span><span> </span><span> </span>It creates the table definitions since the table definitions are stored in</p>
<p class="MsoNormal" style="line-height:150%;"><span> </span>the Export file.If we choose to import data without the rows then it</p>
<p class="MsoNormal" style="line-height:150%;"><span> </span><span> </span>will create only the table definitions.</p>
<p class="MsoNormal" style="margin-left:40.5pt;text-align:justify;text-indent:-22.5pt;line-height:150%;"><!--[if !supportLists]--><strong><span>(B)<span style="font-family:&quot;font-size:7pt;line-height:normal;"> </span></span></strong><!--[endif]--><strong>Extract data from a valid Export file </strong></p>
<p class="MsoNormal" style="margin-left:.5in;line-height:150%;"><span> </span>It will extract data from a valid export file by using the</p>
<p class="MsoNormal" style="margin-left:.5in;line-height:150%;"><span> </span>Table,User,Tablespace or Full Import modes.</p>
<p class="MsoNormal" style="margin-left:40.5pt;text-align:justify;text-indent:-22.5pt;line-height:150%;"><!--[if !supportLists]--><strong><span>(C)<span style="font-family:&quot;font-size:7pt;line-height:normal;"> </span></span></strong><!--[endif]--><strong>Recover from user-error failures</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span> </span>Recovers a user failure errors when a table is accidentally dropped or</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span> </span>truncated.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>Before Using Import :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">We all know that Import Utility will transfer data between tablespaces.Suppose if we want to import some data from <strong>tablespace A(Source) to tablespace B(Target)</strong> using an export file then very first point we need to check is that whether the tablespace B(i.e.,target tablespace) is existing &amp; if its existing then check whether user is created &amp; finally if user is also created then check whether that user has privileges or not.If the user has privileges then only the Import Utility can transfer data from source tablespace A to target tablespace B.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>In Brief :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>1)Create Tablespace 2)Create User 3)Grant Privilege</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong> </strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>Brief On Import Modes :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">Earlier as we have dicussed in detail about the Export Modes, here I will just give u a brief on Import Modes.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">(a)<strong>Table Mode :</strong>Import specified tables into a schema.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">(b)<strong>User Mode :</strong>Import all objects that belong to a schema.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">(c)<strong>Tablespace Mode :</strong>Import all definitions of the objects contained in the tablespace.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">(d)<strong>Full Database Mode :</strong>Import all the objects from the export file.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>Note :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">1)Like Export Utility,we can also perform Import Utility using command-line entries &amp; in interactive mode.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">2)Command-line options are similar to Interactive mode options but command-line entries will give us more functionality.</p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;"><strong>Command-line entries for Import :</strong></p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;"><strong>General Syntax :</strong></p>
<p class="MsoNormal" style="text-align:justify;"><strong> </strong></p>
<p class="MsoNormal" style="text-align:justify;"><strong>IMP username/password parameters=(value1,value2,&#8230;..valuen)</strong></p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;line-height:150%;">Before looking at some of the examples of Import Utility ,</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">First Lets have look at some Import parameters which are oftenly used by DBA’s.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">So just issue the command “imp -help” to get the list of parameters with little description and default modes of it.</p>
<p class="MsoNormal" style="text-align:justify;"><strong>C:\&gt;imp –help</strong></p>
<p class="MsoNormal" style="text-align:justify;"><strong> </strong></p>
<p class="MsoNormal" style="text-align:justify;">Here is the screen shot for it:</p>
<p class="MsoNormal" style="text-align:justify;"><a href="http://anudba.files.wordpress.com/2008/09/import_parameters.jpg"><img class="alignnone size-medium wp-image-194" title="import_parameters" src="http://anudba.files.wordpress.com/2008/09/import_parameters.jpg?w=300&#038;h=223" alt="" width="300" height="223" /></a></p>
<p class="MsoNormal" style="line-height:150%;"><!--[if gte mso 9]&gt;  Normal 0   false false false        MicrosoftInternetExplorer4  &lt;![endif]--><!--[if gte mso 9]&gt;   &lt;![endif]--> <strong>Examples :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">1)To import two tables called EMPLOYEES &amp; DEPARTMENTS, that are present in HR schema including all the rows of it by using export file named export1.dmp</p>
<p class="MsoNormal" style="line-height:150%;"><strong>C:\&gt;IMP hr/hr tables=(employees,departments) rows=y file=export1.dmp</strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="text-align:justify;line-height:150%;">2)To import all the objects for HR schema including all the rows of it using export file named export2.dmp</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>C:\&gt;IMP system/manager fromuser=hr touser=abc file=export2.dmp owner=hr </strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">
<p class="MsoNormal" style="line-height:150%;">3)To import all the object definitions belonging to the tablespace called ts_employees by using an export file named export3.dmp &amp; also generate a logfile named ts_employees.log</p>
<p class="MsoNormal" style="line-height:150%;"><strong>C:\&gt;IMP system/manager <span> </span>TRANSPORT_TABLESPACE=y FILE= export3.dmp</strong> <strong>TABLESPACES=(ts_employees) LOG=ts_employees.log</strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>Note :</strong></p>
<p class="MsoNormal" style="line-height:150%;">If the “file” keyword or parameter is not mentioned in the import statement then the import utility looks for the default file <strong>expdat.dmp</strong> .</p>
<p class="MsoNormal" style="line-height:150%;"><strong>Order of Import Process :</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>The table objects are imported as they are read from the export file.The export file contains objects in the following order :</strong></p>
<p class="MsoNormal" style="line-height:150%;">1)Type Definitions</p>
<p class="MsoNormal" style="line-height:150%;">2)Table Definitions</p>
<p class="MsoNormal" style="line-height:150%;">3)Table Data</p>
<p class="MsoNormal" style="line-height:150%;">4)Table Indexes</p>
<p class="MsoNormal" style="line-height:150%;">5)Integrity Constraints,Views,Procedures &amp; Triggers</p>
<p class="MsoNormal" style="line-height:150%;">6)Bitmap,Function-Based &amp; Domain Indexes</p>
<p class="MsoNormal" style="line-height:150%;"><strong>Suppose ,while we are importing a table ,first the export file is read &amp; then the table and data are created in the following order:</strong></p>
<p class="MsoNormal" style="line-height:150%;">1)New tables are created</p>
<p class="MsoNormal" style="line-height:150%;">2)Data is imported</p>
<p class="MsoNormal" style="line-height:150%;">3)Indexes are built</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">4)Triggers are imported</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">5)Integrity constraints are enabled on the new tables</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">6)Any bitmap,functional &amp; domain indexes are built.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">
<p class="MsoNormal" style="text-align:justify;line-height:150%;">This above sequence prevents data from being rejected due to the order in which the tables are imported.And it will also prevents redundant triggers from firing twice on the same data.Thatmeans,firstly while it is originally inserted and secondly during import.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>Note 1 :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">The order in which the tables are imported is important if you do not import all the objects that a user owns.Suppose , if the table with the foreign key has a referential check on the table with the primary key and the foreign key table is imported first ,then all rows that reference the primary key that have not been imported will be rejected if the constraints are enabled.But for a full database export this is not a problem.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>For Example :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">If the emp table table has a referential integrity constraint on the dept table and the emp table is imported first then all emp rows that reference departments that have not yet been imported into dept would be rejected if the constraints were enabled.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>Note 2 :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">If the data is imported into the existing tables,then the order of import can still produce referential integrity failures.So for the situation like this , if the emp table already exist and referential constraints are in force then many rows could be rejected.</p>
<p class="MsoNormal" style="text-align:justify;">
Posted in Import Utility, ORACLE  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anudba.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anudba.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anudba.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anudba.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anudba.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anudba.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anudba.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anudba.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anudba.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anudba.wordpress.com/193/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anudba.wordpress.com&blog=4230320&post=193&subd=anudba&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://anudba.wordpress.com/2008/09/29/oracle-9i-import-utility/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3d6c754ec275f9098adfbce702691153?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">Anu</media:title>
		</media:content>

		<media:content url="http://anudba.files.wordpress.com/2008/09/import_parameters.jpg?w=300" medium="image">
			<media:title type="html">import_parameters</media:title>
		</media:content>
	</item>
		<item>
		<title>Oracle 9i-EXPORT UTILITY</title>
		<link>http://anudba.wordpress.com/2008/09/20/export-utility/</link>
		<comments>http://anudba.wordpress.com/2008/09/20/export-utility/#comments</comments>
		<pubDate>Sat, 20 Sep 2008 08:22:13 +0000</pubDate>
		<dc:creator>Anupama</dc:creator>
				<category><![CDATA[Export Utility]]></category>
		<category><![CDATA[ORACLE]]></category>
		<category><![CDATA[Oracle's Export Utility]]></category>

		<guid isPermaLink="false">http://anudba.wordpress.com/?p=155</guid>
		<description><![CDATA[  
Introduction To Oracle&#8217;s Export And Import Utility :


We use Oracle&#8217;s Export &#38; Import Utility to
1)logical Backup &#38; Recovery
2)Move the data between Databases
The Export Utility is used to transfer data objects between oracle databases.It can provide logical backup of
(a)Database Objects
(b)Tablespace
(c)Entire database

The Import Utility is used to read a valid export file for moving data [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anudba.wordpress.com&blog=4230320&post=155&subd=anudba&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><!--[if !mso]&gt; &lt;!  v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} --> <!--[endif]--><!--[if gte mso 9]&gt;  Normal 0   false false false        MicrosoftInternetExplorer4  &lt;![endif]--><!--[if gte mso 9]&gt;   &lt;![endif]--><!--[endif]--><!--  /* Font Definitions */  @font-face 	{font-family:Wingdings; 	panose-1:5 0 0 0 0 0 0 0 0 0; 	mso-font-charset:2; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:0 268435456 0 0 -2147483648 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} h3 	{mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	mso-outline-level:3; 	font-size:13.5pt; 	font-family:"Times New Roman";} a:link, span.MsoHyperlink 	{color:blue; 	text-decoration:underline; 	text-underline:single;} a:visited, span.MsoHyperlinkFollowed 	{color:purple; 	text-decoration:underline; 	text-underline:single;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:221645885; 	mso-list-type:hybrid; 	mso-list-template-ids:-1514741050 2102457502 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l0:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings; 	mso-ansi-font-weight:bold;} @list l1 	{mso-list-id:378361139; 	mso-list-type:hybrid; 	mso-list-template-ids:1518215562 686428376 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l1:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings; 	mso-ansi-font-weight:bold;} @list l2 	{mso-list-id:1596474857; 	mso-list-type:hybrid; 	mso-list-template-ids:-762823162 -673783022 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l2:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings; 	mso-ansi-font-weight:bold;} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --><!--[if gte mso 10]&gt; &lt;!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} table.MsoTableGrid 	{mso-style-name:"Table Grid"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	border:solid windowtext 1.0pt; 	mso-border-alt:solid windowtext .5pt; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-border-insideh:.5pt solid windowtext; 	mso-border-insidev:.5pt solid windowtext; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} --> <!--[endif]--></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>Introduction To Oracle&#8217;s Export And Import Utility :<br />
</strong>
</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">We use Oracle&#8217;s Export &amp; Import Utility to</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>1)logical Backup &amp; Recovery</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>2)Move the data between Databases</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">The <strong>Export Utility</strong> is used to transfer data objects between oracle databases.It can provide logical backup of</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">(a)Database Objects</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">(b)Tablespace</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">(c)Entire database</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">
<p class="MsoNormal" style="line-height:150%;">The <strong>Import Utility</strong> is used to read a valid export file for moving data into databases.We export table or complete schema ( Thatmeans all the objects within the schema like tables,view,sequences etc) into an export file called <strong>Dump file</strong>.</p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="text-align:justify;line-height:150%;">An <strong>Export file is an Oracle binary-format dump file</strong> that is typically located on disk or tape. The dump files can be transferred using FTP or physically transported (in the case of tape) to a different site. The files can then be used with the Import utility to transfer data between databases that are on systems not connected through a network. The files can also be used as backups in addition to normal backup procedures.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">The dump file will be with <strong>.dmp</strong> extension &amp; its default name will be <strong>expdata.dmp</strong>. Export dump files can only be read by the Oracle Import utility because it&#8217;s binary file ,we cannot read or understand that file.So we have to use the Import Utility to dump this file into any oracle database.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">The version of the Import utility cannot be earlier than the version of the Export utility used to create the dump file.</p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;"><strong>Note :</strong></p>
<p class="MsoNormal" style="text-align:justify;"><em>You can also display the contents of an export file without actually performing an import. To do this, use the Import SHOW parameter. </em></p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>Before Using Export :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">1)Make sure that u have run the script <strong>catalog.sql</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">2)Ensure that there is <strong>sufficient space</strong> in the disk to take export</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">3)Verify that u have access <strong>priviledges</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">
<p class="MsoNormal" style="text-align:justify;line-height:150%;">Lets dicuss the above 3 points in detail as fudamentals always paly a vital role.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>(1)Run the script </strong><strong>catalog.sql</strong> . After creating a database , we should always run 2scripts.One is catproc.sql &amp; another one catalog.sql.So this point is asking u to make sure that these scripts are executed &amp; most important point is ,these must be runned only once.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">The script catalog.sql performs the following tasks to prepare the database for Export:</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"># Creates the necessary export views in the data dictionary</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"># Creates the EXP_FULL_DATABASE role</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"># Assigns all necessary privileges to the EXP_FULL_DATABASE role</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"># Assigns EXP_FULL_DATABASE to the DBA role</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"># Records the version of catexp.sql that has been installed</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>2)Verifying<span> </span>the disk space :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><!--[if gte mso 9]&gt;  Normal 0   false false false        MicrosoftInternetExplorer4  &lt;![endif]--><!--[if gte mso 9]&gt;   &lt;![endif]--> <strong>In Linux :Using df &amp; du commands :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">Inorder to check disk space using command line,use the command df-h.This command will display space in Megs and Gigabytes.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">For Example :<strong> [root@anupama]# df-h</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">The command <strong>df </strong>stands for <strong>&#8220;disk filesystem&#8221;</strong>.With the -h option (df-h) it shows the disk space in <strong>&#8220;human readable&#8221;</strong>form.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">The <strong>du</strong> command shows the <strong>disk space used </strong>by the files and directories in the current directory.Again the -h option <strong>(df-h)</strong> makes the output easier to understand.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>(3)Verifying Access Privileges</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">To use Export, you must have the CREATE SESSION privilege on an Oracle database. To export tables owned by another user, you must have the EXP_FULL_DATABASE role enabled. This role is granted to all DBAs.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>NOTE :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">(a)If you do not have the system privileges contained in the EXP_FULL_DATABASE role, you cannot export objects contained in another user&#8217;s schema. For example, you cannot export a table in another user&#8217;s schema, even if you created a synonym for it.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">(b)The following schema names are reserved and will not be processed by Export :</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">ORDSYS</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">MDSYS</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">CTXSYS</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">ORDPLUGINS</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">LBACSYS</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">EXPORT :</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>Export can be done in 4 Modes :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">The Export utility provides four modes of export :</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">(a)Table</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">(b)User (Owner)</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">(c)Tablespace</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">(d)Full</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>Table Mode :</strong><span><strong> </strong> </span></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">Table mode exports only specified tables in the user&#8217;s schema.And only a<span> </span>priviledged user can export specified tables owned by other users.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>User Mode :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">User mode exports all objects for a user&#8217;s schema.Privileged users can export all objects in the schemas of a specified set of users.This mode can be used to take a full database export.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>Tablespace Mode :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">The transportable tablespace feature enables you to move a set of tablespaces from one Oracle database to another.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">To move or copy a set of tablespaces, you must make the tablespaces read-only, copy the datafiles of these tablespaces, and use Export and Import to move the database information (metadata) stored in the data dictionary. Both the datafiles and the metadata export file must be copied to the target database. The transport of these files can be done using any facility for copying flat binary files, such as the operating system copying facility, binary-mode FTP, or publishing on CD-ROMs.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">After copying the datafiles and exporting the metadata, you can optionally put the tablespaces in read/write mode.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>Full Database Mode :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">Full Database Mode<span> </span>exports all the database objects,except the objects which are there in SYS schema.Only privileged users can export in this mode.</p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;"><a href="http://anudba.files.wordpress.com/2008/09/exp_modes1.jpg"><img class="alignnone size-medium wp-image-156" title="exp_modes1" src="http://anudba.files.wordpress.com/2008/09/exp_modes1.jpg?w=300&#038;h=193" alt="" width="300" height="193" /></a></p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;"><!--[if gte vml 1]&gt;                    &lt;![endif]--><!--[if !vml]--><!--[endif]--></p>
<p class="MsoNormal" style="text-align:justify;"><strong>Note :</strong></p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;"><em>All users can export in table mode and user mode. Users with the </em>EXP_FULL_DATABASE<em> role (privileged users) can export in all modes.</em></p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;"><em>To specify one of these modes, use the appropriate parameter</em> (FULL, OWNER, TABLES, or TABLESPACES) <em>when you invoke Export.</em></p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>EXPORT WAYS :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>There are 2 ways to do export of data from Oracle Database:</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>1)Conventional Path Export</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>2)Direct Path Export</strong></p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;line-height:150%;">Conventional Path Export is the default mode of the Export Utility &amp; Direct Path Export can be done by setting parameter DIRECT=y.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><em><strong>Let me give you<span> </span>brief about these 2 ways of data export :</strong></em></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">Inorder to transfer large amount of data between databases , Conventional path export takes more time than direct path export because while doing export via conventional path ,the export utility extracts the data from the database using SQL statments and dump the results obtained (by quering) into the Database Buffer Cache.And from the Buffer cache,the data then gets evaluated in the evaluating buffer and the finally gets dumped into the external binary dump file.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">Where as while taking export via Direct path , there is no &#8220;evaluation of data&#8221; step and the data gets transferred to the external dump file from Database Buffer Cache.So this elimination of step leads to speedy data transfer.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>Its good that export via Direct path is fast but it has the following restrictions :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">1)The direct-path option cannot be invoked in interactive manner.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">2)The character set on the client and server side should be same.For this we have to use the NLS_LANG environmental variable to set the same character set as the server .</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">3)The BUFFER parameter of export utility has no effect on dirct-path.It&#8217;s used only by the conventional path option.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">4)The rows containing LOB,BFILE,REF or object types cant be exported using direct export.Only the data definition to create the table is exported but not the data.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>Export Methods :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">Export can be done using the following methods :</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">1)Command-line entries</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">2)Interactive Export prompts</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">3)Parameter files</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">4)Oracle Enterprise Manager</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>Note :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><em>Many options are only available by using the command-lineinterface.You can also use a parameter file with command line.<strong></strong></em></p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;"><strong>METHOD 1 :</strong></p>
<p class="MsoNormal" style="text-align:justify;"><strong> </strong></p>
<p class="MsoNormal" style="text-align:justify;"><strong>Command-line entries for export :</strong></p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;"><strong>General Syntax :</strong></p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;"><strong>EXP username/passowrd parameters(value1,value2,&#8230;..valuen)</strong></p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">First Lets have look at some export parameters which are oftenly used by DBA’s.</p>
<p class="MsoNormal" style="text-align:justify;"><a href="http://anudba.files.wordpress.com/2008/09/exp_parameters1.jpg"><img class="alignnone size-medium wp-image-164" title="exp_parameters1" src="http://anudba.files.wordpress.com/2008/09/exp_parameters1.jpg?w=300&#038;h=193" alt="" width="300" height="193" /></a></p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;"><strong>Examples</strong></p>
<p class="MsoNormal" style="text-align:justify;"><strong> </strong></p>
<p class="MsoNormal" style="text-align:justify;">1)To create a export file named export1.dmp to export two tables called</p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">EMPLOYEES &amp; DEPARTMENTS, that are present in HR schema including all the rows of it.</p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal"><strong>C:\&gt;EXP hr/hr tables=(employees,departments) rows=y file=export1.dmp</strong></p>
<p class="MsoNormal">
<p class="MsoNormal" style="text-align:justify;">2)To create a fast export file named export2.dmp that includes all the</p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">objects for HR schema</p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;"><strong>C:\&gt;EXP system/manager file=export2.dmp owner=hr direct=y</strong></p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;"><strong>Note :</strong> If the file is not specified then the default export fime name will</p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">be expdat.dmp</p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">3)To create an export file named export3.dmp that includes all the object</p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">definitions belonging to the tablespace called ts_employees &amp; also generate</p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">a logfile named <span> </span>ts_employees.log</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>C:\&gt;EXP system/manager TRANSPORT_TABLESPACE=y TABLESPACES=(ts_emplyees) LOG=ts_emplyees.log</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong> </strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">4)To create an export file named=export4.dmp that includes all definitions and data modified in the database since the last cummulative or complete export.</p>
<p class="MsoNormal" style="line-height:150%;"><strong>C:\&gt;EXP system/manager FULL=y INCTYPE=cummulative FILE=export4.dmp</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong> </strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>Method 2 :</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>Interactive Export :</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>Step 1 : Set ORACLE_SID=(your sid name)</strong></p>
<p class="MsoNormal" style="line-height:150%;">Set the ORACLE_SID to the name of the Oracle Instance with which you want the Export untility to communicate to extract the information.</p>
<p class="MsoNormal" style="line-height:150%;"><strong>Step 2 :</strong><strong> </strong>Start the export in the command prompt by issuing the command &#8220;EXP&#8221;</p>
<p class="MsoNormal" style="line-height:150%;">C:\&gt;exp</p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>Step 3:</strong> It will ask for username and password.Then we have to provide the username and password with which we connect to the database.Here i have used</p>
<p class="MsoNormal" style="line-height:150%;"><span> </span><strong>username:system</strong></p>
<p class="MsoNormal" style="line-height:150%;"><span> </span><strong>password:manager</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>Step 4 :</strong> So after getting user credentials(login/pwd),we have to answer the questions asked by Export Utility before exporting.</p>
<p class="MsoNormal" style="line-height:150%;">The first question would be the buffer size you want to use to fetch the data.The default size is 4096k.If you want to stick with the defalut size then just press ENTER key.</p>
<p class="MsoNormal" style="line-height:150%;"><strong>Enter array fetch buffer size:4096&gt;</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>Step 5 :</strong> Then the Export untility will ask for the external dump file.So we need to provide the dump file name including path where you want to store the this file.Remember the dump file extention must be .dmp where as the file can be of any name.If we dont mention the name of the dump file then default name expdat.dmp will be considered.</p>
<p class="MsoNormal" style="line-height:150%;"><strong>Export file:expdat.dmp&gt;emp.dmp</strong></p>
<p class="MsoNormal" style="line-height:150%;">(here emp.dmp is the name of the dump file of user&#8217;s choice)</p>
<p class="MsoNormal" style="line-height:150%;"><strong>Step 6 :</strong> Next it will ask for the data that user wants to export.It can be entire database ,tables or users.<strong></strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>(1)E&lt;ntire database&gt;,(2)U&lt;sers&gt;,or (3)T&lt;ables&gt;;(2)U &gt;</strong></p>
<p class="MsoNormal" style="line-height:150%;">So if you want to export entire database then select the first option.</p>
<p class="MsoNormal" style="line-height:150%;">By default its Users option .</p>
<p class="MsoNormal" style="line-height:150%;"><strong>Step 7 :</strong><strong> </strong>It will ask about the grants</p>
<p class="MsoNormal" style="line-height:150%;">By defalut its yes.I have also selected yes</p>
<p class="MsoNormal" style="line-height:150%;"><strong>Export grants &lt;yes/no&gt;:yes&gt;y</strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>Step 8 :</strong><strong> </strong>The it will ask for the table data to export or not</p>
<p class="MsoNormal" style="line-height:150%;">By defalut its yes.I have also selected yes</p>
<p class="MsoNormal" style="line-height:150%;"><strong>Export table data &lt;yes/no&gt;:yes&gt;y</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>Step 9 :</strong> Then it will ask whether to compress extents or not.</p>
<p class="MsoNormal" style="line-height:150%;">By default its yes.</p>
<p class="MsoNormal" style="line-height:150%;"><strong>Compress extents (yes/No):y</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>Step 10 :</strong> Once all the questions are answeres correctly , the export process will be started.</p>
<p class="MsoNormal" style="line-height:150%;">I have shown the execution of all the above 10 steps in the following screen shot.</p>
<p class="MsoNormal" style="line-height:150%;"><!--[if gte vml 1]&gt;  &lt;![endif]--><!--[if !vml]--><!--[endif]--><strong></strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><a href="http://anudba.files.wordpress.com/2008/09/export1.jpg"><img class="alignnone size-medium wp-image-158" title="export1" src="http://anudba.files.wordpress.com/2008/09/export1.jpg?w=300&#038;h=193" alt="" width="300" height="193" /></a></p>
<p class="MsoNormal" style="line-height:150%;"><strong>Method 3 :</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>PAR FILE Export :</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>Step 1 : Set ORACLE_SID=orange</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>Step 2 :</strong> Create a seperate file having all the parameters lined up<span> </span>&amp; save it as abc.dat , in a location of ur choice , as shown in the screen shot.</p>
<p class="MsoNormal" style="line-height:150%;"><a href="http://anudba.files.wordpress.com/2008/09/parfile_abd1.jpg"><img class="alignnone size-medium wp-image-159" title="parfile_abd1" src="http://anudba.files.wordpress.com/2008/09/parfile_abd1.jpg?w=300&#038;h=193" alt="" width="300" height="193" /></a></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;"><!--[if gte vml 1]&gt;  &lt;![endif]--><!--[if !vml]--><!--[endif]--></p>
<p class="MsoNormal" style="line-height:150%;"><strong>Step 3 : </strong>Now run the Export Untility specifying the PARFILE parameter.</p>
<p class="MsoNormal" style="line-height:150%;"><strong>C:\&gt;exp system/manager parfile=abc.dat</strong></p>
<p class="MsoNormal" style="line-height:150%;"><a href="http://anudba.files.wordpress.com/2008/09/parfile_execution3.jpg"><img class="alignnone size-medium wp-image-160" title="parfile_execution3" src="http://anudba.files.wordpress.com/2008/09/parfile_execution3.jpg?w=300&#038;h=193" alt="" width="300" height="193" /></a></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="text-align:justify;"><!--[if gte vml 1]&gt;  &lt;![endif]--><!--[if !vml]--><!--[endif]--></p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">Once the above command is issued , the execution process will start automatically.</p>
<p class="MsoNormal" style="text-align:justify;">Next post will be the continuation of this post Thats on Import Utility.</p>
<p class="MsoNormal" style="text-align:justify;">References :</p>
<p class="MsoNormal" style="text-align:justify;">1)Oracle DBA 9i Fundamentals II Book</p>
<p class="MsoNormal" style="text-align:justify;">2)Google</p>
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
<p class="MsoNormal" style="text-align:justify;">
Posted in Export Utility, ORACLE Tagged: Oracle's Export Utility <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anudba.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anudba.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anudba.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anudba.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anudba.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anudba.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anudba.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anudba.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anudba.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anudba.wordpress.com/155/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anudba.wordpress.com&blog=4230320&post=155&subd=anudba&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://anudba.wordpress.com/2008/09/20/export-utility/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3d6c754ec275f9098adfbce702691153?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">Anu</media:title>
		</media:content>

		<media:content url="http://anudba.files.wordpress.com/2008/09/exp_modes1.jpg?w=300" medium="image">
			<media:title type="html">exp_modes1</media:title>
		</media:content>

		<media:content url="http://anudba.files.wordpress.com/2008/09/exp_parameters1.jpg?w=300" medium="image">
			<media:title type="html">exp_parameters1</media:title>
		</media:content>

		<media:content url="http://anudba.files.wordpress.com/2008/09/export1.jpg?w=300" medium="image">
			<media:title type="html">export1</media:title>
		</media:content>

		<media:content url="http://anudba.files.wordpress.com/2008/09/parfile_abd1.jpg?w=300" medium="image">
			<media:title type="html">parfile_abd1</media:title>
		</media:content>

		<media:content url="http://anudba.files.wordpress.com/2008/09/parfile_execution3.jpg?w=300" medium="image">
			<media:title type="html">parfile_execution3</media:title>
		</media:content>
	</item>
		<item>
		<title>CREATION OF DATABASE RESOURCE MANAGER OBJECTS :</title>
		<link>http://anudba.wordpress.com/2008/09/01/creation-of-database-resource-manager-objects/</link>
		<comments>http://anudba.wordpress.com/2008/09/01/creation-of-database-resource-manager-objects/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 06:34:29 +0000</pubDate>
		<dc:creator>Anupama</dc:creator>
				<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[RESOURCE MANAGER]]></category>

		<guid isPermaLink="false">http://anudba.wordpress.com/?p=129</guid>
		<description><![CDATA[

CREATING DATABASE RESOURCE MANAGER OBJECTS :
Point 1:
We create database resource manager objects using a package called dbms_resource_manager.
Point 2 :
Suppose there are many users requesting for the resources,then it is the DBA&#8217;s job to decide like to which user has to be given priority so that he can be associated to the consumer group and hence [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anudba.wordpress.com&blog=4230320&post=129&subd=anudba&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><!--[if gte mso 9]&gt;  Normal 0   false false false        MicrosoftInternetExplorer4  &lt;![endif]--><!--[if gte mso 9]&gt;   &lt;![endif]--></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>CREATING DATABASE RESOURCE MANAGER OBJECTS :</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>Point 1:</strong></p>
<p class="MsoNormal" style="line-height:150%;">We create database resource manager objects using a package called <strong>dbms_resource_manager.</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>Point<span> </span>2 :</strong></p>
<p class="MsoNormal" style="line-height:150%;">Suppose there are many users requesting for the resources,then it is the DBA&#8217;s job to decide like to which user has to be given priority so that he can be associated to the consumer group and hence the response time in retrieving data from the table will be less. so here ,</p>
<p class="MsoNormal" style="line-height:150%;"><strong>Create a </strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>(a) Pending Area</strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>(b) Resource consumer groups</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong> </strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>(c) Resource plan</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong> </strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>(d) Resource plan directive</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong> </strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>(e) Validating&amp;Submiting pending area</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong> </strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>(f) Associate user with consumer group (along with switch privs)</strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>STEPS :</strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>Step 1 :</strong> Select a user.let us consider the user as &#8216;HR&#8217;.</p>
<p class="MsoNormal" style="line-height:150%;"><strong>Step 2 :</strong> Check its default consumer group using the following query.</p>
<p class="MsoNormal" style="line-height:150%;"><strong>SQL&gt; select initial_rsrc_consumer_group from dba_users where username=&#8217;HR&#8217;;</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>INITIAL_RSRC_CONSUMER_GROUP</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>DEFAULT_CONSUMER_GROUP</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>Step 3 :</strong> Now,create a pending area.</p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>SQL&gt; exec dbms_resource_manager.create_pending_area();</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong> </strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>PL/SQL procedure successfully completed.</strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>Step 4:</strong> Create a consumer group.</p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>SQL&gt; exec dbms_resource_manager.create_consumer_group(-</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>&gt; consumer_group =&gt; &#8216;anu&#8217; , comment =&gt; &#8216;Doubt&#8217;);</strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>PL/SQL procedure successfully completed.</strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><em>/* here consumer group name is “anu” &amp; in place of comment you </em></p>
<p class="MsoNormal" style="line-height:150%;"><em>can write any description about the group for further reference.*/</em></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>Step 5 :</strong> Then next is we need to create a resource plan.</p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>SQL&gt; exec dbms_resource_manager.create_plan(-</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>&gt; plan =&gt; &#8216;abc&#8217; ,comment =&gt; &#8216;xyz&#8217;);</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong> </strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>PL/SQL procedure successfully completed.</strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>Step 6 :</strong> Next, create a resource plan directive.</p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>SQL&gt; exec dbms_resource_manager.create_plan_directive (-</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>&gt; plan =&gt; &#8216;abc&#8217;, group_or_subplan =&gt; &#8216;OTHER_GROUPS&#8217; , comment =&gt; &#8216;efg&#8217;);</strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>PL/SQL procedure successfully completed.</strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>Step 7 :</strong> Validate the pending area.</p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>SQL&gt; exec dbms_resource_manager.validate_pending_area();</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong> </strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>PL/SQL procedure successfully completed.</strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>NOTE:</strong></p>
<p class="MsoNormal" style="line-height:150%;"><em>/* here one point u need to notice:if u specify group_or_subplan =DEFAULT_CONSUMER_GROUP&#8217; &amp; u tried to validate the pending area,then u will encounter the following error as follows.</em></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>SQL&gt; exec dbms_resource_manager.create_plan_directive (-</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>&gt; plan =&gt; &#8216;abc&#8217;, group_or_subplan =&gt; &#8216;DEFAULT_CONSUMER_GROUP&#8217; , comment =&gt; &#8216;efg&#8217;);</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong> </strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>SQL&gt; exec dbms_resource_manager.validate_pending_area();</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>BEGIN dbms_resource_manager.validate_pending_area(); END;</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>*</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>ERROR at line 1:</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>ORA-29382: validation of pending area failed</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>ORA-29377: consumer group OTHER_GROUPS is not part of top-plan ABC</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>ORA-06512: at &#8220;SYS.DBMS_RMIN&#8221;, line 56</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>ORA-06512: at &#8220;SYS.DBMS_RESOURCE_MANAGER&#8221;, line 293</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>ORA-06512: at line 1<span> </span>*/</strong></p>
<p class="MsoNormal" style="line-height:150%;"><span> </span></p>
<p class="MsoNormal" style="line-height:150%;"><strong>Step 8 :</strong> Now, after validating we need to submit the pending area.Actually without performing validation u can directly execute submit command as shown below but oracle advices to do validation.</p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>SQL&gt; exec dbms_resource_manager.submit_pending_area();</strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>PL/SQL procedure successfully completed. </strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>Step 9 :</strong> Now u need to associate user &#8216;HR&#8217; with the consumer group &#8216;anu&#8217; which we created above.</p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>SQL&gt;<span> </span>exec dbms_resource_manager_privs.grant_switch_consumer_group(-</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>&gt; grantee_name =&gt; &#8216;HR&#8217;, consumer_group =&gt; &#8216;Anu&#8217;,grant_option =&gt; False);</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong> </strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>PL/SQL procedure successfully completed.</strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>Note :</strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><em>/* Here also u need to note one important point.Inorder to make HR user to associate with the cosumer group u need to grant privilege to switch to the consumer group(Anu).otherwise it will throw error as shown below.</em></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>SQL&gt; exec dbms_resource_manager.set_initial_consumer_group(-</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>&gt; user =&gt; &#8216;HR&#8217; , consumer_group =&gt; &#8216;Anu&#8217;);</strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>BEGIN dbms_resource_manager.set_initial_consumer_group( user =&gt; &#8216;HR&#8217; , consumer_group =&gt; &#8216;Anu&#8217;); END;</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>*</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>ERROR at line 1:</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>ORA-29399: user HR does not have privilege to switch to consumer group ANU</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>ORA-06512: at &#8220;SYS.DBMS_RMIN&#8221;, line 56</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>ORA-06512: at &#8220;SYS.DBMS_RESOURCE_MANAGER&#8221;, line 315</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>ORA-06512: at line 1<span> </span>*/</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong> </strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>Step 10 :</strong> Now,in the last step set the initial consumer group for the user as follows.</p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;"><strong>SQL&gt; exec dbms_resource_manager.set_initial_consumer_group(-</strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>&gt; user =&gt; &#8216;HR&#8217; , consumer_group =&gt; &#8216;Anu&#8217;);<span> </span></strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong> </strong></p>
<p class="MsoNormal" style="line-height:150%;"><strong>PL/SQL procedure successfully completed.</strong></p>
<p class="MsoNormal" style="line-height:150%;">
<p class="MsoNormal" style="line-height:150%;">
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/anudba.wordpress.com/129/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/anudba.wordpress.com/129/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anudba.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anudba.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anudba.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anudba.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anudba.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anudba.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anudba.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anudba.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anudba.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anudba.wordpress.com/129/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anudba.wordpress.com&blog=4230320&post=129&subd=anudba&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://anudba.wordpress.com/2008/09/01/creation-of-database-resource-manager-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3d6c754ec275f9098adfbce702691153?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">Anu</media:title>
		</media:content>
	</item>
		<item>
		<title>STATSPACK CREATION IN LINUX &amp; WINDOWS</title>
		<link>http://anudba.wordpress.com/2008/07/29/statspack-creation-in-linux-windows-2/</link>
		<comments>http://anudba.wordpress.com/2008/07/29/statspack-creation-in-linux-windows-2/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 12:02:56 +0000</pubDate>
		<dc:creator>Anupama</dc:creator>
				<category><![CDATA[Performance Tuning]]></category>

		<guid isPermaLink="false">http://anudba.wordpress.com/?p=99</guid>
		<description><![CDATA[ STATSPACK CREATION IN WINDOWS :
STEP 1 : 
RUN THE SCRIPT spcreate.sql at the sql prompt.
 SQL&#62;@D:\oracle\rdbms\admin\spcreate.sql
 -&#62;Once u press enter the oracle server will automatically start installing packages.
-&#62;Then create a default user perfstat.In windows we need not select password for
 this user ,it will implicitly take password as perfstat only.But in linux u have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anudba.wordpress.com&blog=4230320&post=190&subd=anudba&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong> STATSPACK CREATION<span> </span>IN WINDOWS :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>STEP 1 : </strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>RUN THE SCRIPT </strong><strong>spcreate.sql </strong><strong>at the sql prompt.</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span> </span><strong>SQL&gt;@D:\oracle\rdbms\admin\spcreate.sql</strong></p>
<p class="MsoNormal" style="margin-left:30pt;text-align:justify;line-height:150%;"><span> </span>-&gt;Once u press enter the oracle server will automatically start installing packages.</p>
<p class="MsoNormal" style="margin-left:30pt;text-align:justify;line-height:150%;">-&gt;Then create a default user <strong>perfstat</strong>.In windows we need not select password for</p>
<p class="MsoNormal" style="margin-left:30pt;text-align:justify;line-height:150%;"><span> </span>this user ,it will implicitly take password as <strong>perfstat</strong> only.But in linux u have to</p>
<p class="MsoNormal" style="margin-left:30pt;text-align:justify;line-height:150%;"><span> </span><span> </span><span> </span>specify password when it is prompted.</p>
<p class="MsoNormal" style="margin-left:30pt;text-align:justify;line-height:150%;">-&gt;It will automatically execute the following command:</p>
<p class="MsoNormal" style="margin-left:48pt;text-align:justify;line-height:150%;"><strong>Conn</strong><strong> perfstat/perfstat</strong>.Hence u need not enter specifically.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>STEP 2 : </strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>IT WILL ASK TO SPECIFY DEFAULT TABLESPACE &amp; TEMPORARY TABLESPACE.</strong></p>
<p class="MsoNormal" style="margin-left:30pt;line-height:150%;">-&gt; If u didn’t create separate default and temporary tablespace then u can use <span> </span></p>
<p class="MsoNormal" style="margin-left:30pt;line-height:150%;"><span> </span>default tablespace as <strong>users</strong> &amp; temporary tablespace as <strong>temp.</strong></p>
<p class="MsoNormal" style="margin-left:30pt;line-height:150%;"><span> </span><strong><span> </span>Example :</strong></p>
<p class="MsoNormal" style="margin-left:30pt;line-height:150%;"><span> </span>Choose the PERFSTAT user&#8217;s temporary tablespace:<strong>user</strong></p>
<p class="MsoNormal" style="line-height:150%;"><span> </span><span> </span><span> </span>Specifying the SYSTEM tablespace will result in the installation</p>
<p class="MsoNormal" style="margin-left:30pt;line-height:150%;"><span> </span>FAILING, as using SYSTEM for the temporary tablespace is not recommended. <span> </span></p>
<p class="MsoNormal" style="line-height:150%;"><span> </span><span> </span>Specify PERFSTAT user&#8217;s temporary tablespace.</p>
<p class="MsoNormal" style="margin-left:30pt;line-height:150%;"><span> </span>Enter value for temporary_tablespace: <strong>temp</strong></p>
<p class="MsoNormal" style="margin-left:30pt;text-align:justify;line-height:150%;">-&gt; After specifying tablespaces it’ll create corresponding rows,tables,synonyms <span> </span><span> </span></p>
<p class="MsoNormal" style="margin-left:30pt;text-align:justify;line-height:150%;"><span> </span>and also grant priviledges.</p>
<p class="MsoNormal" style="margin-left:30pt;text-align:justify;line-height:150%;">-&gt; Automatically connect as perfstat/perfstat and install the statspack package.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong> </strong><strong>STEP 3 :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>EXECUTE THE COMMAND TO CREATE SNAP SHOTS</strong><strong></strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span> </span><strong>SQL&gt;</strong> <strong>execute statspack.snap</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong><span> </span></strong>Execute the above command some 4 times so that u can select the begin snap id as 1</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span> </span>&amp; the end snap id as 4.Its not compulsory to execute 4 times u can execute it 2 times.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>STEP 4 :</strong><strong> </strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">NOW EXECUTE SCRIPT (spreport.sql) TO GENERATE THE REPORT</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong><span> </span>SQL&gt;@D:\oracle\rdbms\admin\spreport.sql</strong></p>
<p class="MsoNormal" style="text-align:justify;text-indent:.25in;line-height:150%;">-&gt;After creating report , it ‘ll ask to specify the report name.(sp_1.lst or sp_1.txt)</p>
<p class="MsoNormal" style="margin-left:.25in;text-align:justify;line-height:150%;">-&gt; U can also specify the location where u want to store the report.That means u have <span> </span></p>
<p class="MsoNormal" style="margin-left:.25in;text-align:justify;line-height:150%;"><span> </span>to specify the path along with the report name as follows :</p>
<p class="MsoNormal" style="margin-left:45pt;text-align:justify;line-height:150%;"><strong>D:\oracle\PT_REPORT\sp_1.lst</strong></p>
<p class="MsoNormal" style="margin-left:.25in;text-align:justify;line-height:150%;"><span> </span>Where PT_REPORT = folder in which all the reports can be stored.</p>
<p class="MsoNormal" style="margin-left:.25in;text-align:justify;line-height:150%;"><span> </span>Sp_1.lst = report name</p>
<p class="MsoNormal" style="margin-left:.25in;text-align:justify;line-height:150%;">-&gt; If u did not specify the location then the report will be stored in the default location i.e..<strong>c:\Documents\settings\anupama\sp_1.lst</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>STEP 5 : FINALLY VIEW THE REPORT</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">
<p class="MsoNormal" style="text-align:justify;line-height:150%;">
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>STATSPACK CREATION<span> </span>IN LINUX</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>STEP 1 :<br />
</strong>
</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">RUN THE SCRIPT <strong>spcreate.sql </strong>at the sql prompt.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span> </span><strong>SQL&gt;@/oracle/ora92/rdbms/admin/spcreate.sql</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>STEP 2 :<br />
</strong>
</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">It will ask password for perfstat user</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span> </span>Specify as <strong>perstat</strong> (u can specify diff p/w also)</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>STEP 3 :<br />
</strong>
</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">Enter the default tablespace</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span> </span><strong>Users</strong>(u can specify user create default tablespace also)</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>STEP 4 :<br />
</strong>
</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">Enter the temporary tablespace</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span> </span><strong>Temp</strong>(u can specify user create temporary tablespace also)</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>STEP 5 :<br />
</strong>
</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">Connect as perfstat user</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>SQL&gt;conn<span> </span>perfstat/perfstat</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>Note :</strong>without connecting to perfstat user also ,u can execute the below step but it is adviced by oracle to connect and then execute the script.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>STEP 6 :<br />
</strong>
</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">Execute the command to create snap shots</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span> </span><strong>SQL&gt;execute statspack.snap</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong><span> </span></strong>Execute it some 2 or more times</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>Note:</strong>Instead of manually entering the above command u can run the script <strong>spauto.sql </strong>,<strong> </strong>so that it will automatically execute that command based on the time interval u mentioned in the script &amp; then u can take the report.(i.e, directly u can proceed with the below step)</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>STEP 7 :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">Execute the script to generate report.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>SQL&gt;@/oracle/ora92/ rdbms/admin/spreport.sql</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>STEP 8 :<br />
</strong>
</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">Enter the begin &amp; end snap shot id.If u executed the above script 2 times then the</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong><span> </span>Begin snap shot id</strong> will <strong>1</strong> and the <strong>end snap shot id</strong> will be <strong>2</strong>.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>STEP 9 :<br />
</strong>
</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">It’ll ask for report name.Here u can directly specify the report name but it ll get stored in a default location(i.e from the place where u executed the script) ,where in if u specify the location along with report name then it will store the report in a location u want.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong><span> </span>/oracle/pt_reports/sp_report_1.lst </strong>(sp_report_1 is the report name)<strong></strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>STEP 10 :<br />
</strong>
</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">Then exit and see the report in a location where u stored ,if location is not specified check in the default location i.e.from where u executed the script.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span> </span><strong>Vi<span> </span>sp_report_1.lst</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><strong>SUMMARY OF STATSPACK OUTPUT :</strong></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">In output you will get details about the following things</p>
<p class="MsoNormal" style="margin-left:.5in;text-align:justify;text-indent:-.25in;line-height:150%;"><!--[if !supportLists]--><span style="font-family:Wingdings;"></span><!--[endif]-->Database and instance name</p>
<p class="MsoNormal" style="margin-left:.5in;text-align:justify;text-indent:-.25in;line-height:150%;"><!--[if !supportLists]--><span style="font-family:Wingdings;"></span>Time at which the snapshots were taken</p>
<p class="MsoNormal" style="margin-left:.5in;text-align:justify;text-indent:-.25in;line-height:150%;"><!--[if !supportLists]--><span style="font-family:Wingdings;"><span><span style="font-family:&quot;font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;"> </span></span></span><!--[endif]-->Current sizes of the caches</p>
<p class="MsoNormal" style="margin-left:.5in;text-align:justify;text-indent:-.25in;line-height:150%;"><!--[if !supportLists]--><span style="font-family:Wingdings;"><span><span style="font-family:&quot;font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;"> </span></span></span><!--[endif]-->Load profile</p>
<p class="MsoNormal" style="margin-left:.5in;text-align:justify;text-indent:-.25in;line-height:150%;"><!--[if !supportLists]--><span style="font-family:Wingdings;"><span><span style="font-family:&quot;font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;"> </span></span></span><!--[endif]-->Efficiency percentages of the instance</p>
<p class="MsoNormal" style="margin-left:.5in;text-align:justify;text-indent:-.25in;line-height:150%;"><!--[if !supportLists]--><span style="font-family:Wingdings;"><span><span style="font-family:&quot;font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;"> </span></span></span><!--[endif]-->Top five wait events &amp; Complete list of wait events</p>
<p class="MsoNormal" style="margin-left:.5in;text-align:justify;text-indent:-.25in;line-height:150%;"><!--[if !supportLists]--><span style="font-family:Wingdings;"><span><span style="font-family:&quot;font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;"> </span></span></span><!--[endif]-->Information on sql statements currently in the pool</p>
<p class="MsoNormal" style="margin-left:.5in;text-align:justify;text-indent:-.25in;line-height:150%;"><!--[if !supportLists]--><span style="font-family:Wingdings;"><span><span style="font-family:&quot;font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;"> </span></span></span><!--[endif]-->Instance activity statistics &amp; Latch activity</p>
<p class="MsoNormal" style="margin-left:.5in;text-align:justify;text-indent:-.25in;line-height:150%;"><!--[if !supportLists]--><span style="font-family:Wingdings;"><span><span style="font-family:&quot;font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;"> </span></span></span><!--[endif]-->Tablespace &amp; file i/o</p>
<p class="MsoNormal" style="margin-left:.5in;text-align:justify;text-indent:-.25in;line-height:150%;"><!--[if !supportLists]--><span style="font-family:Wingdings;"><span><span style="font-family:&quot;font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;"> </span></span></span><!--[endif]-->Buffer pool statistics &amp; SGA statistics</p>
<p class="MsoNormal" style="margin-left:.5in;text-align:justify;text-indent:-.25in;line-height:150%;"><!--[if !supportLists]--><span style="font-family:Wingdings;"><span><span style="font-family:&quot;font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;"> </span></span></span><!--[endif]-->Rollback or undo segment statistics</p>
<p class="MsoNormal" style="margin-left:.5in;text-align:justify;text-indent:-.25in;line-height:150%;"><!--[if !supportLists]--><span style="font-family:Wingdings;"><span><span style="font-family:&quot;font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;"> </span></span></span><!--[endif]-->Dictionary&amp;library cach statistics</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/anudba.wordpress.com/190/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/anudba.wordpress.com/190/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anudba.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anudba.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anudba.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anudba.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anudba.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anudba.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anudba.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anudba.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anudba.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anudba.wordpress.com/190/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anudba.wordpress.com&blog=4230320&post=190&subd=anudba&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://anudba.wordpress.com/2008/07/29/statspack-creation-in-linux-windows-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3d6c754ec275f9098adfbce702691153?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">Anu</media:title>
		</media:content>
	</item>
	</channel>
</rss>