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

  • SEARCH
  • Home
  • 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 6104595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:51:35+00:00 2026-05-23T13:51:35+00:00

Below are the statements that I run to remove and recreate a USER and

  • 0

Below are the statements that I run to remove and recreate a USER and TABLESPACE on my local machine in oracle.

DROP TABLESPACE X INCLUDING CONTENTS AND DATAFILES ;
DROP USER X CASCADE;
CREATE TABLESPACE X DATAFILE '$ORACLE_PATH/X.dbf' SIZE 128M AUTOEXTEND ON EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO;
CREATE USER X IDENTIFIED BY xxxxxxx DEFAULT TABLESPACE X TEMPORARY TABLESPACE temp;
GRANT exp_full_database TO X;
GRANT CONNECT,RESOURCE,DBA TO X;

We recently added a condition to disable the lock on a table in this TABLESPACE and the above DROP command now issues:

Error report:
SQL Error: ORA-00604: error occurred at recursive SQL level 1
ORA-00069: cannot acquire lock -- table locks disabled for TABLE
00604. 00000 -  "error occurred at recursive SQL level %s"

Does anyone know of a way to DROP the USER and TABLESPACE without enabling the LOCKs or a better method to recreate a local TABLESPACE and USER with locks disabled?

Cheers

  • 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-23T13:51:35+00:00Added an answer on May 23, 2026 at 1:51 pm

    The purpose of the DISABLE TABLE LOCK command is to prevent DDL. If you could drop the table without re-enabling the table lock first that would be a bug to me.

    In your case you will have to enable table locks with a script such as this one:

    BEGIN
       FOR cc IN (SELECT owner, table_name
                    FROM all_tables
                   WHERE tablespace_name = :x
                     AND table_lock = 'DISABLED') LOOP
          EXECUTE IMMEDIATE 'ALTER TABLE "' || cc.owner || '"."' || 
                             cc.table_name || '" ENABLE TABLE LOCK';
       END LOOP;
    END;
    

    Unfortunately it may take a very long time to execute or even fail unexpectedly:

    Caution: Oracle Database waits until
    active DML transactions in the
    database have completed before locking
    the table. Sometimes the resulting
    delay is considerable.

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

Sidebar

Related Questions

In the method below there are numerous case statements (many have been removed) that
I want to run 100 Insert statements of the below Insert`s in a Script.
I have created a procedure and used the below statement inside that . select
Below is a Switch / Case statement that displays an error message when an
I have this if statement that tests for the 2 conditions below. The second
Is there a way to implement the statements below using a custom binding, to
Just wandering if it makes sense, to use if statements like below within jquery
in the code below at first if statements block (there will be more than
I'm trying to create a loop that will output multiple where statements for a
I learned today through this section of the MySQL documentation that prepared statements cannot

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.