<?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-7229519207479719842</id><updated>2025-10-13T10:05:37.615-07:00</updated><category term="Oracle Database Administration"/><category term="Oracle Real Application Clusters ( RAC )"/><category term="Troubleshooting"/><category term="Oracle Enterprise Manager"/><category term="Oracle DBA : Tips and Tricks"/><category term="Unix Commands for DBAs"/><category term="AWR"/><category term="DBA Scripts"/><category term="Datapump"/><category term="High Availability"/><category term="Listener"/><category term="ORA - Errors"/><category term="Oracle Database Objects"/><category term="Oracle RAC"/><title type='text'>ORA-BLOG</title><subtitle type='html'>My Experiences with Oracle Database Administration...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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>44</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7229519207479719842.post-8813598303896245042</id><published>2011-10-05T20:29:00.000-07:00</published><updated>2011-10-05T20:29:31.231-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="Troubleshooting"/><title type='text'>ORA-01555: snapshot too old during datapump export</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Datapump Export can fail with the following error when the parameter FLASHBACK_TIME is used&lt;/div&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;grey&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;ORA-31693: Table data object &quot;SCOTT&quot;.&quot;EMPLOYEES&quot; failed to load/unload and is being skipped due to error:&lt;br /&gt;ORA-02354: error in exporting/importing data&lt;br /&gt;ORA-01555: snapshot too old: rollback segment number 271 with name &quot;_SYSSMU271$&quot; too small&lt;br /&gt;ORA-00604: error occurred at recursive SQL level 3&lt;br /&gt;ORA-08180: no snapshot found based on specified time&lt;br /&gt;ORA-06512: at &quot;SYS.TIMESTAMP_TO_SCN&quot;, line 1^@&lt;br /&gt;ORA-00604: error occurred at recursive SQL level 3&lt;br /&gt;ORA-08180: no snapshot found based on specified ti
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
The reason for this is the database parameter UNDO_RETENTION is set to low  compared to the time set with FLASHBACK_TIME.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;- export starts at 10:00 pm and ends at 00:00 am. Flashback time start at 10:00 pm of the same days when export starts.&lt;br /&gt;&lt;br /&gt;Expdp
 may need 2 hours to complete and undo_retention is set to 2040 that 
means 34 minutes. So the information in undo is recycled.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Solution&lt;/b&gt;&lt;br /&gt;

Set UNDO_RETENTION to a value sufficient to get all info required by the flashback time.&lt;br /&gt;
Also consider increasing undo tablespace size. &lt;br /&gt;
 &lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/8813598303896245042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/10/ora-01555-snapshot-too-old-during.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/8813598303896245042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/8813598303896245042'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/10/ora-01555-snapshot-too-old-during.html' title='ORA-01555: snapshot too old during datapump export'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-8593798423471593258</id><published>2011-10-04T09:06:00.001-07:00</published><updated>2011-10-04T09:06:55.971-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><title type='text'>Trigger on database to capture ORA errors</title><content type='html'>&lt;div&gt;&lt;p&gt;&lt;br&gt;
