How to delete the indexes of a table using routine
Moderators: chulett, rschirm, roy
How to delete the indexes of a table using routine
Hi
I have to delete the indexes of a table using routines. Can anyone help me... please
I have to delete the indexes of a table using routines. Can anyone help me... please
Re: How to delete the indexes of a table using routine
No, you don't. You may need to drop them but why do you believe that you 'need' to do this in a routine?Madhu1981 wrote:I have to delete the indexes of a table using routines.
As noted, the OPEN command is a more appropriate place for commands of that nature. Another solution, seeing as how most users would not have the privledges needed for this, would be the creation of procedure under a user that does and then grant your user the ability to execute it.
You'll need to rebuild them once you are done.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Craig beat me to it.
Always challenge unreasonable and preposterous requirements.
Surely if you can drop indexes without a routine, that is more efficient? How good are your C++ skills? What resources do "they" have for maintaining routines?
Always challenge unreasonable and preposterous requirements.
Surely if you can drop indexes without a routine, that is more efficient? How good are your C++ skills? What resources do "they" have for maintaining routines?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Hi Guru...DSguru2B wrote:Or you can do it in the OPEN command of a database stage. And how exactly are you going to do it in a routine? Are you planning do use a Basic Transformer?
could you explain me in detail. I haven't used this OPEN command in database stage. Can you tell me the syntax of this open command also.
Thanks in advance
Its in the database stage. Syntax will be the same as you would use in your favourite sql tool. OPEN command will run only once when the connection to the database opens, before the main sql. You just need to drop index <<index_name>> on <<table_name>> . Search in google for the exact syntax for your database.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: