If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > drop indexes of a particular owner id

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-22-10, 05:50
divak divak is offline
Registered User
 
Join Date: May 2008
Posts: 24
Exclamation drop indexes of a particular owner id

Hi,
Is there any command to drop the indexes of a particular owner?

DROP INDEX [WHERE owner = XXXX];

Thanks
Reply With Quote
  #2 (permalink)  
Old 09-22-10, 08:14
InformixWilli InformixWilli is offline
Registered User
 
Join Date: Sep 2010
Location: Germany, Brunswick
Posts: 52
No but there is a way to delete them:

Code:
select  "DROP INDEX "||trim(owner)||"."||trim(idxname)||";" 
from    sysindexes 
where   owner="informix";
run, copy, paste, run, be happy

Nicer version with DBAccess
Code:
select  "INDEX "||trim(owner)||"."||trim(idxname)||";" DROP
from    sysindexes 
where   owner="informix";
You can also build a stored procedure to do this.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On