<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7557990652743712088</id><updated>2023-06-15T15:24:16.468+05:30</updated><category term="Non default listener"/><category term="Ora 12162"/><category term="RMAN backup and recovery in noarchivelog mode"/><category term="complete and incomplete recovery in noarchivelog mode using RMAN"/><category term="complete recovery of datafile using rman"/><category term="create database statement in oracle 10g"/><category term="dbca"/><category term="dbnewid"/><category term="define_editor"/><category term="differential and cumulative incremental backup"/><category term="ed"/><category term="edit"/><category term="error when running dbca"/><category term="exception in thread main while running dbca"/><category term="isqlplus"/><category term="listener.ora"/><category term="loss of control file"/><category term="non-default listener in oracle 10gxe"/><category term="ora 12514"/><category term="oracle 10g dbca"/><category term="oracle xe 10g"/><category term="pfile or spfile"/><category term="pfile vs spfile"/><category term="recovering controlfile in noarchivelog mode"/><category term="restoring controlfile in archivelog mode"/><category term="rman"/><category term="rman complete recovery in noarchivelog mode."/><category term="rman incremental backup and restore"/><category term="service registration"/><title type='text'>OraMagic</title><subtitle type='html'>Helps you guide through to simple database issues in Oracle 9i,10g and 11g</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-7441372625361646324</id><published>2012-11-12T09:14:00.002+05:30</published><updated>2012-11-14T13:34:30.209+05:30</updated><title type='text'>parallel query queuing in 11gr2</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Oracle 11g release 2 introduced a number of enhancements related to parallel query processing.&lt;br /&gt;
&lt;br /&gt;
One new parameter parallel_degree_policy has been introduced. Setting this parameter to MANUAL results in oracle 11g release1 behavior. Setting this parameter to Auto provides three &amp;nbsp;facilities:&lt;br /&gt;
1. Each SQL statement will be considered for parallel execution according to a threshold.&lt;br /&gt;
2.&amp;nbsp;in-memory parallel executions as well as&lt;br /&gt;
3. &amp;nbsp;parallel statement queuing.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;This section deals with parallel statement queuing feature.&lt;br /&gt;
&lt;br /&gt;
With this feature , Oracle will queue parallel statement if required parallel server processes are not available. Only once the necessary resources becomes available, statement will dequeued &amp;nbsp;and allowed to run. Prior to 11g release 2, if there were insufficient parallel servers available, then either the statement would be run with downgraded DOP or would serialize. But, in 11g release2 , statement will go into the queue if number of active parallel server process is greater or equal to the PARALLEL_SERVERS_TARGET parameter.&lt;br /&gt;
PARALLEL_SERVERS_TARGET is set lower to the PARALLEL_MAX_SERVER (which controls the maximum number of PX servers allowed on the system) , thus preventing the overloading of the system with PX servers and ensuring each parallel statement will get all of the required Px servers. Statement will be &amp;nbsp;dequeued according to FIFO order. &amp;nbsp;Here is the small demonstration for this feature.&lt;br /&gt;
&lt;br /&gt;
Following are the parameters that needs to consider:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
parallel_degree_limit &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string &amp;nbsp; &amp;nbsp; &amp;nbsp;CPU&lt;br /&gt;
parallel_degree_policy &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string &amp;nbsp; &amp;nbsp; &amp;nbsp;AUTO&lt;br /&gt;
parallel_max_servers &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; integer &amp;nbsp; &amp;nbsp; 10&lt;br /&gt;
parallel_min_percent &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; integer &amp;nbsp; &amp;nbsp; 0&lt;br /&gt;
parallel_min_servers &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; integer &amp;nbsp; &amp;nbsp; 0&lt;br /&gt;
parallel_min_time_threshold &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string &amp;nbsp; &amp;nbsp; &amp;nbsp;AUTO&lt;br /&gt;
parallel_servers_target &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;integer &amp;nbsp; &amp;nbsp; 6&lt;br /&gt;
parallel_threads_per_cpu &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; integer &amp;nbsp; &amp;nbsp; 2&lt;br /&gt;
&lt;br /&gt;
Here parallel_degree_policy is set to Auto. That means each statement will be considered for parallelism.&lt;br /&gt;
&lt;br /&gt;
Now, Lets execute a query.&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; set autotrace on&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; select /*+ q1 */ cust_last_name, sum(amount_sold) from sh.sales,sh.customers c group by cust_last_name;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//output not shown//&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PLAN_TABLE_OUTPUT&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
Plan hash value: 2696793116&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
| Id &amp;nbsp;| Operation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Name &amp;nbsp; &amp;nbsp; &amp;nbsp;| Rows &amp;nbsp;| Bytes | Cost (%CPU)| T&lt;br /&gt;
ime &amp;nbsp; &amp;nbsp; | Pstart| Pstop | &amp;nbsp; &amp;nbsp;TQ &amp;nbsp;|IN-OUT| PQ Distrib |&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PLAN_TABLE_OUTPUT&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
| &amp;nbsp; 0 | SELECT STATEMENT &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; 908 | 11804 | &amp;nbsp; &amp;nbsp;16M (17)| 5&lt;br /&gt;
4:07:31 | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br /&gt;
&lt;br /&gt;
| &amp;nbsp; 1 | &amp;nbsp;PX COORDINATOR &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br /&gt;
&lt;br /&gt;
| &amp;nbsp; 2 | &amp;nbsp; PX SEND QC (RANDOM) &amp;nbsp; &amp;nbsp; &amp;nbsp; | :TQ10002 &amp;nbsp;| &amp;nbsp; 908 | 11804 | &amp;nbsp; &amp;nbsp;16M (17)| 5&lt;br /&gt;
4:07:31 | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp;Q1,02 | P-&amp;gt;S | QC (RAND) &amp;nbsp;|&lt;br /&gt;
&lt;br /&gt;
| &amp;nbsp; 3 | &amp;nbsp; &amp;nbsp;HASH GROUP BY &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; 908 | 11804 | &amp;nbsp; &amp;nbsp;16M (17)| 5&lt;br /&gt;
4:07:31 | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp;Q1,02 | PCWP | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br /&gt;
&lt;br /&gt;
PLAN_TABLE_OUTPUT&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
| &amp;nbsp; 4 | &amp;nbsp; &amp;nbsp; PX RECEIVE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; 908 | 11804 | &amp;nbsp; &amp;nbsp;16M (17)| 5&lt;br /&gt;
4:07:31 | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp;Q1,02 | PCWP | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br /&gt;
&lt;br /&gt;
| &amp;nbsp; 5 | &amp;nbsp; &amp;nbsp; &amp;nbsp;PX SEND HASH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | :TQ10001 &amp;nbsp;| &amp;nbsp; 908 | 11804 | &amp;nbsp; &amp;nbsp;16M (17)| 5&lt;br /&gt;
4:07:31 | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp;Q1,01 | P-&amp;gt;P | HASH &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;br /&gt;
&lt;br /&gt;
| &amp;nbsp; 6 | &amp;nbsp; &amp;nbsp; &amp;nbsp; HASH GROUP BY &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; 908 | 11804 | &amp;nbsp; &amp;nbsp;16M (17)| 5&lt;br /&gt;
4:07:31 | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp;Q1,01 | PCWP | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br /&gt;
&lt;br /&gt;
| &amp;nbsp; 7 | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MERGE JOIN CARTESIAN | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;50G| &amp;nbsp; 617G| &amp;nbsp; &amp;nbsp;13M &amp;nbsp;(1)| 4&lt;br /&gt;
&lt;br /&gt;
PLAN_TABLE_OUTPUT&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
5:42:18 | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp;Q1,01 | PCWP | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br /&gt;
&lt;br /&gt;
| &amp;nbsp; 8 | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PX RECEIVE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 55500 | &amp;nbsp; 433K| &amp;nbsp; 225 &amp;nbsp; (1)| 0&lt;br /&gt;
0:00:03 | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp;Q1,01 | PCWP | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br /&gt;
&lt;br /&gt;
| &amp;nbsp; 9 | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PX SEND BROADCAST &amp;nbsp;| :TQ10000 &amp;nbsp;| 55500 | &amp;nbsp; 433K| &amp;nbsp; 225 &amp;nbsp; (1)| 0&lt;br /&gt;
0:00:03 | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp;Q1,00 | P-&amp;gt;P | BROADCAST &amp;nbsp;|&lt;br /&gt;
&lt;br /&gt;
| &amp;nbsp;10 | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PX BLOCK ITERATOR | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 55500 | &amp;nbsp; 433K| &amp;nbsp; 225 &amp;nbsp; (1)| 0&lt;br /&gt;
0:00:03 | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp;Q1,00 | PCWC | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PLAN_TABLE_OUTPUT&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
| &amp;nbsp;11 | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TABLE ACCESS FULL| CUSTOMERS | 55500 | &amp;nbsp; 433K| &amp;nbsp; 225 &amp;nbsp; (1)| 0&lt;br /&gt;
0:00:03 | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp;Q1,00 | PCWP | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br /&gt;
&lt;br /&gt;
| &amp;nbsp;12 | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BUFFER SORT &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; 918K| &amp;nbsp;4486K| &amp;nbsp; &amp;nbsp;16M (17)| 5&lt;br /&gt;
4:07:28 | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp;Q1,01 | PCWP | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br /&gt;
&lt;br /&gt;
| &amp;nbsp;13 | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PX BLOCK ITERATOR &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; 918K| &amp;nbsp;4486K| &amp;nbsp; 271 &amp;nbsp; (2)| 0&lt;br /&gt;
0:00:04 | &amp;nbsp; &amp;nbsp; 1 | &amp;nbsp; &amp;nbsp;28 | &amp;nbsp;Q1,01 | PCWC | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br /&gt;
&lt;br /&gt;
| &amp;nbsp;14 | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TABLE ACCESS FULL | SALES &amp;nbsp; &amp;nbsp; | &amp;nbsp; 918K| &amp;nbsp;4486K| &amp;nbsp; 271 &amp;nbsp; (2)| 0&lt;br /&gt;
0:00:04 | &amp;nbsp; &amp;nbsp; 1 | &amp;nbsp; &amp;nbsp;28 | &amp;nbsp;Q1,01 | PCWP | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br /&gt;
&lt;br /&gt;
PLAN_TABLE_OUTPUT&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note&lt;br /&gt;
-----&lt;br /&gt;
&amp;nbsp; &amp;nbsp;- automatic DOP: Computed Degree of Parallelism is 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While the query is running, from another terminal, view the number of active px processes. These can be identified by ora_pxxx.&lt;br /&gt;
&lt;br /&gt;
[oracle@host1 dbs]$&lt;b&gt; ps -ef|grep ora_p&lt;/b&gt;&lt;br /&gt;
oracle &amp;nbsp; &amp;nbsp;4730 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;0 10:09 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:00 ora_pmon_orc11&lt;br /&gt;
oracle &amp;nbsp; &amp;nbsp;4742 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;0 10:09 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:00 ora_psp0_orc11&lt;br /&gt;
oracle &amp;nbsp; 12314 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;0 12:10 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:00 ora_pmon_db11&lt;br /&gt;
oracle &amp;nbsp; 12326 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;0 12:10 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:00 ora_psp0_db11&lt;br /&gt;
&lt;b&gt;oracle &amp;nbsp; 12765 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;0 12:18 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:00&lt;span style=&quot;color: red;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;ora_p000_db11&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;oracle &amp;nbsp; 12767 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;1 12:18 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:00 &lt;span style=&quot;color: red;&quot;&gt;ora_p001_db11&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;oracle &amp;nbsp; 12769 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;0 12:18 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:00&lt;span style=&quot;color: red;&quot;&gt; ora_p002_db11&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;oracle &amp;nbsp; 12771 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;0 12:18 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:00 &lt;span style=&quot;color: red;&quot;&gt;ora_p003_db11&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
oracle &amp;nbsp; 12788 11529 &amp;nbsp;0 12:18 pts/2 &amp;nbsp; &amp;nbsp;00:00:00 grep ora_p&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Currently, &amp;nbsp;two sets of parallel server processes are running because DOP is 2, meaning 4 parallel server process are running at a time. &amp;nbsp;Default DOP is 2 because of parallel_degree_limit parameter. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
On the same time while the first query is executing, run another query from another terminal.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
SQL&amp;gt; set autotrace on&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; &amp;nbsp;&amp;nbsp;select /*+ q2 */ cust_last_name, sum(amount_sold) from sh.sales,sh.customers c group by cust_last_name;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
[oracle@host1 ~]$ ps -ef|grep ora_p&lt;/div&gt;
&lt;div&gt;
oracle &amp;nbsp; &amp;nbsp;4730 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;0 10:09 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:00 ora_pmon_orc11&lt;/div&gt;
&lt;div&gt;
oracle &amp;nbsp; &amp;nbsp;4742 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;0 10:09 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:00 ora_psp0_orc11&lt;/div&gt;
&lt;div&gt;
oracle &amp;nbsp; 14001 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;0 12:45 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:00 ora_pmon_db11&lt;/div&gt;
&lt;div&gt;
oracle &amp;nbsp; 14013 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;0 12:45 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:00 ora_psp0_db11&lt;/div&gt;
&lt;div&gt;
oracle &amp;nbsp; 14810 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;0 13:00 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:00 ora_p000_db11&lt;/div&gt;
&lt;div&gt;
oracle &amp;nbsp; 14812 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;0 13:00 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:00 &lt;span style=&quot;color: red;&quot;&gt;ora_p001_db11&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
oracle &amp;nbsp; 14814 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;6 13:00 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:27&lt;span style=&quot;color: red;&quot;&gt; ora_p002_db11&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
oracle &amp;nbsp; 14816 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;6 13:00 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:26 &lt;span style=&quot;color: red;&quot;&gt;ora_p003_db11&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
oracle &amp;nbsp; 15156 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;0 13:06 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:00 &lt;span style=&quot;color: red;&quot;&gt;ora_p004_db11&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
oracle &amp;nbsp; 15158 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;0 13:06 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:00&lt;span style=&quot;color: red;&quot;&gt; ora_p005_db11&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
oracle &amp;nbsp; 15160 &amp;nbsp; &amp;nbsp; 1 33 13:06 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:20&lt;span style=&quot;color: red;&quot;&gt; ora_p006_db11&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
oracle &amp;nbsp; 15162 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;0 13:06 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:00:00 &lt;span style=&quot;color: red;&quot;&gt;ora_p007_db11&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
oracle &amp;nbsp; 15203 14835 &amp;nbsp;0 13:07 pts/4 &amp;nbsp; &amp;nbsp;00:00:00 grep ora_p&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
See, number of active processes running has increased .&lt;br /&gt;
&lt;br /&gt;
From the third terminal, run the parallel query again at the same time while the other two queries are active.&lt;br /&gt;
Now, you will see that your query is queued. You can monitor the status of SQL statement using V$SQL_MONITOR.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
SQL&amp;gt;select status,sql_text from v$sql_monitor where sql_text like &#39;%sh%&#39;;&lt;br /&gt;
&lt;br /&gt;
STATUS&lt;br /&gt;
-------------------&lt;br /&gt;
SQL_TEXT&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
QUEUED&lt;br /&gt;
select /*+ q3 */ cust_last_name, sum(amount_sold) from sh.sales,sh.customers c g&lt;br /&gt;
roup by cust_last_name&lt;br /&gt;
&lt;br /&gt;
EXECUTING&lt;br /&gt;
select /*+ q1 */ cust_last_name, sum(amount_sold) from sh.sales,sh.customers c g&lt;br /&gt;
roup by cust_last_name&lt;br /&gt;
&lt;br /&gt;
EXECUTING&lt;br /&gt;
&lt;br /&gt;
select /*+ q2 */ cust_last_name, sum(amount_sold) from sh.sales,sh.customers c g&lt;br /&gt;
roup by cust_last_name&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: orange;&quot;&gt;Additional Note:&lt;/span&gt; &amp;nbsp;Statement is waiting on the event &quot;PX QUEUING: statement queue&quot;. It &amp;nbsp;is the first statement in the statement queue. All other statements in the queue will be waiting on &quot;ENQ JX SQL statement queue&quot;. Only when a statement gets to the head of the queue will the wait event switch to &quot;PX QUEUING: statement queue&quot;.&lt;br /&gt;
&lt;i&gt;&amp;nbsp;interesting !&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
Related links:&lt;br /&gt;
&lt;br /&gt;
1. &amp;nbsp;&lt;a href=&quot;http://koenigocm.blogspot.in/search/label/AUTOMATIC%20DEGREE%20OF%20PARALLELISM%20%28DOP%29%20IN%20ORACLE%2011G%20R2%20--%20PART%20-%20I&quot;&gt;http://koenigocm.blogspot.in/search/label/AUTOMATIC%20DEGREE%20OF%20PARALLELISM%20%28DOP%29%20IN%20ORACLE%2011G%20R2%20--%20PART%20-%20I&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
2.&lt;br /&gt;
&lt;a href=&quot;http://oracleinaction.blogspot.in/2012/11/PARALLELSTMTQUEUEING.html&quot;&gt;http://oracleinaction.blogspot.in/2012/11/PARALLELSTMTQUEUEING.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/7441372625361646324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2012/11/parallel-query-queuing-in-11gr2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/7441372625361646324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/7441372625361646324'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2012/11/parallel-query-queuing-in-11gr2.html' title='parallel query queuing in 11gr2'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-3503147957607036907</id><published>2012-10-19T12:01:00.004+05:30</published><updated>2012-11-23T14:03:59.826+05:30</updated><title type='text'>change of IP-address in linux box running Oracle server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Most people&amp;nbsp; face
problem while working on the database whenever they changed &amp;nbsp;the ip-address and/or hostname &amp;nbsp;of the machine.&amp;nbsp; Enterprise manager may not working properly. &lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
I am mentioning this issue in this post with the problem
that I face.&amp;nbsp; My machine is
configured&amp;nbsp; with DHCP.&amp;nbsp; Oracle recommends to use static IP address.
So I also want to change this.&amp;nbsp; To
configure static address in rhel5, you need to follow these two steps:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;1.&amp;nbsp; Assigning static IP address&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;log in as root&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
issue neat command&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
It will open network configuration &amp;nbsp;GUI window.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Select eth0 here,&amp;nbsp; go
to edit. Select statically set IP address.&amp;nbsp;
Enter ip address and mention subnet mask.&amp;nbsp; Click on OK button.&amp;nbsp; After, click on File &amp;gt;&amp;gt; save to save
your changes.&amp;nbsp; After ,you will get the
dialogue saying&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;i&gt;Changes are saved. You
may want to restart the network and network services or restart the compute&lt;/i&gt;r.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
click on OK. Exit the network configuration window.
Then,&amp;nbsp; logged in as root user, issue&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
service network restart.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Now, to change the host name(if you want), make modification
in /etc/sysconfig/network. My &lt;b&gt;/etc/sysconfig/network&lt;/b&gt;
looks like:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;----------------------------------------------------------------------------------------------------------------------&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;NETWORKING=yes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;NETWORKING_IPV6=yes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;HOSTNAME=host2.oracle.com&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;--------------------------------------------------------------------------------------------------------------------&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;2. Now, as a second
step, make appropriate entry in /etc/hosts&lt;/b&gt;. My /etc/hosts after
modification looks like: &lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
-----------------------------------------------------------------------------------------------------------------------------------&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;# Do not remove the following line,
or various programs&amp;nbsp; that require network
functionality will fail.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;127.0.0.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  localhost.localdomain localhost&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;#::1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; localhost6.localdomain6
localhost6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;192.168.2.102&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; host2.oracle.com&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; host2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
------------------------------------------------------------------------------------------------------------------------------------&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Now, reboot the system.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Now, after changing ip address and /or hostname ,you may
face certain problems while working on the database. Your listener and/or em
console may not working properly. &lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Use netmgr to configure your listener again.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
And to enable&amp;nbsp; proper
functioning of em console,&amp;nbsp; start your
listener after proper configuration, then start database. &amp;nbsp;.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Firstly, I issued&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;emca&amp;nbsp;
-config&amp;nbsp; dbcontrol db&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Command ran successfully. But after getting enterprise
manager console , homepage shows &lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;background: white; color: red; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; font-weight: normal; line-height: 115%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-weight: bold; mso-bidi-theme-font: minor-bidi;&quot;&gt;Error : java.lang.Exception: UnknownHostException
sending request :: host1.oracle.com.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
The solution is to issue below command , not above.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
[Below command won&#39;t work if you do not start the database]&lt;span style=&quot;color: red;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;[oracle@host2 ~]$&amp;nbsp; emca&amp;nbsp;
-config dbcontrol db -repos recreate&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
And, answer the questions that it asks. Here is the output:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
-------------------------------------------------------------------------------------------------------------&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;STARTED EMCA at Oct 19, 2012
11:27:22 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;EM Configuration Assistant, Version
10.2.0.1.0 Production&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Copyright (c) 2003, 2005,
Oracle.&amp;nbsp; All rights reserved.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Enter the following information:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Database SID: orcl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Database Control is already
configured for the database orcl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;You have chosen to configure
Database Control for managing the database orcl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;This will remove the existing
configuration and the default settings and perform a fresh configuration&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Do you wish to continue?
[yes(Y)/no(N)]: y&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Listener port number: 1521&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Password for SYS user:&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Password for DBSNMP user:&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Password for SYSMAN user:&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Email address for notifications
(optional): sys&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Invalid email.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Email address for notifications
(optional): &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Outgoing Mail (SMTP) server for
notifications (optional): &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;-----------------------------------------------------------------&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;You have specified the following
settings&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Database ORACLE_HOME
................ /u01/app/oracle/product/10.2.0/db_1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Database hostname ................
host2.oracle.com&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Listener port number
................ 1521&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Database SID ................ orcl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Email address for notifications
............... &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Outgoing Mail (SMTP) server for
notifications ............... &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;-----------------------------------------------------------------&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Do you wish to continue?
[yes(Y)/no(N)]: y&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Oct 19, 2012 11:27:45 AM
oracle.sysman.emcp.EMConfig perform&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;INFO: This operation is being logged
at
/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/orcl/emca_2012-10-19_11-27-22-AM.log.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Oct 19, 2012 11:27:46 AM oracle.sysman.emcp.util.DBControlUtil
stopOMS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;INFO: Stopping Database Control
(this may take a while) ...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Oct 19, 2012 11:27:48 AM
oracle.sysman.emcp.EMReposConfig dropRepository&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;INFO: Dropping the EM repository
(this may take a while) ...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Oct 19, 2012 11:28:56 AM oracle.sysman.emcp.EMReposConfig
invoke&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;INFO: Repository successfully
dropped&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Oct 19, 2012 11:28:56 AM
oracle.sysman.emcp.EMReposConfig createRepository&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;INFO: Creating the EM repository
(this may take a while) ...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Oct 19, 2012 11:32:41 AM
oracle.sysman.emcp.EMReposConfig invoke&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;INFO: Repository successfully
created&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Oct 19, 2012 11:32:44 AM
oracle.sysman.emcp.util.DBControlUtil startOMS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;INFO: Starting Database Control
(this may take a while) ...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Oct 19, 2012 11:34:22 AM
oracle.sysman.emcp.EMDBPostConfig performConfiguration&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;INFO: Database Control started
successfully&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Oct 19, 2012 11:34:22 AM
oracle.sysman.emcp.EMDBPostConfig performConfiguration&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;INFO:
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The Database Control URL is
http://host2.oracle.com:5501/em &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Enterprise Manager configuration
completed successfully&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;FINISHED EMCA at Oct 19, 2012
11:34:31 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;[oracle@host2 ~]$ emctl start
dbconsole&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;TZ set to Asia/Calcutta&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Oracle Enterprise Manager 10g
Database Control Release 10.2.0.1.0&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Copyright (c) 1996, 2005 Oracle
Corporation.&amp;nbsp; All rights reserved.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;http://host2.oracle.com:5501/em/console/aboutApplication&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;- An instance of Oracle Enterprise Manager 10g
Database Control is already running&lt;/span&gt;.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
And Enjoy..............&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/3503147957607036907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2012/10/change-of-ip-address-in-linux-box.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/3503147957607036907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/3503147957607036907'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2012/10/change-of-ip-address-in-linux-box.html' title='change of IP-address in linux box running Oracle server'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-8030083866642936814</id><published>2012-10-11T13:08:00.001+05:30</published><updated>2012-10-12T10:41:01.975+05:30</updated><title type='text'>Resolving Autotrace error</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
I was working in 10.2.0 version. When I tried to set autotrace to on. I got SP2-0618 error. And here is a small illustration and solution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; conn hr/hr&lt;br /&gt;
Connected.&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; set autotrace on;&lt;br /&gt;
SP2-0618: Cannot find the Session Identifier. &amp;nbsp;Check PLUSTRACE role is enabled&lt;br /&gt;
SP2-0611: Error enabling STATISTICS report&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; conn / as sysdba&lt;br /&gt;
Connected.&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; set autotrace on;&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt;select * from hr.demo1;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
---------- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
---------- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 12 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 13 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
----------output truncated----------------------------&lt;br /&gt;
&lt;br /&gt;
Execution Plan&lt;br /&gt;
---------------------------------------------------------- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
Plan hash value: 970289426 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
--------------------------------------------------------------------------- &amp;nbsp; &lt;br /&gt;
| Id &amp;nbsp;| Operation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Name &amp;nbsp;| Rows &amp;nbsp;| Bytes | Cost (%CPU)| Time &amp;nbsp; &amp;nbsp; | &amp;nbsp; &lt;br /&gt;
--------------------------------------------------------------------------- &amp;nbsp; &lt;br /&gt;
| &amp;nbsp; 0 | SELECT STATEMENT &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; | 50000 | &amp;nbsp; 195K| &amp;nbsp; &amp;nbsp;21 &amp;nbsp; (5)| 00:00:01 | &amp;nbsp; &lt;br /&gt;
| &amp;nbsp; 1 | &amp;nbsp;TABLE ACCESS FULL| DEMO1 | 50000 | &amp;nbsp; 195K| &amp;nbsp; &amp;nbsp;21 &amp;nbsp; (5)| 00:00:01 | &amp;nbsp; &lt;br /&gt;
--------------------------------------------------------------------------- &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics not shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; conn / as sysdba&lt;br /&gt;
Connected.&lt;br /&gt;
SQL&amp;gt; alter user scott identified by tiger account unlock;&lt;br /&gt;
&lt;br /&gt;
User altered.&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; conn scott/tiger;&lt;br /&gt;
Connected.&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; set autotrace on;&lt;br /&gt;
SP2-0618: Cannot find the Session Identifier. &amp;nbsp;Check PLUSTRACE role is enabled&lt;br /&gt;
SP2-0611: Error enabling STATISTICS report&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; conn / as sysdba&lt;br /&gt;
Connected.&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; grant plustrace to public;&lt;br /&gt;
grant plustrace to public&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; *&lt;br /&gt;
ERROR at line 1:&lt;br /&gt;
ORA-01919: role &#39;PLUSTRACE&#39; does not exist&lt;br /&gt;
&lt;br /&gt;
Execute plustrce.sql from $ORACLE_HOME/sqlplus/admin folder.&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; @?/sqlplus/admin/plustrce.sql&lt;br /&gt;
SQL&amp;gt;&lt;br /&gt;
SQL&amp;gt; drop role plustrace;&lt;br /&gt;
drop role plustrace&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *&lt;br /&gt;
ERROR at line 1:&lt;br /&gt;
ORA-01919: role &#39;PLUSTRACE&#39; does not exist&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; create role plustrace;&lt;br /&gt;
&lt;br /&gt;
Role created.&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt;&lt;br /&gt;
SQL&amp;gt; grant select on v_$sesstat to plustrace;&lt;br /&gt;
&lt;br /&gt;
Grant succeeded.&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; grant select on v_$statname to plustrace;&lt;br /&gt;
&lt;br /&gt;
Grant succeeded.&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; grant select on v_$mystat to plustrace;&lt;br /&gt;
&lt;br /&gt;
Grant succeeded.&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; grant plustrace to dba with admin option;&lt;br /&gt;
&lt;br /&gt;
Grant succeeded.&lt;br /&gt;
&lt;br /&gt;
After the execution of the script,&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; grant plustrace to public;&lt;br /&gt;
&lt;br /&gt;
Grant succeeded.&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; conn hr/hr&lt;br /&gt;
Connected.&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; set autotrace on;&lt;br /&gt;
&lt;br /&gt;
No error shown.&lt;br /&gt;
From hereon, autotrace facility will output properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt;conn / as sysdba&lt;br /&gt;
Connected.&lt;br /&gt;
SQL&amp;gt; set autotrace on;&lt;br /&gt;
&lt;br /&gt;
select * from hr.demo1;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
---------- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
---------- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 12 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 13 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
----------output truncated----------------------------&lt;br /&gt;
&lt;br /&gt;
Execution Plan&lt;br /&gt;
----------------------------------------------------------&lt;br /&gt;
Plan hash value: 970289426&lt;br /&gt;
&lt;br /&gt;
---------------------------------------------------------------------------&lt;br /&gt;
| Id &amp;nbsp;| Operation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Name &amp;nbsp;| Rows &amp;nbsp;| Bytes | Cost (%CPU)| Time &amp;nbsp; &amp;nbsp; |&lt;br /&gt;
---------------------------------------------------------------------------&lt;br /&gt;
| &amp;nbsp; 0 | SELECT STATEMENT &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; | 50000 | &amp;nbsp; 195K| &amp;nbsp; &amp;nbsp;21 &amp;nbsp; (5)| 00:00:01 |&lt;br /&gt;
| &amp;nbsp; 1 | &amp;nbsp;TABLE ACCESS FULL| DEMO1 | 50000 | &amp;nbsp; 195K| &amp;nbsp; &amp;nbsp;21 &amp;nbsp; (5)| 00:00:01 |&lt;br /&gt;
---------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics&lt;br /&gt;
----------------------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp;recursive calls&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp;db block gets&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3415 &amp;nbsp;consistent gets&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp;physical reads&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp;redo size&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;923122 &amp;nbsp;bytes sent via SQL*Net to client&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; 37048 &amp;nbsp;bytes received via SQL*Net from client&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3335 &amp;nbsp;SQL*Net roundtrips to/from client&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp;sorts (memory)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp;sorts (disk)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; 50000 &amp;nbsp;rows processed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics also shown.&lt;br /&gt;
I also tested the same thing in 11g release 2 and found that that is also true for 11g.&lt;br /&gt;
&lt;br /&gt;
Thats all.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/8030083866642936814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2012/10/resolving-autotrace-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/8030083866642936814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/8030083866642936814'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2012/10/resolving-autotrace-error.html' title='Resolving Autotrace error'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-6161257951930171599</id><published>2012-03-09T15:54:00.001+05:30</published><updated>2012-03-09T16:04:07.536+05:30</updated><title type='text'>login as sysoper</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;I want get to know about the role of oper group that has always been created during installation of oracle10g on linux box.&amp;nbsp; 3 groups are always created as a prequisite for oracle 10g installation on linux box.&amp;nbsp; They are oper,dba and oinstall.&lt;br /&gt;
I was knowing the purpose of all these groups.&amp;nbsp; For ex, dba group is used so that an os user can logged in as &lt;i&gt;/ as sysdba&lt;/i&gt;. oinstall is the owner for oracle inventory. And in my case, there is an os user named oracle which is the member of both these groups, oinstall as well as dba.&amp;nbsp; A user which is the member&amp;nbsp; of dba group can logged in as &lt;i&gt;/ as sysdba&lt;/i&gt; as well as &lt;i&gt;/ as sysoper&lt;/i&gt;, and that is what oracle user can does.&lt;br /&gt;
Now I wanted to understand the purpose of oper group then. It was clear to me that oper group is created so that an os user can logged in as / as sysoper to work as system operator and to perform day-to -day basic administrative tasks such as startup, shutdown, backup ,recovery,etc. And&amp;nbsp; the user who can logged in as sysdba has more powerful privilege that sysoper. That means there must be a second os user who can perform the role of system operator by logging as &lt;i&gt;/ as sysope&lt;/i&gt;r and not as &lt;i&gt;/ as sysdba&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
Then I started with creating a second user, besides oracle, who can acess oracle database to perform basic administrative operations. After various tries and errors , I succeded. It is how I did.&lt;br /&gt;
&lt;br /&gt;
$useradd geet&lt;br /&gt;
$ chmod -R 777 /u01&lt;br /&gt;
$usermod -G oper geet&lt;br /&gt;
$ls -l /u01&lt;br /&gt;
total 20&lt;br /&gt;
drwxrwxrwx 8 oracle oinstall 4096 Mar  1 15:40 app&lt;br /&gt;
--------rest truncated-------------&lt;br /&gt;
&lt;br /&gt;
ls -ld /u01&lt;br /&gt;
drwxrwxrwx 8 oracle oinstall 4096 Feb 10 10:16 /u01&lt;br /&gt;
&lt;br /&gt;
ls -l /u01/app&lt;br /&gt;
total 24&lt;br /&gt;
drwxrwxrwx 8 oracle dba      4096 Mar  1 10:32 admin&lt;br /&gt;
drwxrwxrwx 6 oracle dba      4096 Mar  1 10:36 flash_recovery_area&lt;br /&gt;
drwxrwxrwx 2 oracle dba      4096 Mar  1 16:20 logminer_dir&lt;br /&gt;
drwxrwxrwx 6 oracle dba      4096 Mar  1 10:35 oradata&lt;br /&gt;
drwxrwxrwx 7 oracle dba      4096 Mar  1 10:21 oraInventory&lt;br /&gt;
drwxrwxrwx 3 oracle oinstall 4096 Feb  8 12:37 product&lt;br /&gt;
&lt;br /&gt;
Check the permission for $ORACLE_HOME/bin/oracle. It should be&lt;br /&gt;
&lt;br /&gt;
$ls -l oracle&lt;br /&gt;
-rwsrwsrwx 1 oracle dba 93362259 Mar&amp;nbsp; 7 11:26 oracle&lt;br /&gt;
Here is two &lt;i&gt;s&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
$id geet&lt;br /&gt;
uid=503(geet) gid=506(geet) groups=506(geet),501(oper),503(oinstall)&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
$su - geet&lt;br /&gt;
[geet@new-host-15 ~]$ export ORACLE_HOME=/u01/app/product/10.2.0/db_1&lt;br /&gt;
[geet@new-host-15 ~]$ export ORACLE_SID=orcl&lt;br /&gt;
[geet@new-host-15 ~]$ cd $ORACLE_HOME &lt;br /&gt;
[geet@new-host-15 db_1]$ cd bin&lt;br /&gt;
[geet@new-host-15 bin]$ ./sqlplus / as sysoper&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Mar 7 14:12:19 2012&lt;br /&gt;
&lt;br /&gt;
Copyright (c) 1982, 2005, Oracle.  All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Connected.&lt;br /&gt;
&lt;br /&gt;
If&amp;nbsp; this fails: &lt;br /&gt;
&lt;br /&gt;
$ ./sqlplus / as sysoper&lt;br /&gt;
&lt;br /&gt;
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 6 14:17:26 2012&lt;br /&gt;
&lt;br /&gt;
Copyright (c) 1982, 2005, Oracle.  All rights reserved.&lt;br /&gt;
&lt;br /&gt;
ERROR:&lt;br /&gt;
ORA-01031: insufficient privileges&lt;br /&gt;
&lt;br /&gt;
Then check $ORACLE_HOME/rdbms/lib config.c which looks something like this:&lt;br /&gt;
&lt;br /&gt;
/*  SS_DBA_GRP defines the UNIX group ID for sqldba adminstrative access.  */&lt;br /&gt;
/*  Refer to the Installation and User&#39;s Guide for further information.  */&lt;br /&gt;
#define SS_DBA_GRP &quot;dba&quot;&lt;br /&gt;
#define SS_OPER_GRP &quot;oper&quot;&lt;br /&gt;
char *ss_dba_grp[] = {SS_DBA_GRP, SS_OPER_GRP};&lt;br /&gt;
&lt;br /&gt;
if&amp;nbsp; second #define do not contain oper, but&amp;nbsp; dba, then u have to modify this file as above. After modification you have to relink this executable. To relink I used:&lt;br /&gt;
$relink all&lt;br /&gt;
&lt;br /&gt;
But after relinking, I am able to issue&lt;br /&gt;
&lt;br /&gt;
conn / as sysoper&lt;br /&gt;
&lt;br /&gt;
successfully.&lt;br /&gt;
&lt;br /&gt;
but when issuing &lt;br /&gt;
SQL&amp;gt; conn scott/tiger&lt;br /&gt;
ERROR:&lt;br /&gt;
ORA-00600: internal error code, arguments: [17069], [0x30AD70A4], [], [], [],&lt;br /&gt;
[], [], []&lt;br /&gt;
ERROR:&lt;br /&gt;
ORA-00600: internal error code, arguments: [17069], [0x30AD70A4], [], [], [],&lt;br /&gt;
[], [], []&lt;br /&gt;
&lt;br /&gt;
Error accessing package DBMS_APPLICATION_INFO&lt;br /&gt;
Connected.&lt;br /&gt;
&lt;br /&gt;
This error is solved by running utlirp.sql script by logging as sysdba. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/6161257951930171599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2012/03/i-want-get-to-know-about-role-of-oper.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/6161257951930171599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/6161257951930171599'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2012/03/i-want-get-to-know-about-role-of-oper.html' title='login as sysoper'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-669858371723359125</id><published>2011-12-06T13:37:00.000+05:30</published><updated>2011-12-06T13:37:08.900+05:30</updated><title type='text'>loss of all controlfiles using user managed backup and recovery</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SETUP : All scenarios are in archivelog mode.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Database version is &amp;nbsp;10.2.0.1.0&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;1. Loss of all controlfiles when all redos are&amp;nbsp;available.&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; startup&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; alter database begin backup;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; select * from v$backup;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;$cp /u01/app/oradata/orcl1/*.* /u01/app/backup/orcl1/.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;FILE# STATUS&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; CHANGE# TIME&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;---------- ------------------ ---------- ---------&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 1 ACTIVE&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp;482215 05-DEC-11&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 2 ACTIVE&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp;482215 05-DEC-11&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 3 ACTIVE&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp;482215 05-DEC-11&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 4 ACTIVE&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp;482215 05-DEC-11&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 5 ACTIVE&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp;482215 05-DEC-11&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; alter database end backup;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; &amp;nbsp;select * from v$backup;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; FILE# STATUS&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; CHANGE# TIME&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;---------- ------------------ ---------- ---------&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 1 NOT ACTIVE&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp;482215 05-DEC-11&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 2 NOT ACTIVE&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp;482215 05-DEC-11&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 3 NOT ACTIVE&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp;482215 05-DEC-11&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 4 NOT ACTIVE&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp;482215 05-DEC-11&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 5 NOT ACTIVE&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp;482215 05-DEC-11&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; select NAME,SEQUENCE#,RESETLOGS_CHANGE#,FIRST_CHANGE#,NEXT_CHANGE# from v$archived_log;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_05/o1_mf_1_1_7frrnnyw_.arc&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;            &lt;/span&gt; &amp;nbsp; 1&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;482026&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;482026&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; 482412&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_05/o1_mf_1_2_7frrnp2f_.arc&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;            &lt;/span&gt; &amp;nbsp; 2&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;482026&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;482412&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; 482414&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_05/o1_mf_1_3_7frrnvjn_.arc&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;            &lt;/span&gt; &amp;nbsp; 3&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;482026&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;482414&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; 482416&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; select * from v$log;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;GROUP# &amp;nbsp; &amp;nbsp;THREAD# &amp;nbsp;SEQUENCE# &amp;nbsp; &amp;nbsp; &amp;nbsp;BYTES &amp;nbsp; &amp;nbsp;MEMBERS ARC STATUS&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;FIRST_CHANGE# FIRST_TIM&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 1&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;1&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4 &amp;nbsp; 52428800&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; 1 NO &amp;nbsp;CURRENT&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; 482416 05-DEC-11&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 2&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;1&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2 &amp;nbsp; 52428800&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; 1 YES INACTIVE&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; 482412 05-DEC-11&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 3&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;1&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3 &amp;nbsp; 52428800&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; 1 YES INACTIVE&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; 482414 05-DEC-11&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Now, delete all the control files.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; shutdown abort&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; startup&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORACLE instance started.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Total System Global Area &amp;nbsp;167772160 bytes&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Fixed Size&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp;1218292 bytes&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Variable Size&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; 71305484 bytes&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Database Buffers&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; 88080384 bytes&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Redo Buffers&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp;7168000 bytes&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00205: error in identifying control file, check alert log for more info&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;-&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;gt; Restore controlfile from backup to all the locations mentioned in initialization parameter file.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;$cp /u01/app/backup/contro1.ctl /u01/app/oradata/orcl1/control01.ctl&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;$cp /u01/app/backup/contro1.ctl /u01/app/oradata/orcl1/control02.ctl&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;$cp /u01/app/backup/contro1.ctl /u01/app/oradata/orcl1/control03.ctl&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; alter database mount;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Database altered.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; recover database using backup controlfile [until cancel]; &amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00279: change 482216 generated at 12/05/2011 11:42:39 needed for thread 1&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00289: suggestion : /u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_05/o1_mf_1_1_%u_.arc&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00280: change 482216 for thread 1 is in sequence #1&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Specify log: {&lt;ret&gt;=suggested | filename | AUTO | CANCEL}&lt;/ret&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;-&amp;gt; It requires archived log related to seq1. Suggestion is pointing to current location, and press enter to accept the suggestio&lt;/span&gt;n&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00279: change 482412 generated at 12/05/2011 11:50:04 needed for thread 1&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00289: suggestion : /u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_05/o1_mf_1_2_%u_.arc&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00280: change 482412 for thread 1 is in sequence #2&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00278: log file &#39;/u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_05/o1_mf_1_1_7frrnnyw_.arc&#39; no longer needed for this recovery&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Specify log: {&lt;ret&gt;=suggested | filename | AUTO | CANCEL}&lt;/ret&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;-&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;gt; It requires archived log related to seq2. Suggestion is pointing to current location, and press enter to accept the suggestion&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00279: change 482414 generated at 12/05/2011 11:50:05 needed for thread 1&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00289: suggestion : /u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_05/o1_mf_1_3_%u_.arc&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00280: change 482414 for thread 1 is in sequence #3&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00278: log file &#39;/u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_05/o1_mf_1_2_7frrnp2f_.arc&#39; no longer needed for this recovery&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Specify log: {&lt;ret&gt;=suggested | filename | AUTO | CANCEL}&lt;/ret&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;-&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;gt; It requires archived log related to seq3. Suggestion is pointing to current location, and press enter to accept the suggestion&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00279: change 482416 generated at 12/05/2011 11:50:11 needed for thread 1&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00289: suggestion : /u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_05/o1_mf_1_4_%u_.arc&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00280: change 482416 for thread 1 is in sequence #4&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00278: log file &#39;/u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_05/o1_mf_1_3_7frrnvjn_.arc&#39; no longer needed for this recovery&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Specify log: {&lt;ret&gt;=suggested | filename | AUTO | CANCEL}&lt;/ret&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;-&amp;gt; It requires archived log related to seq4. Suggestion is pointing to an archived location, but required redo is available in redo01.log(it is clear from the output of redo log) so,specify the file name and location and press enter&lt;/span&gt;.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/u01/app/oradata/orcl1/redo01.log&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Log applied.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Media recovery complete.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; alter database open resetlogs;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Database altered.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;-&amp;gt; And, you will get all the data back&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;**********************************************************************************&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;2. Loss of all controlfiles and one of the redo is missing&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; startup&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; alter database begin backup;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;$cp /u01/app/oradata/orcl1/*.* /u01/app/backup/orcl1/&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; alter database end backup;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;*****Perform some changes*************&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; Alter system switch logfile;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; select name,sequence# from v$archived_log;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_05/o1_mf_1_1_7fs1hyz7_.arc&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;            &lt;/span&gt; &amp;nbsp; 1&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_05/o1_mf_1_2_7fs1hzyk_.arc&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;            &lt;/span&gt; &amp;nbsp; 2&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_05/o1_mf_1_3_7fs1j3o5_.arc&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;            &lt;/span&gt; &amp;nbsp; 3&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_05/o1_mf_1_4_7fs1j40o_.arc&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;            &lt;/span&gt; &amp;nbsp; 4&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; &amp;nbsp;select * from v$log;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;GROUP# &amp;nbsp; &amp;nbsp;THREAD# &amp;nbsp;SEQUENCE# &amp;nbsp; &amp;nbsp; &amp;nbsp;BYTES &amp;nbsp; &amp;nbsp;MEMBERS ARC STATUS&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;FIRST_CHANGE# FIRST_TIM&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 1&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;1&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5 &amp;nbsp; 52428800&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; 1 NO &amp;nbsp;CURRENT&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; 485153 05-DEC-11&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 2&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;1&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3 &amp;nbsp; 52428800&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; 1 YES ACTIVE&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; 485148 05-DEC-11&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 3&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;1&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4 &amp;nbsp; 52428800&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; 1 YES ACTIVE&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; 485151 05-DEC-11&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;-&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;gt;Remove archived log sequence#2&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;$ rm /u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_05/o1_mf_1_2_7fs1hzyk_.arc&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;-&amp;gt; remove all controlfiles&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;$ rm /u01/app/oradata/orcl1/control*.ctl&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; shutdown abort&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; startup&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Error-&amp;gt; error in identifying controlfile&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;D&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;atabase is in nomount state.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;-&amp;gt; copy all the controlfile and datafiles from backup location to target location&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;$ cp /u01/app/backup/orcl1/*.* /u01/app/oradata/orcl1/*.*&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; alter database mount&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; recover database using backup controlfile until cancel;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00279: change 484998 generated at 12/05/2011 14:15:41 needed for thread 1&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00289: suggestion : /u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_05/o1_mf_1_1_%u_.arc&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00280: change 484998 for thread 1 is in sequence #1&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Specify log: {&lt;ret&gt;=suggested | filename | AUTO | CANCEL}&lt;/ret&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00279: change 485146 generated at 12/05/2011 14:21:10 needed for thread 1&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00289: suggestion : /u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_05/o1_mf_1_2_%u_.arc&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00280: change 485146 for thread 1 is in sequence #2&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ORA-00278: log file &#39;/u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_05/o1_mf_1_1_7fs1hyz7_.arc&#39; no longer needed for this recovery&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Specify log: {&lt;ret&gt;=suggested | filename | AUTO | CANCEL}&lt;/ret&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;--&amp;gt; Since redo sequenc#2 does not exists.Issue cancel.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;CANCEL&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Media recovery cancelled.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; ALTER DATABASE OPEN RESETLOGS;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Database altered.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;**********************************************************************************&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;3. Recovery from loss of all controlfiles &amp;nbsp;by creating controlfile.&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;-&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;gt; Same procedure will work whether all the archivelogs is available or not&lt;/span&gt;.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; SQL&amp;gt; startup&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; alter database begin backup;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;$cp /u01/app/oradata/orcl1/*.* /u01/app/backup/orcl1/&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; alter database end backup;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; alter database backup controlfile to trace as &#39;/u01/app/control.bak&#39; noresetlogs;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;*****Perform some changes*************&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; Alter system switch logfile;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; select name,sequence# from v$archived_log;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 1&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_06/o1_mf_1_1_7fv6mo17_.arc&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;SEQUENCE#&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;----------&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;NAME&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;--------------------------------------------------------------------------------&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 2&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_06/o1_mf_1_2_7fv6zzz6_.arc&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 3&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_06/o1_mf_1_3_7fv700xt_.arc&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 4&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_06/o1_mf_1_4_7fv70466_.arc&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;SEQUENCE#&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;----------&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;NAME&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;--------------------------------------------------------------------------------&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 5&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_06/o1_mf_1_5_7fv70532_.arc&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 6&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;/u01/app/flash_recovery_area/ORCL1/archivelog/2011_12_06/o1_mf_1_6_7fv70b3f_.arc&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; select * from v$log;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;delete archive log related to seq 2 and delete all the controlfiles&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; shutdown abort&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; startup&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;error in identifying contorlfile.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; CREATE CONTROLFILE REUSE DATABASE &quot;ORCL1&quot; NORESETLOGS &amp;nbsp;ARCHIVELOG&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;MAXLOGFILES 16&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;MAXLOGMEMBERS 3&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;MAXDATAFILES 100&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;MAXINSTANCES 8&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;MAXLOGHISTORY 292&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;LOGFILE&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;GROUP 1 &#39;/u01/app/oradata/orcl1/redo01.log&#39; &amp;nbsp;SIZE 50M,&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;GROUP 2 &#39;/u01/app/oradata/orcl1/redo02.log&#39; &amp;nbsp;SIZE 50M,&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;GROUP 3 &#39;/u01/app/oradata/orcl1/redo03.log&#39; &amp;nbsp;SIZE 50M&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;DATAFILE&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&#39;/u01/app/oradata/orcl1/system01.dbf&#39;,&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&#39;/u01/app/oradata/orcl1/undotbs01.dbf&#39;,&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&#39;/u01/app/oradata/orcl1/sysaux01.dbf&#39;,&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&#39;/u01/app/oradata/orcl1/users01.dbf&#39;,&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&#39;/u01/app/oradata/orcl1/example01.dbf&#39;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;CHARACTER SET WE8ISO8859P1&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Controlfuile &amp;nbsp;created&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; recover database;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;SQL&amp;gt; alter database open;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;**********************************************************************************&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/669858371723359125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2011/12/loss-of-all-controlfiles-using-user.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/669858371723359125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/669858371723359125'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2011/12/loss-of-all-controlfiles-using-user.html' title='loss of all controlfiles using user managed backup and recovery'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-6967570996357878971</id><published>2011-04-28T22:52:00.009+05:30</published><updated>2011-04-29T00:41:28.689+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="create database statement in oracle 10g"/><title type='text'>create database manually with minimum configuration</title><content type='html'>This blog discusses how to create oracle database manually using CREATE DATABASE command.&lt;div&gt;Following are some of the ways alongwith  minimum requirement that must be satisfied in order to create database successfully.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;These steps have been tested in oracle 10g Enterprise Edition 10.2.0.1.0. on Linux platform.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;1&lt;b&gt;. First of all, set ORACLE_SID and ORACLE_HOME to apprpriate values&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Suppose you want to create a new database named TEST. Then , issue&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$ORACLE_SID=TEST&lt;/div&gt;&lt;div&gt;$ORACLE_HOME=/oracle/product/10.2.0/db_1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;2. Create initialization parameter file $ORACLE_HOME/dbs/initTEST.&lt;/b&gt;ora&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/*****initTEST.ora******/&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;control_files=(/oracle/product/10.2.0/db_1/oradata/TEST/control01.ctl,/oracle/product/10.2.0/db_1/oradata/TEST/control02.crl)&lt;/div&gt;&lt;div&gt;undo_management=AUTO&lt;/div&gt;&lt;div&gt;&lt;div&gt;undo_tablespace=UNDOTBS&lt;/div&gt;&lt;div&gt;db_name=TEST&lt;/div&gt;&lt;div&gt;db_block_size=8192&lt;/div&gt;&lt;div&gt;sga_max_size=268000000&lt;/div&gt;&lt;div&gt;sga_target=268000000&lt;/div&gt;&lt;div&gt;user_dump_dest=&#39;/oracle/product/10.2.0/db_1/admin/TEST/udump&#39;&lt;/div&gt;&lt;div&gt;background_dump_dest=&#39;/oracle/product/10.2.0/db_1/admin/TEST/bdump&#39;&lt;/div&gt;&lt;div&gt;core_dump_dest=&#39;/oracle/product/10.2.0/db_1/admin/TEST/cdump&lt;/div&gt;&lt;/div&gt;&lt;div&gt;/********************/&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Specified location must exist. Otherwise, error returns.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;3. Now, connect to sqlplus:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;$sqlplus /nolog&lt;/div&gt;&lt;div&gt;SQL&amp;gt; conn /  as sysdba&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;4. Start the database in nomount state.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt; SQL&amp;gt; startup nomount&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;5&lt;span class=&quot;Apple-style-span&quot;&gt;.Issue following create database statement: &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;SQL&amp;gt; create database TEST&lt;/div&gt;&lt;div&gt;&lt;div&gt;logfile group 1(&#39;/oracle/product/10.2.0/db_1/oradata/TEST/redo01.log&#39;) size 10M,&lt;/div&gt;&lt;div&gt;          group 2(&#39;/oracle/product/10.2.0/db_1/oradata/TEST/redo02.log&#39;) size 10M,&lt;/div&gt;&lt;div&gt;         group 3(&#39;/oracle/product/10.2.0/db_1/oradata/TEST/redo03.log&#39;) size 10M&lt;/div&gt;&lt;div&gt;character set WE8ISO8859P1&lt;/div&gt;&lt;div&gt;national character set AL16UTF16&lt;/div&gt;&lt;div&gt;datafile &#39;/oracle/product/10.2.0/db_1/oradata/TEST/system01.dbf&#39; size 100M autoextend on next 10M maxsize unlimited extent management local &lt;/div&gt;&lt;div&gt;sysaux datafile &#39;/oracle/product/10.2.0/db_1/oradata/TEST/sysaux01.dbf&#39; size 10M autoextend on next 10M maxsize unlimited&lt;/div&gt;&lt;div&gt;undo tablespace undotbs datafile &#39;/oracle/product/10.2.0/db_1/oradata/TEST/undotbs01.dbf&#39; size 10M&lt;/div&gt;&lt;div&gt;default temporary tablespace temp tempfile &#39;/oracle/product/10.2.0/db_1/oradata/TEST/temp01.dbf&#39; size 10M;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Above procedure would create datafiles in the specified location. It create four tablespaces: system,sysaux,undotbs and temp.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;6. run $ORACLE_HOME/rdbms/admin/catalog.sql script.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;7. run $ORACLE_HOME/rdbms/admin/catproc.sql script.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Creating database using OMF feature &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;You can also create database using OMF feature. Change initTEST.ora file as follows:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;undo_management=AUTO&lt;/div&gt;&lt;div&gt;sga_max_size=268000000&lt;/div&gt;&lt;div&gt;sga_target=268000000&lt;/div&gt;&lt;div&gt;undo_tablespace=UNDOTBS1&lt;/div&gt;&lt;div&gt;db_name=TEST&lt;/div&gt;&lt;div&gt;db_block_size=8192&lt;/div&gt;&lt;div&gt;db_create_file_dest=&#39;/oracle/product/10.2.0/db_1/oradata&#39;&lt;/div&gt;&lt;div&gt;db_create_online_log_dest_1=&#39;/oracle/product/10.2.0/db_1/oradata&#39;&lt;/div&gt;&lt;div&gt;user_dump_dest=&#39;/oracle/product/10.2.0/db_1/admin/TEST/udump&#39;&lt;/div&gt;&lt;div&gt;background_dump_dest=&#39;/oracle/product/10.2.0/db_1/admin/TEST/bdump&#39;&lt;/div&gt;&lt;div&gt;core_dump_dest=&#39;/oracle/product/10.2.0/db_1/admin/TEST/cdump&#39;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Here, two OMF related parameters have been set,that is, db_create_file_dest and db_create_online_log_dest.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;And issue create database statement as:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SQL&amp;gt; create database TEST&lt;/div&gt;&lt;div&gt;   character set WE8ISO8859P1&lt;/div&gt;&lt;div&gt;    national character set AL16UTF16&lt;/div&gt;&lt;div&gt;    undo tablespace undotbs1&lt;/div&gt;&lt;div&gt;    default temporary tablespace temp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;No need to specify the name of any of the datafiles and redolog files here. It will create all the datafiles according to the specified  OMF related parameters&#39; values.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;All the other steps are same except step no.2 and 5.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;i&gt;I&lt;b&gt;f creating database using OMF features,&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt; &lt;span class=&quot;Apple-style-span&quot;&gt;controlfile parameter needs to be set in the initialization parameter file  after successful creation of the database&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;i&gt; &lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;as Oracle would not identify correct controlfile during next startup of the database. Oracle will locate the controlfile in $ORACLE_HOME/dbs but can not find one. That&#39;s why always set controfile parameter that points to the correct location before shutting down the instance.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can issue even much simple create database statement  when using OMF feature. Issue just:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SQL&amp;gt; create database TEST;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; But all other steps are same.&lt;/div&gt;&lt;div&gt;  &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/6967570996357878971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2011/04/this-blog-discusses-how-to-create.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/6967570996357878971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/6967570996357878971'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2011/04/this-blog-discusses-how-to-create.html' title='create database manually with minimum configuration'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-3256192739920897024</id><published>2011-04-27T22:23:00.004+05:30</published><updated>2011-12-06T12:33:05.631+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="restoring controlfile in archivelog mode"/><title type='text'>restoring controlfile in archivelog mode using RMAN</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;If controlfile has been dropped and we are running in archivelog mode, what options do we have to restore controlfile.&lt;br /&gt;
&lt;br /&gt;
1. RMAN&amp;gt; startup nomount&lt;br /&gt;
2. RMAN&amp;gt; restore controlfile from autobackup;&lt;br /&gt;
3. RMAN&amp;gt; alter database mount;&lt;br /&gt;
4. RMAN&amp;gt; recover database;&lt;br /&gt;
5. RMAN&amp;gt; alter database open resetlogs;&lt;br /&gt;
&lt;br /&gt;
Procedure is same if any archivelog is missing&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/3256192739920897024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2011/04/restoring-controlfile-in-archivelog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/3256192739920897024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/3256192739920897024'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2011/04/restoring-controlfile-in-archivelog.html' title='restoring controlfile in archivelog mode using RMAN'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-2409292478601322358</id><published>2011-04-27T22:09:00.003+05:30</published><updated>2011-04-27T22:23:13.349+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="complete recovery of datafile using rman"/><title type='text'>complete recovery of datafile using RMAN</title><content type='html'>You can perform following experiment to perform complete recovery of datafile in archivelog mode.&lt;br /&gt;1. Assume database is up and running.&lt;br /&gt;2. Delete datafile 4.&lt;br /&gt;3. Valid backup must exist.&lt;br /&gt;4. All the redo logs after the last valid backup exist.&lt;br /&gt;&lt;br /&gt;To restore it,&lt;br /&gt;1. RMAN&amp;gt; SQL&#39;alter database datafile 4 offline&#39;;&lt;br /&gt;2. RMAN&amp;gt; restore datafile 4;&lt;br /&gt;3. RMAN&amp;gt; recover datafile 4;&lt;br /&gt;4. RMAN&amp;gt;SQL&#39;alter database datafile 4 online&#39;;&lt;br /&gt;&lt;br /&gt;If an active redo log file is lost, then incomplete recovery of a datafile is not possible . Instead we have to perform Tablespace point in time recovery.</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/2409292478601322358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2011/04/complete-recovery-of-datafile-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/2409292478601322358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/2409292478601322358'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2011/04/complete-recovery-of-datafile-using.html' title='complete recovery of datafile using RMAN'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-8771539959450022660</id><published>2011-04-02T17:12:00.002+05:30</published><updated>2011-04-02T17:19:42.667+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="dbca"/><category scheme="http://www.blogger.com/atom/ns#" term="error when running dbca"/><category scheme="http://www.blogger.com/atom/ns#" term="exception in thread main while running dbca"/><category scheme="http://www.blogger.com/atom/ns#" term="oracle 10g dbca"/><title type='text'>Resolving Exception in thread &quot;main&quot;  error</title><content type='html'>When trying to execute dbca from my unix(ubuntu 9) prompt, I get following error:&lt;br /&gt;&lt;br /&gt;Exception in thread &quot;main&quot;&lt;br /&gt;and prompt returns.&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 102, 102);&quot;&gt;Solution&lt;/span&gt;: If working on the local machine, set DISPLAY variable as&lt;br /&gt;$ DISPLAY=:0.0&lt;br /&gt;$ export DISPLAY&lt;br /&gt;&lt;br /&gt;$ dbca&lt;br /&gt;&lt;br /&gt;and everything works fine.</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/8771539959450022660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2011/04/resolving-exception-in-thread-main.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/8771539959450022660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/8771539959450022660'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2011/04/resolving-exception-in-thread-main.html' title='Resolving Exception in thread &quot;main&quot;  error'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-455018921142922107</id><published>2011-03-08T12:11:00.014+05:30</published><updated>2011-03-09T20:38:57.908+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="differential and cumulative incremental backup"/><category scheme="http://www.blogger.com/atom/ns#" term="rman complete recovery in noarchivelog mode."/><category scheme="http://www.blogger.com/atom/ns#" term="rman incremental backup and restore"/><title type='text'>Incremental backup and restore in oracle 10g</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Here I am presenting the simple steps to  demonstrate how to take incremental level backup,perform restore and recovery using RMAN.One can learn Rman incremental level backup easily by going through this post. I used oracle 10g express edition.&lt;br /&gt;&lt;br /&gt;Difference between differential and cumulative incremental backup will be clear by going through this simple demo.&lt;br /&gt;&lt;br /&gt;Simple scenarios has been taken.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-family: webdings; color: rgb(255, 153, 102);font-size:130%;&quot; &gt;Demonstrating DIFFERENTIAL INCREMENTAL BACKUP&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style=&quot;color: rgb(255, 153, 102);&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;1. Database is in NOARCHIVELOG mode.&lt;br /&gt;2. Not using recovery catalog.&lt;br /&gt;3. RMAN configuration setting that I used is following. I am posting the output of&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-family: times new roman;&quot;&gt;RMAN&gt; SHOW ALL;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;using target database control file instead of recovery catalog&lt;br /&gt;RMAN configuration parameters are:&lt;br /&gt;CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default&lt;br /&gt;CONFIGURE BACKUP OPTIMIZATION ON;&lt;br /&gt;CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default&lt;br /&gt;CONFIGURE CONTROLFILE AUTOBACKUP ON;&lt;br /&gt;CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO &#39;/usr/lib/oracle/xe/backup/cf_%F&#39;;&lt;br /&gt;CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default&lt;br /&gt;CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default&lt;br /&gt;CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default&lt;br /&gt;CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 400 M FORMAT   &#39;/usr/lib/oracle/xe/backup/df_%U&#39;;&lt;br /&gt;CONFIGURE MAXSETSIZE TO UNLIMITED; # default&lt;br /&gt;CONFIGURE ENCRYPTION FOR DATABASE OFF; # default&lt;br /&gt;CONFIGURE ENCRYPTION ALGORITHM &#39;AES128&#39;; # default&lt;br /&gt;CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default&lt;br /&gt;CONFIGURE SNAPSHOT CONTROLFILE NAME TO &#39;/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/dbs/snapcf_XE.f&#39;; # default&lt;br /&gt;&lt;br /&gt;4. Since database is in NOARCHIVELOG mode, it is necessary to shut down the database cleanly using immediate,normal or transactional options.&lt;br /&gt;&lt;br /&gt;RMAN&gt; shutdown&lt;br /&gt;&lt;br /&gt;5. To take  incremental 0 level backup,mount the database. This step is required even in non-incremental backups.&lt;br /&gt;&lt;br /&gt;RMAN&gt; startup mount&lt;br /&gt;&lt;br /&gt;6. Issue&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;RMAN&gt; BACKUP INCREMENTAL LEVEL 0 DATABASE TAG &#39;FULL_INC&#39;&lt;/span&gt;;&lt;br /&gt;This takes the full backup of the database and also includes controlfile as well as spfile.&lt;br /&gt;&lt;br /&gt;7. Issue&lt;br /&gt;SQL&gt; select * from v$log;&lt;br /&gt;&lt;br /&gt;   GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS&lt;br /&gt;---------- ---------- ---------- ---------- ---------- --- ----------------&lt;br /&gt;FIRST_CHANGE# FIRST_TIM&lt;br /&gt;------------- ---------&lt;br /&gt; 1     1        0   52428800      1 YES UNUSED&lt;br /&gt;    0&lt;br /&gt;&lt;br /&gt; 2     1        1   52428800      1 NO  CURRENT&lt;br /&gt;     1077758 08-MAR-11&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; select checkpoint_change# from v$database;&lt;br /&gt;&lt;br /&gt;CHECKPOINT_CHANGE#&lt;br /&gt;------------------&lt;br /&gt;   1084366&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8. RMAN&gt; ALTER DATABASE OPEN;&lt;br /&gt;&lt;br /&gt;9. Now, perform some DML operations. For example,&lt;br /&gt;&lt;br /&gt;SQL&gt; CREATE TABLE T1(C1 NUMBER);&lt;br /&gt;SQL&gt; INSERT INTO T1 VALUES(10);&lt;br /&gt;SQL&gt; /&lt;br /&gt;SQL&gt; /&lt;br /&gt;SQL&gt; COMMIT;&lt;br /&gt;&lt;br /&gt;10. Again, shutdown the database to take incremental level backup.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;RMAN&gt;SHUTDOWN&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;RMAN&gt;STARTUP MOUNT&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;RMAN&gt; BACKUP INCREMENTAL LEVEL 1 DATABASE TAG &#39;INC_1&#39;;&lt;/span&gt;&lt;br /&gt;It backups only the changes made since the last incremental level n or lower backup. &lt;br /&gt;&lt;br /&gt;11. Open the database again to perform some insertions.&lt;br /&gt;RMAN&gt; ALTER DATABASE OPEN;&lt;br /&gt;&lt;br /&gt;12. SQL&gt; INSERT INTO T1 VALUES(1);&lt;br /&gt;SQL&gt; /&lt;br /&gt;SQL&gt; /&lt;br /&gt;SQL&gt; /&lt;br /&gt;SQL&gt; COMMIT;&lt;br /&gt;&lt;br /&gt;13. Shutdown the database again to take incremental level 2 backup.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;RMAN&gt; SHUTDOWN&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;RMAN&gt; STARTUP MOUNT&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;RMAN&gt; BACKUP INCREMENTAL LEVEL 2 DATABASE TAG &#39;INC_1&#39;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;14. Open database again to made some insertions.&lt;br /&gt;RMAN&gt; ALTER DATABASE OPEN;&lt;br /&gt;SQL&gt; INSERT INTO T1 VALUES(9);&lt;br /&gt;SQL&gt; /&lt;br /&gt;SQL&gt; /&lt;br /&gt;SQL&gt; COMMI;&lt;br /&gt;&lt;br /&gt;15. select * from v$log;&lt;br /&gt;&lt;br /&gt;   GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS&lt;br /&gt;---------- ---------- ---------- ---------- ---------- --- ----------------&lt;br /&gt;FIRST_CHANGE# FIRST_TIM&lt;br /&gt;------------- ---------&lt;br /&gt;    1        1           0   52428800         1 YES UNUSED&lt;br /&gt;       0&lt;br /&gt;&lt;br /&gt;    2        1           1   52428800         1 NO  CURRENT&lt;br /&gt;     1077758 08-MAR-11&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; select checkpoint_change# from v$database;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CHECKPOINT_CHANGE#&lt;br /&gt;------------------&lt;br /&gt;   1084663&lt;br /&gt;&lt;br /&gt;Here all the changes since the last backup has been stored in the redo logs.&lt;br /&gt;&lt;br /&gt;16. Now, delete controlfile.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;$ mv oradata/XE/controlfile cf.bak&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;17. RMAN&gt; SHUTDOWN ABORT;&lt;br /&gt;&lt;br /&gt;18. RMAN&gt; STARTUP&lt;br /&gt;Database will not open. Database will only go upto the NOMOUNT state since controlfile has been lost.&lt;br /&gt;&lt;br /&gt;19. RMAN&gt; Now following steps are needed &lt;span style=&quot;font-weight: bold;&quot;&gt;to recover the database&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;20. RMAN&gt; SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO &#39;/usr/lib/oracle/xe/backup/cf_%F&#39;;&lt;br /&gt;If controlfile autobackup is located in default location, then we can skip this step.&lt;br /&gt;&lt;br /&gt;21. &lt;span style=&quot;font-weight: bold;&quot;&gt;RMAN&gt; RESTORE CONTROLFILE FROM AUTOBACKU&lt;/span&gt;P&lt;br /&gt;&lt;br /&gt;22. &lt;span style=&quot;font-weight: bold;&quot;&gt;RMAN&gt; ALTER DATABASE MOUNT;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;23. &lt;span style=&quot;font-weight: bold;&quot;&gt;RMAN&gt; RESTORE DATABASE&lt;/span&gt;;&lt;br /&gt;It will restore the database using the 0 level backup.&lt;br /&gt;&lt;br /&gt;24. &lt;span style=&quot;font-weight: bold;&quot;&gt;RMAN&gt; RECOVER DATABASE&lt;/span&gt;&lt;br /&gt;Watch the output carefully. You can recognise various backups that are being applied. Look for the tags that you have given to backupsets. It will applies all the incrementals one by one. First it will apply level 1 incremental, and then level 2. Then it will search for appropriate log sequence and applies the same if found. If log switching has not been taken place after the last incremental backup, then we get all the data without any data loss. And database will restore upto the current point in time. In our case no log switching has taken place and all the data since the last backup exist in the redologs. &lt;span style=&quot;font-weight: bold;&quot;&gt;NOREDO &lt;/span&gt;option is needed when log switching has taken place. NOREDO option is not needed if log switch has not taken place.&lt;br /&gt;&lt;br /&gt;25.&lt;span style=&quot;font-weight: bold;&quot;&gt;RMAN&gt; ALTER DATABASE OPEN RESETLOGS;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;26. Now, view the table t1 and you will find the table restored upto the latest point in time if all the redos has been applied.&lt;br /&gt;&lt;br /&gt;27. Always take full backup of the database after opening the database in resetlogs mode.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 153, 102);font-size:130%;&quot; &gt;Demonstrating CUMULATIVE INCREMENTAL BACKUP&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 153, 102);font-size:130%;&quot; &gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Here we will utilize same scenario as above,i.e. no recovery catalog mode,no archivelog mode.&lt;br /&gt;We will start here by taking incremental level 0 backup.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;1. RMAN&gt; SHUTDOWN &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;2. RMAN&gt; STARTUP MOUNT &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;3. RMAN&gt; BACKUP INCREMENTAL LEVEL 0 DATABASE TAG &#39;FULL_INC&#39;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;4. RMAN&gt; ALTER DATABASE OPEN;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;5. SQL&gt; SELECT CHECKPOINT_CHANGE# FROM V$DATABASE;&lt;br /&gt;6. Make some insertion.&lt;br /&gt;SQL&gt; INSERT INTO T1 VALUES(2);&lt;br /&gt;SQL&gt; /&lt;br /&gt;SQL&gt; /&lt;br /&gt;SQL&gt; COMMIT;&lt;br /&gt;&lt;br /&gt;7. Again shutdown the database to take incremental level 1 database which will copies only the changed blocks since the last incremental level 0 backup.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;RMAN&gt; BACKUP INCREMENTAL LEVEL 1 DATABASE TAG &#39;INC_1&#39;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;8.ALTER DATABASE OPEN;&lt;br /&gt;&lt;br /&gt;9. SQL&gt; INSERT INTO T1 VALUES(3);&lt;br /&gt;SQL&gt; /&lt;br /&gt;SQL&gt; /&lt;br /&gt;SQL&gt; COMMIT;&lt;br /&gt;&lt;br /&gt;10. Again shutdown the database to take cumulative incremental level 1 backup, this time. This backups all the changes made after the last n-1 or lower backup,here it will backup all the changes since the incremental level 0 backup.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;RMAN&gt; BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE TAG &#39;CUM_1&#39;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;11. RMAN&gt; ALTER DATABASE OPEN;&lt;br /&gt;&lt;br /&gt;12. Perform some DML again.&lt;br /&gt;SQL&gt; INSERT INTO T1 VALUES(9);&lt;br /&gt;SQL&gt;/&lt;br /&gt;SQL&gt; /&lt;br /&gt;SQL&gt; COMMIT;&lt;br /&gt;&lt;br /&gt;13. Now, we will shutdown the database to take incremental level 1 backup this time.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;RMAN&gt; SHUTDOWN&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;RMAN&gt; STARTUP MOUNT&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;RMAN&gt; BACKUP INCREMENTAL LEVEL 1 DATABASE TAG &#39;INC_1_1&#39;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;14. RMAN&gt; ALTER DATABASE OPEN;&lt;br /&gt;&lt;br /&gt;15. SQL&gt; INSERT INTO T1 VALUES(0);&lt;br /&gt;SQL&gt; /&lt;br /&gt;SQL&gt; COMMIT;&lt;br /&gt;&lt;br /&gt;16. Delete controlfile.&lt;br /&gt;$ mv oradata/XE/controlfile cf.bak&lt;br /&gt;&lt;br /&gt;17. RMAN&gt; SHUTDOWN ABORT&lt;br /&gt;&lt;br /&gt;18. RMAN&gt; STARTUP&lt;br /&gt;Database will not open.It will go upto only NOMOUNT state.&lt;br /&gt;&lt;br /&gt;19. RMAN&gt; SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO &#39;/usr/lib/oracle/XE/backup/cf_%F&#39;;&lt;br /&gt;&lt;br /&gt;20. RMAN&gt; RESTORE CONTROLFILE FROM AUTOBACKUP;&lt;br /&gt;&lt;br /&gt;21. RMAN&gt; ALTER DATABASE MOUNT;&lt;br /&gt;&lt;br /&gt;22. RMAN&gt; RESTORE DATABASE;,&lt;br /&gt;It will restore the database from the last incremental level 0 database.&lt;br /&gt;&lt;br /&gt;23. RMAN&gt; RECOVER DATABASE;&lt;br /&gt;Here NOREDO option is not necessary as it is assumed that redo logs has not been switched and complete recovery is possible. Check the same by looking at the contents of v$log and comparing with the checkpoint_change# that have noted in step 5. If all the changes since that value exist in the redo logs then NOREDO option is not needed. Else it is required.&lt;br /&gt;&lt;br /&gt;Here first of all, cumulative incremental level 1 backup would restore as there is no need for the backup having tag &#39;INC_1&#39; as cumulative incremental level 1 backup take backup of all the changes since the last level 0 backup. Thus our first incremental level 1 backup is not applied. Then it applies backup having tag &#39;INC_1_1&#39; which we take after cumulative incremental level backup. After that it will apply all the changes recorded in the online redologs.&lt;br /&gt;Thus , only two incremental level backups needed to apply here. But in the first scenario all the incremental backups had been applied. Thus we can say that &lt;span style=&quot;font-weight: bold;&quot;&gt;using cumulative incremental backup in your incremental strategy provides faster recovery as number of incremental backups to be applied is less.  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;24. RMAN&gt; ALTER DATBASE OPEN RESETLOGS;&lt;br /&gt;&lt;br /&gt;25. Take whole database backup after opening database in resetlogs mode. It is a good practice to perform th same.&lt;br /&gt;&lt;br /&gt;26. Now check your table. It must have all the changes that we made, keeping all the scenario same.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/455018921142922107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2011/03/incremental-backup-and-restore.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/455018921142922107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/455018921142922107'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2011/03/incremental-backup-and-restore.html' title='Incremental backup and restore in oracle 10g'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-7466906513065012574</id><published>2011-03-02T12:39:00.006+05:30</published><updated>2011-03-02T13:20:41.301+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Non default listener"/><category scheme="http://www.blogger.com/atom/ns#" term="non-default listener in oracle 10gxe"/><category scheme="http://www.blogger.com/atom/ns#" term="oracle xe 10g"/><title type='text'>Configuring non-default listener to listen to non-default port in Oracle xe 10g</title><content type='html'>Following are the steps that I use to configure non-default listener to listen to non-default port,1522.&lt;br /&gt;&lt;br /&gt;1. Edit initXE.ora file which resides in $ORACLE_HOME/dbs &lt;br /&gt;Add local_listener=listener1 line to this file. Listener1 will be the name of the non-default listener.&lt;br /&gt;&lt;br /&gt;2. Edit listener.ora file to configure listener1. listener.ora file resides in $ORACLE_HOME/network/admin.&lt;br /&gt;&lt;br /&gt;My listener.ora file looks like:&lt;br /&gt;&lt;br /&gt;LISTENER1 =&lt;br /&gt;        (ADDRESS_LIST =&lt;br /&gt;                (ADDRESS = (PROTOCOL = TCP)(HOST = vishesh-netbook)(PORT = 1522)))&lt;br /&gt;SID_LIST_LISTENER1 =&lt;br /&gt;        (SID_LIST =&lt;br /&gt;                (SID_DESC =&lt;br /&gt;                        (ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server)&lt;br /&gt;                        (GLOBAL_DBNAME = XE)&lt;br /&gt;                        (SID_NAME = XE)))&lt;br /&gt;&lt;br /&gt;3. Edit tnsnames.ora file to resolve non-default listener name,listener1.&lt;br /&gt;&lt;br /&gt;My tnsnames.ora file looks like:&lt;br /&gt;&lt;br /&gt;# tnsnames.ora Network Configuration File:&lt;br /&gt;LISTENER1 =&lt;br /&gt; (DESCRIPTION =&lt;br /&gt;        (ADDRESS = (PROTOCOL = TCP)(HOST = vishesh-netbook)(PORT = 1522)))&lt;br /&gt;XE =&lt;br /&gt;  (DESCRIPTION =&lt;br /&gt;    (ADDRESS = (PROTOCOL = TCP)(HOST = vishesh-netbook)(PORT = 1522))&lt;br /&gt;    (CONNECT_DATA =&lt;br /&gt;      (SERVER = DEDICATED)&lt;br /&gt;      (SERVICE_NAME = XE)&lt;br /&gt;    )&lt;br /&gt;  )&lt;br /&gt;&lt;br /&gt;EXTPROC_CONNECTION_DATA =&lt;br /&gt;  (DESCRIPTION =&lt;br /&gt;    (ADDRESS_LIST =&lt;br /&gt;      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))&lt;br /&gt;    )&lt;br /&gt;    (CONNECT_DATA =&lt;br /&gt;      (SID = PLSExtProc)&lt;br /&gt;      (PRESENTATION = RO)&lt;br /&gt;&lt;br /&gt;4. Now connect to the database.&lt;br /&gt;5. After connecting, use&lt;br /&gt;SQL&gt; CREATE SPFILE FROM PFILE; #can be run after or before instance startup &lt;br /&gt;SQL&gt; SHUTDOWN&lt;br /&gt;&lt;br /&gt;At OS prompt, use&lt;br /&gt;#lsnrctl start listener1&lt;br /&gt;Then use&lt;br /&gt;# sqlplus /nolog</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/7466906513065012574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2011/03/following-are-steps-that-i-use-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/7466906513065012574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/7466906513065012574'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2011/03/following-are-steps-that-i-use-to.html' title='Configuring non-default listener to listen to non-default port in Oracle xe 10g'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-6277672209733578500</id><published>2011-02-25T22:17:00.010+05:30</published><updated>2011-12-06T12:53:21.280+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="loss of control file"/><category scheme="http://www.blogger.com/atom/ns#" term="recovering controlfile in noarchivelog mode"/><category scheme="http://www.blogger.com/atom/ns#" term="rman"/><title type='text'>Recover from loss of controlfile in NOARCHIVELOG mode using RMAN</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Here I am taking simple scenario to recover the controlfile. Following describes a scenario when my database is in NOARCHIVELOG mode. Database in oracle 10.2.0.1.0&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;SCENARIO: WHEN USED WITH DEFAULT RMAN CONFIGURATION SETTINGS. &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Here only controlfile is lost, all the datafile and redo log files remain intact.&lt;br /&gt;
Following are the steps that can be taken:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;1.RMAN&amp;gt; STARTUP MOUNT&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;2.RMAN&amp;gt; BACKUP DATABASE&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;3. RMAN&amp;gt; ALTER DATABASE OPEN;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;4. delete controlfile&lt;/span&gt;. &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;5. RMAN&amp;gt; SHUTDOWN ABORT; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;6. RMAN&amp;gt; STARTUP;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;Database will not start. It starts in nomount state.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;7. RMAN&amp;gt; RESTORE CONTROLFILE FROM AUTOBACKUP;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;8. RMAN&amp;gt; ALTER DATABASE MOUNT;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;9. RMAN&amp;gt; RESTORE DATABASE;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;10.RMAN&amp;gt; RECOVER DATABASE ;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;11.RMAN&amp;gt; ALTER DATABASE OPEN RESETLOGS;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
And database will be recovered. Here &lt;span style=&quot;font-weight: bold;&quot;&gt;SET DBID&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt; command is not needed because backup is located in flash recovery area.&lt;/span&gt; Controlfile autobackup default format is used.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;SCENARIO: WHEN USED WITH non-DEFAULT RMAN CONFIGURATION SETTINGS.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I changed some of the default RMAN configuration settings. Now backup is not using flash recovery area. Also, controlfile autobackup is not using flash recovery area.&lt;br /&gt;
&lt;br /&gt;
RMAN&amp;gt; SHOW ALL;&lt;br /&gt;
&lt;br /&gt;
RMAN configuration parameters are:&lt;br /&gt;
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default&lt;br /&gt;
CONFIGURE BACKUP OPTIMIZATION ON;&lt;br /&gt;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;CONFIGURE CONTROLFILE AUTOBACKUP ON;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO &#39;/usr/lib/oracle/xe/backup/cf_%F&#39;;&lt;/span&gt;&lt;br /&gt;
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default&lt;br /&gt;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default&lt;br /&gt;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 400 M FORMAT   &#39;/usr/lib/oracle/xe/backup/df_%U&#39;;&lt;/span&gt;&lt;br /&gt;
CONFIGURE MAXSETSIZE TO UNLIMITED; # default&lt;br /&gt;
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default&lt;br /&gt;
CONFIGURE ENCRYPTION ALGORITHM &#39;AES128&#39;; # default&lt;br /&gt;
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default&lt;br /&gt;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO &#39;/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/dbs/snapcf_XE.f&#39;; # default&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now follow these steps:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;1.RMAN&amp;gt; STARTUP MOUNT&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;2.RMAN&amp;gt; BACKUP DATABASE&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;3. RMAN&amp;gt; ALTER DATABASE OPEN;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;4. delete controlfile&lt;/span&gt;. &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;5. RMAN&amp;gt; SHUTDOWN ABORT; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;6. RMAN&amp;gt; STARTUP;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;Database will not start. It starts in nomount state.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;7. RMAN&amp;gt; SET DBID=&lt;dbid&gt;&lt;/dbid&gt;&lt;/span&gt;&lt;put&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;8. RMAN&amp;gt; SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO &#39;/usr/lib/oracle/xe/backup/cf_%F&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;9. RMAN&amp;gt; RESTORE CONTROLFILE FROM AUTOBACKUP;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;10. RMAN&amp;gt; ALTER DATABASE MOUNT;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;11. RMAN&amp;gt; RESTORE DATABASE;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;12.RMAN&amp;gt; RECOVER DATABASE ;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff6666;&quot;&gt;13.RMAN&amp;gt; ALTER DATABASE OPEN RESETLOGS;&lt;br /&gt;
&lt;br /&gt;
Note:  &lt;span style=&quot;color: black;&quot;&gt;If all the redo logs since the last database exist, then you can skip RESTORE DATABASE statement in both the above cases.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/put&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/6277672209733578500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2011/02/recover-from-loss-of-controlfile-in.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/6277672209733578500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/6277672209733578500'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2011/02/recover-from-loss-of-controlfile-in.html' title='Recover from loss of controlfile in NOARCHIVELOG mode using RMAN'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-6695046299833705884</id><published>2011-02-13T22:17:00.016+05:30</published><updated>2011-03-14T23:58:06.121+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="complete and incomplete recovery in noarchivelog mode using RMAN"/><category scheme="http://www.blogger.com/atom/ns#" term="RMAN backup and recovery in noarchivelog mode"/><title type='text'>RMAN restore and recovery in NOARCHIVELOG mode</title><content type='html'>Here I am writing about simple scenarios related to backup and recovery so that RMAN can be learned easily.&lt;br /&gt;Lets start with a simple scenario for performing backup,restore and recovery using RMAN when our database is running in NOARCHIVELOG mode.&lt;br /&gt;Oracle doc says that recovery cannot be performed in NOARCHIVELOG mode. But following scenarios explains how can we perform complete as well as incomplete recovery in NOARCHIVELOG mode. Different scenarios has been given to show how to recover database to a point in time as well as upto the recent time when the disaster occur. Each scenario has been tested in Oracle 10g xe hoping that each will also work with oracle 10g enterprise edition. Each scenario has been tested in NOARCHIVELOG mode.&lt;br /&gt;&lt;br /&gt;Complete recovery can be performed in NOARCHIVEOG mode if all the changes since the last backup exists in the redo logs(including the redo logs that exists during the backup.)&lt;br /&gt;&lt;br /&gt;Incomplete recovery can be performed if all the changes since the last backup up to a point in time exists in the redo log.&lt;br /&gt;&lt;br /&gt;We can perform incomplete recovery until scn,until time and until sequence using RMAN.&lt;br /&gt; &lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SCENARIO I:Complete recovery: a datafile is lost&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;br /&gt;1. I am using Oracle 10g express edition.&lt;br /&gt;2. Database is running in NOARCHIVELOG mode.&lt;br /&gt;3. Cold backup has been performed after clean shutdown of the database.&lt;br /&gt;4. One of the datafiles ,say users.dbf, has been lost.&lt;br /&gt;5.  All the redologs including one with the same log seq# as during the backup is available.&lt;br /&gt;6. Thus here we have to restore only the effected datafiles,not the whole database.&lt;br /&gt;Use the following sequence of steps:&lt;br /&gt;1. RMAN&gt; shutdown&lt;br /&gt;2. RMAN&gt; startup mount&lt;br /&gt;3. RMAN&gt; restore datafile 4; or restore tablespace users;&lt;br /&gt;4. RMAN&gt; recover datafile 4; or recover tablespace users;&lt;br /&gt;5. RMAN&gt; alter database open;&lt;br /&gt;&lt;br /&gt;Instead of step 3 and 4, we can also use&lt;br /&gt;RMAN&gt; restore database; and&lt;br /&gt;RMAN&gt; recover database, respectively.&lt;br /&gt;&lt;br /&gt;But we do not need to restore and recover the whole database in this scenario. Important point is that &lt;span style=&quot;font-style: italic;&quot;&gt;No data loss is guaranteed in NOARCHIVELOG mode if all the redo logs exist since the last backup.&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;&lt;/span&gt; Thus complete recovery has been performed in NOARCHIVELOG mode.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SCENARIO II : Incomplete recovery&lt;/span&gt;&lt;br /&gt;Keeping everything same as scenario I, some redo log seq no# since the last backup is not available say, redo log has been switched. Users.dbf has been lost. Here, to restore the lost datafile following steps should be taken:&lt;br /&gt;&lt;br /&gt;1. RMAN&gt;startup force nomount;&lt;br /&gt;If database is already shutdown, then don&#39;t use force option.&lt;br /&gt;2. RMAN&gt;restore controlfile from autobackup; or restore controlfile from &#39;autobackup_location&#39;;&lt;br /&gt;3. RMAN&gt;alter database mount;&lt;br /&gt;4. RMAN&gt;restore database;&lt;br /&gt;5. RMAN&gt;recover database noredo;&lt;br /&gt;6. RMAN&gt; alter database open resetlogs;&lt;br /&gt;&lt;br /&gt;Here restore of whole database is must.&lt;br /&gt;&lt;br /&gt;You can also follow following link:&lt;br /&gt;&lt;a href=&quot;http://gnjatovic.blogspot.com/2007/06/no-data-loss-in-noarchivelog-mode.html&quot;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SCENARIO III: Incomplete recovery - until scn-when a table is dropped&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; CREATE TABLE T1(C1 NUMBER);&lt;br /&gt;SQL&gt; INSERT INTO T1 VALUES(10);&lt;br /&gt;SQL&gt;/&lt;br /&gt;SQL&gt;/&lt;br /&gt;SQL&gt; COMMIT;&lt;br /&gt;&lt;br /&gt;SQL&gt; select current_scn from v$database;&lt;br /&gt;It generated 810390;&lt;br /&gt;SQL&gt; drop table t1;&lt;br /&gt;&lt;br /&gt;Check v$log. If all the scns since the last backup  upto the point you want to recover to (in our case it is, 810390, because table is dropped after that time) exists , then we can recover table t1 even in noarchivelog mode.&lt;br /&gt;Use following operations:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RMAN&gt; run&lt;br /&gt;{&lt;br /&gt;shutdown;&lt;br /&gt;startup mount;&lt;br /&gt;restore database;&lt;br /&gt;recover database until scn 810390;&lt;br /&gt;alter database open resetlogs;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Now you will find recovered table t1.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SCENARIO IV- incomplete recovery -until time: when a table is dropped.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. Yesterday night, you have taken cold,consistent whole database backup.&lt;br /&gt;2. In the next morning, some user error caused employees table t1 to drop.&lt;br /&gt;3. If you know the approximate time of dropping the table, you can recover the table even to the point of recent changes made in the table. There is no need to panic even if your database is running in NOARCHIVElog mode.&lt;br /&gt;4. Check v$log. If all the changes since the last backup is present in the redo log groups, we can recover the dropped table. Use the following procedure. Suppose the table is dropped at 10:30 in the morning.&lt;br /&gt;&lt;br /&gt;RMAN&gt; RUN {&lt;br /&gt;2&gt; SET UNTIL TIME = &#39;2011-02-22:10:28:00&#39;;&lt;br /&gt;3&gt; RESTORE DATABASE;&lt;br /&gt;4&gt; RECOVER DATABASE;&lt;br /&gt;5&gt; ALTER DATABASE OPEN RESETLOGS;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;For &lt;span style=&quot;font-style: italic;&quot;&gt;until time&lt;/span&gt; to function you must set $NLS_LANG and $NLS_DATE_FORMAT appropriately. In my case $NLS_LANG has been set to american and NLS_DATE_FORMAT has been set to &#39;YYYY-MM-DD:HH24:MI:SS&#39;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SCENARIO V-INCOMPLETE RECOVERY : SQLPLUS UNTIL CANCEL:DATAFILES AND ACTIVE REDO LOG FILE IS LOST&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Suppose two datafiles as well as active redo log group is lost. Here to recover database, use following procedure:&lt;br /&gt;&lt;br /&gt;RMAN&gt; ALTER DATABASE MOUNT;&lt;br /&gt;RMAN&gt; RESTORE DATABASE;&lt;br /&gt;SQL&gt; RECOVER DATABASE UNTIL CANCEL;&lt;br /&gt;&lt;br /&gt;ORA-00279: change 828771 generated at 02/23/2011 11:38:39 needed for thread 1&lt;br /&gt;ORA-00289: suggestion :&lt;br /&gt;/usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/archivelog/2011_02_23/o1_mf&lt;br /&gt;_1_1_%u_.arc&lt;br /&gt;ORA-00280: change 828771 for thread 1 is in sequence #1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Specify log: {&lt;ret&gt;=suggested | filename | AUTO | CANCEL}&lt;br /&gt;cancel&lt;br /&gt;Media recovery cancelled.&lt;br /&gt;&lt;br /&gt;RMAN&gt; ALTER DATABASE OPEN RESETLOGS;&lt;br /&gt;&lt;br /&gt;Since one of the redolog is lost ,we do not have all the redo logs available after the last backup. That is why we have to use sql command UNTIL CANCEL. Type cancel when prompted. We will get changes only upto the last backup that is restored.&lt;br /&gt;&lt;br /&gt;&lt;/ret&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SCENARIO VI-INCOMPLETE RECOVERY : UNTIL SCN:DATAFILES AND ACTIVE REDO LOG FILE IS LOST&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here we will suppose that along with one datafile, active redo log file has also been lost. Yes, of course, it is the same scenario as scenario VI. But read out, difference will be clear. &lt;br /&gt;&lt;br /&gt;1. SQL&gt; truncate table t1;&lt;br /&gt;&lt;br /&gt;Table truncated.&lt;br /&gt;&lt;br /&gt;SQL&gt; inert into t1 values(0);&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;SQL&gt; /&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;SQL&gt; commit;&lt;br /&gt;&lt;br /&gt;Commit complete.&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from t1;&lt;br /&gt;&lt;br /&gt;    C1&lt;br /&gt;----------&lt;br /&gt;     0&lt;br /&gt;     0&lt;br /&gt;&lt;br /&gt;SQL&gt; alter system switch logfile;&lt;br /&gt;&lt;br /&gt;System altered.&lt;br /&gt;SQL&gt; select * from v$log;&lt;br /&gt;&lt;br /&gt;    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS&lt;br /&gt;---------- ---------- ---------- ---------- ---------- --- ----------------&lt;br /&gt;FIRST_CHANGE# FIRST_TIM&lt;br /&gt;------------- ---------&lt;br /&gt;     1        1           1   52428800         1 NO  ACTIVE&lt;br /&gt;      1183659 14-MAR-11&lt;br /&gt;&lt;br /&gt;     2        1           2   52428800         1 NO  CURRENT&lt;br /&gt;      1184383 14-MAR-11&lt;br /&gt;&lt;br /&gt;Group# 2 is current. We will delete log file that belongs to group#  2. Changes since the last backup are stored in log seq#1 which belongs to group# 1. Only the changes that are stored in log seq#2 will be lost. We will get back our changes that we made  in table t1.  Note the low scn (1184383,here)that is listed in Log seq#2. We will need it&lt;br /&gt;&lt;br /&gt;Get the name and location of the redo log group# 2 by listing the contents of v$logfile.&lt;br /&gt;SQL&gt; select * from v$logfile;&lt;br /&gt;&lt;br /&gt;    GROUP# STATUS  TYPE&lt;br /&gt;---------- ------- -------&lt;br /&gt;MEMBER&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;IS_&lt;br /&gt;---&lt;br /&gt;     2       ONLINE&lt;br /&gt;/usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/onlinelog/o1_mf_2_6qwfdq7v_&lt;br /&gt;.log&lt;br /&gt;YES&lt;br /&gt;&lt;br /&gt;     1       ONLINE&lt;br /&gt;/usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/onlinelog/o1_mf_1_6qwm5xz0_&lt;br /&gt;&lt;br /&gt;    GROUP# STATUS  TYPE&lt;br /&gt;---------- ------- -------&lt;br /&gt;MEMBER&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;IS_&lt;br /&gt;---&lt;br /&gt;.log&lt;br /&gt;YES&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; exit&lt;br /&gt;Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production&lt;br /&gt;&lt;br /&gt;oracle@geet:~$ mv /usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/onlinelog/o1_mf_2_6qwfdq7v_.log m.log&lt;br /&gt;oracle@geet:~$ mv oradata/XE/users.dbf uu.bak&lt;br /&gt;&lt;br /&gt;RMAN&gt; shutdown abort;&lt;br /&gt;RMAN&gt; startup mount;&lt;br /&gt;RMAN&gt; restore database UNTIL SCN 1184383;&lt;br /&gt;RMAN&gt; recover databse UNTIL SCN 1184383;&lt;br /&gt;RMAN&gt; alter database open resetlogs;&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from t1;&lt;br /&gt;&lt;br /&gt;    C1&lt;br /&gt;----------&lt;br /&gt;     0&lt;br /&gt;     0&lt;br /&gt;See the output above,  we got the modification of our table back.&lt;br /&gt;&lt;br /&gt;&lt;ret&gt;&lt;br /&gt;&lt;/ret&gt;</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/6695046299833705884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2011/02/rman-retore-and-recovery-in.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/6695046299833705884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/6695046299833705884'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2011/02/rman-retore-and-recovery-in.html' title='RMAN restore and recovery in NOARCHIVELOG mode'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-3953095034878654785</id><published>2011-01-18T22:55:00.003+05:30</published><updated>2011-01-18T23:21:40.862+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="listener.ora"/><category scheme="http://www.blogger.com/atom/ns#" term="ora 12514"/><category scheme="http://www.blogger.com/atom/ns#" term="service registration"/><title type='text'>When is listener.ora needed</title><content type='html'>Today I got stucked with ora:12514 : TNS: listener does not know cuurrently of service requested in connect descriptor.&lt;br /&gt;&lt;br /&gt;When I tried to connect with sqlplus using &lt;br /&gt;sql&gt; conn sys/sys@xe as sysdba&lt;br /&gt;&lt;br /&gt;I got ora:12514 error&lt;br /&gt;&lt;br /&gt;Initially, I thought that error occured due to non registration of xe database service with the listener. And I tried to set the parameters of static service registration in listener.ora file.&lt;br /&gt;But later I got the knowledge that  error occured because my database server has not yet been started. Without starting the database I was trying to connect to the database which is a wrong, even impossible action.&lt;br /&gt;After much struggle, I got the idea of the actual problem.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;A listener.ora file is NOT needed to start a default listener.&lt;/span&gt; I renamed my file to something else, so that I have NO file named &quot;listener.ora&quot;. Then I restarted the listener, and it came up just fine with all default values .&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;If the listener uses default values, there is nothing special needed to get the instance to self-register with the listener.&lt;/span&gt; If the listener is already running when the instance starts, it should register on startup. It will also re-register every few minutes there after, so if the listener comes up after the db instance, it may take a couple of minutes for the registration to occur and the listener come to know of the instance.</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/3953095034878654785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2011/01/when-is-listenerora-needed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/3953095034878654785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/3953095034878654785'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2011/01/when-is-listenerora-needed.html' title='When is listener.ora needed'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-151370344684085100</id><published>2010-08-08T12:33:00.002+05:30</published><updated>2010-08-08T12:46:38.074+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="define_editor"/><category scheme="http://www.blogger.com/atom/ns#" term="ed"/><category scheme="http://www.blogger.com/atom/ns#" term="edit"/><title type='text'>using ed command</title><content type='html'>When trying to edit a sql query or a pl/sql program using ed command on linux platform, I end up with a probably primitive editor.&lt;br /&gt;What I got is as:&lt;br /&gt;&lt;br /&gt;SQL&gt; ed&lt;br /&gt;Wrote file afiedt.buf&lt;br /&gt;29&lt;br /&gt;&lt;br /&gt;?&lt;br /&gt;&lt;br /&gt;The solution is to add follwing line to glogin.sql file of oracle user:&lt;br /&gt; &lt;br /&gt;define_editor=vi</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/151370344684085100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2010/08/using-ed-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/151370344684085100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/151370344684085100'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2010/08/using-ed-command.html' title='using ed command'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-5044684451499548631</id><published>2010-03-18T21:12:00.002+05:30</published><updated>2010-03-18T21:24:46.147+05:30</updated><title type='text'>Ora-12154 when connecting to Oracle forms</title><content type='html'>When I started oracle Forms to create a new data blocks, I was unable to connect to the database. I got error:&lt;br /&gt;Ora 12154: TNS name could not  resolve the connect identifier specified&lt;br /&gt;&lt;br /&gt;I have installed Oracle Developer suite 10g after Oracle 10g server. Platform is Windows Xp.&lt;br /&gt;&lt;br /&gt;Solution: copy tnsnames.ora file from oracle home location to oracle developer home location.&lt;br /&gt;that is,&lt;br /&gt;from&lt;br /&gt;d:\ora_10g\ora92\network\admin\tnsname.ora to&lt;br /&gt;d:\oracle_tool\network\admin\tnsname.ora&lt;br /&gt;&lt;br /&gt;Shutdown and restart the oc4J instance again. Try to connect again. everything work fine.</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/5044684451499548631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2010/03/ora-12154-when-connecting-to-oracle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/5044684451499548631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/5044684451499548631'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2010/03/ora-12154-when-connecting-to-oracle.html' title='Ora-12154 when connecting to Oracle forms'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-2148341029594862172</id><published>2010-03-15T19:33:00.002+05:30</published><updated>2010-03-15T19:44:17.041+05:30</updated><title type='text'>FRM-18107: Failed to create a DE context for the module</title><content type='html'>When starting Forms 10g Developer after starting OCJ4 Instance, I got the above error. &lt;br /&gt;I installed Oracle developer suite 10g after Oracle 10g server. (Windows platform)&lt;br /&gt;Solution is to delete Oracle Home environment Variable.  I  just delete Oracle Home environment variable which points to, on my system,  oracle 10g server which I installed at first. And everything works fine.</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/2148341029594862172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2010/03/frm-18107-failed-to-create-de-context.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/2148341029594862172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/2148341029594862172'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2010/03/frm-18107-failed-to-create-de-context.html' title='FRM-18107: Failed to create a DE context for the module'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-9211181020026628741</id><published>2010-02-07T20:19:00.003+05:30</published><updated>2011-03-08T21:44:03.211+05:30</updated><title type='text'>inserting string containing &#39;&amp;&#39; in table.</title><content type='html'>How can a string like &#39;:&amp;nbnc&#39; be inserted in a table.&lt;br /&gt; This string is using as is bind variable but not actually it is so. &lt;br /&gt;&lt;br /&gt;To insert this or similar string into a table, use&lt;br /&gt;&lt;br /&gt;SET DEFINE OFF&lt;br /&gt;&lt;br /&gt;Then use insert statement. For example,&lt;br /&gt;&lt;br /&gt;SQL&gt; desc t2;&lt;br /&gt; Name                                      Null?    Type&lt;br /&gt; ----------------------------------------- -------- -------------&lt;br /&gt;&lt;br /&gt; C1                                                 VARCHAR2(10)&lt;br /&gt;&lt;br /&gt;SQL&gt; insert into t2 values(&#39;:&amp;nbnc&#39;);&lt;br /&gt;Enter value for nbnc: rr&lt;br /&gt;old   1: insert into t2 values(&#39;:&amp;nbnc&#39;)&lt;br /&gt;new   1: insert into t2 values(&#39;:rr&#39;)&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;SQL&gt; SET DEFINE OFF&lt;br /&gt;SQL&gt; insert into t2 values(&#39;:&amp;nbnc&#39;);&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;SQL&gt;</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/9211181020026628741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2010/02/how-can-string-like-be-inserted-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/9211181020026628741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/9211181020026628741'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2010/02/how-can-string-like-be-inserted-in.html' title='inserting string containing &#39;&amp;&#39; in table.'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-8878602346868046328</id><published>2010-02-01T14:27:00.002+05:30</published><updated>2010-02-01T14:43:06.825+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="isqlplus"/><title type='text'>isqlplus port number</title><content type='html'>How can I know Which port to use to start isqlplus from browser.&lt;br /&gt;Solution. Use following file path to get port number of isqlplus(in oracle 10g).&lt;br /&gt;&lt;br /&gt;$ORACLE_HOME/install/portlist.ini&lt;br /&gt;Then use following url to start isqlplus&lt;br /&gt;&lt;br /&gt;http://host:port/isqlplus</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/8878602346868046328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2010/02/isqlplus-port-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/8878602346868046328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/8878602346868046328'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2010/02/isqlplus-port-number.html' title='isqlplus port number'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-8735237776436662723</id><published>2010-01-29T20:53:00.001+05:30</published><updated>2010-01-29T20:55:53.030+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="pfile vs spfile"/><title type='text'>Difference between spfile and pfile</title><content type='html'>1. spfile resides at server side. it is a binary file. pfile is static client-side file. &lt;br /&gt;2. Pfile must be updated using text editor. Updating spfile manually will corrupt it. To update spfile, &lt;span style=&quot;font-style:italic;&quot;&gt;Alter System set&lt;/span&gt; Command is used.&lt;br /&gt;3. Spfile can be backed up using RMAN.</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/8735237776436662723/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2010/01/difference-between-spfile-and-pfile.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/8735237776436662723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/8735237776436662723'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2010/01/difference-between-spfile-and-pfile.html' title='Difference between spfile and pfile'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-6766267701848679556</id><published>2010-01-29T20:40:00.003+05:30</published><updated>2011-01-17T20:53:49.274+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="pfile or spfile"/><title type='text'>database is using pfile or spfile</title><content type='html'>How can I know whether my database is started using spfile or pfile?&lt;br /&gt;&lt;br /&gt; Execute the following query&lt;br /&gt;&lt;br /&gt;SQL&gt; SELECT DECODE(value, NULL, &#39;PFILE&#39;, &#39;SPFILE&#39;) &quot;Init File Type&quot; &lt;br /&gt;       FROM sys.v_$parameter WHERE name = &#39;spfile&#39;;&lt;br /&gt;&lt;br /&gt;If result displays pfile, it means that database has been started with pfile and vice-versa.</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/6766267701848679556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2010/01/database-is-using-pfile-or-spfile.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/6766267701848679556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/6766267701848679556'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2010/01/database-is-using-pfile-or-spfile.html' title='database is using pfile or spfile'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-505089079951579508</id><published>2009-11-12T18:19:00.000+05:30</published><updated>2009-11-12T18:43:32.222+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="dbnewid"/><title type='text'>rename of dbname and dbid</title><content type='html'>To rename database_name and database sid we can use dbnewid utility.&lt;br /&gt;&lt;br /&gt;Following steps belong to oracle 10g.2 on windows platform&lt;br /&gt;&lt;br /&gt;1. Backup the database&lt;br /&gt;2. SQL&gt; Shutdown immediate&lt;br /&gt;3. SQL&gt; startup mount&lt;br /&gt;4. Run the following command from the command line:&lt;br /&gt;&lt;br /&gt;nid target=sys/password@olddbname DBNAME=ORCL&lt;br /&gt;&lt;br /&gt;After the DBNEWID completed successfully, database has been shut down&lt;br /&gt;&lt;br /&gt;5. SQL&gt; STARTUP MOUNT&lt;br /&gt;Instance start with error.&lt;br /&gt;&lt;br /&gt;6.  Modify initialization parameter DB_NAME to reflect new name.&lt;br /&gt;sql&gt; ALTER SYSTEM SET DB_NAME=ORCL SCOPE=SPFILE;&lt;br /&gt;&lt;pre&gt;7. sql&gt;SHUTDOWN IMMEDIATE&lt;/pre&gt;8. create new password file.&lt;br /&gt;orapwd file=c:\oracle\ora92\database\pwdorcl.ora password=password entries=5&lt;br /&gt;&lt;pre&gt;9.Rename the SPFILE and modify SPFILE to reflect new dbname.&lt;br /&gt;&lt;br /&gt;10. Delete the old service and create the new one.&lt;br /&gt;&lt;br /&gt;oradim -delete -sid olddbname&lt;br /&gt;oradim -new -sid orcl -intpwd password -startmode a -pfile&lt;br /&gt; c:\oracle\ora92\database\spfileorcl.ora&lt;/pre&gt;11. Alter the listener.ora and tnsnames.ora setting to match the new database name and restart the listener:&lt;pre&gt;lsnrctl reload&lt;span style=&quot;font-family:Georgia,serif;&quot;&gt;&lt;br /&gt;&lt;br /&gt;12. &lt;/span&gt;Open the database with RESETLOGS:&lt;br /&gt;SQL &gt;STARTUP MOUNT&lt;br /&gt;SQL &gt;ALTER DATABASE OPEN RESETLOGS;&lt;span style=&quot;font-family:Georgia,serif;&quot;&gt;&lt;br /&gt;&lt;br /&gt;13.&lt;/span&gt;Backup the database.&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/505089079951579508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2009/11/rename-of-dbname-and-dbid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/505089079951579508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/505089079951579508'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2009/11/rename-of-dbname-and-dbid.html' title='rename of dbname and dbid'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7557990652743712088.post-5743289498388639693</id><published>2009-08-20T11:31:00.000+05:30</published><updated>2009-08-20T11:36:27.159+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ora 12162"/><title type='text'>ORA-12162 TNS:service name is incorrectly specified</title><content type='html'>I got this error in oracle 10g on fedora 11 whenever I tried&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;sqlplus&lt;/span&gt; command.&lt;br /&gt;Solution: Just set Oracle_Sid in .bash_profile of oracle user. Export it.</content><link rel='replies' type='application/atom+xml' href='http://oracle4me.blogspot.com/feeds/5743289498388639693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oracle4me.blogspot.com/2009/08/ora-12162-tnsservice-name-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/5743289498388639693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7557990652743712088/posts/default/5743289498388639693'/><link rel='alternate' type='text/html' href='http://oracle4me.blogspot.com/2009/08/ora-12162-tnsservice-name-is.html' title='ORA-12162 TNS:service name is incorrectly specified'/><author><name>Geetanjali</name><uri>http://www.blogger.com/profile/12336353640812401154</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>