<?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>OracleFunda</title>
	<atom:link href="http://oraclefunda.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://oraclefunda.wordpress.com</link>
	<description>Oracle Technology related articles</description>
	<lastBuildDate>Mon, 19 Sep 2011 09:23:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='oraclefunda.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/01fdbfbfe4ca494f0db013073c0926b9?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>OracleFunda</title>
		<link>http://oraclefunda.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://oraclefunda.wordpress.com/osd.xml" title="OracleFunda" />
	<atom:link rel='hub' href='http://oraclefunda.wordpress.com/?pushpress=hub'/>
		<item>
		<title>How to speed up Index creation in Oracle database</title>
		<link>http://oraclefunda.wordpress.com/2009/12/02/how-to-speed-up-index-creation-in-oracle-database/</link>
		<comments>http://oraclefunda.wordpress.com/2009/12/02/how-to-speed-up-index-creation-in-oracle-database/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 18:48:55 +0000</pubDate>
		<dc:creator>aalapsharma</dc:creator>
				<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[create fast index]]></category>
		<category><![CDATA[create index]]></category>
		<category><![CDATA[fast index creation]]></category>
		<category><![CDATA[faster indexes]]></category>
		<category><![CDATA[improve index performance]]></category>
		<category><![CDATA[improve performance]]></category>
		<category><![CDATA[index creation]]></category>
		<category><![CDATA[indexes]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle Database 10g]]></category>
		<category><![CDATA[performance tuning]]></category>
		<category><![CDATA[reduce index creation time]]></category>

		<guid isPermaLink="false">http://oraclefunda.wordpress.com/?p=72</guid>
		<description><![CDATA[Imagine a situation where you have to create an index on a table having 1 billion records. It might take approximately 4-5 hours to create the index. But there are ways to fasten this process. Following are some of the tips that will help you to create indexes faster than the normal time.  Tip#1 &#8211; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraclefunda.wordpress.com&amp;blog=3740344&amp;post=72&amp;subd=oraclefunda&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Imagine a situation where you have to create an index on a table having 1 billion records. It might take approximately 4-5 hours to create the index. But there are ways to fasten this process. Following are some of the tips that will help you to create indexes faster than the normal time. </p>
<p><strong>Tip#1 &#8211; PARALLEL:<br />
</strong>While creating index oracle must first collect the symbolic key/ROWID pairs with a full-table scan. When you specify Parallel option to the create index script oracle will perform a full table scan in parallel threads based on the number of CPUs, table partitioning and disk configuration and hence will reduce index creation time.</p>
<p>Following will work fine on a server that has 4 CPUs:</p>
<p>create index indx_t_doc on t_document(doc_id,doc_type) parallel 3;<br />
<strong> </strong></p>
<p><strong>Tip#2 &#8211; NOLOGGING: </strong><br />
The NOLOGGING keyword in create index command will restrict the database from generating large redo logs and will create minimal redo log. This will improve the performance of Create index command.</p>
<p>create index indx_t_doc on t_document(doc_id,doc_type) PARALLEL 3 NOLOGGING;<br />
<strong> </strong></p>
<p><strong>Tip#3 &#8211; COMPRESS:<br />
</strong>The COMPRESS option will enable key compression. It eliminates repeated occurrence of key column values and may substantially reduce storage. Use integer to specify the prefix length (number of prefix columns to compress).<br />
For unique indexes, the valid range of prefix length values is from 1 to the number of key columns minus 1. The default prefix length is the number of key columns minus 1.</p>
<p>For nonunique indexes, the valid range of prefix length values is from 1 to the number of key columns. The default prefix length is the number of key columns.</p>
<p>create index indx_t_doc on t_document(doc_id,doc_type) PARALLEL 3 NOLOGGING COMPRESS;</p>
<p>Follow these simple tips and save your time.</p>
<p>Happy Indexing <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oraclefunda.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oraclefunda.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oraclefunda.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oraclefunda.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oraclefunda.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oraclefunda.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oraclefunda.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oraclefunda.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oraclefunda.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oraclefunda.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oraclefunda.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oraclefunda.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oraclefunda.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oraclefunda.wordpress.com/72/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraclefunda.wordpress.com&amp;blog=3740344&amp;post=72&amp;subd=oraclefunda&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oraclefunda.wordpress.com/2009/12/02/how-to-speed-up-index-creation-in-oracle-database/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eff5b352aeed3d0d32c409d3b7592eff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aalapsharma</media:title>
		</media:content>
	</item>
		<item>
		<title>Query to find Top 5 wait events in Database</title>
		<link>http://oraclefunda.wordpress.com/2009/10/30/query-to-find-top-5-wait-events-in-database/</link>
		<comments>http://oraclefunda.wordpress.com/2009/10/30/query-to-find-top-5-wait-events-in-database/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 16:39:03 +0000</pubDate>
		<dc:creator>aalapsharma</dc:creator>
				<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[manual query]]></category>
		<category><![CDATA[OEM query]]></category>
		<category><![CDATA[Oracle Database 10g]]></category>
		<category><![CDATA[performance optimization]]></category>
		<category><![CDATA[performance tuning]]></category>
		<category><![CDATA[query to find top 5 wait events]]></category>
		<category><![CDATA[top 5 wait events]]></category>
		<category><![CDATA[wait events]]></category>

		<guid isPermaLink="false">http://oraclefunda.wordpress.com/?p=63</guid>
		<description><![CDATA[Performance optimization of databases is one of the routine tasks of DBAs. This task becomes very easy when you have Oracle Enterprise Manager tool installed. You can generate various reports from AWR and analyze the health of the database and then tune it accordingly. This is normal in every DBA&#8217;s life. But what if you don&#8217;t [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraclefunda.wordpress.com&amp;blog=3740344&amp;post=63&amp;subd=oraclefunda&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Performance optimization of databases is one of the routine tasks of DBAs. This task becomes very easy when you have Oracle Enterprise Manager tool installed. You can generate various reports from AWR and analyze the health of the database and then tune it accordingly. This is normal in every DBA&#8217;s life.</p>
<p>But what if you don&#8217;t have the OEM installed? This is very much possible in a test environment. In this case, you need to generate the reports manually. You need to query the database to extract the data requried for analysis.</p>
<p>For such requirements, we have the below query to find out &#8220;Top 5 wait events in the database&#8221;. The query gives Date, Event_Name and Total_Waits.</p>
<p>Query to find Top 5 wait events in database:</p>
<p>select Day, Event_name, Total_wait from (<br />
select day, event_name, sum(event_time_waited) total_wait,<br />
row_number() over (partition by day order by sum(event_time_waited) desc) rn from (<br />
SELECT   to_date(to_char(begin_interval_time,&#8217;dd/mm/yyyy&#8217;),&#8217;dd/mm/yyyy&#8217;) day,s.begin_interval_time, m.*<br />
    FROM (SELECT ee.instance_number, ee.snap_id, ee.event_name,<br />
                 ROUND (ee.event_time_waited / 1000000) event_time_waited,<br />
                 ee.total_waits,<br />
                 ROUND ((ee.event_time_waited * 100) / et.total_time_waited,<br />
                        1<br />
                       ) pct,<br />
                 ROUND ((ee.event_time_waited / ee.total_waits) / 1000<br />
                       ) avg_wait<br />
            FROM (SELECT ee1.instance_number, ee1.snap_id, ee1.event_name,<br />
                           ee1.time_waited_micro<br />
                         &#8211; ee2.time_waited_micro event_time_waited,<br />
                         ee1.total_waits &#8211; ee2.total_waits total_waits<br />
                    FROM dba_hist_system_event ee1 JOIN dba_hist_system_event ee2<br />
                         ON ee1.snap_id = ee2.snap_id + 1<br />
                       AND ee1.instance_number = ee2.instance_number<br />
                       AND ee1.event_id = ee2.event_id<br />
                       AND ee1.wait_class_id &lt;&gt; 2723168908<br />
                       AND ee1.time_waited_micro &#8211; ee2.time_waited_micro &gt; 0<br />
                  UNION<br />
                  SELECT st1.instance_number, st1.snap_id,<br />
                         st1.stat_name event_name,<br />
                         st1.VALUE &#8211; st2.VALUE event_time_waited,<br />
                         1 total_waits<br />
                    FROM dba_hist_sys_time_model st1 JOIN dba_hist_sys_time_model st2<br />
                         ON st1.instance_number = st2.instance_number<br />
                       AND st1.snap_id = st2.snap_id + 1<br />
                       AND st1.stat_id = st2.stat_id<br />
                       AND st1.stat_name = &#8216;DB CPU&#8217;<br />
                       AND st1.VALUE &#8211; st2.VALUE &gt; 0<br />
                         ) ee<br />
                 JOIN<br />
                 (SELECT et1.instance_number, et1.snap_id,<br />
                         et1.VALUE &#8211; et2.VALUE total_time_waited<br />
                    FROM dba_hist_sys_time_model et1 JOIN dba_hist_sys_time_model et2<br />
                         ON et1.snap_id = et2.snap_id + 1<br />
                       AND et1.instance_number = et2.instance_number<br />
                       AND et1.stat_id = et2.stat_id<br />
                       AND et1.stat_name = &#8216;DB time&#8217;<br />
                       AND et1.VALUE &#8211; et2.VALUE &gt; 0<br />
                         ) et<br />
                 ON ee.instance_number = et.instance_number<br />
               AND ee.snap_id = et.snap_id<br />
                 ) m<br />
         JOIN<br />
         dba_hist_snapshot s ON m.snap_id = s.snap_id<br />
) group by day ,event_name<br />
order by day desc, total_wait desc<br />
)where rn &lt; 6</p>
<p>The query is very useful for the DBAs because it can give you loads of information. You can modify the query to fetch much more information and use it the way you want.</p>
<p>Best Luck <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oraclefunda.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oraclefunda.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oraclefunda.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oraclefunda.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oraclefunda.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oraclefunda.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oraclefunda.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oraclefunda.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oraclefunda.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oraclefunda.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oraclefunda.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oraclefunda.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oraclefunda.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oraclefunda.wordpress.com/63/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraclefunda.wordpress.com&amp;blog=3740344&amp;post=63&amp;subd=oraclefunda&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oraclefunda.wordpress.com/2009/10/30/query-to-find-top-5-wait-events-in-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eff5b352aeed3d0d32c409d3b7592eff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aalapsharma</media:title>
		</media:content>
	</item>
		<item>
		<title>How to create AWR report manually</title>
		<link>http://oraclefunda.wordpress.com/2009/10/29/how-to-create-awr-report-manually/</link>
		<comments>http://oraclefunda.wordpress.com/2009/10/29/how-to-create-awr-report-manually/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 19:46:13 +0000</pubDate>
		<dc:creator>aalapsharma</dc:creator>
				<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[automatic workload repository report]]></category>
		<category><![CDATA[awr report]]></category>
		<category><![CDATA[awr report manually]]></category>
		<category><![CDATA[awrrpt]]></category>
		<category><![CDATA[awrrpt.sql]]></category>
		<category><![CDATA[how to create manual report]]></category>
		<category><![CDATA[manual awr report]]></category>
		<category><![CDATA[manual report]]></category>
		<category><![CDATA[new features in oracle database 10g]]></category>
		<category><![CDATA[optimize database]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle Database 10g]]></category>
		<category><![CDATA[oracle database performance]]></category>
		<category><![CDATA[performance optimization]]></category>
		<category><![CDATA[steps to create awr manually]]></category>
		<category><![CDATA[troubleshoot performance]]></category>

		<guid isPermaLink="false">http://oraclefunda.wordpress.com/?p=57</guid>
		<description><![CDATA[Oracle database 10g If you do not have Oracle Enterprise Manager tool installed then you can create the AWR reports manually using the following commands: 1. Creating Snapshot BEGIN DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT (); END; / The list of the snapshot Ids along with database Ids is availabe in the view DBA_HIST_SNAPSHOT. 2. Dropping a Range of Snapshots. Refer to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraclefunda.wordpress.com&amp;blog=3740344&amp;post=57&amp;subd=oraclefunda&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Oracle database 10g</strong></p>
<p>If you do not have Oracle Enterprise Manager tool installed then you can create the AWR reports manually using the following commands:</p>
<p><span style="text-decoration:underline;"><strong>1. Creating Snapshot</strong></span><br />
BEGIN<br />
DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT ();<br />
END;<br />
/</p>
<p>The list of the snapshot Ids along with database Ids is availabe in the view DBA_HIST_SNAPSHOT.</p>
<p><strong><span style="text-decoration:underline;">2. Dropping a Range of Snapshots.</span><br />
</strong>Refer to the DBA_HIST_SNAPSHOT view column SNAP_ID to view available snapshots. To delete contain SNAP_ID from from 102 to 122,</p>
<p>BEGIN<br />
DBMS_WORKLOAD_REPOSITORY.DROP_SNAPSHOT_RANGE (low_snap_id =&gt; 102, high_snap_id =&gt; 122, dbid =&gt; 8187786345);<br />
END;<br />
/</p>
<p><strong><span style="text-decoration:underline;">3. Modifying Snapshot Settings</span><br />
</strong>If you want to modify the retention period as 43200 minutes (30 days), the interval between each snapshot is specified as 30 minutes, and the number of Top SQL to flush for each SQL criteria as 100 then use following:</p>
<p>BEGIN<br />
DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS( retention =&gt; 43200,<br />
interval =&gt; 30, topnsql =&gt; 100, dbid =&gt; 7123356265);<br />
END;<br />
/<br />
The dbid is optional.</p>
<p><strong><span style="text-decoration:underline;">4. Extract the AWR Data</span><br />
</strong>The <em>awrextr.sql</em> script extracts the AWR data for a range of snapshots from the database into a Data Pump export file. Once created, this dump file can be transported to another system where the extracted data can be loaded. To run the awrextr.sql script, you need to be connected to the database as the SYS user.</p>
<p>To extract AWR data at the SQL prompt, enter:</p>
<p>SQL&gt; @$ORACLE_HOME/rdbms/admin/awrextr.sql</p>
<p><strong><span style="text-decoration:underline;">5. Load the AWR Data</span><br />
</strong>Once the export dump file is transported to the target system, you can load the extracted AWR data using the awrload.sql script. The awrload.sql script will first create a staging schema where the snapshot data is transferred from the Data Pump file into the database. The data is then transferred from the staging schema into the appropriate AWR tables. To run the awrload.sql script, you need to be connected to the database as the SYS user.</p>
<p>To load AWR data at the SQL prompt, enter:</p>
<p>SQL&gt; @$ORACLE_HOME/rdbms/admin/awrload.sql</p>
<p><strong><span style="text-decoration:underline;">6. Generate AWR Reports</span><br />
</strong>The awrrpt.sql SQL script generates an HTML or text report that displays statistics for a range of snapshot Ids.<br />
To generate an HTML or text report for a range of snapshot Ids, run the awrrpt.sql script at the SQL prompt:</p>
<p>SQL&gt; @$ORACLE_HOME/rdbms/admin/awrrpt.sql</p>
<p>First, you need to specify whether you want an HTML or a text report.</p>
<p>Enter value for report_type: text</p>
<p>Specify the number of days for which you want to list snapshot Ids.</p>
<p>Enter value for num_days: 2</p>
<p>After the list displays, you are prompted for the beginning and ending snapshot Id for the workload repository report.</p>
<p>Enter value for begin_snap: 95<br />
Enter value for end_snap: 97</p>
<p>Next, accept the default report name or enter a report name. The default name is accepted in the following example:</p>
<p>Enter value for report_name:<br />
Using the report name awrrpt_1_95_97</p>
<p>The workload repository report is generated.</p>
<p><span style="text-decoration:underline;"><em>awrrpt.sql</em></span><br />
The awrrpt.sql SQL script generates an HTML or text report that displays statistics for a range of snapshot Ids.</p>
<p><span style="text-decoration:underline;"><em>awrrpti.sql</em></span><br />
The awrrpti.sql SQL script generates an HTML or text report that displays statistics for a range of snapshot Ids on a specified database and instance.</p>
<p><span style="text-decoration:underline;"><em>awrsqrpt.sql</em></span><br />
The awrsqrpt.sql SQL script generates an HTML or text report that displays statistics of a particular SQL statement for a range of snapshot Ids. Run this report to inspect or debug the performance of a SQL statement.</p>
<p><span style="text-decoration:underline;"><em>awrsqrpi.sql</em></span><br />
The awrsqrpi.sql SQL script generates an HTML or text report that displays statistics of a particular SQL statement for a range of snapshot Ids on a specified database and instance. Run this report to inspect or debug the performance of a SQL statement on a specific database and instance.</p>
<p><span style="text-decoration:underline;"><em>awrddrpt.sql</em></span><br />
The awrddrpt.sql SQL script generates an HTML or text report that compares detailed performance attributes and configuration settings between two selected time periods.</p>
<p><span style="text-decoration:underline;"><em>awrddrpi.sql</em></span><br />
The awrddrpi.sql SQL script generates an HTML or text report that compares detailed performance attributes and configuration settings between two selected time periods on a specific database and instance.</p>
<p>Best Luck <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oraclefunda.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oraclefunda.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oraclefunda.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oraclefunda.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oraclefunda.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oraclefunda.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oraclefunda.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oraclefunda.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oraclefunda.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oraclefunda.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oraclefunda.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oraclefunda.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oraclefunda.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oraclefunda.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraclefunda.wordpress.com&amp;blog=3740344&amp;post=57&amp;subd=oraclefunda&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oraclefunda.wordpress.com/2009/10/29/how-to-create-awr-report-manually/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eff5b352aeed3d0d32c409d3b7592eff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aalapsharma</media:title>
		</media:content>
	</item>
		<item>
		<title>ORA-01503, ORA-01161, ORA-01110</title>
		<link>http://oraclefunda.wordpress.com/2009/02/15/33/</link>
		<comments>http://oraclefunda.wordpress.com/2009/02/15/33/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 16:49:38 +0000</pubDate>
		<dc:creator>aalapsharma</dc:creator>
				<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[clone database error]]></category>
		<category><![CDATA[clone oracle database error]]></category>
		<category><![CDATA[control file]]></category>
		<category><![CDATA[control file error]]></category>
		<category><![CDATA[copy database error]]></category>
		<category><![CDATA[create control file]]></category>
		<category><![CDATA[create controlfile error]]></category>
		<category><![CDATA[database name  in file header does not match given nameof]]></category>
		<category><![CDATA[ORA-01110]]></category>
		<category><![CDATA[ORA-01161]]></category>
		<category><![CDATA[ORA-01503]]></category>
		<category><![CDATA[oracle database 10g cloning]]></category>
		<category><![CDATA[oracle database cloning error]]></category>
		<category><![CDATA[quick cloning error]]></category>

		<guid isPermaLink="false">http://oraclefunda.wordpress.com/?p=33</guid>
		<description><![CDATA[Problem Scenario: You are trying to (clone) copy one database to another and you receive the following errors during create controlfile step: ORA-01503: create controlfile ORA-01161: database name in file header does not match given name of  ORA-01110: &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. Reason: For CREATE CONTROLFILE commands you have to ensure that all the datafiles are from the same database. So [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraclefunda.wordpress.com&amp;blog=3740344&amp;post=33&amp;subd=oraclefunda&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Problem Scenario:</p>
<p>You are trying to (clone) copy one database to another and you receive the following errors during create controlfile step:</p>
<p>ORA-01503: create controlfile</p>
<p>ORA-01161: database name in file header does not match given name of</p>
<p> ORA-01110: &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..</p>
<p>Reason:</p>
<p>For CREATE CONTROLFILE commands you have to ensure that all the datafiles are from the same database. So in this case the &#8216;given name&#8217; in the error message is the DB NAME from the first file header. Verify that all the dbf files were copied to the correct directories. Also double check to see if all of them are from the same database.</p>
<p>If everything seems to be perfect but you are still receiving ora-1161 then you might have attempted to create controlfile before copying all the files and then alter/added that file.  During Create Controlfile command oracle allocates a db_id and after this if we add any new files then oracle considers them to be from a different database and gives the errors that you received. So you should copy all the files before creating the controlfile.</p>
<p>This error can also occur if you copy the datafiles as a Unix user other than Oracle. If the owner read/write permissions are not the same as Oracle user, then when the create controlfile command is executed, the datafile header will not be updated and the errors occur.</p>
<p>Solution:</p>
<p>a. Copy all the datafiles again and re-execute the Create Controlfile command</p>
<p>b. Check read/write permissions and ownership of the copied datafiles</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oraclefunda.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oraclefunda.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oraclefunda.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oraclefunda.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oraclefunda.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oraclefunda.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oraclefunda.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oraclefunda.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oraclefunda.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oraclefunda.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oraclefunda.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oraclefunda.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oraclefunda.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oraclefunda.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraclefunda.wordpress.com&amp;blog=3740344&amp;post=33&amp;subd=oraclefunda&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oraclefunda.wordpress.com/2009/02/15/33/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eff5b352aeed3d0d32c409d3b7592eff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aalapsharma</media:title>
		</media:content>
	</item>
		<item>
		<title>Quick Database Cloning</title>
		<link>http://oraclefunda.wordpress.com/2009/01/20/quick-database-cloning/</link>
		<comments>http://oraclefunda.wordpress.com/2009/01/20/quick-database-cloning/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 17:36:52 +0000</pubDate>
		<dc:creator>aalapsharma</dc:creator>
				<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[cloning]]></category>
		<category><![CDATA[create database]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database copy]]></category>
		<category><![CDATA[fast copy]]></category>
		<category><![CDATA[new database]]></category>
		<category><![CDATA[quick copy]]></category>

		<guid isPermaLink="false">http://oraclefunda.wordpress.com/?p=20</guid>
		<description><![CDATA[One of the common tasks of the DBAs is to clone a database. Very often there is a need to create a test or dev database which is a replica of Production database. In such cases Database cloning can be of great help. This process is quick and has simple steps. Database cloning procedure can [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraclefunda.wordpress.com&amp;blog=3740344&amp;post=20&amp;subd=oraclefunda&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One of the common tasks of the DBAs is to clone a database. Very often there is a need to create a test or dev database which is a replica of Production database. In such cases Database cloning can be of great help. This process is quick and has simple steps.<br />
Database cloning procedure can be used to clone/copy a database from one UNIX server to another server. This is one of the fastest ways to copy a database to another server.<br />
Before you clone the database it is important to know that this procedure is Operating System dependent. You cannot clone a database from HP-UX to Windows server or Red Hat Linux server. The simple reason being the difference in Endianness. So before starting the cloning process, please make sure that the target and source OS are same or atleast follow same Endianness.</p>
<p><strong>1. Create the script from Source database</strong></p>
<p>Connect to the source database using SQL*PLUS (as SYSDBA) and execute the following command:</p>
<p><em>SQL&gt; alter database backup controlfile to trace;</em></p>
<p>This command will generate a script containing a create database syntax in the trace file directory identified by USER_DUMP_DEST parameter in init.ora file.<br />
The file looks like this:</p>
<p style="padding-left:30px;"><em>STARTUP NOMOUNT<br />
CREATE CONTROLFILE REUSE DATABASE &#8220;SRC_DB&#8221; NORESETLOGS<br />
NOARCHIVELOG<br />
MAXLOGFILES 20<br />
MAXLOGMEMBERS 3<br />
MAXDATAFILES 300<br />
MAXINSTANCES 1<br />
MAXLOGHISTORY 115<br />
LOGFILE<br />
GROUP 1 (&#8216;/app1/oradata/src_db/log1a.dbf&#8217;,<br />
&#8216;/app1/oradata/src_db/log1b.dbf&#8217;) SIZE 50M,<br />
GROUP 2 (&#8216;/app2/oradata/src_db/log2a.dbf&#8217;,<br />
&#8216;/app2/oradata/src_db/log2b.dbf&#8217;) SIZE 50M<br />
DATAFILE<br />
&#8216;/appdata/oradata/src_db/system01.dbf&#8217;,<br />
&#8216;/appdata/oradata/src_db/srcdatabase.dbf&#8217;<br />
;<br />
# Recovery is required if any of the datafiles are restored<br />
# backups, or if the last shutdown was not normal or immediate.<br />
RECOVER DATABASE<br />
# Database can now be opened normally.<br />
ALTER DATABASE OPEN;</em></p>
<p><strong>2. Shutdown the source database</strong></p>
<p><em>SQL&gt; Shutdown immediate</em></p>
<p><strong>3. Copy datafiles to destination server</strong></p>
<p>Copy all the datafiles on the destination server. You may change the filenames if you wish, in this case you will also have to edit the controlfile to reflect the new datafile names of the destination server.</p>
<p><em>rcp /app1/oradata/src_db/*    newhost:/app1/oradata/dest_db<br />
rcp /app2/oradata/src_db/*    newhost:/app2/oradata/dest_db<br />
rcp /appdata/oradata/src_db/* newhost:/appdata/oradata/dest_db</em></p>
<p><strong>4. Edit the Create database command</strong></p>
<p>Change the Create controlfile clause in the Create database command generated in STEP1:</p>
<p><em>Old:</em></p>
<p><em>CREATE CONTROLFILE REUSE DATABASE &#8220;SRC_DB&#8221; NORESETLOGS </em></p>
<p><em>New:</em></p>
<p><em>CREATE CONTROLFILE SET DATABASE &#8220;DEST_DB&#8221; RESETLOGS</em></p>
<p><strong>5. Remove extra clauses</strong></p>
<p>Remove the &#8220;recover database&#8221; and &#8220;alter database open&#8221; clause from the script generated in STEP1:</p>
<p><em># Recovery is required if any of the datafiles are restored<br />
# backups, or if the last shutdown was not normal or immediate.<br />
#RECOVER DATABASE<br />
# Database can now be opened normally.<br />
#ALTER DATABASE OPEN;</em></p>
<p><strong>6. Change the path of datafiles</strong></p>
<p>Change the path of the datafiles in the script generate in STPE1 to reflect the path on the destination server</p>
<p><em>Old:</em></p>
<p><em>DATAFILE<br />
&#8216;/appdata/oradata/src_db/system01.dbf&#8217;,<br />
&#8216;/appdata/oradata/src_db/mydatabase.dbf&#8217;</em></p>
<p><em>New:</em></p>
<p><em>DATAFILE<br />
&#8216;/appdata/oradata/dest_db/system01.dbf&#8217;,<br />
&#8216;/appdata/oradata/dest_db/mydatabase.dbf&#8217;</em></p>
<p><strong>7. Create the dump directories</strong></p>
<p>Create the dump directories: bdump, cdump, udump</p>
<p><em>&gt;cd /app/admin<br />
&gt;mkdir bdump cdump udump pfile</em></p>
<p><strong>8. Copy the Initialization parameter file</strong></p>
<p>Copy the old init.ora file to the destination server</p>
<p><em>rcp /app/admin/src_db/pfile/*.ora newhost:/app/oracle/admin/dest_db/pfile</em></p>
<p><strong>9. Create the new database</strong></p>
<p><em>SQL&gt; @db_create_controlfile.sql</em></p>
<p> </p>
<p>Finally, your cloned database is ready to use.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oraclefunda.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oraclefunda.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oraclefunda.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oraclefunda.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oraclefunda.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oraclefunda.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oraclefunda.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oraclefunda.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oraclefunda.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oraclefunda.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oraclefunda.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oraclefunda.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oraclefunda.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oraclefunda.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraclefunda.wordpress.com&amp;blog=3740344&amp;post=20&amp;subd=oraclefunda&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oraclefunda.wordpress.com/2009/01/20/quick-database-cloning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eff5b352aeed3d0d32c409d3b7592eff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aalapsharma</media:title>
		</media:content>
	</item>
	</channel>
</rss>
