<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="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" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-5834920868170812007</atom:id><lastBuildDate>Tue, 25 Mar 2025 02:45:40 +0000</lastBuildDate><category>Oracle 11i</category><category>oracle sql</category><category>sql</category><category>Export in Toad</category><category>German characters</category><category>HTML</category><category>Oracle 12c</category><category>Oracle datatypes</category><category>Server tools</category><category>Toad version issue</category><category>Treesize</category><category>XML</category><category>XMLserialize</category><category>active sessions</category><category>blob</category><category>clob</category><category>code</category><category>conversion</category><category>create partition</category><category>decoding</category><category>delete partition</category><category>killing sessions</category><category>locks</category><category>long datatype</category><category>move tablespace</category><category>oracle tablespaces</category><category>partition</category><category>plsql</category><category>query</category><category>rebuild indexes</category><category>searching string in long</category><category>size</category><category>software review</category><category>tablespace</category><category>toad</category><category>unusable index</category><title>Oracle developer</title><description></description><link>http://oracletechuser.blogspot.com/</link><managingEditor>noreply@blogger.com (Unknown)</managingEditor><generator>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5834920868170812007.post-2962635898694136488</guid><pubDate>Thu, 05 Nov 2015 14:56:00 +0000</pubDate><atom:updated>2015-11-05T15:56:47.059+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">long datatype</category><category domain="http://www.blogger.com/atom/ns#">oracle sql</category><category domain="http://www.blogger.com/atom/ns#">searching string in long</category><title>Searching a text in long datatype column</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
There is a situation that we have created a table with LONG datatype column and we wanted to search a string in that text.&lt;br /&gt;
&lt;br /&gt;
We use LONG datatype columns to store characters of length upto 2 GB. This is also called big version of VARCHAR2.&lt;br /&gt;
&lt;br /&gt;
The long datatype is deprecated in the &amp;nbsp;newer versions of the Oracle release. But they are still maintained in the old legacy systems. As per Oracle, the use of LONG datatype must be restricted to the below conditions:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 11.25px; font-style: italic; line-height: 18px;&quot;&gt;The use of LONG values is subject to these restrictions:&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; font-size: 11.25px; font-style: italic; line-height: 18px;&quot;&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;A table can contain only one LONG column.&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;You cannot create an object type with a LONG attribute.&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;LONG columns cannot appear in WHERE clauses or in integrity constraints (except that they can appear in NULL and NOT NULL constraints).&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;LONG columns cannot be indexed.&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;LONG data cannot be specified in regular expressions.&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;A stored function cannot return a LONG value.&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;You can declare a variable or argument of a PL/SQL program unit using the LONG data type. However, you cannot then call the program unit from SQL.&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;Within a single SQL statement, all LONG columns, updated tables, and locked tables must be located on the same database.&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;LONG and LONG RAW columns cannot be used in distributed SQL statements and cannot be replicated.&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;If a table has both LONG and LOB columns, then you cannot bind more than 4000 bytes of data to both the LONG and LOB columns in the same SQL statement. However, you can bind more than 4000 bytes of data to either the LONG or the LOB column.&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 11.25px; font-style: italic; line-height: 18px;&quot;&gt;In addition, LONG columns cannot appear in these parts of SQL statements:&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; font-size: 11.25px; font-style: italic; line-height: 18px;&quot;&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;GROUP BY clauses, ORDER BY clauses, or CONNECT BY clauses or with the DISTINCT operator in SELECT statements&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;The UNIQUE operator of a SELECT statement&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;The column list of a CREATE CLUSTER statement&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;The CLUSTER clause of a CREATE MATERIALIZED VIEW statement&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;&lt;b class=&quot;red&quot; style=&quot;color: red;&quot;&gt;SQL built-in functions, expressions, or conditions&lt;/b&gt;&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;SELECT lists of queries containing GROUP BY clauses&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;SELECT lists of subqueries or queries combined by the UNION, INTERSECT, or MINUS set operators&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;&lt;b class=&quot;red&quot; style=&quot;color: red;&quot;&gt;SELECT lists of CREATE TABLE ... AS SELECT statements&lt;/b&gt;&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;ALTER TABLE ... MOVE statements&lt;/li&gt;
&lt;li style=&quot;padding-bottom: 10px;&quot;&gt;SELECT lists in subqueries in INSERT statements&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;So, here comes the big question, how to search a string in LONG datatype columns. So here, I have created sample scripts to understand this scenario better:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;create table temp (x long, id number);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;desc temp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; line-height: 18px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF9RpWDeAwvQ93D84e_6DRvZT3qv6wtzd5AP2Wxz_d3FtY9DYWnARsBK-OayH8KT4JUT6UERpOjq5dGVSE-JOS_gAvnS6_sCivToO-3Bs70j6P7axH6u9iZbmWWz0k7S1QbDLvLgzyGt4/s1600/1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;60&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF9RpWDeAwvQ93D84e_6DRvZT3qv6wtzd5AP2Wxz_d3FtY9DYWnARsBK-OayH8KT4JUT6UERpOjq5dGVSE-JOS_gAvnS6_sCivToO-3Bs70j6P7axH6u9iZbmWWz0k7S1QbDLvLgzyGt4/s400/1.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; line-height: 18px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;insert into temp values (&#39;This is log text1&#39;,1);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;
&lt;/span&gt;&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;insert into temp values (&#39;This is log text2&#39;,2);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;insert into temp values (&#39;This is log text3&#39;,3);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: lime; color: blue;&quot;&gt;insert into temp values (&#39;This is text4&#39;,4);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;select * from temp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiInt0HrBoRwsYmUnrBSZ_P7cccbFxggfcEm1-KuH7R-PLUTTwopCdtcHBBfwZ-OSUg9cxpPoJMxRtsnrMjFcfrugcRY7u30JrMAmgGk93Fbb7pDKnf5p_cT3VdQ3aYsyK758QnrecAz0/s1600/2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiInt0HrBoRwsYmUnrBSZ_P7cccbFxggfcEm1-KuH7R-PLUTTwopCdtcHBBfwZ-OSUg9cxpPoJMxRtsnrMjFcfrugcRY7u30JrMAmgGk93Fbb7pDKnf5p_cT3VdQ3aYsyK758QnrecAz0/s1600/2.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;select * from temp where x like &#39;%log%&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh66Zn-i6dmDuYr1ic3Hl9UtMDvzfD80VumWNQDMROnYU2JWXk4Rw6rVRHsadYXpplfVjL0P66HuohTZaQIP-vj708uVKLssd76CQICTCT7sJuwKuBMdRET_UWZ4mt4iXr2TKk3m95WBPo/s1600/3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh66Zn-i6dmDuYr1ic3Hl9UtMDvzfD80VumWNQDMROnYU2JWXk4Rw6rVRHsadYXpplfVjL0P66HuohTZaQIP-vj708uVKLssd76CQICTCT7sJuwKuBMdRET_UWZ4mt4iXr2TKk3m95WBPo/s1600/3.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;So this is the problem we are talking about.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;How to resolve this? Convert the LONG column to CLOB and try your search operation there.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Still confused? Check the below code part as well:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; line-height: 18px;&quot;&gt;create global temporary table temp_global (x clob, id number);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: blue; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: blue; line-height: 18px;&quot;&gt;insert into temp_global select to_lob(x),id from temp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;/span&gt;&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;select * from temp_global;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju8EP27n3x4-9UhzzP91cRnsEYSj1S5O64G7kiEqLq2PLarR5c-chzu2IKoEJESTWl8X71r2Hlg2V2aZ58Cm3dPlnk1SgVIdQRK_76PpC-NTB7Jcaqib_kj3Ks8j7WmPtdGMy0ePNzCGY/s1600/4.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju8EP27n3x4-9UhzzP91cRnsEYSj1S5O64G7kiEqLq2PLarR5c-chzu2IKoEJESTWl8X71r2Hlg2V2aZ58Cm3dPlnk1SgVIdQRK_76PpC-NTB7Jcaqib_kj3Ks8j7WmPtdGMy0ePNzCGY/s1600/4.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;select * from temp_global where x like &#39;%log%&#39;; --Returns 3 rows&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW5P-IoVBI3D2ihUxpRmcw6LdCLOSZ0mSznlEsSWGixRfmNU8821B0q7KeLM1eFSMPeuRljVzC3fic_ZAPvvXyUGHfyU65ZugiWUKq6TbYJTfMQ2MOWsIgCeiwSH8SXIqK4PFHGmrSn-w/s1600/5.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW5P-IoVBI3D2ihUxpRmcw6LdCLOSZ0mSznlEsSWGixRfmNU8821B0q7KeLM1eFSMPeuRljVzC3fic_ZAPvvXyUGHfyU65ZugiWUKq6TbYJTfMQ2MOWsIgCeiwSH8SXIqK4PFHGmrSn-w/s1600/5.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;select * from temp_global where x not like &#39;%log%&#39;; --Returns 1 row.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;(check the insert script highlighted with green)&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVMkZIgUU3p4guNHcHhyevupiloq_Lhl2CV9TU9cTREtAV7tbLUEh0rrNq0g2BAWGvuPBa1Reu1apqtXyNeRegfk2KYIh6ts5n4TnR1fa9LGuxC-f-NGko5b48gz9FviwalzCnKzpfi20/s1600/6.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVMkZIgUU3p4guNHcHhyevupiloq_Lhl2CV9TU9cTREtAV7tbLUEh0rrNq0g2BAWGvuPBa1Reu1apqtXyNeRegfk2KYIh6ts5n4TnR1fa9LGuxC-f-NGko5b48gz9FviwalzCnKzpfi20/s1600/6.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;So this resolves all the problem with the LONG column.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;Conclusion:&lt;/b&gt; Try not creating LONG columns unless they are really needed. Use CLOB datatype instead.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 11.25px; line-height: 18px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;qp_all470526&quot; style=&quot;width: 100%;&quot;&gt;
&lt;link href=&quot;//fonts.googleapis.com/css?family=Open+Sans&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;&lt;/link&gt;&lt;style&gt;#qp_main470526 .qp_btna:hover input {background:#00355F!important}&lt;/style&gt;&lt;br /&gt;
&lt;div fp=&quot;1c8e403c-18&quot; id=&quot;qp_main470526&quot; results=&quot;0&quot; style=&quot;background-color: white; border-radius: 0px; border: 1px solid #DBD9D9; color: black; font-family: &#39;Open Sans&#39;, sans-serif, Arial; margin: 0px; max-width: 792px; padding: 0.8em;&quot;&gt;
&lt;div style=&quot;background-color: #00355f; color: white; font-family: &#39;Open Sans&#39;, sans-serif, Arial; font-size: 1.2em;&quot;&gt;
&lt;div style=&quot;line-height: 1.3em; padding: 0.8em;&quot;&gt;
Have you worked on LONG datatype?&lt;/div&gt;
&lt;/div&gt;
&lt;form action=&quot;//www.poll-maker.com/results470526x1c8e403c-18&quot; id=&quot;qp_form470526&quot; method=&quot;post&quot; style=&quot;display: inline; margin: 0px; padding: 0px;&quot; target=&quot;_blank&quot;&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;input name=&quot;qp_d470526&quot; type=&quot;hidden&quot; value=&quot;42314.0780092503-42314.0779886562&quot; /&gt;&lt;br /&gt;
&lt;div class=&quot;qp_a&quot; onclick=&quot;var c=this.getElementsByTagName(&#39;INPUT&#39;)[0]; if((!event.target?event.srcElement:event.target).tagName!=&#39;INPUT&#39;){c.checked=(c.type==&#39;radio&#39;?true:!c.checked)};var i=this.parentNode.parentNode.parentNode.getElementsByTagName(&#39;INPUT&#39;);for(var k=0;k!=i.length;k++){i[k].parentNode.parentNode.setAttribute(&#39;sel&#39;,i[k].checked?1:0)}&quot; style=&quot;clear: both; color: #6b6b6b; display: block; font-family: &#39;Open Sans&#39;, sans-serif, Arial; font-size: 1.1em; line-height: 1.5; margin: 10px 0px; padding: 13px 8px 11px;&quot;&gt;
&lt;span style=&quot;cursor: inherit; display: block; padding-left: 30px;&quot;&gt;&lt;input name=&quot;qp_v470526&quot; style=&quot;float: left; height: 20px; margin-left: -25px; margin-top: 2px; padding: 0px; width: 20px;&quot; type=&quot;radio&quot; value=&quot;1&quot; /&gt;Yes&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;qp_a&quot; onclick=&quot;var c=this.getElementsByTagName(&#39;INPUT&#39;)[0]; if((!event.target?event.srcElement:event.target).tagName!=&#39;INPUT&#39;){c.checked=(c.type==&#39;radio&#39;?true:!c.checked)};var i=this.parentNode.parentNode.parentNode.getElementsByTagName(&#39;INPUT&#39;);for(var k=0;k!=i.length;k++){i[k].parentNode.parentNode.setAttribute(&#39;sel&#39;,i[k].checked?1:0)}&quot; style=&quot;clear: both; color: #6b6b6b; display: block; font-family: &#39;Open Sans&#39;, sans-serif, Arial; font-size: 1.1em; line-height: 1.5; margin: 10px 0px; padding: 13px 8px 11px;&quot;&gt;
&lt;span style=&quot;cursor: inherit; display: block; padding-left: 30px;&quot;&gt;&lt;input name=&quot;qp_v470526&quot; style=&quot;float: left; height: 20px; margin-left: -25px; margin-top: 2px; padding: 0px; width: 20px;&quot; type=&quot;radio&quot; value=&quot;2&quot; /&gt;No&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;clear: both; min-height: 40px; padding-left: 0px;&quot;&gt;
&lt;a class=&quot;qp_btna&quot; href=&quot;https://www.blogger.com/blogger.g?blogID=5834920868170812007#&quot; style=&quot;-moz-box-sizing: border-box; -ms-box-sizing: border-box; -o-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; float: left; max-width: 140px; padding-right: 5px; text-decoration: none; width: 50%;&quot;&gt;&lt;input btype=&quot;v&quot; name=&quot;qp_b470526&quot; style=&quot;-webkit-appearance: none; background-color: #0b79d3; border-radius: 0px; border: 0px; color: white; cursor: hand; cursor: pointer; font-family: &#39;Open Sans&#39;, sans-serif, Arial; font-size: 16px; height: 40px; width: 100%;&quot; type=&quot;submit&quot; value=&quot;Vote&quot; /&gt;&lt;/a&gt;&lt;a class=&quot;qp_btna&quot; href=&quot;https://www.blogger.com/blogger.g?blogID=5834920868170812007#&quot; style=&quot;-moz-box-sizing: border-box; -ms-box-sizing: border-box; -o-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; float: left; max-width: 140px; padding-left: 5px; text-decoration: none; width: 50%;&quot;&gt;&lt;input btype=&quot;r&quot; name=&quot;qp_b470526&quot; style=&quot;-webkit-appearance: none; background-color: #0b79d3; border-radius: 0px; border: 0px; color: white; cursor: hand; cursor: pointer; font-family: &#39;Open Sans&#39;, sans-serif, Arial; font-size: 16px; height: 40px; width: 100%;&quot; type=&quot;submit&quot; value=&quot;Results&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;http://www.poll-maker.com/&quot; id=&quot;qp_a470526&quot; style=&quot;color: black; float: right; font-family: Arial; font-size: 10px; text-decoration: none;&quot;&gt;Poll Maker&lt;/a&gt;&lt;/form&gt;
&lt;div style=&quot;display: none;&quot;&gt;
&lt;div id=&quot;qp_rp470526&quot; style=&quot;font-size: 14px; height: 1.5em; line-height: 1.5em; overflow: hidden; position: absolute; right: 5px; text-align: right; width: 5ex;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;qp_rv470526&quot; style=&quot;box-sizing: border-box; color: white; font-size: 14px; line-height: 1.5em; padding-right: 3px; text-align: right; width: 0%;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;qp_rb470526&quot; style=&quot;color: white; display: block; font-size: 14px; line-height: 1.5em; padding-right: 10px 5px;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;qp_rva470526&quot; style=&quot;background: #006FB9; border-color: #006FB9;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;qp_rvb470526&quot; style=&quot;background: #163463; border-color: #163463;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;qp_rvc470526&quot; style=&quot;background: #5BCFFC; border-color: #1481AB;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;script language=&quot;javascript&quot; src=&quot;//scripts.poll-maker.com/3012/scpolls.js&quot;&gt;&lt;/script&gt;

&lt;/div&gt;
</description><link>http://oracletechuser.blogspot.com/2015/11/searching-text-in-long-datatype-column.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF9RpWDeAwvQ93D84e_6DRvZT3qv6wtzd5AP2Wxz_d3FtY9DYWnARsBK-OayH8KT4JUT6UERpOjq5dGVSE-JOS_gAvnS6_sCivToO-3Bs70j6P7axH6u9iZbmWWz0k7S1QbDLvLgzyGt4/s72-c/1.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5834920868170812007.post-4586333168357534894</guid><pubDate>Thu, 05 Nov 2015 14:12:00 +0000</pubDate><atom:updated>2015-11-05T15:12:55.222+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">query</category><category domain="http://www.blogger.com/atom/ns#">rebuild indexes</category><category domain="http://www.blogger.com/atom/ns#">unusable index</category><title>Rebuild unusable Index</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: xx-small;&quot;&gt;The below is the query to rebuild unusable Partitioned and unpartitioned Indexes.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: xx-small;&quot;&gt;Run the &#39;Alter index&#39; script when there are unusable indexes.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;--Query to rebuild unusable Partitioned and Non Partitioned Indexes&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;SELECT owner,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;index_name,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;ALTER index &#39; || owner || &#39;.&#39; || index_name || &#39; REBUILD;&#39; stmt&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; FROM (SELECT owner,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;table_name,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;index_name,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NULL partition_name,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;index_type,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blevel,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;leaf_blocks,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;distinct_keys,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;num_rows&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM all_indexes --Non Partitioned tables&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE status NOT IN (&#39;VALID&#39;, &#39;N/A&#39;)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UNION&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT owner,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;table_name,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;i.index_name,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;partition_name,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;index_type,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ip.blevel,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ip.leaf_blocks,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ip.distinct_keys,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ip.num_rows&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM all_indexes i, all_ind_partitions ip --Partitioned Tables&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE &amp;nbsp; &amp;nbsp; i.owner = ip.index_owner&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND i.index_name = ip.index_name&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND ip.status != &#39;USABLE&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: xx-small;&quot;&gt;If there are many database actions involved everyday, then we can think of creating a database job for this and running this every day after business hours.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://oracletechuser.blogspot.com/2015/11/the-below-is-query-to-rebuild-unusable.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5834920868170812007.post-3818966277765653966</guid><pubDate>Fri, 23 Oct 2015 14:04:00 +0000</pubDate><atom:updated>2015-10-23T16:35:10.984+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Server tools</category><category domain="http://www.blogger.com/atom/ns#">size</category><category domain="http://www.blogger.com/atom/ns#">software review</category><category domain="http://www.blogger.com/atom/ns#">Treesize</category><title>Treesize Professional- Software review</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;In this topic , I am going to share the reviews of the software
&quot;Treesize Professional&quot;. &lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span lang=&quot;de&quot; style=&quot;font-family: inherit; font-size: 11pt;&quot;&gt;This tool is a powerful and flexible hard disk space manager for &lt;/span&gt;&lt;span lang=&quot;en-US&quot; style=&quot;font-family: inherit; font-size: 11pt;&quot;&gt;Windows 8/7/Vista/XP or Windows Server 2012/2008/2003 (32 or 64
Bit).&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;This software lists the size of all the files within the folder
specified. This software displays the result in Gantt Chart as a easier visual
representation. This folder also does recursive search to scan the folders
inside the specified folder.&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;A
variety of graphic reports allow you to get large amounts of info about your
disk space at a glance.&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The Chart tab, gives the pictorial representation of the sizes.&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEJK0WtEy_CIL8yR3A67ii_ph0sqBhtTTLm2bmeTDxGsq8B6Qf7fjZgqER11TTdQrMOhmw76FyKBPnUF19AaL2K2IQCFnS0xrUp3MVNDTAhscXHR4F_T_c-NLM4MMdY45yYBU0olOupuo/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEJK0WtEy_CIL8yR3A67ii_ph0sqBhtTTLm2bmeTDxGsq8B6Qf7fjZgqER11TTdQrMOhmw76FyKBPnUF19AaL2K2IQCFnS0xrUp3MVNDTAhscXHR4F_T_c-NLM4MMdY45yYBU0olOupuo/s320/1.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The &#39;Details&#39; tab lists all the details of the folder within the search
directory including the % of Parent(allocated)&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The &#39;extension&#39; tab lists the size of the files grouped by extensions.
This will be helpful during analysis.&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglRjWtuAvtTQy34ezbaNh9z9CHwefDf0KyXxdKWyFNMKeSzeTL72DG3MqtLLuI6tIGSeQqubDEoEuFgC-MGQl-17ILmU1BTSGmcOeOIlfssklWW98arF9ObK-DJxSJDHugy93_969NZy8/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;159&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglRjWtuAvtTQy34ezbaNh9z9CHwefDf0KyXxdKWyFNMKeSzeTL72DG3MqtLLuI6tIGSeQqubDEoEuFgC-MGQl-17ILmU1BTSGmcOeOIlfssklWW98arF9ObK-DJxSJDHugy93_969NZy8/s320/2.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&#39;Age of Files&#39; tab has the details about the files grouped by the
creation date.&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXBqOs-aIMv_70bHNvvq2z63h0qWJg7smlVsVa5CZ7NCSATxOteWEhxb5RmswBPEwjeyQiAlxGLTKceGnv-FE_MUB5-1DWdItTDbRnP0wHzNaFpzerrXfJU61hr5-MLyYM_bXpL1Rq9Ro/s1600/3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;243&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXBqOs-aIMv_70bHNvvq2z63h0qWJg7smlVsVa5CZ7NCSATxOteWEhxb5RmswBPEwjeyQiAlxGLTKceGnv-FE_MUB5-1DWdItTDbRnP0wHzNaFpzerrXfJU61hr5-MLyYM_bXpL1Rq9Ro/s320/3.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&#39;Top 100 files&#39; tab lists the top 100 files
grouped by size.&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;font-size: 11pt; margin: 0in; text-align: left;&quot;&gt;
&lt;b&gt;&lt;u&gt;Pros:&lt;/u&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit; font-size: 11pt;&quot;&gt;Easier to understand the tool with the pictorial representation&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit; font-size: 11pt;&quot;&gt;Professional&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 14.6667px;&quot;&gt;Interface&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit; font-size: 11pt;&quot;&gt;Graphical display&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;Can be&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 14.6667px;&quot;&gt;integrated&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&amp;nbsp;with
other apps like Scheduler to gather the stats every week.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit; font-size: 11pt;&quot;&gt;Does
faster scan.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit; font-size: 11pt;&quot;&gt;Require
no big Technical knowledge to use this tool.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit; font-size: 11pt;&quot;&gt;Support
most of the 32/64 bit Windows Server.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;Helpful
for weekly Server&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 14.6667px;&quot;&gt;maintenance&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;u&gt;Cons:&lt;/u&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit; font-size: 11pt;&quot;&gt;Overpriced&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit; font-size: 11pt;&quot;&gt;Crowded Interface&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;Seems to freeze up with
     large&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 14.6667px;&quot;&gt;volumes&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&amp;nbsp;of data. (1 terabyte).&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: 14.6667px;&quot;&gt;Download link:&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://download.cnet.com/TreeSize-Professional/3000-2248_4-10008952.html&quot; style=&quot;font-size: 14.6667px;&quot;&gt;http://download.cnet.com/TreeSize-Professional/3000-2248_4-10008952.html&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: 14.6667px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div id=&quot;qp_all455432&quot; style=&quot;width: 100%;&quot;&gt;
&lt;link href=&quot;//fonts.googleapis.com/css?family=Open+Sans&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;&lt;/link&gt;&lt;style&gt;#qp_main455432 .qp_btna:hover input {background:#00355F!important}&lt;/style&gt;&lt;br /&gt;
&lt;div fp=&quot;59ED4d0f-18&quot; id=&quot;qp_main455432&quot; results=&quot;0&quot; style=&quot;background-color: white; border-radius: 0px; border: 1px solid #DBD9D9; color: black; font-family: &#39;Open Sans&#39;, sans-serif, Arial; margin: 0px; max-width: 792px; padding: 15px;&quot;&gt;
&lt;div style=&quot;background-color: #00355f; color: white; font-family: &#39;Open Sans&#39;, sans-serif, Arial; font-size: 18px;&quot;&gt;
&lt;div style=&quot;line-height: 30px; padding: 10px 15px;&quot;&gt;
Have you used Treesize Professional before?&lt;/div&gt;
&lt;/div&gt;
&lt;form action=&quot;//www.poll-maker.com/results455432x59ED4d0f-18&quot; id=&quot;qp_form455432&quot; method=&quot;post&quot; style=&quot;display: inline; margin: 0px; padding: 0px;&quot; target=&quot;_blank&quot;&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;input name=&quot;qp_d455432&quot; type=&quot;hidden&quot; value=&quot;42301.0392476851-42301.039206081&quot; /&gt;&lt;br /&gt;
&lt;div class=&quot;qp_a&quot; onclick=&quot;var c=this.getElementsByTagName(&#39;INPUT&#39;)[0]; if((!event.target?event.srcElement:event.target).tagName!=&#39;INPUT&#39;){c.checked=(c.type==&#39;radio&#39;?true:!c.checked)};var i=this.parentNode.parentNode.parentNode.getElementsByTagName(&#39;INPUT&#39;);for(var k=0;k!=i.length;k++){i[k].parentNode.parentNode.setAttribute(&#39;sel&#39;,i[k].checked?1:0)}&quot; style=&quot;clear: both; color: #6b6b6b; display: block; font-family: &#39;Open Sans&#39;, sans-serif, Arial; font-size: 16px; line-height: 1.5; margin: 10px 0px; padding: 10px;&quot;&gt;
&lt;span style=&quot;cursor: inherit; display: block; padding-left: 30px;&quot;&gt;&lt;input name=&quot;qp_v455432&quot; style=&quot;float: left; height: 20px; margin-left: -25px; margin-top: 2px; padding: 0px; width: 20px;&quot; type=&quot;radio&quot; value=&quot;1&quot; /&gt;Yes&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;qp_a&quot; onclick=&quot;var c=this.getElementsByTagName(&#39;INPUT&#39;)[0]; if((!event.target?event.srcElement:event.target).tagName!=&#39;INPUT&#39;){c.checked=(c.type==&#39;radio&#39;?true:!c.checked)};var i=this.parentNode.parentNode.parentNode.getElementsByTagName(&#39;INPUT&#39;);for(var k=0;k!=i.length;k++){i[k].parentNode.parentNode.setAttribute(&#39;sel&#39;,i[k].checked?1:0)}&quot; style=&quot;clear: both; color: #6b6b6b; display: block; font-family: &#39;Open Sans&#39;, sans-serif, Arial; font-size: 16px; line-height: 1.5; margin: 10px 0px; padding: 10px;&quot;&gt;
&lt;span style=&quot;cursor: inherit; display: block; padding-left: 30px;&quot;&gt;&lt;input name=&quot;qp_v455432&quot; style=&quot;float: left; height: 20px; margin-left: -25px; margin-top: 2px; padding: 0px; width: 20px;&quot; type=&quot;radio&quot; value=&quot;2&quot; /&gt;No&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;clear: both; min-height: 40px; padding-left: 0px;&quot;&gt;
&lt;a class=&quot;qp_btna&quot; href=&quot;https://www.blogger.com/blogger.g?blogID=5834920868170812007#&quot; style=&quot;-moz-box-sizing: border-box; -ms-box-sizing: border-box; -o-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; float: left; max-width: 140px; padding-right: 5px; text-decoration: none; width: 50%;&quot;&gt;&lt;input btype=&quot;v&quot; name=&quot;qp_b455432&quot; style=&quot;-webkit-appearance: none; background-color: #0b79d3; border-radius: 0px; border: 0px; color: white; cursor: hand; cursor: pointer; font-family: &#39;Open Sans&#39;, sans-serif, Arial; font-size: 16px; height: 40px; width: 100%;&quot; type=&quot;submit&quot; value=&quot;Vote&quot; /&gt;&lt;/a&gt;&lt;a class=&quot;qp_btna&quot; href=&quot;https://www.blogger.com/blogger.g?blogID=5834920868170812007#&quot; style=&quot;-moz-box-sizing: border-box; -ms-box-sizing: border-box; -o-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; float: left; max-width: 140px; padding-left: 5px; text-decoration: none; width: 50%;&quot;&gt;&lt;input btype=&quot;r&quot; name=&quot;qp_b455432&quot; style=&quot;-webkit-appearance: none; background-color: #0b79d3; border-radius: 0px; border: 0px; color: white; cursor: hand; cursor: pointer; font-family: &#39;Open Sans&#39;, sans-serif, Arial; font-size: 16px; height: 40px; width: 100%;&quot; type=&quot;submit&quot; value=&quot;Results&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;http://www.poll-maker.com/QuizMaker&quot; id=&quot;qp_a455432&quot; style=&quot;color: black; float: right; font-family: Arial; font-size: 10px; text-decoration: none;&quot;&gt;Quiz Maker&lt;/a&gt;&lt;/form&gt;
&lt;div style=&quot;display: none;&quot;&gt;
&lt;div id=&quot;qp_rp455432&quot; style=&quot;font-size: 14px; height: 1.5em; line-height: 1.5em; overflow: hidden; position: absolute; right: 5px; text-align: right; width: 5ex;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;qp_rv455432&quot; style=&quot;box-sizing: border-box; color: white; font-size: 14px; line-height: 1.5em; padding-right: 3px; text-align: right; width: 0%;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;qp_rb455432&quot; style=&quot;color: white; display: block; font-size: 14px; line-height: 1.5em; padding-right: 10px 5px;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;qp_rva455432&quot; style=&quot;background: #006FB9; border-color: #006FB9;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;qp_rvb455432&quot; style=&quot;background: #163463; border-color: #163463;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;qp_rvc455432&quot; style=&quot;background: #5BCFFC; border-color: #1481AB;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;script language=&quot;javascript&quot; src=&quot;//scripts.poll-maker.com/3012/scpolls.js&quot;&gt;&lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://100widgets.com/js_data.php?id=255&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in 0in 0in 0.75in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</description><link>http://oracletechuser.blogspot.com/2015/10/treesize-professional-software-review.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEJK0WtEy_CIL8yR3A67ii_ph0sqBhtTTLm2bmeTDxGsq8B6Qf7fjZgqER11TTdQrMOhmw76FyKBPnUF19AaL2K2IQCFnS0xrUp3MVNDTAhscXHR4F_T_c-NLM4MMdY45yYBU0olOupuo/s72-c/1.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Stuttgart, Germany</georss:featurename><georss:point>48.7758459 9.1829321000000164</georss:point><georss:box>48.6084304 8.860208600000016 48.9432614 9.5056556000000167</georss:box></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5834920868170812007.post-8710843520426611756</guid><pubDate>Tue, 20 Oct 2015 15:55:00 +0000</pubDate><atom:updated>2015-10-21T14:52:34.991+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">create partition</category><category domain="http://www.blogger.com/atom/ns#">delete partition</category><category domain="http://www.blogger.com/atom/ns#">Oracle 11i</category><category domain="http://www.blogger.com/atom/ns#">partition</category><category domain="http://www.blogger.com/atom/ns#">sql</category><title>Oracle Partitions</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Need for partition:&lt;/h3&gt;
&lt;div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Oracle tables which are very huge say(&amp;gt; 2GB) , which inserts data
everyday and that have historical and important details for reference, requires
Partitions.&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;Partitions are nothing but smaller segments within the tables for
easier&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 14.6667px;&quot;&gt;maintenance&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&amp;nbsp;of the tables.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;When the content of a table need to be distributed across&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 14.6667px;&quot;&gt;different&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&amp;nbsp;types of storage devices, then we need to create&amp;nbsp;partitions.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;And finally for performance issue, we need partition. We prefer losing
a weekly data instead of the whole table contents :)&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;margin: 0in; text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: 14.6667px;&quot;&gt;Partitioned&lt;/span&gt;&lt;span style=&quot;font-family: inherit; font-size: 11pt;&quot;&gt;&amp;nbsp;Index:&lt;/span&gt;&lt;/h3&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;In addition to partitioning not only the tables, the Primary keys of
the big tables are partitioned as well:&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The reasons for partitioning the index are:&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;direction: ltr; margin-bottom: 0in; margin-left: .375in; margin-top: 0in; unicode-bidi: embed;&quot; type=&quot;disc&quot;&gt;
&lt;li lang=&quot;de&quot; style=&quot;margin-bottom: 0px; margin-top: 0px; vertical-align: middle;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Avoid
     rebuilding the entire index when data is removed.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li lang=&quot;de&quot; style=&quot;margin-bottom: 0px; margin-top: 0px; vertical-align: middle;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Perform
     maintenance on parts of the data without invalidating the entire index.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;direction: ltr; margin-bottom: 0in; margin-left: .375in; margin-top: 0in; unicode-bidi: embed;&quot; type=&quot;disc&quot;&gt;
&lt;li lang=&quot;de&quot; style=&quot;margin-bottom: 0px; margin-top: 0px; vertical-align: middle;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Reduce
     the impact of index skew caused by an index on a column with a
     monotonically increasing value.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in 0in 0in 0.375in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in 0in 0in 0.375in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Partitions can be created weekly or monthly basis depending of the data
inflow:&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;We can create a dbms_job for creating the weekly(or monthly)
partitions. The sample statement for creating&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 14.6667px;&quot;&gt;partition&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&amp;nbsp;name is :&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWuc9_LqetfSIoxej6LeGsuTdYsbzO7nqSiNaZCOG0xsjme3vSGuQaM0WpPQ25GLnxZvE7FS23aaAcXZFdp-_PYkjzixMZe5jtHvD5x1gwZH17o7od7WS7AoDx8rhmbmt6jHCnUX3V2i8/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;56&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWuc9_LqetfSIoxej6LeGsuTdYsbzO7nqSiNaZCOG0xsjme3vSGuQaM0WpPQ25GLnxZvE7FS23aaAcXZFdp-_PYkjzixMZe5jtHvD5x1gwZH17o7od7WS7AoDx8rhmbmt6jHCnUX3V2i8/s400/1.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
We create the below table to show the demonstration about partition:&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEii018eiMmbf3aRXJc_qtT_ufSyNt687UEyWR0hKZVPOddSJHdSjAYM2qHguYk5Z3iJyx3TKFR5fhoumHSelzm63_7a-TWr-uR3bosNYeEwQuysNYHgNjEQOx0lb44XRTvPy7OoZPox6YI/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;233&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEii018eiMmbf3aRXJc_qtT_ufSyNt687UEyWR0hKZVPOddSJHdSjAYM2qHguYk5Z3iJyx3TKFR5fhoumHSelzm63_7a-TWr-uR3bosNYeEwQuysNYHgNjEQOx0lb44XRTvPy7OoZPox6YI/s400/2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;This sql will create the name of the partition in the format
&quot;201545_20151107&quot;. This means, that the partition has been created
for the week no 45 of the year 2015 and the week ending 07.11.2015. This way
you can create a job to create 3 partition names every week. This job can be
scheduled to run every Sunday.&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Once the names of the partition are created,then we need to create
partition in the big tables with the created names. &lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;For example if the table name is TBL_PERSONINFORMATION then partition
names can be created as &quot;TBL_PI_201545_20151107&quot;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMb8ANayYs0SB_MTc6YvRUfaY-99Ho6ER70DUfusMy_JW7WTa44RLLXLnwYzUjT8OcyDxA5_hbCAr5AiKp4HoOPDBlwY0PA3L07m0QguRpLSuohkk8KZdYwRVwekYbHweozA56KJfnTzg/s1600/3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;20&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMb8ANayYs0SB_MTc6YvRUfaY-99Ho6ER70DUfusMy_JW7WTa44RLLXLnwYzUjT8OcyDxA5_hbCAr5AiKp4HoOPDBlwY0PA3L07m0QguRpLSuohkk8KZdYwRVwekYbHweozA56KJfnTzg/s400/3.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSa1Ht4bI0fV1-ZRjEHJngWVDeSGrmcJc77DMGN7LjYfNaoKqOXOCXjZPTYps9Q3SiakOzM6q0WI0RJ5Zywfy-vfLD5bSA9vWZToMRuM-dX1Cp9QRGxHmm2zLIaV4VwdO_38a5bHDoFSI/s1600/4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;115&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSa1Ht4bI0fV1-ZRjEHJngWVDeSGrmcJc77DMGN7LjYfNaoKqOXOCXjZPTYps9Q3SiakOzM6q0WI0RJ5Zywfy-vfLD5bSA9vWZToMRuM-dX1Cp9QRGxHmm2zLIaV4VwdO_38a5bHDoFSI/s400/4.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;font-size: 11pt; margin: 0in; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Table creation script:&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
CREATE TABLE TBL_PERSONALINFORMATION&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
(&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp; PERSONID&amp;nbsp;&amp;nbsp;&amp;nbsp; VARCHAR2(20 CHAR)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NOT NULL,&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp; FORENAME&amp;nbsp;&amp;nbsp;&amp;nbsp; VARCHAR2(1000 CHAR),&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp; LASTNAME&amp;nbsp;&amp;nbsp;&amp;nbsp; VARCHAR2(1000 CHAR)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NOT NULL,&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp; AGE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NUMBER,&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp; SEX&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VARCHAR2(1 BYTE),&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp; ADDRESS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VARCHAR2(2000 CHAR),&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp; DATE_ADDED&amp;nbsp; DATE&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
)&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
PARTITION BY RANGE (DATE_ADDED)&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
(&amp;nbsp; &lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp; PARTITION
TBL_PI_201543_20151024 VALUES LESS THAN (TO_DATE(&#39; 2015-10-25 00:00:00&#39;,
&#39;YYYY-MM-DD HH24:MI:SS&#39;, &#39;NLS_CALENDAR=GREGORIAN&#39;)) ,&amp;nbsp; &lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp; PARTITION
TBL_PI_201544_20151024 VALUES LESS THAN (TO_DATE(&#39; 2015-11-01 00:00:00&#39;,
&#39;SYYYY-MM-DD HH24:MI:SS&#39;, &#39;NLS_CALENDAR=GREGORIAN&#39;)) ,&amp;nbsp; &lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp; PARTITION
TBL_PI_201545_20151024 VALUES LESS THAN (TO_DATE(&#39; 2015-11-07 00:00:00&#39;,
&#39;SYYYY-MM-DD HH24:MI:SS&#39;, &#39;NLS_CALENDAR=GREGORIAN&#39;))&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;font-size: 11pt; margin: 0in; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Inserting data into the table:&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
insert into TBL_PERSONALINFORMATION partition (TBL_PI_201543_20151024)
values (&#39;10&#39;,&#39;AA&#39;,&#39;BB&#39;,19,&#39;F&#39;,&#39;AAA BBB St.&#39;,sysdate);&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;After inserting into the table at the appropriate partition, the table
looks like below:&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjD5Mt5rAZh7eteFwX1NavmBejgRkHTdLDlBSbkR7W7zDa8VMscf7L6KKVLGcXxWU9EvFCAo0AQzqZL3k1TCZspM6pErO4cymLeg_1CUARSdKkC-vWy8Tht1cwqhfQTCcaDYK5xA3ti-uo/s1600/5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;49&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjD5Mt5rAZh7eteFwX1NavmBejgRkHTdLDlBSbkR7W7zDa8VMscf7L6KKVLGcXxWU9EvFCAo0AQzqZL3k1TCZspM6pErO4cymLeg_1CUARSdKkC-vWy8Tht1cwqhfQTCcaDYK5xA3ti-uo/s400/5.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Each partition has sufficient number of rows for our demo.&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;font-size: 11pt; margin: 0in; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Before deleting Partition:&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Few important points to consider before deleting the partitions:&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;direction: ltr; margin-bottom: 0in; margin-left: .375in; margin-top: 0in; unicode-bidi: embed;&quot; type=&quot;disc&quot;&gt;
&lt;li lang=&quot;de&quot; style=&quot;margin-bottom: 0px; margin-top: 0px; vertical-align: middle;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;All the
     FKs must be disabled before deleting&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;direction: ltr; margin-bottom: 0in; margin-left: .375in; margin-top: 0in; unicode-bidi: embed;&quot; type=&quot;disc&quot;&gt;
&lt;li lang=&quot;de&quot; style=&quot;margin-bottom: 0px; margin-top: 0px; vertical-align: middle;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Delete
     the partitions using &#39;ALTER TABLE.. DROP PARTITION&#39; syntax&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;direction: ltr; margin-bottom: 0in; margin-left: .375in; margin-top: 0in; unicode-bidi: embed;&quot; type=&quot;disc&quot;&gt;
&lt;li lang=&quot;de&quot; style=&quot;margin-bottom: 0px; margin-top: 0px; vertical-align: middle;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Enable
     the FKs back&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;direction: ltr; margin-bottom: 0in; margin-left: .375in; margin-top: 0in; unicode-bidi: embed;&quot; type=&quot;disc&quot;&gt;
&lt;li lang=&quot;de&quot; style=&quot;margin-bottom: 0px; margin-top: 0px; vertical-align: middle;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Rebuild
     the indexes of the partitioned table&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li lang=&quot;de&quot; style=&quot;margin-bottom: 0px; margin-top: 0px; vertical-align: middle;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Delete
     the data from the referential tables to maintain consistency.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;font-size: 11pt; margin: 0in; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Deleting the Partition:&lt;/span&gt;&lt;/h3&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtgot1iNw1R4P66X2qD0EpHKVNXNt-HGVOutCFpB8zZ_2OQpuYuoeaHjNxc0g6iq9gN8XQ948C9A7YpStuuh-o6ptb4HHZth2Y-luJA5SksB3-KTThqkspPRZgx8uoHxctyRCnpyc7Prc/s1600/6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;168&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtgot1iNw1R4P66X2qD0EpHKVNXNt-HGVOutCFpB8zZ_2OQpuYuoeaHjNxc0g6iq9gN8XQ948C9A7YpStuuh-o6ptb4HHZth2Y-luJA5SksB3-KTThqkspPRZgx8uoHxctyRCnpyc7Prc/s400/6.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in 0in 0in 0.375in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;This way, I have deleted the partition
&quot;TBL_PI_201543_20151024&quot;.&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in 0in 0in 0.375in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in 0in 0in 0.375in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: yellow; color: purple; font-family: inherit;&quot;&gt;Quiz Time&lt;/span&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id=&quot;qp_all451955&quot; style=&quot;width: 100%;&quot;&gt;
&lt;link href=&quot;//fonts.googleapis.com/css?family=Open+Sans&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;&lt;/link&gt;&lt;style&gt;#qp_main451955 .qp_btna:hover input {background:#00355F!important}&lt;/style&gt;&lt;br /&gt;
&lt;div fp=&quot;09a64C5D-18&quot; id=&quot;qp_main451955&quot; results=&quot;0&quot; style=&quot;background-color: white; border-radius: 0px; border: 1px solid #DBD9D9; color: black; font-family: &#39;Open Sans&#39;, sans-serif, Arial; margin: 0px; max-width: 792px; padding: 15px;&quot;&gt;
&lt;div style=&quot;background-color: #00355f; color: white; font-family: &#39;Open Sans&#39;, sans-serif, Arial; font-size: 18px;&quot;&gt;
&lt;div style=&quot;line-height: 30px; padding: 10px 15px;&quot;&gt;
Do you know why we disable Foreign Keys before deleting Partitions?&lt;/div&gt;
&lt;/div&gt;
&lt;form action=&quot;//www.poll-maker.com/results451955x09a64C5D-18&quot; id=&quot;qp_form451955&quot; method=&quot;post&quot; style=&quot;display: inline; margin: 0px; padding: 0px;&quot; target=&quot;_blank&quot;&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;input name=&quot;qp_d451955&quot; type=&quot;hidden&quot; value=&quot;42298.1250231415-42298.1250015774&quot; /&gt;&lt;br /&gt;
&lt;div class=&quot;qp_a&quot; onclick=&quot;var c=this.getElementsByTagName(&#39;INPUT&#39;)[0]; if((!event.target?event.srcElement:event.target).tagName!=&#39;INPUT&#39;){c.checked=(c.type==&#39;radio&#39;?true:!c.checked)};var i=this.parentNode.parentNode.parentNode.getElementsByTagName(&#39;INPUT&#39;);for(var k=0;k!=i.length;k++){i[k].parentNode.parentNode.setAttribute(&#39;sel&#39;,i[k].checked?1:0)}&quot; style=&quot;clear: both; color: #6b6b6b; display: block; font-family: &#39;Open Sans&#39;, sans-serif, Arial; font-size: 16px; line-height: 1.5; margin: 10px 0px; padding: 10px;&quot;&gt;
&lt;span style=&quot;cursor: inherit; display: block; padding-left: 30px;&quot;&gt;&lt;input name=&quot;qp_v451955&quot; style=&quot;float: left; height: 20px; margin-left: -25px; margin-top: 2px; padding: 0px; width: 20px;&quot; type=&quot;radio&quot; value=&quot;1&quot; /&gt;To maintain referential integrity with other tables&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;qp_a&quot; onclick=&quot;var c=this.getElementsByTagName(&#39;INPUT&#39;)[0]; if((!event.target?event.srcElement:event.target).tagName!=&#39;INPUT&#39;){c.checked=(c.type==&#39;radio&#39;?true:!c.checked)};var i=this.parentNode.parentNode.parentNode.getElementsByTagName(&#39;INPUT&#39;);for(var k=0;k!=i.length;k++){i[k].parentNode.parentNode.setAttribute(&#39;sel&#39;,i[k].checked?1:0)}&quot; style=&quot;clear: both; color: #6b6b6b; display: block; font-family: &#39;Open Sans&#39;, sans-serif, Arial; font-size: 16px; line-height: 1.5; margin: 10px 0px; padding: 10px;&quot;&gt;
&lt;span style=&quot;cursor: inherit; display: block; padding-left: 30px;&quot;&gt;&lt;input name=&quot;qp_v451955&quot; style=&quot;float: left; height: 20px; margin-left: -25px; margin-top: 2px; padding: 0px; width: 20px;&quot; type=&quot;radio&quot; value=&quot;2&quot; /&gt;As per the syntax&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;qp_a&quot; onclick=&quot;var c=this.getElementsByTagName(&#39;INPUT&#39;)[0]; if((!event.target?event.srcElement:event.target).tagName!=&#39;INPUT&#39;){c.checked=(c.type==&#39;radio&#39;?true:!c.checked)};var i=this.parentNode.parentNode.parentNode.getElementsByTagName(&#39;INPUT&#39;);for(var k=0;k!=i.length;k++){i[k].parentNode.parentNode.setAttribute(&#39;sel&#39;,i[k].checked?1:0)}&quot; style=&quot;clear: both; color: #6b6b6b; display: block; font-family: &#39;Open Sans&#39;, sans-serif, Arial; font-size: 16px; line-height: 1.5; margin: 10px 0px; padding: 10px;&quot;&gt;
&lt;span style=&quot;cursor: inherit; display: block; padding-left: 30px;&quot;&gt;&lt;input name=&quot;qp_v451955&quot; style=&quot;float: left; height: 20px; margin-left: -25px; margin-top: 2px; padding: 0px; width: 20px;&quot; type=&quot;radio&quot; value=&quot;3&quot; /&gt;To avoid deleting referential data&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;!-- Go to www.addthis.com/dashboard to customize your tools --&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-56278935ee44cda9&quot; async=&quot;async&quot;&gt;&lt;/script&gt;


&lt;div style=&quot;clear: both; min-height: 40px; padding-left: 0px;&quot;&gt;
&lt;a class=&quot;qp_btna&quot; href=&quot;https://www.blogger.com/blogger.g?blogID=5834920868170812007#&quot; style=&quot;-moz-box-sizing: border-box; -ms-box-sizing: border-box; -o-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; float: left; max-width: 140px; padding-right: 5px; text-decoration: none; width: 50%;&quot;&gt;&lt;input btype=&quot;v&quot; name=&quot;qp_b451955&quot; style=&quot;-webkit-appearance: none; background-color: #0b79d3; border-radius: 0px; border: 0px; color: white; cursor: hand; cursor: pointer; font-family: &#39;Open Sans&#39;, sans-serif, Arial; font-size: 16px; height: 40px; width: 100%;&quot; type=&quot;submit&quot; value=&quot;Vote&quot; /&gt;&lt;/a&gt;&lt;a class=&quot;qp_btna&quot; href=&quot;https://www.blogger.com/blogger.g?blogID=5834920868170812007#&quot; style=&quot;-moz-box-sizing: border-box; -ms-box-sizing: border-box; -o-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; float: left; max-width: 140px; padding-left: 5px; text-decoration: none; width: 50%;&quot;&gt;&lt;input btype=&quot;r&quot; name=&quot;qp_b451955&quot; style=&quot;-webkit-appearance: none; background-color: #0b79d3; border-radius: 0px; border: 0px; color: white; cursor: hand; cursor: pointer; font-family: &#39;Open Sans&#39;, sans-serif, Arial; font-size: 16px; height: 40px; width: 100%;&quot; type=&quot;submit&quot; value=&quot;Results&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;http://www.poll-maker.com/&quot; id=&quot;qp_a451955&quot; style=&quot;color: black; float: right; font-family: Arial; font-size: 10px; text-decoration: none;&quot;&gt;online polls&lt;/a&gt;&lt;/form&gt;
&lt;div style=&quot;display: none;&quot;&gt;
&lt;div id=&quot;qp_rp451955&quot; style=&quot;font-size: 14px; height: 1.5em; line-height: 1.5em; overflow: hidden; position: absolute; right: 5px; text-align: right; width: 5ex;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;qp_rv451955&quot; style=&quot;box-sizing: border-box; color: white; font-size: 14px; line-height: 1.5em; padding-right: 3px; text-align: right; width: 0%;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;qp_rb451955&quot; style=&quot;color: white; display: block; font-size: 14px; line-height: 1.5em; padding-right: 10px 5px;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;qp_rva451955&quot; style=&quot;background: #006FB9; border-color: #006FB9;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;qp_rvb451955&quot; style=&quot;background: #163463; border-color: #163463;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;qp_rvc451955&quot; style=&quot;background: #5BCFFC; border-color: #1481AB;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;script language=&quot;javascript&quot; src=&quot;//scripts.poll-maker.com/3012/scpolls.js&quot;&gt;&lt;/script&gt;

&lt;/div&gt;
&lt;/div&gt;
</description><link>http://oracletechuser.blogspot.com/2015/10/oracle-partitions.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWuc9_LqetfSIoxej6LeGsuTdYsbzO7nqSiNaZCOG0xsjme3vSGuQaM0WpPQ25GLnxZvE7FS23aaAcXZFdp-_PYkjzixMZe5jtHvD5x1gwZH17o7od7WS7AoDx8rhmbmt6jHCnUX3V2i8/s72-c/1.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5834920868170812007.post-7351100857969732950</guid><pubDate>Thu, 15 Oct 2015 14:33:00 +0000</pubDate><atom:updated>2015-10-15T23:16:41.009+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">move tablespace</category><category domain="http://www.blogger.com/atom/ns#">Oracle 11i</category><category domain="http://www.blogger.com/atom/ns#">oracle sql</category><category domain="http://www.blogger.com/atom/ns#">oracle tablespaces</category><category domain="http://www.blogger.com/atom/ns#">plsql</category><category domain="http://www.blogger.com/atom/ns#">sql</category><category domain="http://www.blogger.com/atom/ns#">tablespace</category><title>Oracle Tablespaces</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div lang=&quot;de&quot; style=&quot;color: #17365d; font-family: Calibri; font-size: 16.0pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;About&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Tablespace is created in oracle for allocating space for holding
database objects.&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;There are different types of tablespaces:&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit; font-size: 11pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: inherit; font-size: 11pt;&quot;&gt;PERMANENT TABLESPACE: This tablespace contains
     persistent schema objects.&lt;/span&gt;&lt;span lang=&quot;en-US&quot; style=&quot;font-family: inherit; font-size: 11pt;&quot;&gt;Objects in permanent
tablespaces are stored in&lt;/span&gt;&lt;span lang=&quot;de&quot; style=&quot;font-family: inherit; font-size: 11pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang=&quot;de&quot; style=&quot;background: white; color: #222222; font-family: inherit; font-size: 10.5pt;&quot;&gt;datafiles&lt;/span&gt;&lt;span lang=&quot;de&quot; style=&quot;font-family: inherit; font-size: 11pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;font-family: inherit; font-size: 11pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span lang=&quot;en-US&quot; style=&quot;background: white; color: #222222; font-family: inherit; font-size: 10.5pt;&quot;&gt;An&lt;/span&gt;&lt;span lang=&quot;de&quot; style=&quot;background: white; color: #222222; font-family: inherit; font-size: 10.5pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang=&quot;de&quot; style=&quot;background: white; color: #222222; font-family: inherit; font-size: 10.5pt;&quot;&gt;UNDO tablespace&lt;/span&gt;&lt;span lang=&quot;de&quot; style=&quot;background: white; color: #222222; font-family: inherit; font-size: 10.5pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang=&quot;en-US&quot; style=&quot;background: white; color: #222222; font-family: inherit; font-size: 10.5pt;&quot;&gt;is a type of permanent
     tablespace used by Oracle Database to manage undo data if you are running
     your database in automatic undo management mode. Oracle strongly
     recommends that you use automatic undo management mode rather than using
     rollback segments for undo.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span lang=&quot;en-US&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #222222; font-family: inherit; font-size: 10.5pt;&quot;&gt;A&lt;/span&gt;&lt;span lang=&quot;de&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #222222; font-family: inherit; font-size: 10.5pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang=&quot;de&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #222222; font-family: inherit; font-size: 10.5pt;&quot;&gt;TEMPORARY TABLESPACE&lt;/span&gt;&lt;span lang=&quot;de&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #222222; font-family: inherit; font-size: 10.5pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang=&quot;en-US&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #222222; font-family: inherit; font-size: 10.5pt;&quot;&gt;contains schema objects only
     for the duration of a session. Objects in temporary tablespaces are stored
     in &lt;/span&gt;&lt;span lang=&quot;de&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #222222; font-family: inherit; font-size: 10.5pt;&quot;&gt;tempfiles&lt;/span&gt;&lt;span lang=&quot;en-US&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #222222; font-family: inherit; font-size: 10.5pt;&quot;&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #222222; font-size: 10.5pt; margin: 0in 0in 0in 0.375in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10.5pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #17365d; font-family: Calibri; font-size: 16.0pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;CREATE TABLESPACE&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.5pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 10.5pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Tablespaces are created with the syntax &#39;CREATE
TABLESPACE&#39;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.5pt; margin-left: .375in; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #366092; font-family: Calibri; font-size: 13.0pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Project Tablespace:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.5pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 10.5pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;In any oracle related project, tablespaces can be
created as below:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 10.5pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;direction: ltr; margin-bottom: 0in; margin-left: .375in; margin-top: 0in; unicode-bidi: embed;&quot; type=&quot;disc&quot;&gt;
&lt;li style=&quot;color: #222222; margin-bottom: 0; margin-top: 0; vertical-align: middle;&quot;&gt;&lt;span style=&quot;background: white; font-size: 10.5pt;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;lt;PROJECT&amp;gt;_BIG_IDX:&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #222222; font-size: 10.5pt; margin: 0in 0in 0in 0.375in;&quot;&gt;
&lt;span style=&quot;background: white;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;All the small Indexes,
Index Partitions of size greater than 4 MB are grouped here. INDEXPARTITITON comes under this.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 10.5pt; margin: 0in 0in 0in 0.375in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;direction: ltr; margin-bottom: 0in; margin-left: .375in; margin-top: 0in; unicode-bidi: embed;&quot; type=&quot;disc&quot;&gt;
&lt;li style=&quot;color: #222222; margin-bottom: 0; margin-top: 0; vertical-align: middle;&quot;&gt;&lt;span style=&quot;background: white; font-size: 10.5pt;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;lt;PROJECT&amp;gt;_SMALL_IDX:&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #222222; font-size: 10.5pt; margin: 0in 0in 0in 0.375in;&quot;&gt;
&lt;span style=&quot;background: white;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;All the small Indexes,
Index Partitions of size lesser than 5 MB are grouped here.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;INDEXPARTITITON comes under this.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 10.5pt; margin: 0in 0in 0in 0.375in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;direction: ltr; margin-bottom: 0in; margin-left: .375in; margin-top: 0in; unicode-bidi: embed;&quot; type=&quot;disc&quot;&gt;
&lt;li style=&quot;color: #222222; margin-bottom: 0; margin-top: 0; vertical-align: middle;&quot;&gt;&lt;span style=&quot;background: white; font-size: 10.5pt;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;lt;PROJECT&amp;gt;_BIG_TAB:&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #222222; font-size: 10.5pt; margin: 0in 0in 0in 0.375in;&quot;&gt;
&lt;span style=&quot;background: white;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;All the database objects
like LOBINDEX, LOBSEGMENT, TABLE, TABLEPARTITON etc. of size greater than 5 MB
are grouped here.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 10.5pt; margin: 0in 0in 0in 0.375in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;direction: ltr; margin-bottom: 0in; margin-left: .375in; margin-top: 0in; unicode-bidi: embed;&quot; type=&quot;disc&quot;&gt;
&lt;li style=&quot;color: #222222; margin-bottom: 0; margin-top: 0; vertical-align: middle;&quot;&gt;&lt;span style=&quot;background: white; font-size: 10.5pt;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;lt;PROJECT&amp;gt;_SMALL_TAB:&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #222222; font-size: 10.5pt; margin: 0in 0in 0in 0.375in;&quot;&gt;
&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;All the database objects
like LOBINDEX, LOBSEGMENT, TABLE, TABLEPARTITON etc. of size lesser than 5 MB
are grouped here.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.5pt; margin-left: .375in; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.5pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #17365d; font-family: Calibri; font-size: 16.0pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Re-allocating the database objects in proper
tablespaces:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.5pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 10.5pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;There are cases where we need to reallocate database
objects like Tables, Index in the proper Tablespaces on weekly or on monthly
basis.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 10.5pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;en-US&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #222222; font-size: 10.5pt;&quot;&gt;These reallocation will be done
based on &lt;/span&gt;&lt;span lang=&quot;de&quot; style=&quot;font-size: 11pt;&quot;&gt;num_rows,
avg_row_len and initial_extent of the Table objects.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;de&quot; style=&quot;font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;color: #17365d; font-family: Calibri; font-size: 16.0pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Manual Tablespace reallocation scripts:&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;color: #366092; font-family: Calibri; font-size: 13.0pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Table:&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
ALTER TABLE &amp;lt;TABLE NAME to be moved&amp;gt; MOVE TABLESPACE
&amp;lt;destination TABLESPACE NAME&amp;gt;;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;color: #366092; font-family: Calibri; font-size: 13.0pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Index:&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
ALTER INDEX &amp;lt;INDEX_NAME&amp;gt; REBUILD TABLESPACE
&amp;lt;TABLESPACE_NAME&amp;gt;;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;color: #366092; font-family: Calibri; font-size: 13.0pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;LOBSEGMENT:&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;margin: 0in;&quot;&gt;
&lt;span style=&quot;font-size: 14.6667px;&quot;&gt;In Order&lt;/span&gt;&lt;span style=&quot;font-family: inherit; font-size: 11pt;&quot;&gt;&amp;nbsp;to move CLOB column to different tablespace, use the below
command. This will move LOGSEGMENT and LOBINDEX to the new tablespace.&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
ALTER TABLE &amp;lt;Table_Name&amp;gt; MOVE LOB(&amp;lt;CLOB_Column&amp;gt;) STORE AS
(TABLESPACE &amp;lt;Tablespace_name&amp;gt;);&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;color: #366092; font-family: Calibri; font-size: 13.0pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;LOBINDEX:&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;You cannot specify a tablespace for the LOBINDEX -- it is automatically
created and moved with the LOBSEGMENT.&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;color: #366092; font-family: Calibri; font-size: 13.0pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;TABLE PARTITION:&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
alter table &amp;lt;table_name&amp;gt; move partition
&amp;lt;Table_partition_name&amp;gt; tablespace &amp;lt;tablespace_name&amp;gt;;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;color: #366092; font-family: Calibri; font-size: 13.0pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;INDEX PARTITION:&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
ALTER INDEX &amp;lt;Index_name&amp;gt; REBUILD PARITION &amp;lt;Partition_Name&amp;gt;
TABLESPACE&amp;nbsp; &amp;lt;Tablespace_name&amp;gt;;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h2 style=&quot;margin: 0in; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;en-US&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #222222; font-size: 10.5pt;&quot;&gt;Reference&lt;/span&gt;&lt;span lang=&quot;en-US&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #222222; font-size: 10.5pt; font-weight: normal;&quot;&gt;: &lt;/span&gt;&lt;a href=&quot;http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_7003.htm&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span lang=&quot;de&quot; style=&quot;color: black; font-size: 11.0pt;&quot;&gt;http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_7003.htm&lt;/span&gt;&lt;/a&gt;&lt;span lang=&quot;de&quot; style=&quot;font-size: 11pt; font-weight: normal;&quot;&gt; and my own project experience.&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;/div&gt;
</description><link>http://oracletechuser.blogspot.com/2015/10/oracle-tablespaces.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5834920868170812007.post-3167513871536170403</guid><pubDate>Wed, 14 Oct 2015 15:21:00 +0000</pubDate><atom:updated>2015-10-14T17:22:16.204+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">active sessions</category><category domain="http://www.blogger.com/atom/ns#">killing sessions</category><category domain="http://www.blogger.com/atom/ns#">locks</category><category domain="http://www.blogger.com/atom/ns#">Oracle 11i</category><category domain="http://www.blogger.com/atom/ns#">toad</category><title>Oracle Locks and killing the blocking sessions</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
The below queries will identify the locked sessions, the owner of the locked objects.&lt;br /&gt;
&lt;br /&gt;
This also explains how to kill the blocking locked sessions.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #cccccc; color: #660000; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;--Active sessions&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;select&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;substr(a.spid,1,9) pid,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;substr(b.sid,1,5) sid,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;substr(b.serial#,1,5) ser#,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;substr(b.machine,1,6) box,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;substr(b.username,1,10) username,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-- &amp;nbsp; &amp;nbsp; b.server,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;substr(b.osuser,1,8) os_user,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;substr(b.program,1,30) program&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;from v$session b, v$process a&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;where&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;b.paddr = a.addr&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;and type=&#39;USER&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;order by os_user,username;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #cccccc; color: #660000; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;-- Query to identify the locks&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;SELECT username U_NAME, owner OBJ_OWNER,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;object_name, object_type, s.osuser,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;DECODE(l.block,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; 0, &#39;Not Blocking&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; 1, &#39;Blocking&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; 2, &#39;Global&#39;) STATUS,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; DECODE(v.locked_mode,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; 0, &#39;None&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; 1, &#39;Null&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; 2, &#39;Row-S (SS)&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; 3, &#39;Row-X (SX)&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; 4, &#39;Share&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; 5, &#39;S/Row-X (SSX)&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; 6, &#39;Exclusive&#39;, TO_CHAR(lmode)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; ) MODE_HELD&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;FROM gv$locked_object v, dba_objects d,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;gv$lock l, gv$session s&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;WHERE v.object_id = d.object_id&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;AND (v.object_id = l.id1)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;AND v.session_id = s.sid&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ORDER BY username, session_id;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #660000; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b style=&quot;background-color: #cccccc;&quot;&gt;--Identify the locks of the owner&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;SELECT *&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;FROM DBA_DML_LOCKS where owner=&amp;lt;owner_name&amp;gt;;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #cccccc; color: #660000; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;--Use this session id to find SERIAL# by using following SELECT statement&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;SELECT SID,SERIAL#&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;FROM V$SESSION&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;WHERE SID IN (SELECT SESSION_ID&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;FROM DBA_DML_LOCKS&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;where owner=&amp;lt;owner_name&amp;gt;);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #660000; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b style=&quot;background-color: #cccccc;&quot;&gt;--Use ALTER SYSTEM command to KILL SESSION and this will release the lock:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ALTER SYSTEM KILL SESSION &#39;152,361&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;In order to execute this, you may need Oracle DBA previlieges. Check with your DBA to execute this step.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://oracletechuser.blogspot.com/2015/10/oracle-locks-and-killing-blocking.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5834920868170812007.post-892626923260781356</guid><pubDate>Wed, 14 Oct 2015 14:47:00 +0000</pubDate><atom:updated>2015-10-21T10:03:14.388+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">decoding</category><category domain="http://www.blogger.com/atom/ns#">German characters</category><category domain="http://www.blogger.com/atom/ns#">HTML</category><category domain="http://www.blogger.com/atom/ns#">Oracle 11i</category><category domain="http://www.blogger.com/atom/ns#">XML</category><category domain="http://www.blogger.com/atom/ns#">XMLserialize</category><title>Dealing with German Characters in XML/Oracle </title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
There are couple of ways to handle German characters like Ü,Ä,Ö,ä,ö,ü,ß in XML and Oracle queries.&lt;br /&gt;
&lt;br /&gt;
In case of XML, we use the &lt;a href=&quot;https://docs.oracle.com/cd/B28359_01/server.111/b28286/functions239.htm&quot;&gt;XMLserialize&lt;/a&gt; function with encoding options.&lt;br /&gt;
&lt;br /&gt;
The most common encoding options for printing German characters are:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/ISO/IEC_8859-1&quot;&gt;ISO-8859-1&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Windows-1252&quot;&gt;windows-1252&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
The commonly used encoding option &lt;a href=&quot;https://en.wikipedia.org/wiki/UTF-8&quot;&gt;UTF-8&amp;nbsp;&lt;/a&gt;&amp;nbsp;does not support German characters.&lt;br /&gt;
&lt;br /&gt;
The below are the programming way of explaining these encoding options:&lt;br /&gt;
&lt;br /&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
SELECT XMLSerialize(DOCUMENT
XMLType(&#39;&amp;lt;BODY&amp;gt;äÄßÜüÜberwachung&amp;lt;/BODY&amp;gt;&#39;) as BLOB ENCODING &#39;&lt;span style=&quot;background-color: yellow;&quot;&gt;UTF-8&lt;/span&gt;&#39;
VERSION &#39;1.0&#39; INDENT SIZE = 2)&lt;/div&gt;
&lt;br /&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp; AS xmlserialize_doc FROM DUAL&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK5_V92pjaccxo6RV1rif7364hkIOPEl80Twjpj_mHC-qV3vBALiRgZcz9zg67NPvoDTG2wKoqgaiuD-exYUdvEYcW-oQgtuBcdhD9HDCja5Ue-_pDHGBeJbayx1di3JiTGzoTbv8CuKk/s1600/UTF-8.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK5_V92pjaccxo6RV1rif7364hkIOPEl80Twjpj_mHC-qV3vBALiRgZcz9zg67NPvoDTG2wKoqgaiuD-exYUdvEYcW-oQgtuBcdhD9HDCja5Ue-_pDHGBeJbayx1di3JiTGzoTbv8CuKk/s1600/UTF-8.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;As you see the UTF-8 encoding option does not support German characters.&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Lets see the other options.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
SELECT XMLSerialize(DOCUMENT
XMLType(&#39;&amp;lt;BODY&amp;gt;äÄßÜüÜberwachung&amp;lt;/BODY&amp;gt;&#39;) as BLOB ENCODING
&#39;&lt;span style=&quot;background-color: yellow;&quot;&gt;ISO-8859-1&lt;/span&gt;&#39; VERSION &#39;1.0&#39; INDENT SIZE = 2)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp; AS xmlserialize_doc FROM DUAL;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09UnsjveMesH10bDtCdL4aawjDHTtmsxhpQp5GkKDn7koeCbI2VBfjl6C-PtJwZdaURFD6hSTGlrAlwocNiAMDeZlfQzvnQeBqXqHOI76Z0nfXrDZ8dFyRI7GW82ry-I9463IFpvhzE8/s1600/iso.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09UnsjveMesH10bDtCdL4aawjDHTtmsxhpQp5GkKDn7koeCbI2VBfjl6C-PtJwZdaURFD6hSTGlrAlwocNiAMDeZlfQzvnQeBqXqHOI76Z0nfXrDZ8dFyRI7GW82ry-I9463IFpvhzE8/s1600/iso.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
This encoding is working :)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;SELECT XMLSerialize(DOCUMENT
XMLType(&#39;&amp;lt;BODY&amp;gt;äÄßÜüÜberwachung&amp;lt;/BODY&amp;gt;&#39;) as BLOB ENCODING
&#39;&lt;span style=&quot;background-color: yellow;&quot;&gt;windows-1252&lt;/span&gt;&#39; VERSION &#39;1.0&#39; INDENT SIZE = 2)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp; AS xmlserialize_doc FROM DUAL;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0VR0NFH7hWJW0NMjay8BkSERWUmaBMndNUhQiCyPts_Z30QYZar1fuub61uknLDZ8lss4hAGa6uNimGqE7SLWFVV8VB9j1eClDn1HJmtOsbznq1GKnJErrnhWbkip2cH_zzJ_xBD7oMo/s1600/windows.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0VR0NFH7hWJW0NMjay8BkSERWUmaBMndNUhQiCyPts_Z30QYZar1fuub61uknLDZ8lss4hAGa6uNimGqE7SLWFVV8VB9j1eClDn1HJmtOsbznq1GKnJErrnhWbkip2cH_zzJ_xBD7oMo/s1600/windows.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
This option is working as well.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
The only problem with this approach is that output will be in BLOB format and we need a &lt;a href=&quot;http://oracletechuser.blogspot.de/2015/10/function-for-converting-blob-to-clob.html&quot; target=&quot;_blank&quot;&gt;function &lt;/a&gt;to convert that into CLOB to use it.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
We can use the below approach as well to use it in the oracle objects like package or function:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
SELECT REPLACE (&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REPLACE (&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&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; REPLACE (&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&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; REPLACE (&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&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; REPLACE (&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REPLACE
(REPLACE (&#39;ÜäÖößü&#39;, &#39;ß&#39;, &#39;ss&#39;),&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&#39;Ü&#39;,&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&#39;Ue&#39;),&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;Ö&#39;,&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;Oe&#39;),&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&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; &#39;Ä&#39;,&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&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; &#39;Ae&#39;),&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&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; &#39;ä&#39;,&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&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; &#39;ae&#39;),&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&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; &#39;ü&#39;,&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&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; &#39;ue&#39;),&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;ö&#39;,&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;oe&#39;)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp; FROM DUAL;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;This will replace the German characters into the English equivalent.&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;This approach will be useful if the encoding option is not supported by systems like Interfaces.&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The below are the HTML notation for the German characters:&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ul style=&quot;background-color: white; border: 0px; box-sizing: inherit; color: #333333; line-height: 31.9998px; margin: 0px 0px 1.6842em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; box-sizing: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;ä -&amp;gt; &amp;amp;auml;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; box-sizing: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Ä -&amp;gt; &amp;amp;Auml;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; box-sizing: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;ö -&amp;gt; &amp;amp;ouml;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; box-sizing: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Ö -&amp;gt; &amp;amp;Ouml;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; box-sizing: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;ü -&amp;gt; &amp;amp;uuml;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; box-sizing: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Ü -&amp;gt; &amp;amp;Uuml;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; box-sizing: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;ß -&amp;gt; &amp;amp;szlig;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; box-sizing: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;€ -&amp;gt; &amp;amp;euro;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; box-sizing: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;amp; -&amp;gt; &amp;amp;amp;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; box-sizing: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;lt; -&amp;gt; &amp;amp;lt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; box-sizing: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;gt; -&amp;gt; &amp;amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; box-sizing: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;„ -&amp;gt; &amp;amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; box-sizing: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;© -&amp;gt; &amp;amp;copy;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; box-sizing: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;• -&amp;gt; &amp;amp;bull;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; box-sizing: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;™ -&amp;gt; &amp;amp;trade;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; box-sizing: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;® -&amp;gt; &amp;amp;reg;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; box-sizing: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;§ -&amp;gt; &amp;amp;sect;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; box-sizing: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;| -&amp;gt; |&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://oracletechuser.blogspot.com/2015/10/dealing-with-german-characters-in.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK5_V92pjaccxo6RV1rif7364hkIOPEl80Twjpj_mHC-qV3vBALiRgZcz9zg67NPvoDTG2wKoqgaiuD-exYUdvEYcW-oQgtuBcdhD9HDCja5Ue-_pDHGBeJbayx1di3JiTGzoTbv8CuKk/s72-c/UTF-8.JPG" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5834920868170812007.post-4209200274802683624</guid><pubDate>Wed, 14 Oct 2015 14:21:00 +0000</pubDate><atom:updated>2015-10-21T09:59:21.658+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">blob</category><category domain="http://www.blogger.com/atom/ns#">clob</category><category domain="http://www.blogger.com/atom/ns#">conversion</category><category domain="http://www.blogger.com/atom/ns#">Oracle 11i</category><category domain="http://www.blogger.com/atom/ns#">Oracle datatypes</category><title>Function for converting BLOB to CLOB</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;The below is the function to convert BLOB to CLOB datatypes.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Before going to the function, lets understand what are those datatypes about:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h2 style=&quot;font-size: 1.34em; margin-bottom: 0.1em; margin-top: 0pc; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif;&quot;&gt;BLOB data type&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;div class=&quot;section&quot; style=&quot;margin-bottom: 1em; margin-top: 1em;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;A BLOB (binary large object) is a varying-length binary string that can be up to 2,147,483,647 characters long. Like other binary types, BLOB strings are not associated with a code page. In addition, BLOB strings do not hold character data.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;The length is given in bytes for BLOB unless one of the suffixes K, M, or G is given, relating to the multiples of 1024, 1024*1024, 1024*1024*1024 respectively.&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;note&quot; style=&quot;margin-bottom: 1em; margin-top: 1em;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;notetitle&quot; style=&quot;font-weight: bold;&quot;&gt;Note:&amp;nbsp;&lt;/span&gt;Length is specified in bytes for BLOB.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; style=&quot;margin-bottom: 1em; margin-top: 1em;&quot;&gt;
&lt;h2 class=&quot;sectiontitle&quot; style=&quot;font-size: 1.17em; margin-bottom: 0em; margin-top: 1em;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Syntax&lt;/span&gt;&lt;/h2&gt;
&lt;pre&gt;&lt;strong&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
{ BLOB | BINARY LARGE OBJECT } [ ( &lt;em&gt;length&lt;/em&gt; [{K |M |G }] ) ]&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;strong&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;h1 class=&quot;topictitle1&quot; style=&quot;font-size: 1.34em; margin-bottom: 0.1em; margin-top: 0pc; white-space: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif;&quot;&gt;CLOB data type&lt;/span&gt;&lt;/h1&gt;
&lt;div style=&quot;white-space: normal;&quot;&gt;
&lt;div class=&quot;section&quot; style=&quot;margin-bottom: 1em; margin-top: 1em;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;A CLOB (character large object) value can be up to 2,147,483,647 characters long. A CLOB is used to store unicode character-based data, such as large documents in any character set.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;The length is given in number characters for both CLOB, unless one of the suffixes K, M, or G is given, relating to the multiples of 1024, 1024*1024, 1024*1024*1024 respectively.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Length is specified in characters (unicode) for CLOB.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;section&quot; style=&quot;margin-bottom: 1em; margin-top: 1em;&quot;&gt;
&lt;h2 class=&quot;sectiontitle&quot; style=&quot;font-size: 1.17em; margin-bottom: 0em; margin-top: 1em;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Syntax&lt;/span&gt;&lt;/h2&gt;
&lt;pre&gt;&lt;strong&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;{CLOB |CHARACTER LARGE OBJECT} [ ( length [{K |M |G}] ) ]&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; style=&quot;font-family: &#39;Times New Roman&#39;; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
&lt;h3 style=&quot;font-size: 1.17em; margin-bottom: 0em; margin-top: 1em; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;FUNCTION:&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
CREATE OR REPLACE FUNCTION blob_to_clob (blob_in IN BLOB)&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
RETURN CLOB&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
AS&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v_clob&amp;nbsp;&amp;nbsp;&amp;nbsp; CLOB;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v_varchar VARCHAR2(32767);&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v_start&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PLS_INTEGER := 1;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v_buffer&amp;nbsp; PLS_INTEGER := 32767;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
BEGIN&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
DBMS_LOB.CREATETEMPORARY(v_clob, TRUE);&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FOR i IN
1..CEIL(DBMS_LOB.GETLENGTH(blob_in) / v_buffer)&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOOP&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v_varchar :=
UTL_RAW.CAST_TO_VARCHAR2(DBMS_LOB.SUBSTR(blob_in, v_buffer, v_start));&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
DBMS_LOB.WRITEAPPEND(v_clob, LENGTH(v_varchar), v_varchar);&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v_start := v_start +
v_buffer;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END LOOP;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp; RETURN v_clob;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp; &lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
END blob_to_clob;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
/&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><link>http://oracletechuser.blogspot.com/2015/10/function-for-converting-blob-to-clob.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5834920868170812007.post-5526158376457499889</guid><pubDate>Wed, 14 Oct 2015 14:11:00 +0000</pubDate><atom:updated>2015-10-15T23:00:36.876+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Export in Toad</category><category domain="http://www.blogger.com/atom/ns#">Oracle 11i</category><category domain="http://www.blogger.com/atom/ns#">Oracle 12c</category><category domain="http://www.blogger.com/atom/ns#">Toad version issue</category><title>Toad Version Problem</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;I use Oracle 11.2. version and have been using Toad 12.6.0.53 version.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6xmvAEi5dXnKoVKKspE6XswFg_X6n5Bs0VTu_1Ssixnq2aIaeY_Z6vVxtiiBchc0sXYw33qPSfy5gBQvAoH2C_QOUDdwk-nQQzkcUoblHa3OpVn-wyaeCqklFIkYKFofYoB3DCy7760U/s1600/Toad2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;122&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6xmvAEi5dXnKoVKKspE6XswFg_X6n5Bs0VTu_1Ssixnq2aIaeY_Z6vVxtiiBchc0sXYw33qPSfy5gBQvAoH2C_QOUDdwk-nQQzkcUoblHa3OpVn-wyaeCqklFIkYKFofYoB3DCy7760U/s320/Toad2.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;Oracle Version:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit
Production&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
PL/SQL Release 11.2.0.3.0 - Production&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
CORE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;11.2.0.3.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Production&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
TNS for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production&lt;/div&gt;
&lt;br /&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
NLSRTL Version 11.2.0.3.0 - Production&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Recently when I tried to export the DDL of a particular table from this menu:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Toad =&amp;gt; Database =&amp;gt; Export =&amp;gt; Generate Schema script:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;I got this error:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjfFlcUbP_H73wAIWebu82-AWqMpEql25lVCMdkbXaaoEnmbuKEcFYiIhc8l0jB19RVrIYO8FJGkffRL5H4BrSVxIdNlqQmWK2FzEr6qU7zdPUiADD8beug7t_SzWUba541dp2OpII6J0/s1600/Toad1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;96&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjfFlcUbP_H73wAIWebu82-AWqMpEql25lVCMdkbXaaoEnmbuKEcFYiIhc8l0jB19RVrIYO8FJGkffRL5H4BrSVxIdNlqQmWK2FzEr6qU7zdPUiADD8beug7t_SzWUba541dp2OpII6J0/s320/Toad1.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-size: 16px; line-height: 24px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;I tried to see how this error occurs: so I spooled sql into the screen and got this output:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;Select table_name, column_name, data_type, data_type_mod,
data_type_owner,&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; decode(data_type, &#39;CHAR&#39;,
char_length,&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&#39;VARCHAR&#39;, char_length,&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&#39;VARCHAR2&#39;, char_length,&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;NCHAR&#39;,
char_length,&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&#39;NVARCHAR&#39;, char_length,&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&#39;NVARCHAR2&#39;, char_length,&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
data_length) data_length,&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data_precision,
data_scale, nullable, char_used&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , virtual_column&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , identity_column,
column_id, hidden_column, default_on_null&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
FROM SYS.DBA_TAB_COLS c&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
WHERE OWNER = :own&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;background: yellow; mso-highlight: yellow;&quot;&gt;AND&amp;nbsp;&amp;nbsp; USER_GENERATED = &#39;YES&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
and exists (select &#39;x&#39;&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from&amp;nbsp; sys.DBA_ALL_TABLES t&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where t.table_name =
c.table_name&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and&amp;nbsp;&amp;nbsp; t.owner = c.owner)&lt;/div&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
order by table_name, internal_column_id&lt;/div&gt;
&lt;br /&gt;
&lt;div lang=&quot;de&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
I tried looking information about the column &#39;USER_GENERATED&#39; in the table DBA_TAB_COLS in the Oracle Documentation and got the below information:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX55UrmD5lYUrFKLeLNHJ3S2FdzmAZRgZdfiyFkchakxO8QHOzatcM0XpJ3ERRUOU5vK6XZhhKV3yEusEtz2QfEyt_BRhTOEv8Wu5r_MPiyBV3u_DSlo0AGRB8xsnusHLpVTQtD6z00VA/s1600/Toad3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX55UrmD5lYUrFKLeLNHJ3S2FdzmAZRgZdfiyFkchakxO8QHOzatcM0XpJ3ERRUOU5vK6XZhhKV3yEusEtz2QfEyt_BRhTOEv8Wu5r_MPiyBV3u_DSlo0AGRB8xsnusHLpVTQtD6z00VA/s1600/Toad3.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This column is a Oracle 12c column and my Toad tried to look for this column as I use the wrong version of Toad.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background: yellow; font-weight: bold; mso-highlight: yellow;&quot;&gt;Resolution: Toad and Oracle versions are
incompatible. So Installed Toad 11.6 version. This will resolve the version discrepancy issue.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background: yellow; font-weight: bold; mso-highlight: yellow;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://oracletechuser.blogspot.com/2015/10/toad-version-problem.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6xmvAEi5dXnKoVKKspE6XswFg_X6n5Bs0VTu_1Ssixnq2aIaeY_Z6vVxtiiBchc0sXYw33qPSfy5gBQvAoH2C_QOUDdwk-nQQzkcUoblHa3OpVn-wyaeCqklFIkYKFofYoB3DCy7760U/s72-c/Toad2.png" height="72" width="72"/><thr:total>1</thr:total></item></channel></rss>