<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Extract Index Definition from Oracle in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/extract-index-definition-from-oracle/m-p/5003811#M773014</link>
    <description>Volker,&lt;BR /&gt;I had another snoop and found:&lt;BR /&gt;&lt;A href="http://oracle.ittoolbox.com/code/archives.asp?d=2117&amp;amp;a=s&amp;amp;i=10" target="_blank"&gt;http://oracle.ittoolbox.com/code/archives.asp?d=2117&amp;amp;a=s&amp;amp;i=10&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Notes:&lt;BR /&gt;Check what your utl_file_dir is.&lt;BR /&gt;Customize the select by replacing schema_name and adding your index_name&lt;BR /&gt;&lt;BR /&gt;I had to run as sys&lt;BR /&gt;connect / as sysdba&lt;BR /&gt;@c1.sql&lt;BR /&gt;exec CREATE_SQL_FOR_INDICES&lt;BR /&gt;&lt;BR /&gt;Produced a script like:&lt;BR /&gt;CREATE UNIQUE INDEX APPLY$_ERROR_HANDLER_UNQ ON APPLY$_ERROR_HANDLER(RESOLUTION_ID) TABLESPACE SYSTEM;&lt;BR /&gt;</description>
    <pubDate>Mon, 18 Sep 2006 06:25:15 GMT</pubDate>
    <dc:creator>Peter Godron</dc:creator>
    <dc:date>2006-09-18T06:25:15Z</dc:date>
    <item>
      <title>Extract Index Definition from Oracle</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/extract-index-definition-from-oracle/m-p/5003808#M773011</link>
      <description>&lt;!--!*#--&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;how do I extract the exact "CREATE INDEX" Statement for a function based index ?&lt;BR /&gt;&lt;BR /&gt;I tried this:&lt;BR /&gt;&lt;BR /&gt;select substr ( INDEX_NAME||':'||COLUMN_NAME,1,60),DESCEND &lt;BR /&gt;from DBA_IND_COLUMNS where INDEX_NAME like '&amp;amp;index_like_value%' &lt;BR /&gt;order by INDEX_NAME,COLUMN_POSITION;&lt;BR /&gt;&lt;BR /&gt;Which runs like:&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt; select substr ( INDEX_NAME||':'||COLUMN_NAME,1,60),DESCEND&lt;BR /&gt;from DBA_IND_COLUMNS where INDEX_NAME like '&amp;amp;index_like_value%'&lt;BR /&gt;order by INDEX_NAME,COLUMN_POSITION;&lt;BR /&gt;Enter value for index_like_value: /BIC/AY04_WP_I00%&lt;BR /&gt;old   2: from DBA_IND_COLUMNS where INDEX_NAME like '&amp;amp;index_like_value%'&lt;BR /&gt;new   2: from DBA_IND_COLUMNS where INDEX_NAME like '/BIC/AY04_WP_I00%%'&lt;BR /&gt;&lt;BR /&gt;/BIC/AY04_WP_I0004:SOURSYSTEM                                ASC&lt;BR /&gt;/BIC/AY04_WP_I0004:/BIC/Y04GRANST                            ASC&lt;BR /&gt;/BIC/AY04_WP_I0004:/BIC/Y04HESYS                             ASC&lt;BR /&gt;/BIC/AY04_WP_I0004:/B20/S_C43CLACC                           ASC&lt;BR /&gt;/BIC/AY04_WP_I0004:/B20/S_C41FINST                           ASC&lt;BR /&gt;/BIC/AY04_WP_I00~0:SOURSYSTEM                                ASC&lt;BR /&gt;/BIC/AY04_WP_I00~0:/B20/S_C30POS                             ASC&lt;BR /&gt;/BIC/AY04_WP_I00~0:/BIC/AO_VER_VF                            ASC&lt;BR /&gt;/BIC/AY04_WP_I00~0:/BIC/AO_SYS_VF                            ASC&lt;BR /&gt;/BIC/AY04_WP_I00~0:/BIC/AO_VAL_VF                            ASC&lt;BR /&gt;/BIC/AY04_WP_I00~ZV8:SOURSYSTEM                              ASC&lt;BR /&gt;/BIC/AY04_WP_I00~ZV8:/BIC/AO_PACKNO                          ASC&lt;BR /&gt;/BIC/AY04_WP_I00~ZV8:/B20/S_C41FINST                         ASC&lt;BR /&gt;/BIC/AY04_WP_I00~ZV8:SYS_NC00029$                            DESC&lt;BR /&gt;/BIC/AY04_WP_I00~ZV9:SOURSYSTEM                              ASC&lt;BR /&gt;/BIC/AY04_WP_I00~ZV9:/BIC/AO_PACKNO                          ASC&lt;BR /&gt;/BIC/AY04_WP_I00~ZV9:SYS_NC00029$                            DESC&lt;BR /&gt;&lt;BR /&gt;17 rows selected.&lt;BR /&gt;&lt;BR /&gt;Elapsed: 00:00:00.16&lt;BR /&gt;SQL&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Now I like to identify my reverse ordered columns by name, i.E "SYS_NC00029$"&lt;BR /&gt;&lt;BR /&gt;I scaned a lot of DBA_ Tables, but did not find it yet ?&lt;BR /&gt;&lt;BR /&gt;Volker</description>
      <pubDate>Mon, 18 Sep 2006 04:50:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/extract-index-definition-from-oracle/m-p/5003808#M773011</guid>
      <dc:creator>Volker Borowski</dc:creator>
      <dc:date>2006-09-18T04:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Index Definition from Oracle</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/extract-index-definition-from-oracle/m-p/5003809#M773012</link>
      <description>Volker,&lt;BR /&gt;unless a script is absolutely required, you could use TOAD.</description>
      <pubDate>Mon, 18 Sep 2006 05:03:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/extract-index-definition-from-oracle/m-p/5003809#M773012</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-09-18T05:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Index Definition from Oracle</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/extract-index-definition-from-oracle/m-p/5003810#M773013</link>
      <description>Peter,&lt;BR /&gt;&lt;BR /&gt;Toad will surely work, but I am not permitted to install it right here.&lt;BR /&gt;&lt;BR /&gt;Got a (not so good) solution meanwhile:&lt;BR /&gt;Doing an export of the table with&lt;BR /&gt;rows=n&lt;BR /&gt;indexes=y&lt;BR /&gt;constraints=n&lt;BR /&gt;grants=n&lt;BR /&gt;triggers=n&lt;BR /&gt;gives the complete CREATE INDEX statement in the dump, allthough it is a bit garbled.&lt;BR /&gt;&lt;BR /&gt;Since I do not like to use EXP all the time in production, still a rabit to win for the dictionary table that contains the required information.&lt;BR /&gt;&lt;BR /&gt;Volker</description>
      <pubDate>Mon, 18 Sep 2006 05:52:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/extract-index-definition-from-oracle/m-p/5003810#M773013</guid>
      <dc:creator>Volker Borowski</dc:creator>
      <dc:date>2006-09-18T05:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Index Definition from Oracle</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/extract-index-definition-from-oracle/m-p/5003811#M773014</link>
      <description>Volker,&lt;BR /&gt;I had another snoop and found:&lt;BR /&gt;&lt;A href="http://oracle.ittoolbox.com/code/archives.asp?d=2117&amp;amp;a=s&amp;amp;i=10" target="_blank"&gt;http://oracle.ittoolbox.com/code/archives.asp?d=2117&amp;amp;a=s&amp;amp;i=10&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Notes:&lt;BR /&gt;Check what your utl_file_dir is.&lt;BR /&gt;Customize the select by replacing schema_name and adding your index_name&lt;BR /&gt;&lt;BR /&gt;I had to run as sys&lt;BR /&gt;connect / as sysdba&lt;BR /&gt;@c1.sql&lt;BR /&gt;exec CREATE_SQL_FOR_INDICES&lt;BR /&gt;&lt;BR /&gt;Produced a script like:&lt;BR /&gt;CREATE UNIQUE INDEX APPLY$_ERROR_HANDLER_UNQ ON APPLY$_ERROR_HANDLER(RESOLUTION_ID) TABLESPACE SYSTEM;&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Sep 2006 06:25:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/extract-index-definition-from-oracle/m-p/5003811#M773014</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-09-18T06:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Index Definition from Oracle</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/extract-index-definition-from-oracle/m-p/5003812#M773015</link>
      <description>Peter,&lt;BR /&gt;&lt;BR /&gt;thanks, but this script is way too poor.&lt;BR /&gt;&lt;BR /&gt;It does not care about&lt;BR /&gt;- multi-column-indexes&lt;BR /&gt;-- order of multi-column index-columns&lt;BR /&gt;- ascending/descending columns&lt;BR /&gt;&lt;BR /&gt;I searched half of google before I asked here. Lots of stuff out there, but also a lot of faulty or at least incomplete stuff.&lt;BR /&gt;&lt;BR /&gt;Volker&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Sep 2006 06:42:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/extract-index-definition-from-oracle/m-p/5003812#M773015</guid>
      <dc:creator>Volker Borowski</dc:creator>
      <dc:date>2006-09-18T06:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Index Definition from Oracle</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/extract-index-definition-from-oracle/m-p/5003813#M773016</link>
      <description>Try the dbms_metadata procedure.&lt;BR /&gt;For example.&lt;BR /&gt;create table pdj_test(fld number ); &lt;BR /&gt;create index pdj_test_f1 on pdj_test (to_char(fld));&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; select dbms_metadata.GET_DDL('INDEX','PDJ_TEST_F1','SYSTEM') from dual;&lt;BR /&gt;&lt;BR /&gt;----  Handles function based indexes. ---&lt;BR /&gt;&lt;BR /&gt;  CREATE INDEX "SYSTEM"."PDJ_TEST_F1" ON "SYSTEM"."PDJ_TEST" (TO_CHAR("FLD"))&lt;BR /&gt;  PCTFREE 10 INITRANS 2 MAXTRANS 255&lt;BR /&gt;  STORAGE(INITIAL 16384 NEXT 16384 MINEXTENTS 1 MAXEXTENTS 505&lt;BR /&gt;  PCTINCREASE 50 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)&lt;BR /&gt;  TABLESPACE "SYSTEM"</description>
      <pubDate>Mon, 18 Sep 2006 09:29:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/extract-index-definition-from-oracle/m-p/5003813#M773016</guid>
      <dc:creator>Patti Johnson</dc:creator>
      <dc:date>2006-09-18T09:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Index Definition from Oracle</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/extract-index-definition-from-oracle/m-p/5003814#M773017</link>
      <description>Patti,&lt;BR /&gt;&lt;BR /&gt;that pretty much seems to nail it perfectly!&lt;BR /&gt;Will try out tomorrow morning !&lt;BR /&gt;&lt;BR /&gt;Good night&lt;BR /&gt;Volker</description>
      <pubDate>Mon, 18 Sep 2006 13:59:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/extract-index-definition-from-oracle/m-p/5003814#M773017</guid>
      <dc:creator>Volker Borowski</dc:creator>
      <dc:date>2006-09-18T13:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Index Definition from Oracle</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/extract-index-definition-from-oracle/m-p/5003815#M773018</link>
      <description>&lt;!--!*#--&gt;Also....&lt;BR /&gt;&lt;BR /&gt;exp system/manager indexfile=myindexes.txt owner = scott &lt;BR /&gt;&lt;BR /&gt;This will produce a better formatted output file containing all the create index statements. &lt;BR /&gt;&lt;BR /&gt;Cheers!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Sep 2006 01:02:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/extract-index-definition-from-oracle/m-p/5003815#M773018</guid>
      <dc:creator>Leon Allen</dc:creator>
      <dc:date>2006-09-19T01:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Index Definition from Oracle</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/extract-index-definition-from-oracle/m-p/5003816#M773019</link>
      <description>Excellent Solution by Patti !&lt;BR /&gt;Closing thread.&lt;BR /&gt;Volker</description>
      <pubDate>Tue, 19 Sep 2006 03:14:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/extract-index-definition-from-oracle/m-p/5003816#M773019</guid>
      <dc:creator>Volker Borowski</dc:creator>
      <dc:date>2006-09-19T03:14:20Z</dc:date>
    </item>
  </channel>
</rss>

