Drop user cascade locks

Hello

I'm in Oracle Database 10 g Enterprise Edition Release 10.2.0.2.0 - Prod.

I'm trying to drop user cascade and the statement hangs with wait event 'db file scattered read' on a query from sys.

I put a trace on the session where I'm doing it and rerun the drop command.
ALTER session set events "name of the 1940 ERRORSTACK level 3 trace";
ALTER session set events 10046 trace context name forever, level 12';

The relevant section of the tkprof is below:

Select o.name, o.type #, o.obj #, o.remoteowner, o.linkname, o.namespace, o.subname
Of
obj$ o, tab$ t where o.owner #=: 1 and o.type #! 11 and o.type = #! = 13 and
o.type #! 14 and o.type = #! 10 and o.type = #! = 33 and o.type #! = 32 and o.type #.
! 8 and o.type = #! = 9 and o.type #! 7 and o.type = #! = 38 and o.type #! = 22
and o.type #! = 28 and o.type #! 29 and o.type = #! 30 and o.type = #! = 55 and
o.obj # t.obj = #(+) and (t.property is null or (bitand (t.property, 8192)! = 8192))
and bitand (t.property, 512). (= 512 and bitand(t.flags,536870912)! = 536870912))
o.type # desc order


call the query of disc elapsed to cpu count current lines
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.00 0 0 0 0
Run of 115 0.01 0.02 0 0 0 0
Fetch 7501 75.39 825,13 1385179 2455703 0 7500
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Total 7617 75,40 825,15 1385179 2455703 0 7500

Chess in the library during parsing cache: 0
Optimizer mode: CHOOSE
The analysis of the user id: SYS (recursive depth: 1).

Rows Row Source operation
------- ---------------------------------------------------
7500 SORT ORDER BY (cr = 2449755 pr = 1381735 pw = time 0 = 822704263 en)
FILTER 162677 (cr = 2449755 pr = 1381735 pw = time 0 = 818684218 en)
162677 HASH JOIN EXTERNAL (cr = 2449755 pr = 1381735 pw = time 0 = 818328045 en)
164036 TABLE ACCESS BY INDEX ROWID OBJ$ (cr = 34382 pr = 6 pw = time 0 = 737122 en)
310201 I_OBJ2 INDEX RANGE SCAN (cr = 4830 pr = 4 pw = time 0 = 126082 US)(object id 37)
14444378 TABLE ACCESS FULL TAB $ (cr = 2421321 pr = 1385173 pw = time 0 = 770578194 en)


I tried to collect statistics of dictionary and troubleshoot with Metalink ID 1291804.1.
However, none of these permits.

Please help.

Kind regards
Horia Berca

Hello

There is a bug in Oracle10.2.0.4. Please try my suggestions mentioned bellows. And let me know if any question.

1 remove the objects belonged to the first schema.
2. then slide the user later.

Also, please see my doc mentioned below.

Drop User Cascade very slow in 10.2.0.4 [ID 798586.1].

Hopefully this might solve your problem.

Thank you
Vishal Joshi
Oracle Apps DBA.

Tags: Database

