<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Oracle Support Sanctions Manually Created SQL Profiles!</title>
	<atom:link href="http://kerryosborne.oracle-guy.com/2010/07/sqlt-coe_xfr_sql_profilesql/feed/" rel="self" type="application/rss+xml" />
	<link>http://kerryosborne.oracle-guy.com/2010/07/sqlt-coe_xfr_sql_profilesql/</link>
	<description>Just another Oracle blog</description>
	<lastBuildDate>Mon, 06 Feb 2012 21:28:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Chuck</title>
		<link>http://kerryosborne.oracle-guy.com/2010/07/sqlt-coe_xfr_sql_profilesql/#comment-82567</link>
		<dc:creator>Chuck</dc:creator>
		<pubDate>Thu, 12 Jan 2012 16:04:36 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=2649#comment-82567</guid>
		<description>Looking in coe_xfr_sql_profile I see that the signatures are created by calling:
DBMS_SQLTUNE.SQLTEXT_TO_SIGNATURE(sql_txt)

So yes, something must have happened to the sql somewhere along the line.

I understand your point of not moving profiles between environments, but this is a VLDB and I&#039;m not permitted to modify the sql so I was considering this as an alternative for plan stability when needed.

Thanks for all the help</description>
		<content:encoded><![CDATA[<p>Looking in coe_xfr_sql_profile I see that the signatures are created by calling:<br />
DBMS_SQLTUNE.SQLTEXT_TO_SIGNATURE(sql_txt)</p>
<p>So yes, something must have happened to the sql somewhere along the line.</p>
<p>I understand your point of not moving profiles between environments, but this is a VLDB and I&#8217;m not permitted to modify the sql so I was considering this as an alternative for plan stability when needed.</p>
<p>Thanks for all the help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: osborne</title>
		<link>http://kerryosborne.oracle-guy.com/2010/07/sqlt-coe_xfr_sql_profilesql/#comment-82565</link>
		<dc:creator>osborne</dc:creator>
		<pubDate>Thu, 12 Jan 2012 15:44:17 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=2649#comment-82565</guid>
		<description>Yes - the SIGNATURE in dba_sql_profiles should match either EXACT_MATCHING_SIGNATURE or FORCE_MATCHING_SIGNATURE from v$sql depending on whether you used FORCE_MATCHING or not. So something must have happened to make the text string of the SQL text not match exactly. 

By the way, I generally don&#039;t move Profiles from one environment to another. It seems more productive to me to work directly in the production environment on a test copy of the problem SQL (one with a comment in it for example). There&#039;s no guarantee that the hints that produce the desired plan in TEST will produce the same plan in PROD even if you get it to use the Profile. That&#039;s because there are so many possible differences in the inputs into the optimizer (stats, parameters, memory sizing, etc...) If you do want to move an existing Profile you can also use the DBMS_SQLTUNE.PACK_STGTAB_SQLPROF and DBMS_SQLTUNE.UNPACK_STGTAB_SQLPROF procedures. We&#039;ve used these for migrating a set of Profiles to a new platform, but I&#039;ve not written about it on the blog as it&#039;s a relatively uncommon thing for me.

Hope that gives you some ideas.

Kerry</description>
		<content:encoded><![CDATA[<p>Yes &#8211; the SIGNATURE in dba_sql_profiles should match either EXACT_MATCHING_SIGNATURE or FORCE_MATCHING_SIGNATURE from v$sql depending on whether you used FORCE_MATCHING or not. So something must have happened to make the text string of the SQL text not match exactly. </p>
<p>By the way, I generally don&#8217;t move Profiles from one environment to another. It seems more productive to me to work directly in the production environment on a test copy of the problem SQL (one with a comment in it for example). There&#8217;s no guarantee that the hints that produce the desired plan in TEST will produce the same plan in PROD even if you get it to use the Profile. That&#8217;s because there are so many possible differences in the inputs into the optimizer (stats, parameters, memory sizing, etc&#8230;) If you do want to move an existing Profile you can also use the DBMS_SQLTUNE.PACK_STGTAB_SQLPROF and DBMS_SQLTUNE.UNPACK_STGTAB_SQLPROF procedures. We&#8217;ve used these for migrating a set of Profiles to a new platform, but I&#8217;ve not written about it on the blog as it&#8217;s a relatively uncommon thing for me.</p>
<p>Hope that gives you some ideas.</p>
<p>Kerry</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chuck</title>
		<link>http://kerryosborne.oracle-guy.com/2010/07/sqlt-coe_xfr_sql_profilesql/#comment-82545</link>
		<dc:creator>Chuck</dc:creator>
		<pubDate>Thu, 12 Jan 2012 14:56:55 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=2649#comment-82545</guid>
		<description>The statement has the same signature in V$SQL on both test and prod, but would I expect that signature to be in dba_sql_profiles as well?  

SYSTEM-c4prd1-H3PRD-&gt; select EXACT_MATCHING_SIGNATURE from v$sql
  2  where sql_id = &#039;d9a4x6bvkkfhr&#039;;

EXACT_MATCHING_SIGNATURE
------------------------
              2.9681E+18

SYSTEM-c4tst1-H3PRD-&gt;  select EXACT_MATCHING_SIGNATURE from v$sql where sql_id = &#039;d9a4x6bvkkfhr&#039;;

EXACT_MATCHING_SIGNATURE
------------------------
              2.9681E+18



SYSTEM-c4tst1-H3PRD-&gt; select name, category, signature, created, last_modified, type, status, force_matching from dba_sql_profiles

NAME                           CATEGORY                        SIGNATURE CREATED             LAST_MODIFIED       TYPE      STATUS
------------------------------ ------------------------------ ---------- ------------------- ------------------- --------- --------
coe_d9a4x6bvkkfhr_1957636171   DEFAULT                        1.5067E+19 09-01-2012 15:56:28 09-01-2012 16:17:58 MANUAL    ENABLED</description>
		<content:encoded><![CDATA[<p>The statement has the same signature in V$SQL on both test and prod, but would I expect that signature to be in dba_sql_profiles as well?  </p>
<p>SYSTEM-c4prd1-H3PRD-&gt; select EXACT_MATCHING_SIGNATURE from v$sql<br />
  2  where sql_id = &#8216;d9a4x6bvkkfhr&#8217;;</p>
<p>EXACT_MATCHING_SIGNATURE<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
              2.9681E+18</p>
<p>SYSTEM-c4tst1-H3PRD-&gt;  select EXACT_MATCHING_SIGNATURE from v$sql where sql_id = &#8216;d9a4x6bvkkfhr&#8217;;</p>
<p>EXACT_MATCHING_SIGNATURE<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
              2.9681E+18</p>
<p>SYSTEM-c4tst1-H3PRD-&gt; select name, category, signature, created, last_modified, type, status, force_matching from dba_sql_profiles</p>
<p>NAME                           CATEGORY                        SIGNATURE CREATED             LAST_MODIFIED       TYPE      STATUS<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212; &#8212;&#8212;&#8211;<br />
coe_d9a4x6bvkkfhr_1957636171   DEFAULT                        1.5067E+19 09-01-2012 15:56:28 09-01-2012 16:17:58 MANUAL    ENABLED</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: osborne</title>
		<link>http://kerryosborne.oracle-guy.com/2010/07/sqlt-coe_xfr_sql_profilesql/#comment-82446</link>
		<dc:creator>osborne</dc:creator>
		<pubDate>Thu, 12 Jan 2012 01:45:49 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=2649#comment-82446</guid>
		<description>Hi Chuck,

I&#039;m not sure. There is a signature that&#039;s calculated in order to match a statement to a SQL Profile. Check and see if those are the same. You didn&#039;t say how you were generating the Profile but the text has to match pretty much exactly (except for literals if you use FORCE_MATCHING).

Kerry</description>
		<content:encoded><![CDATA[<p>Hi Chuck,</p>
<p>I&#8217;m not sure. There is a signature that&#8217;s calculated in order to match a statement to a SQL Profile. Check and see if those are the same. You didn&#8217;t say how you were generating the Profile but the text has to match pretty much exactly (except for literals if you use FORCE_MATCHING).</p>
<p>Kerry</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chuck</title>
		<link>http://kerryosborne.oracle-guy.com/2010/07/sqlt-coe_xfr_sql_profilesql/#comment-82177</link>
		<dc:creator>Chuck</dc:creator>
		<pubDate>Tue, 10 Jan 2012 14:37:09 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=2649#comment-82177</guid>
		<description>Kerry, 
Thanks for the great blog, tons of usefull information.
I&#039;m having trouble implementing this concept.  I&#039;m trying to pull the plan from PROD and implement it in TEST, but the profile is not getting used in test.  

Many issues.., primary one being the length of the hint (ORA-06502)..,  but found solutions between your blog and Randolf&#039;s (thanks both).

So I was finally able to extract the hints from the PROD system and create the profile on the TEST system, but it is not using it. Same sqlid, sqltext, but xplans are still different and TEST does not show the profile being used.  What am I missing?</description>
		<content:encoded><![CDATA[<p>Kerry,<br />
Thanks for the great blog, tons of usefull information.<br />
I&#8217;m having trouble implementing this concept.  I&#8217;m trying to pull the plan from PROD and implement it in TEST, but the profile is not getting used in test.  </p>
<p>Many issues.., primary one being the length of the hint (ORA-06502)..,  but found solutions between your blog and Randolf&#8217;s (thanks both).</p>
<p>So I was finally able to extract the hints from the PROD system and create the profile on the TEST system, but it is not using it. Same sqlid, sqltext, but xplans are still different and TEST does not show the profile being used.  What am I missing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://kerryosborne.oracle-guy.com/2010/07/sqlt-coe_xfr_sql_profilesql/#comment-74633</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Sat, 26 Nov 2011 18:31:31 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=2649#comment-74633</guid>
		<description>Thank You Kerry... will give a try right away :)</description>
		<content:encoded><![CDATA[<p>Thank You Kerry&#8230; will give a try right away :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: osborne</title>
		<link>http://kerryosborne.oracle-guy.com/2010/07/sqlt-coe_xfr_sql_profilesql/#comment-74471</link>
		<dc:creator>osborne</dc:creator>
		<pubDate>Thu, 24 Nov 2011 23:03:30 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=2649#comment-74471</guid>
		<description>Sam,

The method documented here should work. Steps are:

1. Log into 10g DB
2. Find sql_id and hplan_hash_value for the statement
3. run coe_xfr_sql_profile.sql (it will generate a file containing the sql_id and plan_hash_value in the name)
4. Copy the generated script to the machine running 11g
5. Log in to 11g DB and verify that the statement is there
6. Run the generated script
7. Check to make sure the SQL Profile generates the expected plan

By the way, I should mention that I consider using SQL Profiles in this manner as a band aid, best used for emergency situations to give you time to figure out why you&#039;re not getting the plan you expect.</description>
		<content:encoded><![CDATA[<p>Sam,</p>
<p>The method documented here should work. Steps are:</p>
<p>1. Log into 10g DB<br />
2. Find sql_id and hplan_hash_value for the statement<br />
3. run coe_xfr_sql_profile.sql (it will generate a file containing the sql_id and plan_hash_value in the name)<br />
4. Copy the generated script to the machine running 11g<br />
5. Log in to 11g DB and verify that the statement is there<br />
6. Run the generated script<br />
7. Check to make sure the SQL Profile generates the expected plan</p>
<p>By the way, I should mention that I consider using SQL Profiles in this manner as a band aid, best used for emergency situations to give you time to figure out why you&#8217;re not getting the plan you expect.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://kerryosborne.oracle-guy.com/2010/07/sqlt-coe_xfr_sql_profilesql/#comment-74419</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Thu, 24 Nov 2011 14:33:43 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=2649#comment-74419</guid>
		<description>Hi Kerry.

Do we have a method to pull a plan from 10.2 and bring over to 11.1?  There is a query taking a bad plan.  Statistics on the tables involved in the query look to be the same (were imported ok).  I’d like to bring the plan over but don’t know the steps.</description>
		<content:encoded><![CDATA[<p>Hi Kerry.</p>
<p>Do we have a method to pull a plan from 10.2 and bring over to 11.1?  There is a query taking a bad plan.  Statistics on the tables involved in the query look to be the same (were imported ok).  I’d like to bring the plan over but don’t know the steps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Outline, SQL profile and SQL Plan Management(SPM) &#171; Oracle Explorer: Standing on the shoulders of giants</title>
		<link>http://kerryosborne.oracle-guy.com/2010/07/sqlt-coe_xfr_sql_profilesql/#comment-50494</link>
		<dc:creator>Outline, SQL profile and SQL Plan Management(SPM) &#171; Oracle Explorer: Standing on the shoulders of giants</dc:creator>
		<pubDate>Wed, 27 Jul 2011 22:39:09 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=2649#comment-50494</guid>
		<description>[...] Jonathan Lewis http://kerryosborne.oracle-guy.com/2011/01/licensing-requirements-for-sql-profiles/ http://kerryosborne.oracle-guy.com/2010/07/sqlt-coe_xfr_sql_profilesql/ SQLT (SQLTXPLAIN) &#8211; Tool that helps to diagnose SQL statements performing poorly [ID [...]</description>
		<content:encoded><![CDATA[<p>[...] Jonathan Lewis <a href="http://kerryosborne.oracle-guy.com/2011/01/licensing-requirements-for-sql-profiles/" rel="nofollow">http://kerryosborne.oracle-guy.com/2011/01/licensing-requirements-for-sql-profiles/</a> <a href="http://kerryosborne.oracle-guy.com/2010/07/sqlt-coe_xfr_sql_profilesql/" rel="nofollow">http://kerryosborne.oracle-guy.com/2010/07/sqlt-coe_xfr_sql_profilesql/</a> SQLT (SQLTXPLAIN) &#8211; Tool that helps to diagnose SQL statements performing poorly [ID [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: osborne</title>
		<link>http://kerryosborne.oracle-guy.com/2010/07/sqlt-coe_xfr_sql_profilesql/#comment-33317</link>
		<dc:creator>osborne</dc:creator>
		<pubDate>Thu, 30 Dec 2010 16:19:09 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=2649#comment-33317</guid>
		<description>No problem. Thanks for the positive feedback. Now that you&#039;ve got a taste of the drug, make sure you don&#039;t let it take you down the path to addiction. Profiles are an extremely powerful tool, but they are not appropriate for fixing all your problems. You can quickly find yourself having 100&#039;s of these things. If you do, you probably have an underlying problem that needs to be addressed. I wrote a chapter in the book &lt;a href=&quot;http://www.amazon.com/Pro-Oracle-SQL-Experts-Voice/dp/1430232285/ref=sr_1_1?ie=UTF8&amp;qid=1293726458&amp;sr=8-1&quot; rel=&quot;nofollow&quot;&gt;Pro Oracle SQL&lt;/a&gt; by Apress that covers this topic in great detail by the way. If you want more details, it&#039;s got pretty much everything I know on the topic. Like Forest Gump said, &quot;And that&#039;s all I&#039;ve got to say about that.&quot;.

Kerry</description>
		<content:encoded><![CDATA[<p>No problem. Thanks for the positive feedback. Now that you&#8217;ve got a taste of the drug, make sure you don&#8217;t let it take you down the path to addiction. Profiles are an extremely powerful tool, but they are not appropriate for fixing all your problems. You can quickly find yourself having 100&#8242;s of these things. If you do, you probably have an underlying problem that needs to be addressed. I wrote a chapter in the book <a href="http://www.amazon.com/Pro-Oracle-SQL-Experts-Voice/dp/1430232285/ref=sr_1_1?ie=UTF8&#038;qid=1293726458&#038;sr=8-1" rel="nofollow">Pro Oracle SQL</a> by Apress that covers this topic in great detail by the way. If you want more details, it&#8217;s got pretty much everything I know on the topic. Like Forest Gump said, &#8220;And that&#8217;s all I&#8217;ve got to say about that.&#8221;.</p>
<p>Kerry</p>
]]></content:encoded>
	</item>
</channel>
</rss>

