Informatica pre sql to drop an index
<p>I am trying to load 2 million records into a oracle table using the Oracle external loader in Informatica. In order to load the data, I am trying to drop the index on the table and re create after the data is loaded. I am using the below anonymous block in the pre SQL in mapping for the target:</p>

<pre><code>Declare indxcnt int\;

 BEGIN

  SELECT COUNT(INDEX_NAME) 
  INTO indxcnt 
  FROM all_INDEXES WHERE INDEX_NAME  = 'TEST_INDEX1'\;

  IF indxcnt &gt; 0 THEN
     Execute Immediate 'DROP INDEX TEST_INDEX1'\;
  END If \;
 END\;
</code></pre>

<p>However the pre SQL is not working and as the index is not getting dropped.</p>

<p>When I use the same anonymous block in the session properties using the relation writer, it is working fine.</p>

<p>Kindly help me how to drop and re create the index while using the loader to load the table.</p>