Similar Questions

  • DROP USER CASCADE takes forever! Cannot see all blocks... any ideas?

    Hi all

    I am running a script that has a cascade of user to fall, and it's been sitting there for about 3.5 hours at this point.

    I ran a query to see if I could find any blocking sessions:

    SQL > alter
    A written file afiedt.buf

    1 SELECT DECODE (ask, 0,' the owner: ',' server: '). Sess sid,
    2 id1, id2, lmode, request, type
    3. IN V$ LOCK
    4. WHERE (id1, id2, type) IN
    5 (SELECT id1, id2, type OF LOCKING WHEN demand for V$ > 0)
    6 * ORDER BY id1, ask
    SQL > /.

    no selected line


    So, I'm a bit stuck... is possible to see what maybe continues this? This is performed on a 3 x system RAC node... I think this would go pretty fast...

    any ideas on what to do or what to watch?

    TIA,

    Cayenne

    Yes, you drop the first user objects, then delete it the user. Slow user drops have been written about many times over the years. It generally works better if you don't try to do everything via a single command.

    I had the same experience with drop tablespace waterfall. It is generally faster remove objects via the script, then drop the tablespace.

    For now, you want to probably just wait the drop user cascade.

    HTH - Mark D Powell.

  • Possibility for impdp clean without "drop user cascade?

    First time poster here.

    Unlike a lot of readers here, our Organization the Group DBA super duper which are very sensitive to what we do to the servers. While it is understandable that what they do is also a headache for us, also.

    The installer: We have 2 servers on 11g, a PROD and a QA. The DBA of takes a database PROD discharge via expdp and we give it to restore on QA. The plan is to drop and re-create the user before running impdp.

    The problem is that we do not have the privileges 'connect sysdba virtue' so that we can delete and re-create the user, and we won't get to have.

    It comes as good if:

    (1) we drop all the tables, procedures, sequences, and etc, then run impdp

    (2) there is an option to run impdp which will force overwrite the database?

    (3) there are other alternatives to complete updating of the schema?

    Thanks in advance for your advice.

    David

    (1) it is just as good. Maybe better, because the privileges of the user, quotas, etc. remain in place.

    (2) not sure offhand. see the documentation.

    (3) truncate everything and start the import operation. This is useful as if your structure is the same and simply refresh the data.

    Here is a block that I use to exterminate all the user objects, if I don't want to drop or create the user. He manages the types of objects in my application. If you have other types of objects, you may need to add sections for them.

    -- this will drop all objects for a user.
    -- it assumes you are logged in AS the user owning the objects
    
    BEGIN
       FOR x_rec in (select view_name from user_views) LOOP
          execute immediate 'drop view '||x_rec.view_name;
       END LOOP;
    
       FOR x_rec in (select mview_name from user_mviews) LOOP
          execute immediate 'drop materialized view '||x_rec.mview_name;
       END LOOP;
    
       FOR x_rec in (select table_name from user_tables) LOOP
          execute immediate 'drop table '||x_rec.table_name||' cascade constraints';
       END LOOP;
    
       FOR x_rec in (select synonym_name from user_synonyms) LOOP
          execute immediate 'drop synonym '||x_rec.synonym_name;
       END LOOP;
    
       FOR x_rec in (select sequence_name from user_sequences) LOOP
          execute immediate 'drop sequence '||x_rec.sequence_name;
       END LOOP;
    
       FOR x_rec in (select index_name from user_indexes) LOOP
          execute immediate 'drop index '||x_rec.index_name;
       END LOOP;
    
    END;
    /
    
    purge recyclebin;
    
  • Hanging drop user cascade and results: PX Deq: Txn recovery Star

    I have question drop cascade command user. He was suspended for an hour.
    the user segments size is 150 GB.


    In v $session_wait folowing events are coming.



    Event SID P1 P2 session_waited
    ------------------------------ ---------- ---------- ---------- ---------
    PX Deq: Beginning of recovery Txn 515 200 782 0
    PX Deq: Beginning of recovery Txn 530 200 781 0
    DB file sequential read 543 232 113709 0
    PX Deq: Start Recovery Txn 511 200 781 1
    PX Deq: Start Recovery Txn 518 200 781 1
    PX Deq: Start Recovery Txn 514 200 781 2
    PX Deq: Start Recovery Txn 516 200 781 2
    PX Deq: Start Recovery Txn 517 200 782 2
    PX Deq: Start Recovery Txn 519 200 781 2
    PX Deq: Start Recovery Txn 520 200 781 2
    PX Deq: Start Recovery Txn 521 200 781 2
    PX Deq: Start Recovery Txn 522 200 781 2
    PX Deq: Start Recovery Txn 523 200 781 2
    PX Deq: Start Recovery Txn 524 200 781 2
    PX Deq: Start Recovery Txn 525 200 781 2
    PX Deq: Start Recovery Txn 526 200 781 2
    PX Deq: Start Recovery Txn 527 200 781 2
    PX Deq: Start Recovery Txn 528 200 781 2
    PX Deq: Start Recovery Txn 529 200 781 2
    PX Deq: Start Recovery Txn 531 200 699 2
    PX Deq: Start Recovery Txn 533 200 781 2
    PX Deq: Start Recovery Txn 534 200 781 2
    PX Deq: Start Recovery Txn 535 200 782 2
    PX Deq: Start Recovery Txn 536 200 781 2
    PX Deq: Start Recovery Txn 537 200 781 2
    PX Deq: Start Recovery Txn 539 200 782 2
    PX Deq: Start Recovery Txn 540 200 781 2
    PX Deq: Start Recovery Txn 513 200 782 2
    PX Deq: Start Recovery Txn 512 200 781 2
    PX Deq: Start Recovery Txn 510 200 781 2
    PX Deq: Start Recovery Txn 509 200 781 2
    PX Deq: Start Recovery Txn 507 200 782 2
    PX Deq: Start Recovery Txn 508 200 781 2
    wait event CAP be increaed 548 0 0 124
    How to delete this user... Please advice...

    There is then some data in your segment, I suggest you truncate / drop the table one by one, finally, you delete the user.

    Now your issued user 'drop', the sql is ddl, it can not cancled, you restart your db, even the operation will continue.

  • Drop users connected to loop diagram

    Hi all

    I am currently trying to get a simple script that will get all the users currently connect to a schema and then kill the session so I can let it go. At the moment I can do this with separate controls.

    select username, osuser, sid, serial#
    from v$session
    where username like 'myschema%'
    order by username, osuser;
    

    alter system kill session '<sid>,<serial#>';
    

    drop user <user> cascade;
    

    All works, but requires that orders running manually. Ideally I would like to be able to run a command to do that. Right now I'm trying to just drag the users but I get the error:

    10:18:07 [BEGIN - 0 row (s), 0,251 seconds] [error Code: 6550, SQL State: 65000] ORA-06550: line 5, column 4:

    PLS-00103: encountered the symbol "END" when expected in the following way:

    * & = - + ; <>/ is mod remains not return rem

    return < an exponent (*) > <>or! = or ~ = > = < = <>and or

    as like2 like4 likec between using | Member in bulk

    submultiset

    The code I use is

    BEGIN
       FOR connectedUser IN (SELECT sid, serial# FROM v$session WHERE username like 'myschema%')
       LOOP
          EXECUTE IMMEDIATE 'ALTER SYSTEM KILL SESSION ''' || connectedUser.sid || ',' || connectedUser.serial# || ''
       END LOOP
    END
    

    Any help is very appreciated.

    Thank you

    Nick

    BEGIN

    FOR connectedUser IN (SELECT sid, serial # FROM v$ session WHERE username like '% USER1% ')

    LOOP

    dbms_output.put_line (connectedUser.sid |) ',' || connectedUser.serial #);

    RUN IMMEDIATELY "ALTER SYSTEM KILL SESSION"'| " connectedUser.sid | ',' | connectedUser.serial # | " ' ' ;

    END LOOP;

    END;

    / 2 3 4 5 6 7 8

    You can try over a

  • Windows SteadyState and MSE for locked user? Locked user _save files on the desktop? Add the locked user language

    I use Microsoft Windows XP SP3 and Microsoft Security Essentials.

    I did 2 locked users:

    1 locked with custom Restrictions user running Internet Explorer and other Internet browsers, write and draw and nothing much and is welcomed by right clicking on the program icon only run under other Creditentials.

    2 power User, made from MMC with Chater way to have more power that any user who can not only surf the Internet, but also play games online, and this user is also locked.

    My question is: how to make 1. User has locked protected with Microsoft Security Essentials, cause seems MSE is not protect this account, and I can't be sure because of the locked account cannot see even if it is protected, I put MSE on startup but that does not put MSE icon on the taskbar. If it is not protected is not a good cause for the idea that the user navigates Net.

    Another thing I want to do:

    For both locked users able to save files to the desktop and I have it unchecked in Windows SteadyState, but when I connect them and when I log into files are not saved on their desktop computers. So what is the point of selection/deslecting in sign of Restriction if the files went once they logout?

    I wanted to do administrator can retrieve files from their office soon logs in.

    Is - it possible and keep them locked?

    One last thing - since English isn't the only language to be used on 1 locked user account

    How can I put language so that the user can switch between EN and another language

    Thank you for your replies,

    Hi Jade000,

    I recommend you ask your question in the forums of SteadyState for assistance.

    Hope the helps of information.
    Concerning
    Joel S
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • drop user failed ORA-00604 ORA-01008

    Hello

    Oracle Database Enterprise Edition on Solaris SPARC 10.2.0.4.0.

    Recently I didn't drop a schema:

    user password menu cascade

    Error report-

    SQL error: ORA-00604: error occurred at the SQL level 1 recursive

    ORA-01008: not all variables

    ORA-06512: at line 2

    00604 00000 - "an error occurred at the SQL level recursive %s.

    * Cause: An error occurred during the processing of a recursive SQL statement

    (a statement applicable to dictionary tables inside).

    * Action: If the situation described by the following error stack

    can be corrected, to do so; otherwise contact Oracle Support.

    So, I turned on 10046 trace to check what caused the failure:

    In the trace file, I saw:

    PARSING IN CURSOR #42 len = dep 88 = 1 uid = 25 oct = 47 = 25 tim = hv 46736406559755 lid = ad 909419424 = "9a554a68".

    Start

    run immediately 'call wmsys.lt_ctx_pkg.allowDDLOperation ("false");

    end;

    END OF STMT

    ANALYSIS #42:c = 0, e = 42, p = 0, cr = 0, cu = 0, set = 0, r = 0, dep = 1, og = 1, tim = 46736406559753

    LINKS FOR #42:

    =====================

    PARSING IN CURSOR #43 len = dep 51 = 2 uid = 25 oct cover 170 = 25 tim = hv 46736406560263 = = ad 2806787184 = "b3862ea8".

    call wmsys.lt_ctx_pkg.allowDDLOperation(:"SYS_B_0")

    END OF STMT

    ANALYSIS #43:c = 0, e = 264, p = 0, cr = 0, cu = 0, put = 1, r = 0, dep = 2, og = 1, tim = 46736406560261

    EXEC #42:c = 0, e = 832, p = 0, cr = 0, cu = 2, set = 0, r = 0, dep = 1, og = 1, tim = 46736406560766

    #42 ERROR: err = 1008 tim = 490840735

    Suggests that the wmsys.lt_ctx_pkg.allowDDLOperation(''false'') caused the problem.

    So I manually ran it:

    Start

    run immediately 'call wmsys.lt_ctx_pkg.allowDDLOperation ("false");

    end;

    Error report-

    ORA-01008: not all variables

    ORA-06512: at line 2

    01008 00000 - "not all variables.

    * Cause:

    * Action:

    Can anyone help on this please? I looked everywhere but no luck.

    Thank you

    Hello

    Please, I beg you. Check the Note MOS "Datapump Export or Drop Table Fails with ORA-01008 (Doc ID 791065.1)"

    If the database parameter cursor_sharing value other than EXACT, set CURSOR_SHARING = TRUE.

    Borys

  • registration for Vista, the user is locked

    When I log on to windows vista, it shows locked user. How can I unlock it? Zeaus

    Restart > Ctrl + Alt + Delete > log.

    See you soon.

    Mick Murphy - Microsoft partner

  • The user is locked... Switch user___

    Lately on Windows Vista Home Premium I have bee getting a new screen when I start a session (the computer is never turned off) is displayed above. I am the only user and I've never blocked the computer. How can I get rid of him?

    Hello
     
    1. are you able to connect to the user account?
    2. don't you make changes before the show?
    3 does your computer crash when the system is idle?
    4. your computer connected to a domain is?
     
    We recommend that you first of all to you cross check if 'on summary, logon screen' is selected under screen saver properties. To do this, follow these steps.
    1. right click on the desktop, click Customize.
    2. from the list of options, click screen saver.
    3. make sure that "on the RESUME, logon screen" is not selected.
    4. apply the changes.
     
    NOTE: If you only have one account, and if the computer is not connected to the domain. Lucky to happen this issue is only if the computer is locked by mistake.
     
    Visit this link to understand the fast user switching: http://windows.microsoft.com/en-us/windows-vista/What-is-Fast-User-Switching
     
    I hope this helps.
     
    Kind regards
    Syed
    Answers from Microsoft supports the engineer.
  • major problem on this laptop lenovo most of users experience lock when windows starts

    I BOUGHT THIS computer PORTABLE OF BEST BUY in January 2012 I BEGAN to HAVE the PROBLEMS WITH HIM.  Finally after blocking up to 5 or 6 times during the first months of couple finally just locked up and no matter how many times I rebooted, tap, it took off the battery voltage I couldn't get windows to load.upon goes to best buy, of course, they informed me, I had 19 different virus, spyware, malware or adware on my pc.since I had not loaded programs and software here and I do not open unsoliciated e-mail and I had PC for 15 years and never had a problem, I was very skeptical. I told them no, I didn't spend $200.00 for them to fix and remove the problem that was to have my old pc of 3 months. I went back picked it up and they said well we have windows to start up, but does not remove the virus, well after returning home and running analysis trend micro system with microsoft security essentials and CC Cleaner full nothing was found on my system. I only got lock up once on me over the last 4 weeks Ive got back, but when I went on the best shopping site I noticed that most of the people who gave user reviews and booought this portable paticular all have something in common pc freezes when windows start right at the point where the screen is about to go to windows and he said wait a moment before it switches on your office. Please if anyone knows why or what's going on with this portable paticular or can give some help or suggestions, it would be greatly appreciated. Ive owned offices for 15 years and never had a problem this is my first laptop and I just spent 600 for it and want it to run properly. 12/11/15 IS A LENOVO V570 MAKING DAT IS IT im assuming that it is December 15, 2011

    Do you have the drivers updated through windows update? If so bad move, all drivers must come from Lenovo.

    CCleaner is not an AV or malware analysis tool, I hope that you do not use the registry tool.

    Run the free http://www.malwarebytes.org/products/malwarebytes_free

    If the blockages are spasmodic, his v.hard to diagnose, unles perhaps, happens when you do something specific.

    If the blockades persist, and you have not installed the material or questionable programs, call Lenovo support line

  • Drop user

    Hello

    If someone drop a user with 'drop statement user' does oracle connects something somewhere?

    Thank you! * T

    If you have enabled and configured the audit, then Yes, you would be able to see things in the audit trail.

  • The user account lock &amp; expired

    Hi all

    I'm confused, what is the difference of locking of account & expired he brings to the user or the owner?

    If I blocked an account that it cannot connect.

    If I have an account on expiry it may not also login.

    So, what is the difference?

    Thank you

    Petra k

    My delimma is that we have a lot of 'unknown' users created in our database of PROD. Some oracle tools and some come from our 3 party apps tools. We ask the IT audit

    to remove unused user accounts. But I don't know where users are not used. If I lock it and nobody complains doesn't mean that it is not used? If I have password expire it?

    What is the best to use to check if the USER name is not used? Lock it or it expires?

    You must read this quote from doc that I have provided, because it exactly answers your question. It tells you the difference between expiring and the account was locked.

  • User account locked.

    Hi all

    OS: RHEL
    DB: 10 G

    I am facing a weird problem, one of my user account of db got locked yesterday and then I unlocked the same.
    And today I faced the same problem and I did the same thing, the account was unlocked for a while but it locked again. It seems I have is workinfg fine for a while and because of a certain unknown activity itself is getting locked.

    I want to know how I can get to the root of this.
    Checking for the same DB is disabled.

    Kindly help...

    Kind regards
    Sphinx!

    Salvation;

    Please see the bulletin:
    How to create a Trigger that fires when the user account is locked/unlocked [291820.1 ID]

    Respect of
    HELIOS

  • Drop-down menu: lock after the choice is made?

    Is it possible to lock the choices in a drop after its manufacture, so when the document is saved and then re-opened, the choice is not editable?

    LC ES2 9.0.0, Win 7

    You could put something like the following on the initialize event of the field - the field will remain open until the file is saved with a value in the field if there is no value that the field remains open when the file is saved and opened.

    Form1.subMain.DropDownList1::Initialize - (JavaScript, client)

    If (! this.isNull) {}

    This.Access = "readOnly";

    }

  • Password accepted but does nothing (admin) user. Locked user account? How can I register as a Admin to change?

    Had problems with Solution Explorer. While changing this and that, I blocked the user accounts. My password is not rejected, but does nothing. How can I get as long as a tool fix my problem?

    If you have an installation of Vista DVD (not a recovery DVDs), you can start the system with it. Select the default language, then select "repair your computer". Then select "Command Prompt". At the command prompt, type:

    NET user administrator / Active: Yes [press Enter]
    [Note: do not enter the brackets!]

    If you do not have a Vista installation DVD (only have a recovery disk), the computer mftr. may have given you the option to repair Vista (not a system recovery!) system in the diagnostic menu. This menu of diagnosis is the same one where you can choose Safe Mode. Get to this menu by repeatedly pressing the F8 key as the computer starts. If you do not have this option, you can make a bootable Vista file repair DVD in this link:

    http://NeoSmart.net/blog/2008/Windows-Vista-recovery-disc-download/

    Note: All the Neosmart recovery disk downloads are torrent files. There is a good explanation of the torrent on the site Web of Neosmart files. You will need a torrent as muTorrent client to get the files. Torrent client will download the .iso file with which to create the bootable DVD. You will need to use third-party burning software such as Nero, Roxio or the free ImgBurn (http://www.imgburn.com ) to burn the image .iso image file, not in the form of data.

    Remove the installation/rescue DVD and restart the computer. Now, you will be able to log on to the built-in Administrator compatible account now and make your changes. Once you have fixed things, connect to your additional administrative account (implemented by the recommendations below) and disable the administrator built-in again for security reasons.

    Start Orb > Search box > type: cmd
    When cmd appears in the above results, right-click and choose "Run as Administrator" [OK]. Now, you will get the command prompt. At the command prompt, type:

    NET user administrator / active: No. [Enter]

    Exit the command prompt.

    General recommendations for creating users in Vista:

    You absolutely don't want to have only one user account. As XP and all the other modern operating systems, Vista is a multi-user system with integrated system of accounts as default Administrator and comments. These accounts should be left alone because they are part of the structure of the operating system.

    In particular, you do not want one account user with administrative privileges on Vista because the administrator account integrated (normally only used in emergencies) is disabled by default. If you use as an administrator for your daily work, and this account is corrupt, things will be difficult.  It is not impossible to activate the built-in administrator to rescue things, but there may be more that you want to do. Better not to put you in a bad situation at first.

    The user account that is for your daily work must be a Standard user, with the extra administrative user (call it something like 'CompAdmin' or 'Tech' or similar) only it for elevation purposes. As a user Standard is recommended for security reasons and will help protect your computer against infections. After you have created "CompAdmin", connect to it and change your normal user account Standard. Then log on to your regular account.
    MS - MVP - Elephant Boy computers - don't panic!

Maybe you are looking for