Locking during the generation and the online option to avoid problems

Hi Experts,

In our suite of applications, schemas are shared among several applications, and even when there is a deployment of an application, the other application remains upward. In this process, we are facing problems of locking. For example, when creating indexes, I get the error "resource busy and acquired with no expectations. This post is specific to this point on error when creating index (change the design of the app etc is out of reach for me currently).

I was checking the "online" option of create index and I was wondering if that helps. It looks promising for me. When we have large tables (50 million more and creating indexes on them takes about 5 minutes and at the same time we have another app doing short transactions - who commit in 5 seconds, then creating index 'with the option' can help - is what I was asking.)

Here is an example of what I've tried:

-- first create a table with a few million rows:

SET SERVEROUTPUT ON

DECLARE
  v_sql VARCHAR2 (200);
BEGIN
  v_sql := 'create table test as select * from dba_objects';

  EXECUTE IMMEDIATE v_sql;

  FOR i IN 1 .. 5
  LOOP
  v_sql := 'insert into test select * from test';

  EXECUTE IMMEDIATE v_sql;

  COMMIT;
  END LOOP;
END;
/

--Now in session 1:
---------


create index ti1 on test(OWNER,OBJECT_NAME,SUBOBJECT_NAME,OBJECT_ID,DATA_OBJECT_ID,OBJECT_TYPE,CREATED,LAST_DDL_TIME,TIMESTAMP,STATUS,TEMPORARY,GENERATED,SECONDARY,NAMESPACE)
online;

session 2:
------------
DELETE FROM TEST WHERE ROWNUM<1000;

commit;

DELETE FROM TEST WHERE ROWNUM<40200;
rollback;

--etc.

I find that deletions, etc. in the second session is done (they follow by commit and they take a few seconds) with this option 'create an index online '. The option 'create index' is also no error with the error ORA-«resource busy...» ». So what a better way to create indexes to avoid locking issues? Note that is is very good for us to have the creation of index take more time for what's important is that they are not lacking in critical production deployments.

Are there other possible implications (-except that it takes more time to create the index with the option 'online'), that one should be aware of? Any known issues or is there any other glitches with the creation of online index?

I will be grateful for any views on that.

What is your version of DB full?

In our suite of applications, schemas are shared among several applications, and even when there is a deployment of an application, the other application remains upward. In this process, we are facing problems of locking. For example, when creating indexes, I get the error "resource busy and acquired with no expectations.

OK-, this exception is not surprising. To create or rebuild an index, Oracle has a lock on the base table. He can't do that if other users perform DML on the table - it must wait.

And before 11 g ANY other session that then tries to perform DML on the base table that oracle wait will also block.

I was checking the "online" option of create index and I was wondering if that helps.

Well, if you do not use the clause of 'ONLINE' you must do that maintenance CONNECTION or you now cause other sessions cling while creating/reconstruction is made;

It looks promising for me. When we have large tables (50 million more and creating indexes on them takes about 5 minutes and at the same time we have another app doing short transactions - who commit in 5 seconds, then creating index 'with the option' can help - is what I was asking.)

Yes - it should help. But he cannot eliminate the problem entirely.

See this article by the Index indicated Richard expert Foote (there are many other related articles index also):

https://richardfoote.WordPress.com/2008/02/11/index-create-and-rebuild-locking-improvements-in-11g-ch-ch-ch-changes/

Tags: Database