You might want to track ORA errors on your database so that whenever an oracle error comes,you may want the error code and error description to be logged into some table. This will be required when you see your application just exists saying some error but you did not see any ORA error in application log file or console. &lt;/p&gt;
&lt;p&gt;In this cases, what you can do is write a trigger on the database server to log the error code, error statement and error description to a table when ORA error comes.&lt;/p&gt;
&lt;p&gt;To implement this, first create a table which will hold the ORA error,statement and error description. This can be created in SYS schema.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;CREATE TABLE stats$error_log (&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; err_dt&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TIMESTAMP,&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; db_user&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VARCHAR2(30),&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; msg_stack&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VARCHAR2(2000),&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sqltxt&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VARCHAR2(1000))&lt;/i&gt;&lt;br&gt;
&lt;i&gt;tablespace users;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Now, create a trigger on the database server error.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;CREATE OR REPLACE TRIGGER log_server_errors&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160; AFTER SERVERERROR&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160; ON DATABASE&lt;/i&gt;&lt;br&gt;
&lt;i&gt;DECLARE&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; v_sqltext VARCHAR2(1000);&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; nl_sqltext ora_name_list_t;&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160; BEGIN&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -- Capture entire error text&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; FOR i IN 1 .. ora_sql_txt(nl_sqltext) LOOP&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; v_sqltext := v_sqltext || nl_sqltext(i);&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; END LOOP;&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; INSERT INTO STATS$ERROR_LOG&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; (err_dt, db_user, msg_stack, sqltxt)&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VALUES&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; (systimestamp,&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sys.login_user,&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; dbms_utility.format_error_stack, v_sqltext);&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&amp;#160; END log_server_errors;&lt;/i&gt;&lt;br&gt;
&lt;i&gt;/&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;For further reference you can find.&lt;br&gt;
Simple version:&lt;br&gt;
&lt;a href=&quot;http://www.adp-gmbh.ch/ora/sql/trigger/servererror.html&quot;&gt;http://www.adp-gmbh.ch/ora/sql/trigger/servererror.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Slightly more fancy version:&lt;br&gt;
&lt;a href=&quot;http://blog.sydoracle.com/2011/02/using-oracles-servererror-to-catch.html
&quot;&gt;http://blog.sydoracle.com/2011/02/using-oracles-servererror-to-catch.html&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/8593798423471593258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/10/trigger-on-database-to-capture-ora.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/8593798423471593258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/8593798423471593258'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/10/trigger-on-database-to-capture-ora.html' title='Trigger on database to capture ORA errors'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-8034005862225864983</id><published>2011-09-30T10:30:00.001-07:00</published><updated>2011-09-30T19:30:02.329-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle RAC"/><title type='text'>How to pin nodes in RAC</title><content type='html'>&lt;div&gt;&lt;p&gt;The following steps can be used to pin nodes in RAC. &lt;br&gt;
Pinning a node means that the association of a node name with a node number is fixed. If a node is not pinned,node number may change if the lease expires while it is down. The lease of a pinned node never expires.&lt;/p&gt;
&lt;p&gt;To find whether a node in a cluster is pinned,use the olsnodes command.&lt;/p&gt;
&lt;p&gt;[grid@raclinux1 stage10g]$ olsnodes -t&lt;br&gt;
raclinux1 Unpinned&lt;br&gt;
raclinux2 Unpinned&lt;br&gt;
&amp;#160;&lt;br&gt;
Use the pin command to pin the nodes&amp;#160;&lt;/p&gt;
&lt;p&gt;[root@raclinux1 bin]# ./crsctl pin css -n raclinux1&lt;br&gt;
CRS-4664: Node raclinux1 successfully pinned.&lt;br&gt;
[root@raclinux1 bin]#&lt;br&gt;
&amp;#160;&lt;/p&gt;
&lt;p&gt;[root@raclinux2 bin]# ./crsctl pin css -n raclinux2&lt;br&gt;
CRS-4664: Node raclinux2 successfully pinned.&lt;br&gt;
[root@raclinux2 bin]#&lt;br&gt;
&amp;#160;&lt;br&gt;
[grid@raclinux1 stage10g]$ olsnodes -t&lt;br&gt;
raclinux1 Pinned&amp;#160;&lt;br&gt;
raclinux2 Pinned&lt;br&gt;
&amp;#160;&lt;/p&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/8034005862225864983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/how-to-pin-nodes-in-rac.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/8034005862225864983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/8034005862225864983'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/how-to-pin-nodes-in-rac.html' title='How to pin nodes in RAC'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-4342968761829611895</id><published>2011-09-27T18:37:00.001-07:00</published><updated>2011-09-27T18:37:23.350-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Datapump"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><title type='text'>Using SYSDBA for datapump export and import</title><content type='html'>&lt;br&gt;&lt;br&gt;&lt;br /&gt;Here is a quote from MOS on the usage oof SYSDBA for export and import &lt;br /&gt;&lt;br&gt;*How to Connect AS SYSDBA when Using Export or Import&lt;br&gt;&lt;br /&gt;[ID 277237.1]*&lt;br /&gt;&lt;br&gt;SYSDBA is used internally in the Oracle database and has specialized functions. Its behavior is not the same as for generalized users. For example, the SYS user cannot do a transaction level consistent read (read-only transaction). Queries by SYS will return changes made during the&lt;br&gt;&lt;br /&gt;transaction even if SYS has set the transaction to be READ ONLY.&amp;nbsp; &lt;br&gt;&lt;br /&gt;Therefore export parameters like CONSISTENT, OBJECT_CONSISTENT, FLASHBACK_SCN, and FLASHBACK_TIME cannot be used. Starting with Oracle10g, the export shows a warning that the export is not&lt;br&gt;&lt;br /&gt;consistent when the export is started with CONSISTENT=Y and connects to the database with the user SYS (or as SYSDBA):&lt;br&gt;&lt;br /&gt;&lt;b&gt;EXP-00105: parameter CONSISTENT is not supported for this user&lt;/b&gt;&lt;br /&gt;&lt;br&gt;Note that Oracle automatically provides read consistency to a query so that all the data that the query sees comes from a single point in time (statement-level read consistency). For export this means that the export of&lt;br&gt;&lt;br /&gt;table data is consistent. However, if a table contains nested tables, the outer table and each inner table are exported as separate transactions. And if a table is partitioned, each partition is exported as a separate transaction. If a nested table or a partitioned table was updated during the&lt;br&gt;&lt;br /&gt;export, the data that is exported while connected as the SYS schema could be inconsistent.&lt;br /&gt;&lt;br&gt;This could be reason when you see &#39;duplicate key on index&#39; and related errors when you perform datapump import using impdp. For eg :- There were some duplicate value on index of some tables which were taken using datapump export as sysdba with flashback parameters. The table does not have duplicate values in production.&lt;br /&gt;&lt;br&gt;Typically, there is no need to invoke Export or Import as SYSDBA, except in the following situations:&lt;br /&gt;&lt;br&gt;- at the request of Oracle technical support;&lt;br&gt;&lt;br /&gt;- when exporting a transportable tablespace set with the old style export utility (Oracle9i and Oracle8i);&lt;br&gt;&lt;br /&gt;- when importing a transportable tablespace set with the old-style import utility (Oracle10g, Oracle9i, and Oracle8i).&quot;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/4342968761829611895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/using-sysdba-for-datapump-export-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/4342968761829611895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/4342968761829611895'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/using-sysdba-for-datapump-export-and.html' title='Using SYSDBA for datapump export and import'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-6730233392612645787</id><published>2011-09-26T19:04:00.000-07:00</published><updated>2011-09-26T19:05:01.699-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AWR"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><title type='text'>Privileges required for generating AWR reports</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Some times you may have a requirment to generate AWR reports using non - administrator schemas.&lt;br /&gt;
&lt;br /&gt;
The following privileges are required for a SCHEMA to generate AWR reports.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;grey&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;grant SELECT ON SYS.V_$DATABASE to SCHEMA;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&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;SELECT ON SYS.V_$INSTANCE&amp;nbsp; to SCHEMA;&lt;br /&gt;EXECUTE ON SYS.DBMS_WORKLOAD_REPOSITORY&amp;nbsp; to&amp;nbsp; SCHEMA;&lt;br /&gt;SELECT ON SYS.DBA_HIST_DATABASE_INSTANCE&amp;nbsp; to SCHEMA;&lt;br /&gt;SELECT ON SYS.DBA_HIST_SNAPSHOT&amp;nbsp; to SCHEMA;&lt;br /&gt;GRANT ADVISOR&amp;nbsp; to SCHEMA;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/6730233392612645787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/privileges-required-for-generating-awr.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/6730233392612645787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/6730233392612645787'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/privileges-required-for-generating-awr.html' title='Privileges required for generating AWR reports'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-4327098929871118239</id><published>2011-09-26T18:36:00.001-07:00</published><updated>2011-09-26T18:36:15.252-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Listener"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><title type='text'>Change oracle listener log file</title><content type='html'>&lt;br&gt;Listener log files may grow very big in size and you may sometimes want to delete the existing log file to free up some space. When you try to delete the log file in windows, you will get file already in use message. &lt;br /&gt;&lt;br&gt;To solve this, you can change the listener log file using the below commands&lt;br /&gt;&lt;br&gt;&lt;font color =&quot;#0032ff&quot;&gt;lsnrctl&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color =&quot;#0032ff&quot;&gt;set log_file listener1.log &lt;/font&gt;&lt;br /&gt;&lt;br&gt;Where listener1.log is the new log file, now you can delete the old log file.&lt;br /&gt;&lt;br&gt;You can also turn off listener logging as below&lt;br /&gt;&lt;br&gt;&lt;font color =&quot;#00cdff&quot;&gt;&lt;font color =&quot;#0034ff&quot;&gt;lsnrctl&lt;/font&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color =&quot;#00cdff&quot;&gt;&lt;font color =&quot;#0034ff&quot;&gt;set log_status off&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/4327098929871118239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/change-oracle-listener-log-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/4327098929871118239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/4327098929871118239'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/change-oracle-listener-log-file.html' title='Change oracle listener log file'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-436718759645833807</id><published>2011-09-25T07:01:00.000-07:00</published><updated>2011-09-25T07:01:38.690-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle DBA : Tips and Tricks"/><title type='text'>Create a Local Listener on non default port ( ports other than 1521)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
On some circumstances you may need to have separate listeners running on seperate ports for your databases.When you create a database, the default listener will be created and listens on port 1521. There may be cases when you want to run multiple listeners for your databases.&lt;br /&gt;
&lt;br /&gt;
If you want PMON to register with a local listener that does not use TCP/IP, port 1521, configure the LOCAL_LISTENER parameter in the initialization parameter file to locate the local listener.&lt;br /&gt;
&lt;br /&gt;
For a shared server environment, you can alternatively use the LISTENER attribute of the DISPATCHERS parameter in the initialization parameter file to register the dispatchers with a nondefault local listener. Because both the LOCAL_LISTENER parameter and the LISTENER attribute enable PMON to register dispatcher information with the listener, it is not necessary to specify both the parameter and the attribute if the listener values are the same.&lt;br /&gt;
&lt;br /&gt;
The steps are as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1.&lt;/b&gt;&lt;b&gt; Create new non default listener&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a new listener using $ORACLE_HOME/netca&lt;b&gt; &lt;/b&gt;for this.&lt;b&gt; &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;2.Set the LOCAL_LISTENER parameter for your database&lt;/b&gt;. You can set this in two ways.&lt;br /&gt;
a ) &lt;u&gt;Initialization parameter file (PFILE)&lt;/u&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a ) Ensure you have ORACLE_HOME and ORACLE_SID environment variable set&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b) sqlplus / as sysdba&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c) create pfile=&#39;$ORACLE_HOME/dbs/init&lt;oracle_sid&gt;.ora from spfile;&lt;/oracle_sid&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; d) Open $ORACLE_HOME/dbs/init&lt;oracle_sid&gt;.ora and add the following entry&lt;/oracle_sid&gt;&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; *.local_listener=listener1&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; where listener1 is the name you want to give for your new listener.&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; e) shut immediate;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f) startup pfile=&#39;$ORACLE_HOME/dbs/init&lt;oracle_sid&gt;.ora&#39;&lt;/oracle_sid&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
b) &lt;u&gt;Server parameter file ( SPFILE )&lt;/u&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a ) Ensure you have ORACLE_HOME and ORACLE_SID environment variable set&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b) sqlplus / as sysdba&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; c) alter system set local_listener=listener1 scope=spfile sid=&#39;*&#39;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; d) shut immediate;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e) startup;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2.Resolve listener name with tnsnames.ora&lt;/b&gt;&lt;br /&gt;
listener name ( in this case listener1) is then resolved to the listener protocol addresses through a naming method, such as a tnsnames.ora file on the database server.&lt;br /&gt;
&lt;br /&gt;
Add the following entry in your database server tnsnames.ora&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
listener1= &lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&amp;nbsp;(DESCRIPTION= &lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&amp;nbsp; (ADDRESS=(PROTOCOL=tcp)(HOST=&lt;span style=&quot;color: blue;&quot;&gt;&lt;your database=&quot;&quot; host=&quot;&quot; ip=&quot;&quot; server=&quot;&quot;&gt;&lt;/your&gt;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;&lt;your database=&quot;&quot; ip=&quot;&quot; server=&quot;&quot;&gt;&lt;/your&gt;&lt;/span&gt;)(PORT=&amp;lt;&lt;span style=&quot;background-color: blue; color: blue;&quot;&gt;&lt;new port=&quot;&quot;&gt;&lt;/new&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;port you wish to configure&amp;gt;&lt;/span&gt;)))&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
3.Restart the database &lt;/div&gt;
a ) Ensure you have ORACLE_HOME and ORACLE_SID environment variable set&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a) sqlplus / as sysdba&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; b) shut immediate;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c) startup;&lt;br /&gt;
&lt;br /&gt;
You will see that database is registered with new listener.&lt;br /&gt;
&lt;br /&gt;
Refer : &lt;a href=&quot;http://download.oracle.com/docs/cd/B13789_01/network.101/b10775/listenercfg.htm&quot;&gt;http://download.oracle.com/docs/cd/B13789_01/network.101/b10775/listenercfg.htm&lt;/a&gt; &lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/436718759645833807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/create-local-listener-on-non-default.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/436718759645833807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/436718759645833807'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/create-local-listener-on-non-default.html' title='Create a Local Listener on non default port ( ports other than 1521)'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-8368607404512318923</id><published>2011-09-24T07:56:00.000-07:00</published><updated>2011-09-24T07:56:21.181-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Enterprise Manager"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Real Application Clusters ( RAC )"/><title type='text'>Change SYSMAN account password Oracle RAC / Single Instance database</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Following steps can&amp;nbsp; be used to change SYSMAN account password for Oracle RAC / single instance database. This can be done online.&lt;br /&gt;
&lt;br /&gt;
Login to the server where target database runs as oracle software owner os user.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;grey&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;ibs-ash-sr133 oraaires [MYDBSTG2]:&lt;span style=&quot;color: blue;&quot;&gt;emctl status dbconsole&lt;/span&gt;&lt;br /&gt;Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.&lt;br /&gt;ibs-ash-sr133 oraaires [MYDBSTG2]:&lt;span style=&quot;color: blue;&quot;&gt;sqlplus / as sysdba&lt;/span&gt;&lt;br /&gt;SQL*Plus: Release 11.2.0.2.0 Production on Fri Aug 12 11:17:08 2011&lt;br /&gt;Copyright (c) 1982, 2010, Oracle.&amp;nbsp; All rights reserved.&lt;br /&gt;Connected to:&lt;br /&gt;Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production&lt;br /&gt;With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,&lt;br /&gt;Data Mining and Real Application Testing options&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; show parameter db_uni&lt;br /&gt;NAME&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TYPE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE&lt;br /&gt;------------------------------------------------------&lt;br /&gt;
db_unique_name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MYDBSTG&lt;br /&gt;SQL&amp;gt; exit&lt;br /&gt;Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production&lt;br /&gt;With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,&lt;br /&gt;Data Mining and Real Application Testing options&lt;br /&gt;
&lt;br /&gt;ibs-ash-sr133 oraaires [MYDBSTG2]:&lt;span style=&quot;color: blue;&quot;&gt;export ORACLE_UNQNAME=MYDBSTG&lt;/span&gt;&lt;br /&gt;ibs-ash-sr133 oraaires [MYDBSTG2]:&lt;span style=&quot;color: blue;&quot;&gt;emctl status dbconsole&lt;/span&gt;&lt;br /&gt;Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0&lt;br /&gt;Copyright (c) 1996, 2010 Oracle Corporation.&amp;nbsp; All rights reserved.&lt;br /&gt;https://ibs-ash-sr133.ibsdc.com:5500/em/console/aboutApplication&lt;br /&gt;Oracle Enterprise Manager 11g is running.&lt;br /&gt;------------------------------------------------------------------&lt;br /&gt;Logs are generated in directory /projects/aires/product/11.2.0/aires_stg/ibs-ash-sr133_MYDBSTG/sysman/log&lt;br /&gt;
&lt;br /&gt;ibs-ash-sr133 oraaires [MYDBSTG2]:&lt;span style=&quot;color: blue;&quot;&gt;emctl stop dbconsole&lt;/span&gt;&lt;br /&gt;Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0&lt;br /&gt;Copyright (c) 1996, 2010 Oracle Corporation.&amp;nbsp; All rights reserved.&lt;br /&gt;https://ibs-ash-sr133.ibsdc.com:5500/em/console/aboutApplication&lt;br /&gt;Stopping Oracle Enterprise Manager 11g Database Control ...&lt;br /&gt;&amp;nbsp;...&amp;nbsp; Stopped.&lt;br /&gt;ibs-ash-sr133 oraaires [MYDBSTG2]:&lt;span style=&quot;color: blue;&quot;&gt;emctl status dbconsole&lt;/span&gt;&lt;br /&gt;Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0&lt;br /&gt;Copyright (c) 1996, 2010 Oracle Corporation.&amp;nbsp; All rights reserved.&lt;br /&gt;https://ibs-ash-sr133.ibsdc.com:5500/em/console/aboutApplication&lt;br /&gt;Oracle Enterprise Manager 11g is not running.&lt;br /&gt;&lt;br /&gt;ibs-ash-sr133 oraaires [MYDBSTG2]:&lt;span style=&quot;color: blue;&quot;&gt;sqlplus / as sysdba&lt;/span&gt;&lt;br /&gt;SQL*Plus: Release 11.2.0.2.0 Production on Fri Aug 12 11:19:42 2011&lt;br /&gt;Copyright (c) 1982, 2010, Oracle.&amp;nbsp; All rights reserved.&lt;br /&gt;Connected to:&lt;br /&gt;Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production&lt;br /&gt;With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,&lt;br /&gt;Data Mining and Real Application Testing options&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; &lt;span style=&quot;color: blue;&quot;&gt;alter user sysman identified by we#t04q;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;User altered.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; conn sysman/we#t04q&lt;br /&gt;Connected.&lt;br /&gt;SQL&amp;gt; show user&lt;br /&gt;USER is &quot;SYSMAN&quot;&lt;br /&gt;SQL&amp;gt; exit&lt;br /&gt;Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production&lt;br /&gt;With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,&lt;br /&gt;Data Mining and Real Application Testing options&lt;br /&gt;
&lt;br /&gt;ibs-ash-sr133 oraaires [MYDBSTG2]:&lt;span style=&quot;color: blue;&quot;&gt;emctl setpasswd dbconsole&lt;/span&gt;&lt;br /&gt;Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0&lt;br /&gt;Copyright (c) 1996, 2010 Oracle Corporation.&amp;nbsp; All rights reserved.&lt;br /&gt;https://ibs-ash-sr133.ibsdc.com:5500/em/console/aboutApplication&lt;br /&gt;Please enter new repository password:&lt;br /&gt;Repository password successfully updated.&lt;br /&gt;
&lt;br /&gt;ibs-ash-sr133 oraaires [MYDBSTG2]:&lt;span style=&quot;color: blue;&quot;&gt;emctl start dbconsole&lt;/span&gt;&lt;br /&gt;Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0&lt;br /&gt;Copyright (c) 1996, 2010 Oracle Corporation.&amp;nbsp; All rights reserved.&lt;br /&gt;https://ibs-ash-sr133.ibsdc.com:5500/em/console/aboutApplication&lt;br /&gt;Starting Oracle Enterprise Manager 11g Database Control ....... started.&lt;br /&gt;------------------------------------------------------------------&lt;br /&gt;Logs are generated in directory /projects/aires/product/11.2.0/aires_stg/ibs-ash-sr133_MYDBSTG/sysman/log&lt;br /&gt;ibs-ash-sr133 oraaires [MYDBSTG2]:&lt;span style=&quot;color: blue;&quot;&gt;emctl status dbconsole&lt;/span&gt;&lt;br /&gt;Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0&lt;br /&gt;Copyright (c) 1996, 2010 Oracle Corporation.&amp;nbsp; All rights reserved.&lt;br /&gt;https://ibs-ash-sr133.ibsdc.com:5500/em/console/aboutApplication&lt;br /&gt;Oracle Enterprise Manager 11g is running.&lt;br /&gt;------------------------------------------------------------------&lt;br /&gt;Logs are generated in directory /projects/aires/product/11.2.0/aires_stg/ibs-ash-sr133_MYDBSTG/sysman/log&lt;br /&gt;ibs-ash-sr133 oraaires [MYDBSTG2]:&lt;br /&gt;&lt;br /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;b&gt;Reference :&lt;/b&gt; How To Change the Password of the Database User Sysman (DB Control Repository Schema) [ID 259379.1]&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/8368607404512318923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/change-sysman-account-password-oracle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/8368607404512318923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/8368607404512318923'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/change-sysman-account-password-oracle.html' title='Change SYSMAN account password Oracle RAC / Single Instance database'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-8295655102064210201</id><published>2011-09-24T07:39:00.000-07:00</published><updated>2011-09-24T07:39:42.202-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="Unix Commands for DBAs"/><title type='text'>Unix : Split / Print / Grep lines before and after search pattern</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
You can use ggrep command to print or grep a certain number of lines before or after a particular search string / pattern from a file.&lt;br /&gt;
This will be quite useful when you know a search string / pattern, for eg : ORA-00257: archiver error. Connect internal only. You might want to see from when onwards this error has been reported in alert log. The log might be very huge , a vi /&amp;nbsp; tail might be time consuming in this case. Use the below command.&lt;br /&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;grey&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;/usr/sfw/bin/ggrep &lt;span style=&quot;color: blue;&quot;&gt;-A 5 -B 5&lt;/span&gt; &lt;span style=&quot;color: orange;&quot;&gt;&#39;ORA-19815:&#39;&lt;/span&gt; alert_idckf.log &amp;gt; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Here&lt;b&gt; -A 5 and -B 5&lt;/b&gt; , where 5 stands for number of lines before and after the search string &quot;ORA-19815:&#39;&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;grey&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;/usr/sfw/bin/ggrep &lt;span style=&quot;color: blue;&quot;&gt;-B 10&lt;/span&gt; &lt;span style=&quot;color: orange;&quot;&gt;&#39;ORA-19815: WARNING: 
db_recovery_file_dest_size of 26754416640 bytes is 100.00% used&#39;&lt;/span&gt; 
alert_idckf.log &amp;gt; 1
&lt;/span&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&amp;nbsp; Here , the search is only for printing 10 lines after the search string&amp;nbsp; &#39;ORA-19815: WARNING: db_recovery_file_dest_size of 26754416640 bytes is 100.00% used&#39; from the file alert_idckf.log. The output is redirected to 1, which can be viewed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/8295655102064210201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/unix-split-print-grep-lines-before-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/8295655102064210201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/8295655102064210201'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/unix-split-print-grep-lines-before-and.html' title='Unix : Split / Print / Grep lines before and after search pattern'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-2239765834607089203</id><published>2011-09-22T19:55:00.000-07:00</published><updated>2011-09-22T19:55:42.955-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Real Application Clusters ( RAC )"/><title type='text'>Reboot-less node fencing in Oracle Clusterware 11g Release 2</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
There has been several improvements in the node eviction and split brain scenarios with Oralce 11G R2 RAC.&lt;br /&gt;
&lt;br /&gt;
Oracle Clusterware uses a STONITH (Shoot The Other Node In The Head) comparable fencing algorithm to ensure data integrity in cases, in which cluster integrity is&lt;br /&gt;endangered and split-brain scenarios need to be prevented. In case of Oracle Clusterware, this means that a local process enforces the removal of one or more nodes from the cluster (fencing).&lt;br /&gt;Until Oracle Clusterware 11g Release 2, Patch Set One (11.2.0.2) the fencing of a node was performed by a “fast reboot” of the respective server. A “fast reboot” in this context summarizes a shutdown and restart procedure that does not wait for any IO to finish or for file systems to synchronize on shutdown. With Oracle Clusterware 11g Release 2, Patch Set One (11.2.0.2) this mechanism has been changed in order to prevent such a reboot as much as possible.&lt;br /&gt;&lt;br /&gt;Already with Oracle Clusterware 11g Release 2 this algorithm was improved so that failures of certain, Oracle RAC-required subcomponents in the cluster do not necessarily cause an&lt;br /&gt;immediate fencing (reboot) of a node. Instead, an attempt is made to clean up the failure within the cluster and to restart the failed subcomponent. Only, if a cleanup of the failed component appears to be unsuccessful, a node reboot is performed in order to force a cleanup.&lt;br /&gt;&lt;br /&gt;With Oracle Clusterware 11g Release 2, Patch Set One (11.2.0.2) further improvements were made so that Oracle Clusterware will try to prevent a split-brain without rebooting the node. It thereby implements a standing requirement from those customers, who were requesting to preserve the node and to prevent a reboot, since the node runs applications not managed by Oracle Clusterware, which would otherwise be forcibly shut down by the reboot of a node.&lt;br /&gt;&lt;br /&gt;With the new algorithm and when a decision is made to evict a node from the cluster, Oracle Clusterware will first attempt to shutdown all resources on the machine that was chosen to be the subject of an eviction. Especially IO generating processes are killed and it is ensured that those processes are completely stopped before continuing. If, for some reason, not all resources can be stopped or IO generating processes cannot be stopped completely, Oracle Clusterware will still perform a reboot or use IPMI to forcibly evict the node from the cluster.&lt;br /&gt;If all resources can be stopped and all IO generating processes can be killed, Oracle Clusterware will shut itself down on the respective node, but will attempt to restart after the stack has been stopped. The restart is initiated by the Oracle High Availability Services Daemon, which has been introduced with Oracle Clusterware 11g Release 2.&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/2239765834607089203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/reboot-less-node-fencing-in-oracle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/2239765834607089203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/2239765834607089203'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/reboot-less-node-fencing-in-oracle.html' title='Reboot-less node fencing in Oracle Clusterware 11g Release 2'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-3577670560080968310</id><published>2011-09-22T19:52:00.000-07:00</published><updated>2011-09-22T19:52:18.366-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="High Availability"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Real Application Clusters ( RAC )"/><title type='text'>Redundant Interconnect Usage in 11G R2 RAC</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
We have thought of implementing this new feature with Oracle 11G as we have frequent private NIC down events which further results in node evictions.&lt;br /&gt;
&lt;br /&gt;
Redundant Interconnect without any 3rd-party IP failover technology (bond, IPMP or similar) is supported natively by Grid Infrastructure starting from 11.2.0.2.&amp;nbsp; Multiple private network adapters can be defined either during the installation phase or afterward using the oifcfg.&amp;nbsp; Oracle Database, CSS, OCR, CRS, CTSS, and EVM components in 11.2.0.2 employ it automatically.&lt;br /&gt;
&lt;br /&gt;
Grid Infrastructure can activate a maximum of four private network adapters at a time even if more are defined. The ora.cluster_interconnect.haip resource will start one to four link local&amp;nbsp; HAIP on private network adapters for interconnect communication for Oracle RAC, Oracle ASM, and Oracle ACFS etc.&lt;br /&gt;
&lt;br /&gt;
Grid automatically picks link local addresses from reserved 169.254.*.* subnet for HAIP, and it will not attempt to use any 169.254.*.* address if it&#39;s already in use for another purpose. With HAIP, by default, interconnect traffic will be load balanced across all active interconnect interfaces, and corresponding HAIP address will be failed over transparently to other adapters if one fails or becomes non-communicative. .&lt;br /&gt;
&lt;br /&gt;
The number of HAIP addresses is decided by how many private network adapters are active when Grid comes up on the first node in the cluster .&amp;nbsp; If there&#39;s only one active private network, Grid will create one; if two, Grid will create two; and if more than two, Grid will create four HAIPs. The number of HAIPs won&#39;t change even if more private network adapters are activated later, a restart of clusterware on all nodes is required for new adapters to become effective&lt;br /&gt;
&lt;br /&gt;
New HAIP reource&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;grey&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;--------------------------------------------------------------------------------&lt;br /&gt;NAME&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TARGET&amp;nbsp; STATE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SERVER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STATE_DETAILS&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;Cluster Resources&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;ora.asm&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; ONLINE&amp;nbsp; ONLINE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibs-ash-sr118&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Started&lt;br /&gt;&lt;span style=&quot;color: red;&quot;&gt;ora.cluster_interconnect.haip&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&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; ONLINE&amp;nbsp; ONLINE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibs-ash-sr118&lt;/span&gt;&lt;br /&gt;ora.crf&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; ONLINE&amp;nbsp; ONLINE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibs-ash-sr118&lt;br /&gt;ora.crsd&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; ONLINE&amp;nbsp; ONLINE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibs-ash-sr118&lt;br /&gt;ora.cssd&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; ONLINE&amp;nbsp; ONLINE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibs-ash-sr118&lt;br /&gt;ora.cssdmonitor&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; ONLINE&amp;nbsp; ONLINE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibs-ash-sr118&lt;br /&gt;ora.ctssd&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; ONLINE&amp;nbsp; ONLINE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibs-ash-sr118&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OBSERVER&lt;br /&gt;ora.diskmon&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; ONLINE&amp;nbsp; ONLINE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibs-ash-sr118&lt;br /&gt;ora.drivers.acfs&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; ONLINE&amp;nbsp; ONLINE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibs-ash-sr118&lt;br /&gt;ora.evmd&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; ONLINE&amp;nbsp; ONLINE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibs-ash-sr118&lt;br /&gt;ora.gipcd&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; ONLINE&amp;nbsp; ONLINE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibs-ash-sr118&lt;br /&gt;ora.gpnpd&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; ONLINE&amp;nbsp; ONLINE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibs-ash-sr118&lt;br /&gt;ora.mdnsd&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; ONLINE&amp;nbsp; ONLINE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibs-ash-sr118
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
While in previous releases bonding, trunking, teaming, or similar technology was required to make use of redundant network connections between the nodes to be used as redundant,dedicated, private communication channels or “interconnect”, Oracle Clusterware now provides an integrated solution to ensure “Redundant Interconnect Usage”. This functionality is available starting with Oracle Database 11g Release 2, Patch Set One (11.2.0.2).&lt;br /&gt;&lt;br /&gt;The Redundant Interconnect Usage feature does not operate on the network interfaces directly. Instead, it is based on a multiple-listening-endpoint architecture, in which a highly available virtual IP (the HAIP) is assigned to each private network (up to a total number of 4 interfaces).By default, Oracle Real Application Clusters (RAC) software uses all of the HAIP addresses for private network communication, providing load balancing across the set of interfaces identified as the private network. If a private interconnect interface fails or becomes non-communicative,then Oracle Clusterware transparently moves the corresponding HAIP address to one of the remaining functional interfaces&lt;br /&gt;&lt;br /&gt;Oracle RAC Databases, Oracle Automatic Storage Management (clustered ASM), and Oracle Clusterware components such as CSS, OCR, CRS, CTSS, and EVM components employ&lt;br /&gt;Redundant Interconnect Usage starting with Oracle Database 11g Release 2, Patch Set One (11.2.0.2)&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;=============&lt;br /&gt;&lt;br /&gt;&lt;i style=&quot;color: black;&quot;&gt;# $GRID_HOME/bin/oifcfg getif&lt;br /&gt;eth0 10.2.156.0 global public&lt;br /&gt;eth1 192.168.12.0 global cluster_interconnect&lt;br /&gt;&lt;br /&gt;The interfaces that are currently stored in the GPnP profile, their subnets, and their role (public or cluster_interconnect) are displayed.&lt;br /&gt;&lt;br /&gt;2. Add the remaining LLT links to the GPnP profile:&lt;br /&gt;# $GRID_HOME/bin/oifcfg setif -global \&lt;br /&gt;eth2/192.168.12.0:cluster_interconnect&lt;br /&gt;&lt;br /&gt;3. Verify that the correct interface subnet is in use:&lt;br /&gt;# $GRID_HOME/bin/oifcfg getif&lt;br /&gt;eth0 10.2.156.0 global public&lt;br /&gt;eth1 192.168.12.0 global cluster_interconnect&lt;br /&gt;eth2 192.168.2.0 global cluster_interconnect&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;4.You must restart Oracle Clusterware on all members of the cluster when you make global changes. For local changes, you only need to perform a node restart.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
 Interconnect changes for the database occur at instance startup. However, the interconnect for Oracle Clusterware might be different.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: purple;&quot;&gt;11gR2 Grid Infrastructure Redundant Interconnect and ora.cluster_interconnect.haip [ID 1210883.1]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple;&quot;&gt;How to Modify Private Network Interface in 11.2 Grid Infrastructure [ID 1073502.1]&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;http://download.oracle.com/docs/cd/B28359_01/rac.111/b28255/oifcfg.htm&quot;&gt;http://download.oracle.com/docs/cd/B28359_01/rac.111/b28255/oifcfg.htm&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;color: purple;&quot;&gt;How to Change Interconnect/Public Network (Interface or Subnet) in Oracle Clusterware [ID 283684.1]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: purple;&quot;&gt;[11gR2 Grid Infrastructure Redundant Interconnect and ora.cluster_interconnect.haip [ID 1210883.1]]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: purple;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: black;&quot;&gt;Known Issues &lt;/span&gt;&lt;br /&gt;================&lt;br /&gt;&lt;br /&gt;A few bug fixes for haip has come with 11.2.0.3&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/3577670560080968310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/redundant-interconnect-usage-in-11g-r2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/3577670560080968310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/3577670560080968310'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/redundant-interconnect-usage-in-11g-r2.html' title='Redundant Interconnect Usage in 11G R2 RAC'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-7353229875172635521</id><published>2011-09-22T09:38:00.000-07:00</published><updated>2011-09-22T09:42:11.835-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Enterprise Manager"/><title type='text'>Drop and Create enterprise manager database control ( emca)  for 11G R2 RAC</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
