<?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: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-6726343810795707505</id><updated>2011-07-08T01:35:15.929+02:00</updated><title type='text'>Laurent Leturgez's blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://laurentleturgez.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://laurentleturgez.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Laurent Leturgez</name><uri>http://www.blogger.com/profile/15794577109522905455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6726343810795707505.post-4318029706466649329</id><published>2011-02-10T12:11:00.001+01:00</published><updated>2011-02-10T12:11:46.980+01:00</updated><title type='text'>I moved to Wordpress</title><content type='html'>I decided to move my blog to wordpress.&lt;br /&gt;You can access it at this address : &lt;a href="http://laurentleturgez.wordpress.com/"&gt;http://laurentleturgez.wordpress.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;See you soon !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6726343810795707505-4318029706466649329?l=laurentleturgez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/4318029706466649329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/4318029706466649329'/><link rel='alternate' type='text/html' href='http://laurentleturgez.blogspot.com/2011/02/i-moved-to-wordpress.html' title='I moved to Wordpress'/><author><name>Laurent Leturgez</name><uri>http://www.blogger.com/profile/15794577109522905455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6726343810795707505.post-483755434361022654</id><published>2011-02-09T18:02:00.008+01:00</published><updated>2011-02-09T22:15:31.354+01:00</updated><title type='text'>Control bug fixes activation in Oracle</title><content type='html'>&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span style="font-size: 85%; " &gt;When you upgrade oracle database version, you can be faced to a problem of CBO that changes its behaviour.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span style="font-size: 85%; " &gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span style="font-size: 85%; " &gt;To do this, Oracle have introduced an undocumented parameter : "_fix_control" (Since 10.2.0.2). With this parameter, you can unable or disable a bug fixe to see, for example, if the CBO behaviour is controlled by a bug fix or not.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span style="font-size: 85%; " &gt;Off course, this kind of tests have to be implemented for testing purposes only !&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span style="font-size: 85%; " &gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span style="font-size: 85%; " &gt;To see what bug fix is implemented on your database, oracle have implemented two views V$SYSTEM_FIX_CONTROL and V$SESSION_FIX_CONTROL.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span style="font-size: 85%; " &gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span style="font-size: 85%; " &gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span style="font-size: 85%; " &gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span style="font-size: 85%; " &gt;In these views, you will find information about the bug number, a short description, and the value of the parameter optimizer_features_enabled in which the bug fix is activated.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span style="font-size: 85%; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:Trebuchet MS;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:trebuchet ms;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:trebuchet ms;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span&gt;&lt;span  &gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;SQL&gt;&lt;span&gt; &lt;/span&gt;select bugno,value,description,optimizer_feature_enable,is_default from v$system_fix_control;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;BUGNO&lt;span&gt; &lt;/span&gt;VALUE DESCRIPTION&lt;span&gt; &lt;/span&gt;OPTIMIZER_FEATURE_ENABLE&lt;span&gt; &lt;/span&gt;IS_DEFAULT&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;---------- ---------- ---------------------------------------------------------------- ------------------------- ----------&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;3834770&lt;span&gt; &lt;/span&gt;1 Lift restriction on unnest subquery with a view&lt;span&gt; &lt;/span&gt;8.0.0&lt;span&gt; &lt;/span&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;3746511&lt;span&gt; &lt;/span&gt;1 do not combine predicates from LNNVL&lt;span&gt; &lt;/span&gt;8.0.0&lt;span&gt; &lt;/span&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;4519016&lt;span&gt; &lt;/span&gt;1 Pick view card from view qb instead of parent qb&lt;span&gt; &lt;/span&gt;9.2.0&lt;span&gt; &lt;/span&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;3118776&lt;span&gt; &lt;/span&gt;1 Check for obj# for named view estimated card&lt;span&gt; &lt;/span&gt;9.2.0.8&lt;span&gt; &lt;/span&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;4488689&lt;span&gt; &lt;/span&gt;1 ignore IS NOT NULL predicate as an index filter&lt;span&gt; &lt;/span&gt;10.2.0.2&lt;span&gt; &lt;/span&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;2194204&lt;span&gt; &lt;/span&gt;0 disable push predicate driven by func. index into partition view&lt;span&gt; &lt;/span&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;2660592&lt;span&gt; &lt;/span&gt;1 do not trigger bitmap plans if no protential domain index driver 8.1.7&lt;span&gt; &lt;/span&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;2320291&lt;span&gt; &lt;/span&gt;1 push into table with RLS&lt;span&gt; &lt;/span&gt;9.2.0&lt;span&gt; &lt;/span&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;2324795&lt;span&gt; &lt;/span&gt;1 add(remove) cluster index for push view&lt;span&gt; &lt;/span&gt;8.1.7&lt;span&gt; &lt;/span&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;4308414&lt;span&gt; &lt;/span&gt;1 outer query must have more than one table unless lateral view&lt;span&gt; &lt;/span&gt;10.1.0.5&lt;span&gt; &lt;/span&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;3499674&lt;span&gt; &lt;/span&gt;0 enable tiny index improvements: consider small indexes as cachhe&lt;span&gt; &lt;/span&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;4569940&lt;span&gt; &lt;/span&gt;1 Use index heuristic for join pred being pushed&lt;span&gt; &lt;/span&gt;10.1.0.5&lt;span&gt; &lt;/span&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;4631959&lt;span&gt; &lt;/span&gt;1 Refine criteria for additional phase in JPPD&lt;span&gt; &lt;/span&gt;10.2.0.2&lt;span&gt; &lt;/span&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;4519340&lt;span&gt; &lt;/span&gt;1 Generate distinct view in SU if candidate for JPPD&lt;span&gt; &lt;/span&gt;10.2.0.2&lt;span&gt; &lt;/span&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;4550003&lt;span&gt; &lt;/span&gt;1 do not consider no sel predicates in join selectivity sanity&lt;span&gt; &lt;/span&gt;10.1.0&lt;span&gt; &lt;/span&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  &gt;.../....&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;In this example, we can see that the bug fix #4488689 is activated in our database (because of the value parameter set to 1).&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;We can see too that some og the buf fixes are not activated by default (ex: 2194204)&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;You can have a session view by querying the V$SESSION_FIX_CONTROL.&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Now, if you want to test to desactivate a bug fix, you can do it by using the _fix_control undocumented parameter.&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:trebuchet ms;font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:trebuchet ms;font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;To disable a bug fix, you have to specify the bug number completed by ON or OFF&lt;/span&gt;. &lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:Trebuchet MS;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:Trebuchet MS;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:trebuchet ms;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:trebuchet ms;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;For example: &lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:Trebuchet MS;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:trebuchet ms;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span  &gt;-- To deactivate a single bug fix:&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span  &gt;SQL&gt; alter session set "_fix_control"='4488689:OFF';&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span  &gt;-- To deactivate many bug fixes:&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span  &gt;SQL&gt; alter session set "_fix_control"='4488689:OFF','4631959:OFF','4519340:OFF';&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span  &gt;-- To activate it, you have to use ON instead of OFF&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; "&gt;&lt;span  &gt;SQL&gt; alter session set "_fix_control"='4488689:ON';&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span style="font-size: 85%; "&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span style="font-size: 85%; "&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;If we control the V$SESSION_FIX_CONTROL view on these specific bug fixes, we can view that they are desactivated (value column equals 0).&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span style="font-size: 85%; "&gt;SQL&gt;&lt;span&gt; &lt;/span&gt;select SESSION_ID,BUGNO,VALUE,OPTIMIZER_FEATURE_ENABLE,IS_DEFAULT&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span class="Apple-style-span"&gt;&lt;span&gt;&lt;/span&gt;&lt;span style="font-size: 85%; "&gt;2&lt;span&gt; &lt;/span&gt;from V$SESSION_FIX_CONTROL&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in"&gt;&lt;span class="Apple-style-span"&gt;&lt;span&gt;&lt;/span&gt;&lt;span style="font-size: 85%; "&gt;3&lt;span&gt; &lt;/span&gt;where session_id=sys_context('USERENV','SID') and bugno in (4488689,4631959,4519340);&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in"&gt;&lt;span style="font-size: 85%; "&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in"&gt;&lt;span style="font-size: 85%; "&gt;SESSION_ID&lt;span&gt; &lt;/span&gt;BUGNO&lt;span&gt; &lt;/span&gt;VALUE OPTIMIZER_FEATURE_ENABLE&lt;span&gt; &lt;/span&gt;IS_DEFAULT&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in"&gt;&lt;span style="font-size: 85%; "&gt;---------- ---------- ---------- ------------------------- ----------&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span class="Apple-style-span"&gt;&lt;span&gt;&lt;/span&gt;&lt;span style="font-size: 85%; "&gt;22&lt;span&gt; &lt;/span&gt;4488689&lt;span&gt; &lt;/span&gt;0 10.2.0.2&lt;span&gt; &lt;/span&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span class="Apple-style-span"&gt;&lt;span&gt;&lt;/span&gt;&lt;span style="font-size: 85%; "&gt;22&lt;span&gt; &lt;/span&gt;4631959&lt;span&gt; &lt;/span&gt;0 10.2.0.2&lt;span&gt; &lt;/span&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-size: 11pt; "&gt;&lt;span class="Apple-style-span"&gt;&lt;span&gt;&lt;/span&gt;&lt;span style="font-size: 85%; "&gt;22&lt;span&gt; &lt;/span&gt;4519340&lt;span&gt; &lt;/span&gt;0 10.2.0.2&lt;span&gt; &lt;/span&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in; FONT-FAMILY: Calibri; FONT-SIZE: 11pt"&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in; FONT-FAMILY: Calibri; FONT-SIZE: 11pt"&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0in; FONT-FAMILY: Calibri; FONT-SIZE: 11pt"&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6726343810795707505-483755434361022654?l=laurentleturgez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/483755434361022654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/483755434361022654'/><link rel='alternate' type='text/html' href='http://laurentleturgez.blogspot.com/2011/02/control-bug-fixes-activation-in-oracle.html' title='Control bug fixes activation in Oracle'/><author><name>Laurent Leturgez</name><uri>http://www.blogger.com/profile/15794577109522905455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6726343810795707505.post-5151213101157892490</id><published>2010-09-08T17:25:00.014+02:00</published><updated>2010-09-10T16:37:32.418+02:00</updated><title type='text'>Disassembling V$ views</title><content type='html'>&lt;div&gt;If you are instesting by Oracle Internals, maybe you have already tried to use the DBMS_METADATA Package&lt;span class="Apple-style-span" style="font-size: medium;"&gt; to get th&lt;/span&gt;e definition code of an Oracle static view :&lt;br /&gt;&lt;br /&gt;&lt;demo&gt;&lt;span style="font-family:courier new;"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;SQL&gt; set long 5000&lt;br /&gt;SQL&gt; set pages 5000&lt;br /&gt;SQL&gt; select dbms_metadata.get_ddl('VIEW','DBA_DATA_FILES') from dual;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:Georgia, serif;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;DBMS_METADATA.GET_DDL('VIEW','DBA_DATA_FILES')&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;----------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;  CREATE OR REPLACE FORCE VIEW "SYS"."DBA_DATA_FILES" ("FILE_NAME", "F&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ILE_ID", "TABLESPACE_NAME", "BYTES", "BLOCKS", "STATUS", "RELATIVE_FNO&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;", "AUTOEXTENSIBLE", "MAXBYTES", "MAXBLOCKS", "INCREMENT_BY", "USER_BY&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;TES", "USER_BLOCKS", "ONLINE_STATUS") AS&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;  select v.name, f.file#, ts.name,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;       ts.blocksize * f.blocks, f.blocks,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;       decode(f.status$, 1, 'INVALID', 2, 'AVAILABLE', 'UNDEFINED'),&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;       f.relfile#, decode(f.inc, 0, 'NO', 'YES'),&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;       ts.blocksize * f.maxextend, f.maxextend, f.inc,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;       ts.blocksize * (f.blocks - 1), f.blocks - 1,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;       decode(fe.fetsn, 0, decode(bitand(fe.festa, 2), 0, 'SYSOFF', 'S&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;YSTEM'),&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;         decode(bitand(fe.festa, 18), 0, 'OFFLINE', 2, 'ONLINE', 'RECO&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;VER'))&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;from sys.file$ f, sys.ts$ ts, sys.v$dbfile v, x$kccfe fe&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;where v.file# = f.file#&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;  and f.spare1 is NULL&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;  and f.ts# = ts.ts#&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;  and fe.fenum = f.file#&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;union all&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;select&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;.../...&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/demo&gt;&lt;/div&gt;&lt;div&gt;&lt;demo&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;But if you try to get the definition code of the "V$" dynamic views, you will obtain a strange output which mentioned a call to V$DATAFILE (at the end) &lt;/demo&gt;&lt;/div&gt;&lt;div&gt;&lt;demo&gt;&lt;br /&gt;&lt;/demo&gt;&lt;/div&gt;&lt;div&gt;&lt;demo&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style=" ;font-size:x-small;"&gt;SQL&gt; select dbms_metadata.get_ddl('VIEW','V_$DATAFILE') from dual;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;DBMS_METADATA.GET_DDL('VIEW','V_$DATAFILE')&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;----------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;  CREATE OR REPLACE FORCE VIEW "SYS"."V_$DATAFILE" ("FILE#", "CREATION&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;_CHANGE#", "CREATION_TIME", "TS#", "RFILE#", "STATUS", "ENABLED", "CHE&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;CKPOINT_CHANGE#", "CHECKPOINT_TIME", "UNRECOVERABLE_CHANGE#", "UNRECOV&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ERABLE_TIME", "LAST_CHANGE#", "LAST_TIME", "OFFLINE_CHANGE#", "ONLINE_&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;CHANGE#", "ONLINE_TIME", "BYTES", "BLOCKS", "CREATE_BYTES", "BLOCK_SIZ&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;E", "NAME", "PLUGGED_IN", "BLOCK1_OFFSET", "AUX_NAME", "FIRST_NONLOGGE&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;D_SCN", "FIRST_NONLOGGED_TIME", "FOREIGN_DBID", "FOREIGN_CREATION_CHAN&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;GE#", "FOREIGN_CREATION_TIME", "PLUGGED_READONLY", "PLUGIN_CHANGE#", "&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;PLUGIN_RESETLOGS_CHANGE#", "PLUGIN_RESETLOGS_TIME") AS&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;  select "FILE#","CREATION_CHANGE#","CREATION_TIME","TS#","RFILE#","ST&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ATUS","ENABLED","CHECKPOINT_CHANGE#","CHECKPOINT_TIME","UNRECOVERABLE_&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;CHANGE#","UNRECOVERABLE_TIME","LAST_CHANGE#","LAST_TIME","OFFLINE_CHAN&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;GE#","ONLINE_CHANGE#","ONLINE_TIME","BYTES","BLOCKS","CREATE_BYTES","B&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;LOCK_SIZE","NAME","PLUGGED_IN","BLOCK1_OFFSET","AUX_NAME","FIRST_NONLO&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;GGED_SCN","FIRST_NONLOGGED_TIME","FOREIGN_DBID","FOREIGN_CREATION_CHAN&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;GE#","FOREIGN_CREATION_TIME","PLUGGED_READONLY","PLUGIN_CHANGE#","PLUG&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;IN_RESETLOGS_CHANGE#","PLUGIN_RESETLOGS_TIME" &lt;b&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="color:#FF0000;"&gt;from v$datafile&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;demo&gt;&lt;demo&gt;In fact, dynamic performance view definition are stored in the V$FIXED_VIEW_DEFINITION.&lt;br /&gt;As in 10g and 11g, the V$ views are results of GV$ view, if you want to get the definition view of the V$DATAFILE, a better way is to query this view with the GV$DATAFILE definition.&lt;br /&gt;&lt;br /&gt;&lt;demo&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style=" ;font-size:x-small;"&gt;SELECT view_definition FROM&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:x-small;"&gt;2 v$fixed_view_definition&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:x-small;"&gt;3 WHERE view_name='V$DATAFILE'&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:x-small;"&gt;4 /&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;VIEW_DEFINITION&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;----------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;select  FILE# , CREATION_CHANGE# , CREATION_TIME , TS# , RFILE# , STAT&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;US , ENABLED , CHECKPOINT_CHANGE# , CHECKPOINT_TIME, UNRECOVERABLE_CHA&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;NGE#, UNRECOVERABLE_TIME, LAST_CHANGE# , LAST_TIME , OFFLINE_CHANGE# ,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt; ONLINE_CHANGE# , ONLINE_TIME , BYTES , BLOCKS , CREATE_BYTES , BLOCK_&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;SIZE , NAME, PLUGGED_IN, BLOCK1_OFFSET , AUX_NAME , FIRST_NONLOGGED_SC&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;N, FIRST_NONLOGGED_TIME, FOREIGN_DBID, FOREIGN_CREATION_CHANGE#, FOREI&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;GN_CREATION_TIME, PLUGGED_READONLY, PLUGIN_CHANGE#, PLUGIN_RESETLOGS_C&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;HANGE#, PLUGIN_RESETLOGS_TIME from GV$DATAFILE where inst_id = USERENV&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;('Instance')&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;SELECT view_definition FROM&lt;br /&gt;2 v$fixed_view_definition&lt;br /&gt;3 WHERE view_name='GV$DATAFILE'&lt;br /&gt;4 /&lt;br /&gt;&lt;div&gt;VIEW_DEFINITION&lt;/div&gt;&lt;div&gt;----------------------------------------------------------------------&lt;/div&gt;&lt;div&gt;select fe.inst_id,fe.fenum,to_number(fe.fecrc_scn), to_date(fe.fecrc_t&lt;/div&gt;&lt;div&gt;im,'MM/DD/RR HH24:MI:SS','NLS_CALENDAR=Gregorian'), fe.fetsn,fe.ferfn,&lt;/div&gt;&lt;div&gt; decode(fe.fetsn,0,decode(bitand(fe.festa,2),0,'SYSOFF','SYSTEM'),   d&lt;/div&gt;&lt;div&gt;ecode(bitand(fe.festa,18),0,'OFFLINE',2,'ONLINE','RECOVER')), decode(f&lt;/div&gt;&lt;div&gt;e.fedor,2,'READ ONLY',   decode(bitand(fe.festa, 12),     0,'DISABLED'&lt;/div&gt;&lt;div&gt;,4,'READ ONLY',12,'READ WRITE','UNKNOWN')), to_number(fe.fecps), to_da&lt;/div&gt;&lt;div&gt;te(fe.fecpt,'MM/DD/RR HH24:MI:SS','NLS_CALENDAR=Gregorian'), to_number&lt;/div&gt;&lt;div&gt;(fe.feurs), to_date(fe.feurt,'MM/DD/RR HH24:MI:SS','NLS_CALENDAR=Grego&lt;/div&gt;&lt;div&gt;rian'), to_number(fe.fests), decode(fe.fests,NULL,to_date(NULL),  to_d&lt;/div&gt;&lt;div&gt;ate(fe.festt,'MM/DD/RR HH24:MI:SS','NLS_CALENDAR=Gregorian')), to_numb&lt;/div&gt;&lt;div&gt;er(fe.feofs),to_number(fe.feonc_scn), to_date(fe.feonc_tim,'MM/DD/RR H&lt;/div&gt;&lt;div&gt;H24:MI:SS','NLS_CALENDAR=Gregorian'), fh.fhfsz*fe.febsz,fh.fhfsz,fe.fe&lt;/div&gt;&lt;div&gt;csz*fe.febsz,fe.febsz,fn.fnnam, fe.fefdb, fn.fnbof,  decode(fe.fepax,&lt;/div&gt;&lt;div&gt;0, 'UNKNOWN', 65535, 'NONE', fnaux.fnnam),     to_number(fh.fhfirstunr&lt;/div&gt;&lt;div&gt;ecscn),                                  to_date(fh.fhfirstunrectime,'&lt;/div&gt;&lt;div&gt;MM/DD/RR HH24:MI:SS','NLS_CALENDAR=Gregorian'), fe.fepdi, fe.fefcrs, f&lt;/div&gt;&lt;div&gt;e.fefcrt, decode(fe.fefdb, 1, 'YES', 'NO'),  fe.feplus, fe.feprls, fe.&lt;/div&gt;&lt;div&gt;feprlt  from x$kccfe fe, x$kccfn fn, x$kccfn fnaux, x$kcvfh fh   where&lt;/div&gt;&lt;div&gt;                                                               ((fe.fe&lt;/div&gt;&lt;div&gt;pax!=65535 and fe.fepax!=0 and fe.fepax=fnaux.fnnum)              or&lt;/div&gt;&lt;div&gt; ((fe.fepax=65535 or fe.fepax=0) and fe.fenum=fnaux.fnfno&lt;/div&gt;&lt;div&gt;         and fnaux.fntyp=4 and fnaux.fnnam is not null and&lt;/div&gt;&lt;div&gt;                bitand(fnaux.fnflg, 4) != 4&lt;/div&gt;&lt;div&gt;                       and fe.fefnh=fnaux.fnnum))&lt;/div&gt;&lt;div&gt;                        and fn.fnfno=fe.fenum and fn.fnfno=fh.hxfil an&lt;/div&gt;&lt;div&gt;d fe.fefnh=fn.fnnum            and fe.fedup!=0 and fn.fntyp=4 and fn.f&lt;/div&gt;&lt;div&gt;nnam is not null  and bitand(fn.fnflg, 4) != 4  order by fe.fenum&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;Now you know that GV$DATAFILE view is using x$kccfe, x$kccfn, x$kcvfh fixed tables. &lt;span style="font-family:courier new;font-size:78%;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;&lt;/span&gt;&lt;/demo&gt;&lt;/demo&gt;&lt;/demo&gt;&lt;/demo&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6726343810795707505-5151213101157892490?l=laurentleturgez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/5151213101157892490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/5151213101157892490'/><link rel='alternate' type='text/html' href='http://laurentleturgez.blogspot.com/2010/09/disassembling-v-views.html' title='Disassembling V$ views'/><author><name>Laurent Leturgez</name><uri>http://www.blogger.com/profile/15794577109522905455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6726343810795707505.post-57751480345785746</id><published>2010-04-26T23:15:00.004+02:00</published><updated>2010-06-29T21:57:03.861+02:00</updated><title type='text'>Convert a virtualBox disk to plug it into Vmware</title><content type='html'>Oracle VirtualBox is a powerful virtualization software used on workstation.&lt;br /&gt;The software is fitted with a set of powerful tools that can be used to migrate your disks to VMWare.&lt;br /&gt;&lt;br /&gt;If you want to migrate a hard disk initially built with Oracle Virtual Box (VDI) to a VM Ware hard disk. There's a very easy and it can be done in only two steps:&lt;br /&gt;&lt;br /&gt;- first step, you convert the vdi to a raw disk. To do it, you will use "vboxmanage" command from virtualbox&lt;br /&gt;&lt;blockquote&gt;G:\WM_disks&gt; "c:\Program Files\Sun\VirtualBox\vboxmanage" internalcommands converttoraw linux_1_d1.vdi linux_1_d1.raw&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;- and last step :) you convert the raw disk to a VMDK format disk. In this step, you can still use "vboxmanage" command from virtualbox&lt;br /&gt;&lt;blockquote&gt;G:\WM_disks&gt; "c:\Program Files\Sun\VirtualBox\vboxmanage" convertfromraw linux_1_d1.raw linux_1_d1.vmdk -format VMDK&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;The conversion is a little bit long and depends on the size of the disk.&lt;br /&gt;&lt;br /&gt;To finish, you can add the converted disk to an existing or new VM ware virtual machine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6726343810795707505-57751480345785746?l=laurentleturgez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/57751480345785746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/57751480345785746'/><link rel='alternate' type='text/html' href='http://laurentleturgez.blogspot.com/2010/04/convert-virtualbox-disk-to-vmware-disk.html' title='Convert a virtualBox disk to plug it into Vmware'/><author><name>Laurent Leturgez</name><uri>http://www.blogger.com/profile/15794577109522905455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6726343810795707505.post-3429081069971607007</id><published>2010-03-02T12:42:00.004+01:00</published><updated>2010-03-02T12:50:32.811+01:00</updated><title type='text'>I'm Back</title><content type='html'>A quick post to inform readers that I was a little bit busy last month because of my removal and because I have started a new job on a French Oracle consulting company &lt;a href="http://www.digora.com" target="_blank"&gt;DIGORA&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;So I will write  new posts next days !!!&lt;br /&gt;&lt;br /&gt;See you soon !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6726343810795707505-3429081069971607007?l=laurentleturgez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/3429081069971607007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/3429081069971607007'/><link rel='alternate' type='text/html' href='http://laurentleturgez.blogspot.com/2010/03/im-back.html' title='I&apos;m Back'/><author><name>Laurent Leturgez</name><uri>http://www.blogger.com/profile/15794577109522905455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6726343810795707505.post-7574667376456253477</id><published>2010-01-22T10:18:00.002+01:00</published><updated>2010-01-22T10:20:44.074+01:00</updated><title type='text'>Good news</title><content type='html'>EU has officially validated the acquisition of Sun Microsystems by Oracle.&lt;br /&gt;That's a really good news for Sun hardware and Software.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6726343810795707505-7574667376456253477?l=laurentleturgez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/7574667376456253477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/7574667376456253477'/><link rel='alternate' type='text/html' href='http://laurentleturgez.blogspot.com/2010/01/good-news.html' title='Good news'/><author><name>Laurent Leturgez</name><uri>http://www.blogger.com/profile/15794577109522905455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6726343810795707505.post-6711776448509966715</id><published>2009-11-19T16:02:00.006+01:00</published><updated>2009-11-19T17:46:02.333+01:00</updated><title type='text'>Oracle 11g md_restore and compatible.rdbms</title><content type='html'>I have recently made a restore test of my diskgroup metadata with the new version of oracle server : 11.2.0.1.&lt;br /&gt;&lt;br /&gt;Initially, I have created a TEST_DG diskgroup with the new asmca interface.&lt;br /&gt;As I had a 10g database on my laptop, I have set the compatibility.rdbms parameter on 10.2.0.0.&lt;br /&gt;After a rapid md_backup command to save my diskgroup metadatas, I have tried to restore it with the md_restore command.&lt;br /&gt;&lt;br /&gt;What a surprise when I saw this error message:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;ASMCMD [+] &gt; md_restore md_backup.sav -G TEST_DG&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Current Diskgroup metadata being restored: TEST_DG&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ASMCMD-09352: CREATE DISKGROUP failed&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ORA-15018: diskgroup cannot be created&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ORA-15283: ASM operation requires compatible.rdbms of 11.1.0.7.0 or higher (DBD ERROR: OCIStmtExecute)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After a short research, I realize that the CREATE DISKGROUP command is generated like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;create diskgroup TEST_DG EXTERNAL redundancy  disk '/dev/oracleasm/disks/ASM10' name TEST_DG_0001 size 100M  disk '/dev/oracleasm/disks/ASM05' name&lt;br /&gt;TEST_DG_0000 size 100M attribute 'compatible.asm' = '11.2.0.0.0' , 'compatible.rdbms' = '10.2.0.0.0' , 'au_size' = '1048576', 'sector_size' = '512&lt;br /&gt;', 'cell.smart_scan_capable' = 'FALSE';&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;And this command uses properties which have been introduced in Oracle 11g release (for example: sector_size). Next command works fine:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;create diskgroup TEST_DG EXTERNAL redundancy disk '/dev/oracleasm/disks/ASM10' name TEST_DG_0001 size 100M disk '/dev/oracleasm/disks/ASM05' name&lt;br /&gt;TEST_DG_0000 size 100M attribute 'compatible.asm' = '11.2.0.0.0' , 'compatible.rdbms' = '10.2.0.0.0' &lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;So, if like me, you have some Oracle 10g databases that run on an ASM 11g release, you have to restore your diskgroup metadata in an SQL file (by using -S option of the md_restore command) and adapt the DDLs for your needs.&lt;br /&gt;&lt;br /&gt;Not really easy ! ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6726343810795707505-6711776448509966715?l=laurentleturgez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/6711776448509966715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/6711776448509966715'/><link rel='alternate' type='text/html' href='http://laurentleturgez.blogspot.com/2009/11/oracle-112-mdrestore-doesnt-want-to.html' title='Oracle 11g md_restore and compatible.rdbms'/><author><name>Laurent Leturgez</name><uri>http://www.blogger.com/profile/15794577109522905455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6726343810795707505.post-899763428980621489</id><published>2009-11-05T16:02:00.010+01:00</published><updated>2010-05-25T15:04:52.011+02:00</updated><title type='text'>delete ADR "problems"</title><content type='html'>When you are using adrci to interface adr you can easily purge incidents, health monitor reports etc...&lt;br /&gt;&lt;br /&gt;... but you can't purge problems:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;adrci&gt; help purge&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  Usage: PURGE [[-i &lt;id1&gt; | &lt;id1&gt; &lt;id2&gt;] |&lt;/id2&gt;&lt;/id1&gt;&lt;/id1&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;               [-age &lt;mins&gt; [-type ALERT|INCIDENT|TRACE|CDUMP|HM|UTSCDMP]]]:&lt;/mins&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  Purpose: Purge the diagnostic data in the current ADR home. If no&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;           option is specified, the default purging policy will be used.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  Options:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    [-i id1 | id1 id2]: Users can input a single incident ID, or a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    range of incidents to purge.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    [-age &lt;mins&gt;]: Users can specify the purging policy either to all&lt;/mins&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    the diagnostic data or the specified type. The data older than &lt;mins&gt;&lt;/mins&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    ago will be purged&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    [-type ALERT|INCIDENT|TRACE|CDUMP|HM|UTSCDMP]: Users can specify what type of&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    data to be purged.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  Examples:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    purge&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    purge -i 123 456&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    purge -age 60 -type incident&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;No trace of problem purge :(&lt;br /&gt;&lt;br /&gt;If you want to delete those problems, you have to know about a SQL interface directly in adrci. (The "tables" represents XML files mappings, these files are located in the repository).&lt;br /&gt;&lt;br /&gt;So, I paste above a little example of a DELETE in adrci interface:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;adrci&gt; delete from problem;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;3 Rows Deleted&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;adrci&gt; commit;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Transaction Committed&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;adrci&gt; show problem&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ADR Home = /u01/app/oracle/diag/rdbms/racdb/racdb1:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;*************************************************************************&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;0 rows fetched&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Be careful, if you delete problems, you will loose the problem memory of your database.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6726343810795707505-899763428980621489?l=laurentleturgez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/899763428980621489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/899763428980621489'/><link rel='alternate' type='text/html' href='http://laurentleturgez.blogspot.com/2009/11/delete-adr-problems.html' title='delete ADR &quot;problems&quot;'/><author><name>Laurent Leturgez</name><uri>http://www.blogger.com/profile/15794577109522905455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6726343810795707505.post-2732043560067533385</id><published>2009-10-14T11:24:00.004+02:00</published><updated>2009-10-14T11:34:57.033+02:00</updated><title type='text'>Win $10 million, if your performance are better than exadata v2</title><content type='html'>Larry Ellison has announced a new challenge !&lt;br /&gt;If you win it you can earn $10 million.&lt;br /&gt;&lt;br /&gt;The challenge: if one of your existing database application cannot run twice as fast on exadata v2 system, those million are for you !&lt;br /&gt;&lt;br /&gt;Off course, IBM can challenge it ;)&lt;br /&gt;&lt;br /&gt;Read more here : &lt;a href="http://www.oracle.com/features/exadatachallenge.html"&gt;http://www.oracle.com/features/exadatachallenge.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6726343810795707505-2732043560067533385?l=laurentleturgez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/2732043560067533385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/2732043560067533385'/><link rel='alternate' type='text/html' href='http://laurentleturgez.blogspot.com/2009/10/win-10-million-if-your-performance-are.html' title='Win $10 million, if your performance are better than exadata v2'/><author><name>Laurent Leturgez</name><uri>http://www.blogger.com/profile/15794577109522905455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6726343810795707505.post-5109003934024903172</id><published>2009-09-25T09:28:00.004+02:00</published><updated>2009-09-29T10:33:10.385+02:00</updated><title type='text'>[11gR2 RAC] instances disappear from crs_stat output</title><content type='html'>In an Oracle 11g Release 2 Real Application Cluster configuration, your instances are located on the cluster nodes.&lt;br /&gt;&lt;br /&gt;In Oracle 10g, you could see where the instances were located by using the crs_stat -t command.&lt;br /&gt;&lt;br /&gt;In 11gR2, crs_stat output doesn't show instances as application.&lt;br /&gt;&lt;br /&gt;If you want to know where your instance is running, you must use srvctl command to get this information :&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ srvctl status instance -d racdb -i racdb1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Instance racdb1 is running on node linux1&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6726343810795707505-5109003934024903172?l=laurentleturgez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/5109003934024903172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/5109003934024903172'/><link rel='alternate' type='text/html' href='http://laurentleturgez.blogspot.com/2009/09/11gr2-rac-instances-disappear-from.html' title='[11gR2 RAC] instances disappear from crs_stat output'/><author><name>Laurent Leturgez</name><uri>http://www.blogger.com/profile/15794577109522905455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6726343810795707505.post-3432948186028899004</id><published>2009-09-22T10:16:00.005+02:00</published><updated>2009-09-22T10:24:46.966+02:00</updated><title type='text'>load ACFS on CentOS 5</title><content type='html'>In my last post, I wrote that acfs was not compatible on CentOS.&lt;br /&gt;So  I decided to search a solution ... and I found it.&lt;br /&gt;&lt;br /&gt;acfsload, the program who load the acfs driver makes an OS version check which fails.&lt;br /&gt;This program uses a perl module osds_acfslib.pm which is located on the $ORACLE_HOME/lib directory of the Grid Infrastructure.&lt;br /&gt;&lt;br /&gt;In this perl module, you can find at lines 280/281 the perl code that makes this version check. This check is only an "rpm -qa | grep release" !&lt;br /&gt;&lt;br /&gt;So if you are on a CentOS 5, you just  have to complete this line by adding a centos check :&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;[root@linux1 lib]# cd /u01/app/oracle/product/11.2.0/grid/lib&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[root@linux1 lib]# cp -p osds_acfslib.pm osds_acfslib.pm.ORIG&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;.../...&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;[root@linux1 lib]# diff osds_acfslib.pm osds_acfslib.pm.ORIG &lt;/span&gt;&lt;br /&gt;281,281&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;       ($release =~ /redhat-release-5/) || ($release =~ /centos-release-5/))&lt;/span&gt;&lt;br /&gt;---&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&gt;          ($release =~ /redhat-release-5/))&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When you have done this add-on, you must finish what the installer have failed ie. copy the acfs kernel modules at the right place and regenerate&lt;br /&gt;kernel module dependencies.&lt;br /&gt;&lt;br /&gt;NB: Be careful of your kernel version, in this example, I was using a 2.6.18-92.1.22.el5 kernel.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;[root@linux1 lib]# mkdir /lib/modules/2.6.18-92.1.22.el5/extra/usm&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;[root@linux1 lib]# cp /u01/app/oracle/product/11.2.0/grid/install/usm/EL5 /i386/2.6.18-8/2.6.18-8.el5-i686/bin/*.ko /lib/modules/2.6.18-92.1.22.el5/extra/usm/&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[root@linux1 lib]# chmod 744 /lib/modules/2.6.18-92.1.22.el5/extra/usm/*&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[root@linux1 lib]# depmod&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now you can execute the acfsload and load the acfs modules without warning:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;[root@linux1 lib]# /u01/app/oracle/product/11.2.0/grid/bin/acfsload start -s&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can check everything is loaded with the acfsdriverstate command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;[root@linux1 lib]# cd /u01/app/oracle/product/11.2.0/grid/bin&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[root@linux1 bin]# ./acfsdriverstate -orahome /u01/app/oracle/product/11.2.0/grid loaded&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ACFS-9203: TRUE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note, on the next reboot, you have to load the acfs modules, and mount the acfs filesystem.&lt;br /&gt;You can do this by writing you own init shell script based on the chkconfig format, and load it on the desired runlevel.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6726343810795707505-3432948186028899004?l=laurentleturgez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/3432948186028899004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/3432948186028899004'/><link rel='alternate' type='text/html' href='http://laurentleturgez.blogspot.com/2009/09/load-acfs-on-centos-5.html' title='load ACFS on CentOS 5'/><author><name>Laurent Leturgez</name><uri>http://www.blogger.com/profile/15794577109522905455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6726343810795707505.post-4910988531488422780</id><published>2009-09-15T20:19:00.003+02:00</published><updated>2009-09-15T20:25:14.095+02:00</updated><title type='text'>acfs is not compatible on CentOS</title><content type='html'>&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;span style="text-decoration: underline;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;[root@linux1 bin]# ./acfsload start -s&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;ADVM/ACFS is not supported on centos-release-5-2.el5.centos&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Yuk :(&lt;br /&gt;&lt;br /&gt;I'm searching for a solution&lt;/span&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6726343810795707505-4910988531488422780?l=laurentleturgez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/4910988531488422780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/4910988531488422780'/><link rel='alternate' type='text/html' href='http://laurentleturgez.blogspot.com/2009/09/acfs-is-not-compatible-on-centos.html' title='acfs is not compatible on CentOS'/><author><name>Laurent Leturgez</name><uri>http://www.blogger.com/profile/15794577109522905455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6726343810795707505.post-7820451234161060358</id><published>2009-09-10T16:55:00.005+02:00</published><updated>2009-09-11T08:10:24.028+02:00</updated><title type='text'>Generate a random date in Oracle</title><content type='html'>This morning, I had to generate a random date using DBMS_RANDOM package. As the documentation mentions this package can only generate alphanumeric and numeric value, I have to search a little bit.&lt;br /&gt;&lt;br /&gt;So the trick for generating a random date is to choose two dates between the random process will choose a date.&lt;br /&gt;&lt;br /&gt;Those dates will be translated to Julian format. As the Julian format is the number of days since January 1, 4712 BC, you can use the numeric random generation procedure of DBMS_RANDOM package.&lt;br /&gt;&lt;br /&gt;Let's see how we can generate a random date between 2009 Jan, 1st and 2009 Dec, 31st :&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;SQL&gt; create table t (d date);&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;Table created.&lt;br /&gt;&lt;br /&gt;SQL&gt; select to_char(to_date('2009/01/01','YYYY/MM/DD'),'J') "20090101",&lt;br /&gt; 2 to_char(to_date('2009/12/31','YYYY/MM/DD'),'J') "20091231"&lt;br /&gt; 3 from dual;&lt;br /&gt;&lt;br /&gt;2009010 2009123&lt;br /&gt;------- -------&lt;br /&gt;2454833 2455197&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;SQL&gt; begin &lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt; 2 for i in 1..5 loop &lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt; 3 insert into t values(&lt;br /&gt;    to_date(trunc(dbms_random.value(2454833,2455197)),'J')); &lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt; 4 end loop; &lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt; 5 end; &lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt; 6 /&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;PL/SQL procedure successfully completed.&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;SQL&gt; select * from t;&lt;br /&gt;D&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;----------------------&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;2009-NOV-30 12AM:00:00&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;2009-MAY-31 12AM:00:00&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;2009-SEP-01 12AM:00:00&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;2009-DEC-28 12AM:00:00&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;2009-MAY-03 12AM:00:00&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6726343810795707505-7820451234161060358?l=laurentleturgez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/7820451234161060358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/7820451234161060358'/><link rel='alternate' type='text/html' href='http://laurentleturgez.blogspot.com/2009/09/generate-random-date-in-oracle.html' title='Generate a random date in Oracle'/><author><name>Laurent Leturgez</name><uri>http://www.blogger.com/profile/15794577109522905455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6726343810795707505.post-8598257508442917247</id><published>2009-09-09T17:10:00.006+02:00</published><updated>2009-09-09T18:03:34.398+02:00</updated><title type='text'>Event for crashing an oracle session</title><content type='html'>&lt;span style="font-family:arial;"&gt;Thanks to &lt;/span&gt;&lt;a href="http://oracle.nativeread.com/"&gt;&lt;span style="font-family:arial;"&gt;Grimm &lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;for this information relayed by Laurent Schneider.&lt;br /&gt;&lt;br /&gt;This is a tricky method for crashing a session without disconnecting the user :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Session 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;- - - - - - -&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;SQL&gt; begin&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;2 while 2&gt;1 loop&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;3 null;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;4 end loop;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;5 end;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;6 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;/&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Session 2 (as user SYS or as user who has privilege to execute the package DBMS_SYSTEM.SET_EV)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;———-&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;SQL&gt; exec dbms_system.set_ev(sid,serial#,10237,4,'');&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;PL/SQL procedure successfully completed.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Session 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;————-&lt;br /&gt;ERROR at line 1:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;ORA-01013: user requested cancel of current operation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;The session is not killed, user is still connected -&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;If you want to perform other queries, administrator have to invalidate this event (exec dbms_system.set_ev(sid,serial#,10237,0,'');) otherwise you will encountered some "ORA-00604: error occurred at recursive SQL level 1" &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;SQL&gt; select * from v$version;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;BANNER&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;——————————————————————————–&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6726343810795707505-8598257508442917247?l=laurentleturgez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/8598257508442917247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/8598257508442917247'/><link rel='alternate' type='text/html' href='http://laurentleturgez.blogspot.com/2009/09/event-for-crashing-session.html' title='Event for crashing an oracle session'/><author><name>Laurent Leturgez</name><uri>http://www.blogger.com/profile/15794577109522905455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6726343810795707505.post-1214603864608006978</id><published>2009-09-08T00:09:00.000+02:00</published><updated>2009-09-08T13:57:36.466+02:00</updated><title type='text'>Hello World :)</title><content type='html'>Because it's a way of life for numbers of Oracle DBA in the world.&lt;br /&gt;I did it ...&lt;br /&gt;&lt;br /&gt;On this blog, I will publish messages concerning my job, and my experiences of Oracle Database.&lt;br /&gt;&lt;br /&gt;Laurent&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6726343810795707505-1214603864608006978?l=laurentleturgez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/1214603864608006978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6726343810795707505/posts/default/1214603864608006978'/><link rel='alternate' type='text/html' href='http://laurentleturgez.blogspot.com/2007/12/hello-world.html' title='Hello World :)'/><author><name>Laurent Leturgez</name><uri>http://www.blogger.com/profile/15794577109522905455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>