Similar Questions

  • Is there an online option to assess problems w / computer speed?

    Is there an online option to assess problems w / computer speed?  Takes forever to load pages

    Hi RobinGG,

    You did it changes on your computer before this problem?

    There is no online resource to check the performance of the computer.

    However, you can follow this link to improve the performance of the computer.

    Restore the performance of your computer with Windows XP

    Hope the helps of information.

    Please post back and we do know.

  • Hi why my iphone wifi turn off automatically when I lock my device? And how can I solve this problem

    Hello

    Why my wifi from the iphone 6 turn off automatically when I lock my device? And how can I solve this problem?

    Yes, it's designed for it. If, however, you plug, WiFi will not drop when the screen is locked.

  • After Effects keeps crashing during the RAM Preview? [Sound problem]

    Hey, personal Adobe! Adobe After Effects worked well during the first week! But about 3 days ago I discovered a major problem. Whenever I have add all the sound/music files in the application and click the RAM Preview, Adobe After Effect crashes. It was surprising to me because it never happened to me before. But here's the thing, if I don't add any audio files in my project and click RAM Preview, it does not crash. Any ideas on how to solve this problem?

    Thanks again!

    You should consider updating your OS and your AE.

    Apple fixed some critical bugs in that related to EI 10.10.5, so I'll try that first.

    So, if you don't mind the new cool blue colors, you should also consider updating AE - at least to the last version of CC 2014. There was a lot of bug fixes and new features added.

  • Registry during the installation of Flash Player problems

    Hi, first, sorry for the spelling errors, I'm Argentinian . I write here because I have tried MANY ways and solutions to install Flash Player for IE, here a few facts:

    I mainly use Google Chrome, which has the PC already installed, but I have a problem with the ActiveX control, I can install Flash player 11 for windows but not ActiveX... I read that it is a tool for IE, so I thought that I wouldn't be needing, but when I tried to run a program (game Ranger) he said I had need of ActiveX control and that I had not in my computer... So I started to search for solutions, etc etc, and ultimately abandon it because I just couldn't do it, but right now I did it again because I want to know if it's something important to have...

    The problem during the installation is the following: it starts to download the Flash Player... then install it and when it is at 51%, it stops and a message appears saying: registry error. It's what happens when I try to install ActiveX, not Flash Player itself, because as I said above I can install...

    All I want to know is if he remains the path to allow the installation of Flash Player change the values of registry... because I think that's the main problem... I think so. Thank you for reading.

    Edit: I forgot to say my system information.

    OS: Windows 7 32-bit

    FINALLY FOUND THE SOLUTION!

    That's where I found it > http://forums.adobe.com/message/4086663#4086663

    Finally, after 6 months, I installed ActiveX, thanks to this person than the fixed

    in any case, I am grateful to you guys, I've been impressed with the speed that you have answered my question, thank you very much.

  • ORA-28000 account locked during the creation of database (grid with asm on standlone server infrastructure)

    My Details of the operating system environment:

    OEL 6.5 64-bit

    Database version: 11.2.0.4.

    I have set up my lab for the infrastructure of grid with ASM on Stand alone server. Everything was going well with no error. My ASM Diskgroup is mounted, State resource t crsctl shows everything online, also I can connect using sys / as sysasm, my interlocutor is up and running for ASM, creating database using DBCA it gives an error 'ORA-28000 account locked' I'm confused which account is blocked because I have not yet created a data base.  Help, please

    Thank you

    Sunil

    Hello

    Add the dba group to the oracle user.

    And try again

    Best regrads

  • No facial blendshapes during the autorig option

    Hi all.

    Do I need to download my character from within fuse to access face blendshapes during autorig?

    The option is not there when downloading a file obj or fbx.

    At soon Traoré

    Update: I just saw in another post that downloaded obj/fbx characters are not recognized as fuse characters and therefore won't blendshapes.

  • Table of $ OBJ is locked during the query

    When we run the following script in Oracle 10 g R2 on Linux:
    CREATE TABLE AUDIT_TMP TABLESPACE CIL_DATA AS 
    SELECT * FROM AUDIT 
    WHERE CREATION_TIME BETWEEN ADD_MONTHS(SYSDATE,-2) AND SYSDATE;
    Then the table $ OBJ is locked.
    SQL> select object_id, session_id, oracle_username, process, locked_mode from  sys.v_$locked_object;
    OBJECT_ID SESSION_ID ORACLE_USERNAME                PROCESS      LOCKED_MODE
    ---------- ---------- ------------------------------ ------------ -----------
    18        281 SYS                            11460                  3
    SQL>
    SQL>
    SQL> select object_name from dba_objects where object_id = '18';
    OBJECT_NAME
    ------------------------------------------------------------------------------------------------------------------------
    OBJ$
    Can someone tell me like why OBJ$ table is locked. Is this a normal behavior?

    Simplistically: A SQL uses one or more SQL objects (tables, indexes, etc.). A SQL must therefore place a lock of data shared on the object, dictionary use, to prevent someone from edit this object (detached, update its definition, evolution, etc.).

    Think of it as a protection mechanism - for example the SQL cannot run on a table when another session suddenly drops a column of this table that uses SQL as a filter condition. Therefore the shared - lock to prevent the table change it if it is in use.

    Similarly, a change in the data dictionary (create table, alter table, etc.) must also be blocked when you change an object. However, this technique requires an exclusive lock in order to update this object in the data dictionary. Which means THAT DDL must wait a DML on the object to complete, before the DOF can update the definition of the object. And a DML will have to wait a DDL if DDL is busy changing the purpose of the DML want to use.

  • Computer HP mini: mini Hp locked during the boot

    I have hp mini piece at a yard sale it has a password then I press start 3 times and stopped system CNU8521J90

    Hello:

    Enter the unlock code...

    e9luq73wo1

  • During the installation of tac, earpiece problem

    When installing rac, I add listener (by srvctl)

    but 1 knot is normal (tnsping is ok) but 2 node tnsping is broken (information of receiver endpoint are rollback when I resart)

    How I can solove this problem? HP - ux 11.0.2.3

    1637236 wrote:

    Thanks for the reply. I can't give you due to security.

    Of course you can.  We do it all the time.  Make the requested command.  Copy the session in Notepad.  Use 'replace all' to systematically replace the sensitive bits with a more generic value - like changing a real hostname to simply "myhost."  IP addresses other than 127.0.0.1 may be replaced by ' nnn. ***. .nnn ', where "nnn" corresponds to the actual values and ' *' obfucates of the actual values.   When you are done paste the copy "hidden" in your answers.  In doing so, we can see exactly what is happening without revealing anything sensitive, and any changes will be consistent.  We don't need to see that your domain is "bigsecret.agency.gov".  A value of 'mydomain' works as well.  We only need to see that anything that either is used systematically.

  • 0xC1900101 - 0 x 20017 installation failed during SAFE_OS with an error during the START operation

    When you try to upgrade Windows 7 SP1 to Windows 10 ' 0xC1900101 - 0 x 20017 installation failed during SAFE_OS with an error during the START operation "is a problem recurring and none of the solutions posted for a Samsung RV511 work.

    When will there be a solution of Microsoft?

    Concerning

    Hello

    Since Windows 10 is a completely new operating system, the computer manufacturer might still not have designed and developed drivers for it. As suggested waiting for the manufacturer to release the necessary drivers for the hardware and then try the upgrade.

  • my computer is locked in the options admistritive and I for got my password. How to access and fine the password or change it?

    my computer is locked in the options admistritive and I for got my password. How to access and fine the password or change it?

    Hello dianeweeks,

    Thanks for the reply.  I have included a link below that I hope will help.

    Microsoft's strategy concerning lost or forgotten passwords

    http://support.Microsoft.com/kb/189126

  • How to set the name of the author and where I find all of the debug option token during the race or the creation of the application on QNX IDE?

    How to set the name of the author and where I find all of the debug option token during the race or the creation of the application on QNX IDE?

    Here is the error

    Failure of deployment: Info: request shipment: install and launch
    Info: Action: install and launch
    News: Native debugging: on
    Info: File size: 219949
    Info: Installing com.example.UIBB10AppTest1.testDev_B10AppTest15dd51c62...
    Info: Treatment 219949 bytes
    actual_dname:
    actual_id:
    actual_version:
    result::failure 881 the application author does not match the author token of debugging

    The author information is located in the bar - descriptor.xml in the tab "General". But the information must be defined automatically. In addition, you must install the token debug on your device.

    If everything is configured properly there is only one problem that happened to me. I had several chips debugging Momentics. I had to remove all chips debugging and leave alone the I want to use. Perhaps, you have also several debugging chips installed in Momentics. This seems to be a bug in Momentics who can't handle several chips debugging.

  • Cabinet detects 2 problems during analysis, but in the end that he said found no problem and the only option I have is to click Finish

    I have downloaded Microsoft Windows Malicious Software Removal Tool (KB890830) - to install the CAB file switch and it detects 2 problems during analysis, but in the end that he said found no problem and the only option I have is to click Finish. I tried several times with the same result of detection 2 never, he gets rid of them. Help?

    OT: Malware

    On Saturday, April 5, 2014 22:59:18 + 0000, JChabler wrote:

    Where? I find only free trials to detect, but you have to pay to resolve.

    Go to https://www.malwarebytes.org/ and lower-left button
    corner, one that says "Free download."

  • Recently ordered (and order confirmed) "Plan of creative photography of Cloud (one year). I want to cancel it, but during the procedure, I do not even the option "Cancel". How should I proceed?

    Recently ordered (and order confirmed) "Plan of creative photography of Cloud (one year). I want to cancel it, but during the procedure, I do not even the option "Cancel". How should I proceed?

    In order to cancel the order, please contact customer service

    You can use: http://helpx.adobe.com/x-productkb/global/phone-support-orders.html

    For more information on cancellation: cancel your creative cloud membership

