Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 776741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:29:49+00:00 2026-05-14T19:29:49+00:00

I’ve written a PL/SQL procedure that would benefit if indexes were first disabled, then

  • 0

I’ve written a PL/SQL procedure that would benefit if indexes were first disabled, then rebuilt upon completion. An existing thread suggests this approach:

alter session set skip_unusable_indexes = true;

alter index your_index unusable;

[do import]

alter index your_index rebuild;

However, I get the following error on the first alter index statement:

SQL Error: ORA-14048: a partition maintenance operation may not be combined with other operations
ORA-06512: [...]
14048. 00000 -  "a partition maintenance operation may not be combined with other operations"
*Cause:    ALTER TABLE or ALTER INDEX statement attempted to combine
           a partition maintenance operation (e.g. MOVE PARTITION) with some
           other operation (e.g. ADD PARTITION or PCTFREE which is illegal
*Action:   Ensure that a partition maintenance operation is the sole
           operation specified in ALTER TABLE or ALTER INDEX statement;
           operations other than those dealing with partitions,
           default attributes of partitioned tables/indices or
           specifying that a table be renamed (ALTER TABLE RENAME) may be
           combined at will

The problem index is defined so:

CREATE INDEX A11_IX1 ON STREETS ("SHAPE")
  INDEXTYPE IS "SDE"."ST_SPATIAL_INDEX" PARAMETERS
  ('ST_GRIDS=890,8010,72090 ST_SRID=2');

This is a custom index type from a 3rd-party vendor, and it causes chronic performance degradation during high-volume update/insert/delete operations.

Any suggestions on how to work around this error? By the way, this error only occurs within a PL/SQL block.

Edit: Here is the procedure in its entirety:

procedure disable_indexes (
  tbl_name in varchar2
) as
  stmt varchar2(200);
  cursor curs(v_tbl_name in varchar2) is
    select 'alter index ' || index_name || ' unusable;' as ddl_stmt
    from user_indexes
    where upper(table_owner) = upper(user)
    and upper(table_name) = upper(v_tbl_name)
    and ityp_name in ('CTXCAT', 'ST_SPATIAL_INDEX');
begin
  for r_curs in curs(tbl_name) loop
    dbms_output.put_line(r_curs.ddl_stmt);
    execute immediate r_curs.ddl_stmt;
  end loop;
end;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T19:29:50+00:00Added an answer on May 14, 2026 at 7:29 pm

    If this is really your code and not a pseudo-code rewrite, remove the ; at the end of your statement in the stmt variable (otherwise you will run into ORA-00911: invalid character during execution)

    Now if your process works manually, you should be able to make it work with execute immediate in a procedure. Make sure that this is not a role issue (see this article by Tom Kyte) by issuing SET ROLE NONE before executing the commands manually.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.