I Have a program in C that drops a bitmap index and then rebuilds it.
Its a DW system wherein we drop the indexes load the data and recreate the bitmap indexes.
While dropping the bitmap index in the Pro C program sometimes i get that error ora 54 resource busy.I am thinking of trying the operation again all over till i suceed what do you guys think about this ?
code is something like
for dropping the index
execute immeduate 'drop index ...';
For creating the index
My C program calls a Pl/sql block and after creating the index when i try to set the degree of parallelism to 1 i run into ora 54 resource busy problem.So should i code similarly in the pl/sql block something like
execute immeditae 'alter index xyz parallel 1';
exit when sqlca.code!=54;
is this the right approach ?
This code would be run through a scheduler .and would called through out the day by a lot of programs.
How about a different approach, of setting the index unusable, "alter session set skip_unusable_indexes=true", load, then rebuild the indexes? I find it more robust myself, as changes to index properties (tablespace etc) do not have to be stored outside of the existing index definition.
Are you using direct-path loads, by the way? If so, have you evaluated loading with enabled indexes in place? If not, I would strongly advise that you use direct and not conventional-path inserts