Maybe you are looking for

  • Cookies active according to Firefox - but not true

    In attempting to create a sync account and receiving the message "Cookies disabled", I made the help instructions to erase the cache, cookies and history, but it does not work. I updated Firefox twice, wiped out at least three times and always in vai

  • Ports Satellite A135 - S2306 defective USB after the BIOS update.

    OK, I searched all over the internet and not found anyone else with this same problem, or anyone with a solution that worked for me. A few weeks ago, I had the common error of the BIOS reset itself and asking for a password at startup. I took my loca

  • Sony SBH-52

    Dear Forum (reader), I received my Sony SBH-52 last Friday and I'm going to use it with an iPhone 5 and iPad Mini (or other MAC devices) like I did with my Sony Smart Wireless headphones Pro that has worked very well for not to say perfect. This devi

  • Wireless connection to my HP Officejet 6500 709 has

    I have a HP Officejet 6500 709 a.  I want to move it to a location that is not in close proximaty to my modem.  My printer has a wireless radio?  Must be connected directly to the modem?  I have a wireless network in my house, but the only way I can

  • [FAD] A few questions on the article of Timo "JDev: always test your application with the ApplicationModule Pooling disabled.

    Hallo Timo,I read your article JDev: always Test Your App with the regrouping of ApplicationModule turns off | JDev & amp; amp; ADF Goodies and I have some doubts.I understand that you have disabled to AM pooling only to show the problem and the appl