With 11G R2 , drop ,creation, de-config,re creation of enterprise manager database console does not put the database in quiesce mode.&lt;br /&gt;
The followed to drop , create , de config and re create emca for 11G R2 single instance or RAC.&lt;br /&gt;
&lt;br /&gt;
I have tried ./bin/emca -config dbcontrol db -repos drop to drop enterprise manager repository objects, but it got hung at some point. Finally, I have tried the manual drop option which is very simple and you are almost sure that it will work !&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1.Drop db control repository manually&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
1. stop dbconsole , if running and the following process from ORACLE_HOME (from each node)&lt;/div&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;grey&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;$ps -ef | grep console&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;
$ps -ef| grep emwd&lt;br /&gt;
$ps -ef | grep emagent&lt;br /&gt;
$ps -ef |grep java&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;br /&gt;
2. Set environment&amp;nbsp; variables&lt;/div&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;grey&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;SET ORACLE_HOSTNAME=&amp;lt; Hostname of your machine &quot;&lt;br /&gt;
SET ORACLE_HOME=&amp;lt; Location where your database is installed &amp;gt;&lt;br /&gt;
SET ORACLE_SID=&amp;lt; name of your database &quot;&lt;br /&gt;
SET PATH=%ORACLE_HOME%\bin;%PATH% &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
Note : You will have to replace SET command with EXPORT for *nix environments&lt;br /&gt;
&lt;br /&gt;
3. Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and management objects:&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;grey&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;a. drop user sysman cascade;&lt;br /&gt;
b. drop role MGMT_USER;&lt;br /&gt;
c. drop user MGMT_VIEW cascade;&lt;br /&gt;
d. drop public synonym MGMT_TARGET_BLACKOUTS;&lt;br /&gt;
e. drop public synonym SETEMVIEWUSERCONTEXT; &lt;br /&gt;
f. drop public synonym MGMT_target_blackouts;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;
g. drop public synonym mgmt_severity_array;&lt;br /&gt;
h. drop public synonym mgmt_guid_obj;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&amp;nbsp;Verify any left over object owned by SYSMAN&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt; SELECT owner,TABLE_NAME, synonym_name name FROM dba_synonyms WHERE table_owner = &#39;SYSMAN&#39;;&lt;br /&gt;
&lt;br /&gt;
if yo notice any public synonym or any rows returned by the above query .&lt;br /&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;grey&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;SQL&amp;gt; &lt;br /&gt;
&lt;br /&gt;
DECLARE&lt;br /&gt;
CURSOR c1 IS&lt;br /&gt;
SELECT owner, synonym_name name&lt;br /&gt;
FROM dba_synonyms&lt;br /&gt;
WHERE table_owner = &#39;SYSMAN&#39;;&lt;br /&gt;
BEGIN&lt;br /&gt;
FOR r1 IN c1 LOOP&lt;br /&gt;
IF r1.owner = &#39;PUBLIC&#39; THEN&lt;br /&gt;
EXECUTE IMMEDIATE &#39;DROP PUBLIC SYNONYM &#39;||r1.name;&lt;br /&gt;
ELSE&lt;br /&gt;
EXECUTE IMMEDIATE &#39;DROP SYNONYM &#39;||r1.owner||&#39;.&#39;||r1.name;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
END IF;&lt;br /&gt;
END LOOP;&lt;br /&gt;
END;&lt;br /&gt;
/
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;br /&gt;
4.Move or rename config folders on each node :&lt;/div&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;grey&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;$rm -rf $ORACLE_HOME/&lt;hostname_sid&gt;&lt;br /&gt;$rm -rf $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_&lt;hostname&gt;_&lt;sid&gt;&lt;br /&gt;&lt;br /&gt;
&lt;/sid&gt;&lt;/hostname&gt;&lt;/hostname_sid&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
You would replace the values in the &amp;lt;&amp;gt; with the correct values.&lt;br /&gt;
&lt;br /&gt;
5.Create DBconsole repos and configure dbconsole : (Use -cluster when its RAC DB)&lt;br /&gt;
&lt;br /&gt;
$export ORACLE_HOME=&lt;oracle home=&quot;&quot;&gt; (Please give the physical path avoid symbolic links)&lt;br /&gt;$ &lt;oracle_home&gt;&lt;br /&gt;&lt;/oracle_home&gt;&lt;/oracle&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;2.Create emca&amp;nbsp; repository objects&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Execute the below command to create emca db console for RAC&lt;br /&gt;
./bin/emca -config dbcontrol db -repos create -cluster&lt;br /&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;grey&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;-bash-3.00$ ./bin/emca -config dbcontrol db -repos create -cluster&lt;br /&gt;
&lt;br /&gt;
STARTED EMCA at Aug 19, 2011 8:47:46 AM&lt;br /&gt;
EM Configuration Assistant, Version 11.2.0.0.2 Production&lt;br /&gt;
Copyright (c) 2003, 2005, Oracle.&amp;nbsp; All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Enter the following information:&lt;br /&gt;
Database unique name: bvnprd&lt;br /&gt;
Service name: bvnprd&lt;br /&gt;
Listener ORACLE_HOME [ /project/11.2.0/grid ]:&lt;br /&gt;
Password for SYS user: ^R &lt;span style=&quot;color: red;&quot;&gt;&amp;lt; Give SYS password in single quotes if there are special characters &amp;gt;&lt;/span&gt;&lt;br /&gt;
Password for SYS user: ^R&lt;br /&gt;
Password for SYS user: ^R&lt;br /&gt;
Password for SYS user:&lt;br /&gt;
Database Control is already configured for the database bvnprd&lt;br /&gt;
You have chosen to configure Database Control for managing the database bvnprd&lt;br /&gt;
This will remove the existing configuration and the default settings and perform a fresh configuration&lt;br /&gt;
Do you wish to continue? [yes(Y)/no(N)]: yes&lt;br /&gt;
Password for DBSNMP user:&lt;br /&gt;
Password for SYSMAN user:&lt;br /&gt;
Cluster name: crs&lt;br /&gt;
Email address for notifications (optional):&lt;br /&gt;
Outgoing Mail (SMTP) server for notifications (optional):&lt;br /&gt;
ASM ORACLE_HOME [ /project/11.2.0/grid ]:&lt;br /&gt;
ASM port [ 1521 ]:&lt;br /&gt;
ASM username [ ASMSNMP ]: SYS &lt;span style=&quot;color: red;&quot;&gt;&amp;lt; You can also give ASMSNMP user and password below &amp;gt;&lt;/span&gt;&lt;br /&gt;
ASM user password:&lt;br /&gt;
Invalid username/password or database/scan listener not up or database service is not registered with scan listener.&lt;br /&gt;
ASM user password:&lt;br /&gt;
Invalid username/password or database/scan listener not up or database service is not registered with scan listener.&lt;br /&gt;
ASM user password: 3LHj*5x&lt;br /&gt;
Invalid username/password or database/scan listener not up or database service is not registered with scan listener.&lt;br /&gt;
ASM user password:&lt;br /&gt;
Invalid username/password or database/scan listener not up or database service is not registered with scan listener.&lt;br /&gt;
ASM user password:&amp;nbsp; LHj*5x&lt;br /&gt;
-----------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
You have specified the following settings&lt;br /&gt;
&lt;br /&gt;
Database ORACLE_HOME ................ /project/oracle/orabase/product/11.2.0/dbhome_1&lt;br /&gt;
&lt;br /&gt;
Database instance hostname ................ dom-ash-sr147.domdc.com&lt;br /&gt;
Listener ORACLE_HOME ................ /project/11.2.0/grid&lt;br /&gt;
Listener port number ................ 1521&lt;br /&gt;
Cluster name ................ crs&lt;br /&gt;
Database unique name ................ bvnprd&lt;br /&gt;
Email address for notifications ...............&lt;br /&gt;
Outgoing Mail (SMTP) server for notifications ...............&lt;br /&gt;
ASM ORACLE_HOME ................ /project/11.2.0/grid&lt;br /&gt;
ASM port ................ 1521&lt;br /&gt;
ASM user role ................ SYSDBA&lt;br /&gt;
ASM username ................ SYS&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------&lt;br /&gt;
Do you wish to continue? [yes(Y)/no(N)]: yes&lt;br /&gt;
Aug 19, 2011 9:19:52 AM oracle.sysman.emcp.EMConfig perform&lt;br /&gt;
INFO: This operation is being logged at /project/oracle/orabase/cfgtoollogs/emca/bvnprd/emca_2011_08_19_08_47_45.log.&lt;br /&gt;
Aug 19, 2011 9:19:55 AM oracle.sysman.emcp.util.DBControlUtil stopOMS&lt;br /&gt;
INFO: Stopping Database Control (this may take a while) ...&lt;br /&gt;
Aug 19, 2011 9:20:02 AM oracle.sysman.emcp.EMReposConfig createRepository&lt;br /&gt;
INFO: Creating the EM repository (this may take a while) ...&lt;br /&gt;
Aug 19, 2011 9:30:49 AM oracle.sysman.emcp.EMReposConfig invoke&lt;br /&gt;
INFO: Repository successfully created&lt;br /&gt;
Aug 19, 2011 9:31:06 AM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository&lt;br /&gt;
INFO: Uploading configuration data to EM repository (this may take a while) ...&lt;br /&gt;
Aug 19, 2011 9:31:49 AM oracle.sysman.emcp.EMReposConfig invoke&lt;br /&gt;
INFO: Uploaded configuration data successfully&lt;br /&gt;
Aug 19, 2011 9:31:50 AM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles&lt;br /&gt;
INFO: Propagating /project/oracle/orabase/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_dom-ash-sr147_bvnprd to remote nodes ...&lt;br /&gt;
Aug 19, 2011 9:31:53 AM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles&lt;br /&gt;
INFO: Propagating /project/oracle/orabase/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_dom-ash-sr149_bvnprd to remote nodes ...&lt;br /&gt;
Aug 19, 2011 9:32:02 AM oracle.sysman.emcp.EMAgentConfig deployStateDirs&lt;br /&gt;
INFO: Propagating /project/oracle/orabase/product/11.2.0/dbhome_1/dom-ash-sr147_bvnprd to remote nodes ...&lt;br /&gt;
Aug 19, 2011 9:32:11 AM oracle.sysman.emcp.EMAgentConfig deployStateDirs&lt;br /&gt;
INFO: Propagating /project/oracle/orabase/product/11.2.0/dbhome_1/dom-ash-sr149_bvnprd to remote nodes ...&lt;br /&gt;
Aug 19, 2011 9:32:16 AM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary&lt;br /&gt;
INFO:&amp;nbsp; Location /project/oracle/orabase/product/11.2.0/dbhome_1/EMStagePatches_bvnprd is not shared. Software library could not be configured. Provisioning archives will not be deployed. Please configure it manually.&lt;br /&gt;
Aug 19, 2011 9:32:16 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole&lt;br /&gt;
INFO: Securing Database Control (this may take a while) ...&lt;br /&gt;
Aug 19, 2011 9:32:32 AM oracle.sysman.emcp.util.DBControlUtil startOMS&lt;br /&gt;
INFO: Starting Database Control (this may take a while) ...&lt;br /&gt;
Aug 19, 2011 9:33:10 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration&lt;br /&gt;
INFO: Database Control started successfully&lt;br /&gt;
Aug 19, 2011 9:33:10 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration&lt;br /&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 https://dom-ash-sr147.domdc.com:1158/em &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;br /&gt;
Aug 19, 2011 9:33:12 AM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage&lt;br /&gt;
INFO:&lt;br /&gt;
****************&amp;nbsp; Current Configuration&amp;nbsp; ****************&lt;br /&gt;
&amp;nbsp;INSTANCE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NODE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBCONTROL_UPLOAD_HOST&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; ---------------------&lt;br /&gt;
&lt;br /&gt;
bvnprd&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dom-ash-sr147&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dom-ash-sr147.domdc.com&lt;br /&gt;
bvnprd&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dom-ash-sr149&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dom-ash-sr147.domdc.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aug 19, 2011 9:33:12 AM oracle.sysman.emcp.EMDBPostConfig invoke&lt;br /&gt;
WARNING:&lt;br /&gt;
************************&amp;nbsp; WARNING&amp;nbsp; ************************&lt;br /&gt;
&lt;br /&gt;
Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.&amp;nbsp; The encryption key has been placed in the file: /project/oracle/orabase/product/11.2.0/dbhome_1/dom-ash-sr147_bvnprd/sysman/config/emkey.ora.&amp;nbsp;&amp;nbsp; Please ensure this file is backed up as the encrypted data will become unusable if this file is lost.&lt;br /&gt;
&lt;br /&gt;
***********************************************************&lt;br /&gt;
Enterprise Manager configuration completed successfully&lt;br /&gt;
FINISHED EMCA at Aug 19, 2011 9:33:12 AM&lt;br /&gt;
-bash-3.00$
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/7353229875172635521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/drop-and-create-enterprise-manager.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/7353229875172635521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/7353229875172635521'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/drop-and-create-enterprise-manager.html' title='Drop and Create enterprise manager database control ( emca)  for 11G R2 RAC'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-8331940802798771974</id><published>2011-09-22T09:10:00.000-07:00</published><updated>2011-09-22T09:12:45.616-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle DBA : Tips and Tricks"/><title type='text'>Calculate next run time in dbms_scheduler.create_job (job_interval )</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
You control when and how often a job repeats by setting the repeat_interval attribute of the job itself or of the named schedule that the job references. You can set repeat_interval with DBMS_SCHEDULER package procedures or with Enterprise Manager.&lt;br /&gt;
&lt;br /&gt;
The question I had was what will be the next execution date of a job ? Will it be based on start time of one instance of job&amp;nbsp; or completion time of one instance of job ?&lt;br /&gt;
&lt;br /&gt;
According to Oracle Documentation&amp;nbsp; &lt;a href=&quot;http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/scheduse004.htm#i1023312&quot;&gt;http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/scheduse004.htm#i1023312&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The result of evaluating the repeat_interval is a set of timestamps.The Scheduler runs the job at each timestamp. Note that the start date from the job or schedule also helps determine the resulting set of timestamps. (See Oracle Database PL/SQL Packages and Types Reference for more information about repeat_interval evaluation.) If no value for repeat_interval is specified, the job runs only once at the specified start date.&lt;br /&gt;
&lt;br /&gt;
Immediately after a job is started, &lt;u&gt;the repeat_interval is evaluated to determine the next scheduled execution time of the job&lt;/u&gt;. It is possible that the next scheduled execution time arrives while the job is still running. &lt;u&gt;A new instance of the job, however, will not be started until the current one completes&lt;/u&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is something that I took sometime to figure out !&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/8331940802798771974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/calculate-next-run-time-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/8331940802798771974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/8331940802798771974'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/calculate-next-run-time-in.html' title='Calculate next run time in dbms_scheduler.create_job (job_interval )'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-5074965568547281918</id><published>2011-09-17T23:09:00.000-07:00</published><updated>2011-09-17T23:10:16.839-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Real Application Clusters ( RAC )"/><category scheme="http://www.blogger.com/atom/ns#" term="Troubleshooting"/><title type='text'>ASM DiskGroup NOT Mounted in 11G R2</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
I was just going to create a 11G R2 RAC&amp;nbsp; database on my RHEL 5.4 two node cluster. But dbca exists stating that ASM diskgroup where I am planning to put my database files are not mounted.&lt;br /&gt;
&lt;br /&gt;
When I checked status using GRID_HOME/asmca,it shows the disks as mounted. But still dbca reports the same problem&lt;br /&gt;
&lt;br /&gt;
I wanted to login to ASM instance and query the V$ASM_DISKGROUP.&lt;br /&gt;
&lt;br /&gt;
On Node 1, I saw that ASM instance is up.&lt;br /&gt;
&lt;br /&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;grey&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;n310 oracle [+ASM1]:ps -ef | grep smon&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; oracle 355 30041 0 15:06 pts/2 00:00:00 grep smon&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; oracle 6730 1 0 12:51 ? 00:00:00 asm_smon_+ASM1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oracle 14649 1 0 14:30 ? 00:00:00 ora_smon_nfr1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oracle 14968 1 0 14:31 ? 00:00:00 ora_smon_nfr3&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
I thought I will query the V$ASM_DISKGROUP dynamic view to see the state of my ASM diskgroups.&lt;br /&gt;
&lt;br /&gt;
Check the ORACLE_HOME variable from which ASM instance was started.&lt;br /&gt;
&lt;br /&gt;
From the above grep command , I got the PID 6730 for ASM instance.&lt;br /&gt;
Go to /proc/PID/environ and check the environment variables with which the ASM instance was started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;grey&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;n310 oracle [+ASM1]:cat /proc/6730/environ&lt;br /&gt;
Here I can see the ORACLE_HOME as /app/oracle/grid.&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;
export ORACLE_HOME=app/oracle/grid&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Since now I got the ORACLE_HOME, Lets see what V$ASM_DISKGROUP shows&lt;br /&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;grey&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;&amp;nbsp;n310 oracle [+ASM1]:export ORACLE_SID=+ASM1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; n310 oracle [+ASM1]:./bin/sqlplus / as sysasm&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 15 16:12:43 2011&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Copyright (c) 1982, 2009, Oracle. All rights reserved.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Connected to:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – 64bit Production&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; With the Real Application Clusters and Automatic Storage Management options&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL&amp;gt; select NAME,TOTAL_MB,FREE_MB,STATE from v$ASM_DISKgroup;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; NAME TOTAL_MB FREE_MB STATE&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; —————————— ———- ———- ———–&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; DATA 8610 7684 MOUNTED&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; VOL 0 0 DISMOUNTED&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL&amp;gt; alter diskgroup VOL mount;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Diskgroup altered.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL&amp;gt; select NAME,TOTAL_MB,FREE_MB,STATE from v$ASM_DISKgroup;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; NAME TOTAL_MB FREE_MB STATE&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; —————————— ———- ———- ———–&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; DATA 8610 7684 MOUNTED&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; VOL 38170 37980 MOUNTED &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Here, When I logged in as sysdba,I got the following error. &lt;br /&gt;
&lt;br /&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;grey&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL&amp;gt; alter diskgroup VOL mount;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; alter diskgroup VOL mount&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ERROR at line 1:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ORA-15032: not all alterations performed&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ORA-15260: permission denied on ASM disk group&amp;nbsp;&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;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
So, I used SYSASM to do ASM management operations.&lt;br /&gt;
&lt;br /&gt;
When I quered the DISKGROUP status in the second node, it shows as MOUNTED. &lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/5074965568547281918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/asm-diskgroup-not-mounted-in-11g-r2.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/5074965568547281918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/5074965568547281918'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/asm-diskgroup-not-mounted-in-11g-r2.html' title='ASM DiskGroup NOT Mounted in 11G R2'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-3476975629159605629</id><published>2011-09-17T23:01:00.000-07:00</published><updated>2011-09-17T23:01:53.663-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Unix Commands for DBAs"/><title type='text'>Find files created in last 24 hours in Unix</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
I just had a requirement recently to start a process and see which all files it write when it is started.&lt;br /&gt;
 I used a ‘find’ command from the home directory for this.&lt;br /&gt;
&lt;br /&gt;


find . -mtime -1 -print&lt;br /&gt;
&lt;br /&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;grey&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;n310 oracle [CHANGEME]:find . -mtime -1 -print&amp;nbsp; &amp;nbsp; &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;
./bin&lt;br /&gt;
./dbs&lt;br /&gt;
./install&lt;br /&gt;
./install/.ee 
    
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/3476975629159605629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/find-files-created-in-last-24-hours-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/3476975629159605629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/3476975629159605629'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/find-files-created-in-last-24-hours-in.html' title='Find files created in last 24 hours in Unix'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-2982732580593713262</id><published>2011-09-17T22:57:00.000-07:00</published><updated>2011-09-17T22:57:31.305-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="Troubleshooting"/><title type='text'>Table not present in datapump export 11G R2 - Deferred Segment Creation</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
After upgrading database to 11G R2 developers keep complaining that some tables doesn’t come in the export file.They noticed it when they imported this and found that some objects were not in a compiled state.When they tried to compile, they came to know that tables was not imported. There is no error in the export / import log, but some tables are not exported.&lt;br /&gt;
BTW, they used imp /exp utilities.&lt;br /&gt;
The tables which were not exported were empty- which means they had zero rows in it.&lt;br /&gt;
&lt;br /&gt;
Understand Deferred Segment Creation&lt;br /&gt;
&lt;br /&gt;
Beginning with Oracle Database 11g Release 2, when you create heap-organized tables in a locally managed tablespace, the database defers table segment creation until the first row is inserted. In addition, segment creation is deferred for any LOB columns of the table, any indexes created implicitly as part of table creation, and any indexes subsequently explicitly created on the table.This means that,no segments are allocated until a row is inserted to these table.You can verify this by querying user_tables&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;grey&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;SQL&amp;gt; SELECT table_name, segment_created FROM   user_tables where rownum &amp;lt; 4; 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
The advantages of this space allocation method are the following:&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;It saves a significant amount of disk space in applications that create hundreds or thousands of tables upon installation, many of which might never be populated&lt;/li&gt;
&lt;li&gt;It reduces application installation time.
There is a small performance penalty when the first row is inserted, because the new segment must be created at that time.&amp;nbsp; &lt;/li&gt;
&lt;/ol&gt;
Here is how you can solve this problem&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Set the parameter DEFERRED_SEGMENT_CREATION initialization parameter to FALSE, which is TRUE by default&lt;/li&gt;
&lt;li&gt;ALTER table MOVE for the tables which are returned from the above query&lt;/li&gt;
&lt;li&gt;INSERT a record to these tables and then rollback&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/2982732580593713262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/table-not-present-in-datapump-export.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/2982732580593713262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/2982732580593713262'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/table-not-present-in-datapump-export.html' title='Table not present in datapump export 11G R2 - Deferred Segment Creation'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-8508662564060521945</id><published>2011-09-17T21:42:00.000-07:00</published><updated>2011-09-17T21:42:29.706-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DBA Scripts"/><title type='text'>Script to find duplicates for primary key or Unique Index</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This script will help you to find duplicate values coming in any primary key or unique key or unique index fields.&lt;br /&gt;
This will be very useful when you encounter any issues during datapump export or import, when a unique index creation fails with &quot;ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found&quot;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;gray&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;REM This is an example SQL*Plus Script to delete duplicate rows from&lt;br /&gt;
REM a table.&lt;br /&gt;
REM&lt;br /&gt;
set echo off&lt;br /&gt;
set verify off heading off&lt;br /&gt;
undefine t&lt;br /&gt;
undefine c&lt;br /&gt;
prompt&lt;br /&gt;
prompt&lt;br /&gt;
prompt Enter name of table with duplicate rows&lt;br /&gt;
prompt&lt;br /&gt;
accept t prompt &#39;Table: &#39;&lt;br /&gt;
prompt&lt;br /&gt;
select &#39;Table &#39;||upper(&#39;&amp;amp;&amp;amp;t&#39;) from dual;&lt;br /&gt;
describe &amp;amp;&amp;amp;t&lt;br /&gt;
prompt&lt;br /&gt;
prompt Enter name(s) of column(s) which should be unique. If more than&lt;br /&gt;
prompt one column is specified , you MUST separate with commas.&lt;br /&gt;
prompt&lt;br /&gt;
accept c prompt &#39;Column(s): &#39;&lt;br /&gt;
prompt&lt;br /&gt;
delete from &amp;amp;&amp;amp;t&lt;br /&gt;
where rowid not in (select min(rowid) from &amp;amp;&amp;amp;t group by &amp;amp;&amp;amp;c)&lt;br /&gt;
/&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/8508662564060521945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/script-to-find-duplicates-for-primary.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/8508662564060521945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/8508662564060521945'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/script-to-find-duplicates-for-primary.html' title='Script to find duplicates for primary key or Unique Index'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-991431699566901925</id><published>2011-09-17T08:40:00.000-07:00</published><updated>2011-09-17T21:38:23.604-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><title type='text'>Find Explain Plan for a given sql_id</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
You can check the explain plan for a given sql_id using following commands.&lt;br /&gt;
&lt;br /&gt;
Suppose the sql_id given was ’6rata4x2qurst’.&lt;br /&gt;
The source of sql_id can be a badly performing query from statspack, awr etc.&lt;br /&gt;
&lt;br /&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;grey&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;SQL&amp;gt; select sql_fulltext from gv$sql where sql_id=’6rata4x2qurst’;&lt;br /&gt;SQL_FULLTEXT&lt;br /&gt;——————————————————————————–——————–——————–——————–——————–&lt;br /&gt;select empno from emp where sal &amp;gt; 1000&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; explain plan for select empno from emp where sal &amp;gt; 1000;&lt;br /&gt;Explained.&lt;br /&gt;SQL&amp;gt; select * from table(dbms_xplan.display());&lt;br /&gt;&lt;br /&gt;PLAN_TABLE_OUTPUT&lt;br /&gt;—————————————————————————–——–——–——–——–——————–——————–——————–&lt;br /&gt;&lt;br /&gt;Plan hash value: 3956160932&lt;br /&gt;————————————————————————–——–——–——————–——————–——————–——————–&lt;br /&gt;| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |&lt;br /&gt;————————————————————————–——–——–——–——————–——————–——————–——————–&lt;br /&gt;| 0 | SELECT STATEMENT | | 13 | 104 | 3 (0)| 00:00:01 |&lt;br /&gt;|* 1 | TABLE ACCESS FULL| EMP | 13 | 104 | 3 (0)| 00:00:01 |&lt;br /&gt;————————————————————————–——————–——————–——————–——————–——————–&lt;br /&gt;Predicate Information (identified by operation id):&lt;br /&gt;———————————————————————–——————–——————–——————–——————–——————–&lt;br /&gt;PLAN_TABLE_OUTPUT&lt;br /&gt;—————————————————————————–——————–——————–——————–——————–——————–&lt;br /&gt;1 – filter(“SAL”&amp;gt;1000)&lt;br /&gt;13 rows selected.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/991431699566901925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/find-explain-plan-for-given-sqlid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/991431699566901925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/991431699566901925'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/find-explain-plan-for-given-sqlid.html' title='Find Explain Plan for a given sql_id'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-40908203160256382</id><published>2011-09-17T06:21:00.000-07:00</published><updated>2011-09-17T21:45:33.791-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Real Application Clusters ( RAC )"/><title type='text'>Find Cluster Name in 11g R2 RAC</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
When you configure enterprise manager db control in RAC, using emca command, it asks for cluster name . You can find the cluster name using cemutlo command.&lt;br /&gt;
&lt;br /&gt;
You should change your path to GRID_HOME/bin directory and execute the following command.&lt;br /&gt;
&lt;br /&gt;
&lt;table &lt;font=&quot;&quot; bgcolor=&quot;#000000&quot; border=&quot;2&quot; bordercolor=&quot;gray&quot; cellpadding=&quot;3&quot; color=&quot;white&quot; style=&quot;color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;  
&lt;td&gt;-bash-3.00$ ./cemutlo -n&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;
crs&lt;br /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/40908203160256382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/find-cluster-name-in-11g-r2-rac.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/40908203160256382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/40908203160256382'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/09/find-cluster-name-in-11g-r2-rac.html' title='Find Cluster Name in 11g R2 RAC'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-1123041263729256559</id><published>2011-05-13T10:12:00.001-07:00</published><updated>2011-09-17T21:46:24.862-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ORA - Errors"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="Troubleshooting"/><title type='text'>ORA-00214 : Control file version inconsistent and ORA-01033:</title><content type='html'>One fine morning , when I tried too connect to test database which is running in my local windows machine, I got the following error. &lt;br/&gt; &lt;code&gt; &lt;br/&gt; sqlplus scott/tiger@TEST &lt;br/&gt; ERROR: &lt;br/&gt; ORA-01033: ORACLE initialization or shutdown in progress &lt;br/&gt; &lt;/code&gt; &lt;br/&gt;   &lt;br/&gt; Then I tried to login to the database as SYS and I found that the database is in mount state. So why is it not open ? I knew when the windows machine was restarted the database might have come up and went into mount state. Then why it did not open. Let&#39;s see. &lt;br/&gt;  &lt;br/&gt; Let me shutdown and startup it manually and see what went wrong. &lt;br/&gt;  &lt;br/&gt; &lt;code&gt; &lt;br/&gt; SQL&gt; startup; &lt;br/&gt; ORACLE instance started. &lt;br/&gt;  &lt;br/&gt; Total System Global Area  612368384 bytes &lt;br/&gt; Fixed Size                  1250428 bytes &lt;br/&gt; Variable Size             188746628 bytes &lt;br/&gt; Database Buffers          415236096 bytes &lt;br/&gt; Redo Buffers                7135232 bytes &lt;br/&gt; ORA-00214: control file &#39;D:\APPLNS\ORACLE\ORADATA\TEST\CONTROL02.CTL&#39; version &lt;br/&gt; 521 inconsistent with file &#39;D:\APPLNS\ORACLE\ORADATA\TEST\CONTROL01.CTL&#39; &lt;br/&gt; version 519 &lt;br/&gt;  &lt;br/&gt; &lt;/code&gt; &lt;br/&gt; So this is the problem. One or more copy of control files are inconsistent. As you know,control files are multiplexed and here somehow the copy of control file inconsistent. So let&#39;s where are these control files. Remember my db is in mount state. &lt;br/&gt; &lt;code&gt; &lt;br/&gt; SQL&gt; show parameter control; &lt;br/&gt;  &lt;br/&gt; NAME                                 TYPE        VALUE &lt;br/&gt; ------------------------------------ ----------- ------------------------------ &lt;br/&gt; control_file_record_keep_time        integer     7 &lt;br/&gt; control_files                        string      D:\APPLNS\ORACLE\ORADATA\TEST\ &lt;br/&gt;                                                  CONTROL01.CTL, D:\APPLNS\ORACL &lt;br/&gt;                                                  E\ORADATA\TEST\CONTROL02.CTL, &lt;br/&gt;                                                  D:\APPLNS\ORACLE\ORADATA\TEST\ &lt;br/&gt;                                                  CONTROL03.CTL &lt;br/&gt;                                                   &lt;br/&gt; &lt;/code&gt; &lt;br/&gt;  &lt;br/&gt; Now what we have to do is startup the database with a single control file which is consistent.Remove the control file copies and start with only one control file.                                                    &lt;br/&gt; If you use pfile then edit the CONTROL_FILES parameter from init.ora and modify it to include just one copy of control file. &lt;br/&gt; 			  &lt;br/&gt; If you use spfile then after issuing startup nomount use show control_files to see existing controlfiles inside spfile and then you can use ALTER SYSTEM SET CONTROL_FILES=file_name; in order to point just one copy of control file. &lt;br/&gt;  &lt;br/&gt; Here is my control_files parameter in init.ora &lt;br/&gt; &lt;code&gt; &lt;br/&gt; *.control_files=&#39;D:\Applns\oracle\oradata\TEST\control01.ctl&#39;,&#39;D:\Applns\oracle\oradata\TEST\control02.ctl&#39;,&#39;D:\Applns\oracle\oradata\TEST\control03.ctl&#39; &lt;br/&gt; &lt;/code&gt; &lt;br/&gt; I have modified it to include just only one. &lt;br/&gt; &lt;code&gt; &lt;br/&gt; *.control_files=&#39;D:\Applns\oracle\oradata\TEST\control01.ctl&#39; &lt;br/&gt; &lt;/code&gt; &lt;br/&gt;  &lt;br/&gt; Now let&#39;s startup the instance with new pfile. &lt;br/&gt; &lt;code&gt; &lt;br/&gt; SQL&gt; startup pfile=&#39;D:\Applns\oracle\product\10.2.0\db_1\database\initTEST.ora&#39; &lt;br/&gt; ORACLE instance started. &lt;br/&gt;  &lt;br/&gt; Total System Global Area  612368384 bytes &lt;br/&gt; Fixed Size                  1250428 bytes &lt;br/&gt; Variable Size             188746628 bytes &lt;br/&gt; Database Buffers          415236096 bytes &lt;br/&gt; Redo Buffers                7135232 bytes &lt;br/&gt; Database mounted. &lt;br/&gt; Database opened. &lt;br/&gt; SQL&gt; &lt;br/&gt; &lt;/code&gt; &lt;br/&gt;  &lt;br/&gt; Bravo !!!! &lt;br/&gt; You can see my database came up and is open. &lt;br/&gt; Now, let&#39;s copy the good control file and make two copies. &lt;br/&gt; &lt;code&gt; &lt;br/&gt; D:\Applns\oracle\oradata\TEST&gt;dir CO* &lt;br/&gt;  Volume in drive D is Applns &lt;br/&gt;  Volume Serial Number is 876D-EFDD &lt;br/&gt;  &lt;br/&gt; Directory of D:\Applns\oracle\oradata\TEST &lt;br/&gt;  &lt;br/&gt; 05/10/2011  10:54 AM         7,061,504 CONTROL01.CTL &lt;br/&gt; 05/05/2011  08:03 AM         7,061,504 CONTROL02.CTL &lt;br/&gt; 05/05/2011  08:03 AM         7,061,504 CONTROL03.CTL &lt;br/&gt;                3 File(s)     21,184,512 bytes &lt;br/&gt;                0 Dir(s)  45,936,365,568 bytes free &lt;br/&gt;  &lt;br/&gt; D:\Applns\oracle\oradata\TEST&gt;del CONTROL02.CTL &lt;br/&gt;  &lt;br/&gt; D:\Applns\oracle\oradata\TEST&gt;del CONTROL03.CTL &lt;br/&gt;  &lt;br/&gt; D:\Applns\oracle\oradata\TEST&gt;copy CONTROL01.CTL CONTROL02.CTL &lt;br/&gt;         1 file(s) copied. &lt;br/&gt;  &lt;br/&gt; D:\Applns\oracle\oradata\TEST&gt;copy CONTROL01.CTL CONTROL03.CTL &lt;br/&gt;         1 file(s) copied. &lt;br/&gt; &lt;/code&gt;         &lt;br/&gt;  &lt;br/&gt; Don&#39;t forget to put back these entries in your pfile. &lt;br/&gt; &lt;code&gt; &lt;br/&gt; *.control_files=&#39;D:\Applns\oracle\oradata\TEST\control01.ctl&#39;,&#39;D:\Applns\oracle\oradata\TEST\control02.ctl&#39;,&#39;D:\Applns\oracle\oradata\TEST\control03.ctl&#39; &lt;br/&gt; &lt;/code&gt; &lt;br/&gt;  &lt;br/&gt; Let&#39;s shutdown and start database with new pfile and create spfile. &lt;br/&gt; &lt;code&gt; &lt;br/&gt; SQL&gt; shutdown immediate; &lt;br/&gt; Database closed. &lt;br/&gt; Database dismounted. &lt;br/&gt; ORACLE instance shut down. &lt;br/&gt; SQL&gt; startup pfile=&#39;D:\Applns\oracle\product\10.2.0\db_1\database\initTEST.ora&#39;; &lt;br/&gt; ORACLE instance started. &lt;br/&gt;  &lt;br/&gt; Total System Global Area  612368384 bytes &lt;br/&gt; Fixed Size                  1250428 bytes &lt;br/&gt; Variable Size             188746628 bytes &lt;br/&gt; Database Buffers          415236096 bytes &lt;br/&gt; Redo Buffers                7135232 bytes &lt;br/&gt; Database mounted. &lt;br/&gt; Database opened. &lt;br/&gt; SQL&gt; show parameter control_files; &lt;br/&gt;  &lt;br/&gt; NAME                                 TYPE        VALUE &lt;br/&gt; ------------------------------------ ----------- ------------------------------ &lt;br/&gt; control_files                        string      D:\APPLNS\ORACLE\ORADATA\TEST\ &lt;br/&gt;                                                  CONTROL01.CTL, D:\APPLNS\ORACL &lt;br/&gt;                                                  E\ORADATA\TEST\CONTROL02.CTL, &lt;br/&gt;                                                  D:\APPLNS\ORACLE\ORADATA\TEST\ &lt;br/&gt;                                                  CONTROL03.CTL &lt;br/&gt; SQL&gt; create spfile from pfile; &lt;br/&gt;  &lt;br/&gt; File created. &lt;br/&gt;  &lt;br/&gt; SQL&gt; shutdown immediate; &lt;br/&gt; Database closed. &lt;br/&gt; Database dismounted. &lt;br/&gt; ORACLE instance shut down. &lt;br/&gt; SQL&gt; startup; &lt;br/&gt; ORACLE instance started. &lt;br/&gt;  &lt;br/&gt; Total System Global Area  612368384 bytes &lt;br/&gt; Fixed Size                  1250428 bytes &lt;br/&gt; Variable Size             188746628 bytes &lt;br/&gt; Database Buffers          415236096 bytes &lt;br/&gt; Redo Buffers                7135232 bytes &lt;br/&gt; Database mounted. &lt;br/&gt; Database opened. &lt;br/&gt; &lt;/code&gt; &lt;br/&gt;  &lt;br/&gt; So that was it !!! . Let&#39;s try a new connection. &lt;br/&gt;  &lt;br/&gt; &lt;code&gt; &lt;br/&gt; D:\Applns\oracle\oradata\TEST&gt;sqlplus scott/tiger@test &lt;br/&gt;  &lt;br/&gt; SQL*Plus: Release 10.2.0.1.0 - Production on Tue May 10 11:01:59 2011 &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-01017: invalid username/password; logon denied &lt;br/&gt;  &lt;br/&gt;  &lt;br/&gt; SQL&gt; alter user scott identified by tiger; &lt;br/&gt;  &lt;br/&gt; SQL&gt; alter user scott account unlock; &lt;br/&gt;  &lt;br/&gt; D:\Applns\oracle\oradata\TEST&gt;sqlplus scott/tiger@test &lt;br/&gt;  &lt;br/&gt; SQL*Plus: Release 10.2.0.1.0 - Production on Tue May 10 11:03:33 2011 &lt;br/&gt;  &lt;br/&gt; Copyright (c) 1982, 2005, Oracle.  All rights reserved. &lt;br/&gt;  &lt;br/&gt;  &lt;br/&gt; Connected to: &lt;br/&gt; Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production &lt;br/&gt; With the Partitioning, OLAP and Data Mining options &lt;br/&gt;  &lt;br/&gt; SQL&gt; &lt;br/&gt;  &lt;br/&gt; &lt;/code&gt; &lt;br/&gt;  &lt;br/&gt; It worked !!! . Happy Reading... &lt;br/&gt; &lt;div style=&#39;clear: both; text-align: center; font-size: xx-small;&#39;&gt;Published with Blogger-droid v1.6.9&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/1123041263729256559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/05/ora-00214-control-file-version.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/1123041263729256559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/1123041263729256559'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/05/ora-00214-control-file-version.html' title='ORA-00214 : Control file version inconsistent and ORA-01033:'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-7050919847264311207</id><published>2011-05-13T09:44:00.001-07:00</published><updated>2011-09-17T21:38:23.548-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><title type='text'>Maximum number of datafiles for an Oracle database</title><content type='html'>The maximum number of datafiles an Oracle database can have is controlled by the parameter , &#39;db_files&#39;. You can find the maximum number of datafiles for a database as shown below. &lt;br/&gt; &lt;code&gt; &lt;br/&gt; SQL&gt; show parameter db_files &lt;br/&gt;  &lt;br/&gt; NAME                                 TYPE        VALUE &lt;br/&gt; ------------------------------------------------- ----------- ------------------------------ &lt;br/&gt; db_files.                              integer     200 &lt;br/&gt; SQL&gt; &lt;br/&gt; &lt;/code&gt; &lt;br/&gt; You can change or increase the value of this using ALTER SYSTEM command.&lt;div style=&#39;clear: both; text-align: center; font-size: xx-small;&#39;&gt;Published with Blogger-droid v1.6.9&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/7050919847264311207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/05/maximum-number-of-datafiles-for-oracle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/7050919847264311207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/7050919847264311207'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/05/maximum-number-of-datafiles-for-oracle.html' title='Maximum number of datafiles for an Oracle database'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-4789174178057851719</id><published>2011-05-05T20:44:00.001-07:00</published><updated>2011-09-17T21:38:23.475-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><title type='text'>Delete / Drop Database using dbca silent option</title><content type='html'>You can delete or drop a databse using dbca in silent or gui mode. This is how you can use dbca silent mode to delete a database. &lt;br/&gt; SourceDB - ORACLE_SID of the target databse which has to be dropped. &lt;br/&gt; &lt;br/&gt; &lt;code&gt; &lt;br/&gt; Oracle@N880 ~]$ ./bin/dbca -silent -deleteDatabase -sourceDB M9W1 &lt;br/&gt; Connecting to database &lt;br/&gt; 4% complete &lt;br/&gt; 9% complete &lt;br/&gt; 14% complete &lt;br/&gt; 47% complete &lt;br/&gt; Updating network configuration files &lt;br/&gt; 48% complete &lt;br/&gt; 52% complete &lt;br/&gt; Deleting instance and datafiles &lt;br/&gt; 76% complete &lt;br/&gt; 100% complete &lt;br/&gt; Look at the log file &quot;/applns/oracle/cfgtoollogs/dbca/M9W1.log&quot; for further details. &lt;br/&gt; &lt;/code&gt; &lt;div style=&#39;clear: both; text-align: center; font-size: xx-small;&#39;&gt;Published with Blogger-droid v1.6.8&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/4789174178057851719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/05/delete-drop-database-using-dbca-silent.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/4789174178057851719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/4789174178057851719'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/05/delete-drop-database-using-dbca-silent.html' title='Delete / Drop Database using dbca silent option'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-3573601068758515018</id><published>2011-05-05T01:14:00.001-07:00</published><updated>2011-09-17T21:38:23.452-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><title type='text'></title><content type='html'>These two roles are defined automatically for Oracle databases.The privileges associated with these role changed from 9i,10g R1 and 10g R2.Before you assign this role to a new user, you can see what all privileges a user granted with this role can get, using the below queries. &lt;br /&gt;  &lt;br /&gt; &lt;code&gt; &lt;br /&gt; SQL&gt; select banner from v$version; &lt;br /&gt;  &lt;br /&gt; BANNER &lt;br /&gt; ---------------------------------------------------------------- &lt;br /&gt; Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod &lt;br /&gt; PL/SQL Release 10.2.0.4.0 - Production &lt;br /&gt; CORE    10.2.0.4.0      Production &lt;br /&gt; TNS for Solaris: Version 10.2.0.4.0 - Production &lt;br /&gt; NLSRTL Version 10.2.0.4.0 - Production &lt;br /&gt;  &lt;br /&gt; SQL&gt; select grantee, privilege, admin_option from dba_sys_privs where grantee=&#39;CONNECT&#39;; &lt;br /&gt;  &lt;br /&gt; GRANTEE                        PRIVILEGE                                ADM &lt;br /&gt; ------------------------------ ---------------------------------------- --- &lt;br /&gt; CONNECT                        CREATE SESSION                           NO &lt;br /&gt;  &lt;br /&gt; SQL&gt; select grantee, privilege, admin_option from dba_sys_privs where grantee=&#39;RESOURCE&#39;; &lt;br /&gt;  &lt;br /&gt; GRANTEE                        PRIVILEGE                                ADM &lt;br /&gt; ------------------------------ ---------------------------------------- --- &lt;br /&gt; RESOURCE                       CREATE TRIGGER                           NO &lt;br /&gt; RESOURCE                       CREATE SEQUENCE                          NO &lt;br /&gt; RESOURCE                       CREATE TYPE                              NO &lt;br /&gt; RESOURCE                       CREATE PROCEDURE                         NO &lt;br /&gt; RESOURCE                       CREATE CLUSTER                           NO &lt;br /&gt; RESOURCE                       CREATE OPERATOR                          NO &lt;br /&gt; RESOURCE                       CREATE INDEXTYPE                         NO &lt;br /&gt; RESOURCE                       CREATE TABLE                             NO &lt;br /&gt;  &lt;br /&gt; &lt;/code&gt; &lt;br /&gt;  &lt;br /&gt; &lt;div style=&#39;clear: both; text-align: center; font-size: xx-small;&#39;&gt;Published with Blogger-droid v1.6.8&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/3573601068758515018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/05/differeneces-between-connect-and_05.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/3573601068758515018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/3573601068758515018'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/05/differeneces-between-connect-and_05.html' title=''/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-8010903406864270042</id><published>2011-04-26T15:47:00.000-07:00</published><updated>2011-09-17T21:38:23.555-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><title type='text'>Frequency of archive log generation.</title><content type='html'>&lt;p&gt;Find the frequency in which archive logs are generated for a database.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;This will give the number of archive logs generated for each day.&lt;/p&gt;&lt;br/&gt;&lt;blockquote&gt;&lt;p&gt;SQL&amp;gt; select count(*),trunc(first_time) from v$log_history group by trunc(first_time) order by trunc(first_time);&lt;/p&gt;&lt;br/&gt;&lt;p&gt;  COUNT(*) TRUNC(FIR&lt;br/&gt;---------- ---------&lt;br/&gt;         2 05-APR-11&lt;br/&gt;        44 06-APR-11&lt;br/&gt;        42 07-APR-11&lt;br/&gt;        42 08-APR-11&lt;br/&gt;        43 09-APR-11&lt;br/&gt;        43 10-APR-11&lt;br/&gt;        42 11-APR-11&lt;br/&gt;        45 12-APR-11&lt;br/&gt;        43 13-APR-11&lt;br/&gt;        43 14-APR-11&lt;br/&gt;        43 15-APR-11&lt;/p&gt;&lt;br/&gt;&lt;p&gt;  COUNT(*) TRUNC(FIR&lt;br/&gt;---------- ---------&lt;br/&gt;        43 16-APR-11&lt;br/&gt;        49 17-APR-11&lt;br/&gt;        46 18-APR-11&lt;br/&gt;        14 19-APR-11&lt;/p&gt;&lt;br/&gt;&lt;p&gt;15 rows selected.&lt;/p&gt;&lt;br/&gt;&lt;/blockquote&gt;&lt;br/&gt;&lt;p&gt;If you want to know at what time log switches happened for each day, you can use the below query.&lt;/p&gt;&lt;br/&gt;&lt;blockquote&gt;&lt;p&gt;SQL&amp;gt; SELECT TO_CHAR(first_time,&#39;YYYY-MON-DD&#39;) DAY,&lt;br/&gt;  2    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;00&#39;,1,0)),&#39;99&#39;) &quot;00&quot;,&lt;br/&gt;  3    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;01&#39;,1,0)),&#39;99&#39;) &quot;01&quot;,&lt;br/&gt;  4    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;02&#39;,1,0)),&#39;99&#39;) &quot;02&quot;,&lt;br/&gt;  5    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;03&#39;,1,0)),&#39;99&#39;) &quot;03&quot;,&lt;br/&gt;  6    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;04&#39;,1,0)),&#39;99&#39;) &quot;04&quot;,&lt;br/&gt;  7    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;05&#39;,1,0)),&#39;99&#39;) &quot;05&quot;,&lt;br/&gt;  8    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;06&#39;,1,0)),&#39;99&#39;) &quot;06&quot;,&lt;br/&gt;  9    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;07&#39;,1,0)),&#39;99&#39;) &quot;07&quot;,&lt;br/&gt; 10    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;08&#39;,1,0)),&#39;99&#39;) &quot;08&quot;,&lt;br/&gt; 11    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;09&#39;,1,0)),&#39;99&#39;) &quot;09&quot;,&lt;br/&gt; 12    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;10&#39;,1,0)),&#39;99&#39;) &quot;10&quot;,&lt;br/&gt; 13    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;11&#39;,1,0)),&#39;99&#39;) &quot;11&quot;,&lt;br/&gt; 14    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;12&#39;,1,0)),&#39;99&#39;) &quot;12&quot;,&lt;br/&gt; 15    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;13&#39;,1,0)),&#39;99&#39;) &quot;13&quot;,&lt;br/&gt; 16    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;14&#39;,1,0)),&#39;99&#39;) &quot;14&quot;,&lt;br/&gt; 17    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;15&#39;,1,0)),&#39;99&#39;) &quot;15&quot;,&lt;br/&gt; 18    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;16&#39;,1,0)),&#39;99&#39;) &quot;16&quot;,&lt;br/&gt; 19    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;17&#39;,1,0)),&#39;99&#39;) &quot;17&quot;,&lt;br/&gt; 20    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;18&#39;,1,0)),&#39;99&#39;) &quot;18&quot;,&lt;br/&gt; 21    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;19&#39;,1,0)),&#39;99&#39;) &quot;19&quot;,&lt;br/&gt; 22    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;20&#39;,1,0)),&#39;99&#39;) &quot;20&quot;,&lt;br/&gt; 23    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;22&#39;,1,0)),&#39;99&#39;) &quot;22&quot;,&lt;br/&gt; 24    TO_CHAR(SUM(DECODE(TO_CHAR(first_time,&#39;HH24&#39;),&#39;23&#39;,1,0)),&#39;99&#39;) &quot;23&quot;&lt;br/&gt; 25  FROM v$log_history&lt;br/&gt; 26  GROUP BY TO_CHAR(first_time,&#39;YYYY-MON-DD&#39;)&lt;br/&gt; 27  ORDER BY TO_CHAR(first_time,&#39;YYYY-MON-DD&#39;) ;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;DAY         00  01  02  03  04  05  06  07  08  09  10  11  12  13  14  15  16  17  18  19  20  22  23&lt;br/&gt;----------- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---&lt;br/&gt;2011-APR-05   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   2&lt;br/&gt;2011-APR-06   5   0   3   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   2  16&lt;br/&gt;2011-APR-07   4   0   3   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   2  15&lt;br/&gt;2011-APR-08   4   0   3   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   2  15&lt;br/&gt;2011-APR-09   5   0   3   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   2  15&lt;br/&gt;2011-APR-10   5   0   3   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   2  15&lt;br/&gt;2011-APR-11   5   0   3   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   2  14&lt;br/&gt;2011-APR-12   7   0   3   0   2   0   2   0   2   0   2   0   2   1   2   0   2   0   2   0   2   2  14&lt;br/&gt;2011-APR-13   6   0   3   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   2  14&lt;br/&gt;2011-APR-14   6   0   3   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   2  14&lt;br/&gt;2011-APR-15   6   0   3   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   2  14&lt;/p&gt;&lt;br/&gt;&lt;p&gt;DAY         00  01  02  03  04  05  06  07  08  09  10  11  12  13  14  15  16  17  18  19  20  22  23&lt;br/&gt;----------- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---&lt;br/&gt;2011-APR-16   6   0   3   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   2  14&lt;br/&gt;2011-APR-17   7   0   3   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   2  19&lt;br/&gt;2011-APR-18   2   2   3   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   0   2   2  19&lt;br/&gt;2011-APR-19   2   0   3   0   2   0   2   0   2   0   2   0   1   0   0   0   0   0   0   0   0   0   0&lt;/p&gt;&lt;br/&gt;&lt;/blockquote&gt;&lt;br/&gt;&lt;p&gt;The retention period or the history of log switches / arvchive log generation in v$log_history is controlled by MAXLOGHISTORY. This is specified during database creation or control file creation.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;You can query this as shown below.&lt;br/&gt;&lt;/p&gt;&lt;br/&gt;&lt;blockquote&gt;&lt;p&gt;&lt;br/&gt;SQL&amp;gt; select type,records_used  from v$controlfile_record_section where type like &#39;LOG%&#39;&lt;br/&gt;  2  ;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;TYPE                         RECORDS_USED&lt;br/&gt;---------------------------- ------------&lt;br/&gt;LOG HISTORY                           584&lt;/p&gt;&lt;br/&gt;&lt;p&gt;SQL&amp;gt; select count(*) from v$log_history;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;  COUNT(*)&lt;br/&gt;----------&lt;br/&gt;       584&lt;br/&gt;       &lt;br/&gt;&lt;/p&gt;&lt;br/&gt;&lt;/blockquote&gt;&lt;br/&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/8010903406864270042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/04/frequency-of-archive-log-generation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/8010903406864270042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/8010903406864270042'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/04/frequency-of-archive-log-generation.html' title='Frequency of archive log generation.'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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-7229519207479719842.post-6383026605310972225</id><published>2011-04-26T15:40:00.000-07:00</published><updated>2011-09-17T21:38:23.535-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Database Administration"/><title type='text'>Put files in remote machine by FTP in background</title><content type='html'>&lt;p&gt;If you have a requirement to put files from one machine to a remote machine where the client in which you are connecting might disconnect after some time out. In this case you would want the file transfer to take place in background ( in server ).Here is a small shell script which can put files in background. This is for solaris.&lt;/p&gt;&lt;br/&gt;&lt;blockquote&gt;&lt;p&gt;#!/bin/sh&lt;br/&gt;HOST=&#39;remote machine ip&#39;&lt;br/&gt;USER=&#39;remote machine user name&#39;&lt;br/&gt;PASSWD=&#39;remote machine user password&#39;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;ftp -n $HOST &amp;lt;&amp;lt;END_SCRIPT&lt;br/&gt;quote USER $USER&lt;br/&gt;quote PASS $PASSWD&lt;br/&gt;prompt off&lt;br/&gt;cd /data1/oracle/rman -- source directory where your files are present&lt;br/&gt;mput *&lt;br/&gt;quit&lt;br/&gt;END_SCRIPT&lt;br/&gt;exit 0&lt;/p&gt;&lt;br/&gt;&lt;/blockquote&gt;&lt;br/&gt;&lt;p&gt;You can check whether the process is running as shown below.&lt;/p&gt;&lt;br/&gt;&lt;blockquote&gt;&lt;p&gt;-bash-3.00$ ps -ef | grep scriptname&lt;/p&gt;&lt;br/&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://ora-ssn.blogspot.com/feeds/6383026605310972225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ora-ssn.blogspot.com/2011/04/put-files-in-remote-machine-by-ftp-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/6383026605310972225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7229519207479719842/posts/default/6383026605310972225'/><link rel='alternate' type='text/html' href='http://ora-ssn.blogspot.com/2011/04/put-files-in-remote-machine-by-ftp-in.html' title='Put files in remote machine by FTP in background'/><author><name>Sreejith Nair</name><uri>http://www.blogger.com/profile/04058899850449535682</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>