The OTN forums, which should be a plethora of knowledge and learning, were always hampered by the hideous interface.
But, changes are coming. It will be interesting to see what transpires
https://wikis.oracle.com/display/Forums/OTN+Forums+Migration+and+Upgrade
A reader of this blog, VijayS, asked me to share the script I use to demo ITL deadlocks that I mentioned in this comment. Since other readers might be interested, here is the script.
SET TERMOUT ON FEEDBACK ON VERIFY OFF SCAN ON ECHO ON @connect SELECT * FROM v$version WHERE rownum = 1; REM REM cleanup REM DROP TABLE t PURGE; PAUSE REM REM create a test table with three completely full data blocks REM (default tablespace is expected to have 8KB blocks) REM CREATE TABLE t (n NUMBER, c VARCHAR2(4000)) PCTFREE 0; INSERT INTO t SELECT rownum, rpad('*',2679,'*') FROM dual CONNECT BY level <= 9; COMMIT; SELECT dbms_rowid.rowid_block_number(rowid), n FROM t ORDER BY n; PAUSE REM REM in this session modify two rows: one in the first block and one in the REM third block REM SET SQLPROMPT " 1 > " SELECT sid FROM v$session WHERE audsid = userenv('sessionid'); UPDATE t SET n=n*10 WHERE n IN (1,7); PAUSE REM REM in another session (called session #2) modify two rows: one in the first REM block and one in the second block REM REM @connect REM SET SQLPROMPT " 2 > " REM REM SELECT sid FROM v$session WHERE audsid = userenv('sessionid'); REM UPDATE t SET n=n*10 WHERE n IN (2,5); REM PAUSE REM REM in another session (called session #3) try to modify one row per block; REM since all ITL slots of the first block are taken, wait... REM REM @connect REM SET SQLPROMPT " 3 > " REM REM SELECT sid FROM v$session WHERE audsid = userenv('sessionid'); REM UPDATE t SET n=n*10 WHERE n = 9; REM UPDATE t SET n=n*10 WHERE n = 6; REM UPDATE t SET n=n*10 WHERE n = 3; REM PAUSE REM REM in this session try to modify one row in the second block and, in addition, REM in session #2, try to modify one row in the third block; since all ITL slots REM of the second and third block are taken, wait..., deadlock... REM REM run "UPDATE t SET n=n*10 WHERE n = 8;" in session #2 UPDATE t SET n=n*10 WHERE n = 4;
Notice that:
To give you an example of what it looks like when you run it, here is a recording:
The deadlock graph generated by the run that I recorded is the following one. Notice that the rows waited on are set to “no row”.
---------Blocker(s)-------- ---------Waiter(s)--------- Resource Name process session holds waits process session holds waits TX-00090013-00001b44 25 140 X 23 147 S TX-0007001d-000019a9 23 147 X 25 140 S session 140: DID 0001-0019-00000D23 session 147: DID 0001-0017-000004BC session 147: DID 0001-0017-000004BC session 140: DID 0001-0019-00000D23 Rows waited on: Session 140: no row Session 147: no row
As Exadata Storage Indexes (SI) are purely memory only structures located on the Exadata storage servers, care needs to be taken in how much memory they can potentially consume. As a result, there is a limit of 8 columns (or 8 SIs) that can be defined for a given 1M storage region at any point […]![]()
Following on from last weeks book competition, the kind people at Packt have offered another prize. This time 2 e-book copies of
Oracle E-Business Suite R12 Integration and OA Framework Development and Extension Cookbook by Andy Penver.
The competition will run for about two weeks, so I’ll be selecting the winners on 10th May 2013. To enter, comment on this post, telling me why you think you need this book and what you hope to gain from it. The two lucky winners will be selected based on their comments on this post (not Facebook, Google+ or Twitter), so try and be creative or you won’t stand out from the crowd.
The winners will be contacted via email, so please use your real email address when posting your comment.
You can read more about the contents of the book and the author on the Packt website, but here is a little marketing message about the book.
“Oracle E-Business Suite R12 Integration and OA Framework Development and Extension Cookbook is an
extensive guide for both beginners and intermediate users that describes how to develop extensions in Oracle
E-Business Suite. The book also discusses some of Oracle E-Business Suite’s vital features, such as creating and
distributing BI Publisher template files to the file system, authoring, managing, delivering highly-formatted
documents using BI Publisher and configuring a browser.This is a practical hands-on guide, designed to demonstrate the newest features in Oracle E-Business Suite
Release 12. With an in-depth knowledge of personalizing OA Framework pages in Oracle E-Business Suite,
readers will not only be able to install JDeveloper with OA Extension and set up a development environment,
but also deploy an OA Framework page within Oracle E-Business Suite Release 12.”
Good Luck!
Cheers
Tim…
PS. Connor, death threats will not work this time.
Things have certainly been busy lately so I haven’t had much of a chance to get back here for a while. Busy at work, busy at home, busy at play and even busy with a new David Bowie album to enjoy !! And yes, “The Next Day” is an absolutely stunning album by the great […]![]()
Delphix has been selected as one of Gartner’s Cool Vendors in Storage for 2013!
Gartner uses the Cool Vendor awards to highlight innovative and disruptive new companies that are rapidly changing how enterprises do business.
Iron Man blew me away when I first saw it. Iron Man 2 was good, but not as good as the first. Iron Man 3 was better than Iron Man 2, but not as good as Iron Man or The Avengers movie, in my opinion. Don’t take this as a major criticism, because all of these films are very cool. It’s a relative thing…
The tech didn’t take so much of the center stage during this movie. Don’t get me wrong, there is a lot, but it seemed much more about Tony than the suite. That’s not a bad thing, but the suit is the cool bit for me. There were a few suit-related scenes I would have developed a bit more. Also, it needed some AC/DC during a kick-ass action scene. If they were there I didn’t notice them.
The end was a bit weak, but stay until right at the end credits to see the extra scene and a little message before you leave…
I’m being extra picky here. It’s definitely cool and worth going to see!
Cheers
Tim…
Some days are just too good to be true :) I ran into an interesting problem trying to install 11.2.0.3.0 Grid Infrastructure for a two node cluster. The storage was presented via iSCSI which turned out to be a blessing and inspiration for this blog post. So far I haven’t found out yet how to create “shareable” LUNs in KVM the same way I did successfully with Xen. I wouldn’t recommend general purpose iSCSI for anything besides lab setups though. If you want network based storage, go and use 10GBit/s Ethernet and either use FCoE or (direct) NFS.
Here is my setup. Storage is presented in 3 targets using tgtd on the host:
iSCSI initiators are Oracle Linux 6.4 on KVM with the host running OpenSuSE 12.3 providing the iSCSI targets. Yes, I know I’m probably the only Oracle DBA running SuSE, but to my defence I have a similar system with Oracle Linux 6.4 throughout and both work.
So besides the weird host OS there is nothing special. Since I’m lazy sometimes and don’t particularly like udev I decided to use ASMLib for device name persistence on the iSCSI LUNs. This turned out to be crucial, otherwise I’d never had written this post.
So much for the introduction
And here’s the problem. While installing Grid Infrastructure OUI allowed me to fill out all wizard interfaces and proceeded to install the binaries on all hosts. If you have installed RAC before that’s not the interesting part of the installation. It gets far more interesting when you run root.sh! Normally root.sh simply completes if you paid attention to the pre-requisites. I _have_ paid attention to them yet still the script failed on node 1! I don’t have the exact output on screen any more but the script bailed out trying to create the voting files.
Whenever something goes wrong with the installation of Grid Infrastructure you can turn to $GRID_HOME/cfgtoollogs/crsconfig/rootcrs_$(hostname).log. The relevant section in the file contained this:
2013-04-23 14:11:12: Creating voting files 2013-04-23 14:11:12: Creating voting files in ASM diskgroup OCR 2013-04-23 14:11:12: Executing crsctl replace votedisk '+OCR' 2013-04-23 14:11:12: Executing /u01/app/11.2.0/grid/bin/crsctl replace votedisk '+OCR' 2013-04-23 14:11:12: Executing cmd: /u01/app/11.2.0/grid/bin/crsctl replace votedisk '+OCR' 2013-04-23 14:11:12: Command output: > Failed to create voting files on disk group OCR. > Change to configuration failed, but was successfully rolled back. > CRS-4000: Command Replace failed, or completed with errors. >End Command output 2013-04-23 14:11:12: Voting file add failed
Ooops. Not good-why would that fail? The ASM instance was up, the OCR has already been created. Most Clusterware commands leave a trace in $GRID_HOME/log/$(hostname)/client. I checked the last file in there but it didn’t help much:
2013-04-23 15:07:49.079: [ CRSCTL][3108575008]crsctl_format_diskgroup: diskgroup OCR creation with status 1. Please check the alert log file for ASM 2013-04-23 15:07:49.082: [ CSSCLNT][3108575008]clsssConfigLockTrace: === clsssConfigUnlock === 2013-04-23 15:07:49.082: [ CSSCLNT][3108575008]clsssConfigLockTrace: lock(0x1cb70d0), version(1), size(1088) 2013-04-23 15:07:49.082: [ CSSCLNT][3108575008]clsssConfigLockTrace: offsets(24), activever(186647296) 2013-04-23 15:07:49.082: [ CSSCLNT][3108575008]clsssConfigLockTrace: id(14), instantiation(12), incarn(1) 2013-04-23 15:07:49.082: [ CSSCLNT][3108575008]clsssConfigLockTrace: mapoff(28), configoff(548), mapsize(512) 2013-04-23 15:07:49.082: [ CSSCLNT][3108575008]clsssConfigLockTrace: state(0), holders(0), waiters(0) 2013-04-23 15:07:49.082: [ CSSCLNT][3108575008]clsssConfigLockTrace: committimestamp(0), commitstate(0) 2013-04-23 15:07:49.082: [ CSSCLNT][3108575008]clsssConfigLockTrace: === Map (of first 7 entries) === 2013-04-23 15:07:49.082: [ CSSCLNT][3108575008]clsssConfigLockTrace: 000 000 000 000 000 000 000
Except for line 1-that is a very obvious pointer. Maybe there is something in the ASM instance’s alert.log?
2013-04-23 15:07:48.733000 +01:00 NOTE: [crsctl.bin@rac11gr2node1.example.com (TNS V1-V3) 13092] opening OCR file NOTE: updated gpnp profile ASM diskstring: NOTE: Creating voting files in diskgroup OCR NOTE: Voting File refresh pending for group 1/0x20cf9032 (OCR) NOTE: Attempting voting file creation in diskgroup OCR ERROR: Could not create voting files. It spans across 161 AUs (max supported is 64 AUs) ERROR: Voting file allocation failed for group OCR Errors in file /u01/app/oracle/diag/asm/+asm/+ASM1/trace/+ASM1_ora_13100.trc: ORA-15303: Voting files could not be created in diskgroup OCR due to small Allocation Unit size 2013-04-23 15:07:51.278000 +01:00 NOTE: Attempting voting file refresh on diskgroup OCR
That was it! But what’s so special about the disk group? Something started to dawn on me…I have recently spent quite some time on 4k sector size disks and their implications. And my hard disks have recently been replaced … here’s what I got from ASM:
SQL> select name,sector_size from v$asm_diskgroup; NAME SECTOR_SIZE ------------------------------ ----------- OCR 4096
So sure enough, my disk group uses 4k sectors, even though at no point I asked it to do so. In fact up to today I struggled to create a disk group with a 4k sector size for lack of supporting hardware! So this is the first time I see those, my hard disks in the lab server must be pretty new then. There are many ways to check for the block size of your LUN, this time I chose fdisk (this only works for LUNs that use the MBR format, if the LUN has been initialised with a GPT you need to install parted instead)
[root@rac11gr2node1 client]# fdisk -lu /dev/sda Disk /dev/sda: 2147 MB, 2147483648 bytes 67 heads, 62 sectors/track, 1009 cylinders, total 4194304 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sda1 531712 4191385 1829837 83 Linux [root@rac11gr2node1 client]#
Notice this line:
Sector size (logical/physical): 512 bytes / 4096 bytes
And there exactly lies the problem. ASMLib in my version cannot deal with a 4k sector size properly it seems. The problem is known, just search for ORA-15303 in My Oracle Support. It seems particular to LUNs/disks with different logical and physical block sizes though-refer to the MOS note for more information. For your reference, here are my versions:
[oracle@rac11gr2node1 ~]$ rpm -qa| grep oracleasm oracleasmlib-2.0.4-1.el6.x86_64 oracleasm-support-2.1.8-1.el6.x86_64 [oracle@rac11gr2node1 ~]$
The strange thing is that the ASM instance with the single disk group has been created successfully, as shown by the log (note the disk list in line 1):
2013-04-23 14:10:54: Executing as oracle: /u01/app/11.2.0/grid/bin/asmca -silent -diskGroupName OCR -diskList 'ORCL:OCR1,ORCL:OCR2,ORCL:O CR3' -redundancy NORMAL -configureLocalASM -au_size 1 2013-04-23 14:10:54: Running as user oracle: /u01/app/11.2.0/grid/bin/asmca -silent -diskGroupName OCR -diskList 'ORCL:OCR1,ORCL:OCR2,ORCL:OCR3' -redundancy NORMAL -configureLocalASM -au_size 1 2013-04-23 14:10:54: Invoking "/u01/app/11.2.0/grid/bin/asmca -silent -diskGroupName OCR -diskList 'ORCL:OCR1,ORCL:OCR2,ORCL:OCR3' -redundancy NORMAL -configureLocalASM -au_size 1" as user "oracle" 2013-04-23 14:10:54: Executing /bin/su oracle -c "/u01/app/11.2.0/grid/bin/asmca -silent -diskGroupName OCR -diskList 'ORCL:OCR1,ORCL:OCR2,ORCL:OCR3' -redundancy NORMAL -configureLocalASM -au_size 1" 2013-04-23 14:10:54: Executing cmd: /bin/su oracle -c "/u01/app/11.2.0/grid/bin/asmca -silent -diskGroupName OCR -diskList 'ORCL:OCR1,ORCL:OCR2,ORCL:OCR3' -redundancy NORMAL -configureLocalASM -au_size 1" 2013-04-23 14:11:09: Command output: > > ASM created and started successfully. > > Disk Group OCR created successfully. > >End Command output
After spending a little while thinking what to do I decided to bite the bullet and start from scratch. The deinstall scripts again worked really well in my case.
Instead of ASMLib I used udev for the second attempt. The trick with udev is to find something to map. The scsi_id command for example is a great help in determining disk attributes, but there are others too. In my case, all I wanted to achieve is to change permissions of the iSCSI disks to oracle:dba and 0660. In my lab environment I didn't use multiple paths to the iSCSI target, and I didn't care about symlinks. You get it, this isn't 100% realistic ... Note that In KVM disks are named vd*, like /dev/vda for the first one etc. if you are using virtio, the para-virtualised drivers. The iSCSI disks ended up being called /dev/sd* which makes it easy to define an asm_diskstring.[root@rac11gr2node1 sys]# /sbin/scsi_id --whitelisted --replace-whitespace --page=0x80 --device=/dev/sdg --export ID_SCSI=1 ID_VENDOR=IET ID_VENDOR_ENC=IET\x20\x20\x20\x20\x20 ID_MODEL=VIRTUAL-DISK ID_MODEL_ENC=VIRTUAL-DISK ID_REVISION=0001 ID_TYPE=disk ID_SERIAL_RAW="SIET VIRTUAL-DISK" ID_SERIAL=SIET_VIRTUAL-DISK ID_SERIAL_SHORT=So using the vendor string and the model attribute from SYSFS will most likely work. Please note that this is a rather simplistic model and wouldn't necessarily work with Fibre Channel attached disks or multipathing. The resulting udev rule in /etc/udev/rules/99-asm.rules was:
KERNEL=="sd[a-z]*", BUS=="scsi", SYSFS{vendor}=="IET", SYSFS{model}=="VIRTUAL-DISK", OWNER="oracle", GROUP="dba" MODE="0660"I also deconfigured ASMLib on all nodes just to be sure:
[root@rac11gr2node1 u01]# /etc/init.d/oracleasm configure Configuring the Oracle ASM library driver. This will configure the on-boot properties of the Oracle ASM library driver. The following questions will determine whether the driver is loaded on boot and what permissions it will have. The current values will be shown in brackets ('[]'). Hittingwithout typing an answer will keep that current value. Ctrl-C will abort. Default user to own the driver interface [oracle]: Default group to own the driver interface [dba]: Start Oracle ASM library driver on boot (y/n) [y]: n Scan for Oracle ASM disks on boot (y/n) [y]: n Writing Oracle ASM library driver configuration: done Dropping Oracle ASMLib disks: [ OK ] Shutting down the Oracle ASMLib driver: [ OK ] [root@rac11gr2node1 u01]# Running udevadm trigger loaded the new rules and indeed, the /dev/sd*1 devices now were owned by oracle:dba.
Then I ran through OUI again and wanted to assign the previously used disks again, but they didn't appear as candidates :( OK so the deconfig didn't zero out the disk headers. Not a problem, oracleasm has a "deletedisk" command that can be used for this exact purpose. You just need to be really sure it's the correct disk you are zeroing out, otherwise someone else will surely complain (you have been warned!).
The rest was simple. The ASM instance has again been created successfully, note the difference in disk names this time (my asm_diskstring was set to /dev/sd*1):
2013-04-23 16:29:29: Executing as oracle: /u01/app/11.2.0/grid/bin/asmca -silent -diskGroupName OCR -diskList '/dev/sda1,/dev/sdb1,/dev/sdc1' -redundancy NORMAL -diskString '/dev/sd*1' -configureLocalASM -au_size 1 2013-04-23 16:29:29: Running as user oracle: /u01/app/11.2.0/grid/bin/asmca -silent -diskGroupName OCR -diskList '/dev/sda1,/dev/sdb1,/dev/sdc1' -redundancy NORMAL -diskString '/dev/sd*1' -configureLocalASM -au_size 1 2013-04-23 16:29:29: Invoking "/u01/app/11.2.0/grid/bin/asmca -silent -diskGroupName OCR -diskList '/dev/sda1,/dev/sdb1,/dev/sdc1' -redundancy NORMAL -diskString '/dev/sd*1' -configureLocalASM -au_size 1" as user "oracle" 2013-04-23 16:29:29: Executing /bin/su oracle -c "/u01/app/11.2.0/grid/bin/asmca -silent -diskGroupName OCR -diskList '/dev/sda1,/dev/sdb1,/dev/sdc1' -redundancy NORMAL -diskString '/dev/sd*1' -configureLocalASM -au_size 1" 2013-04-23 16:29:29: Executing cmd: /bin/su oracle -c "/u01/app/11.2.0/grid/bin/asmca -silent -diskGroupName OCR -diskList '/dev/sda1,/dev/sdb1,/dev/sdc1' -redundancy NORMAL -diskString '/dev/sd*1' -configureLocalASM -au_size 1"And this time the voting disks were created as well:
CRS-2676: Start of 'ora.diskmon' on 'rac11gr2node2' succeeded CRS-2676: Start of 'ora.cssd' on 'rac11gr2node2' succeeded ASM created and started successfully. Disk Group OCR created successfully. clscfg: -install mode specified Successfully accumulated necessary OCR keys. Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. CRS-4256: Updating the profile Successful addition of voting disk 9d9a9577a66a4f6fbf267b125dc7f4a3. Successful addition of voting disk 26e5ff2544084ff0bfb9e753b090ec22. Successful addition of voting disk 38a820cd4b424f4ebf514370168fa499. Successfully replaced voting disk group with +OCR. CRS-4256: Updating the profile CRS-4266: Voting file(s) successfully replaced ## STATE File Universal Id File Name Disk group -- ----- ----------------- --------- --------- 1. ONLINE 9d9a9577a66a4f6fbf267b125dc7f4a3 (/dev/sda1) [OCR] 2. ONLINE 26e5ff2544084ff0bfb9e753b090ec22 (/dev/sdb1) [OCR] 3. ONLINE 38a820cd4b424f4ebf514370168fa499 (/dev/sdc1) [OCR] Located 3 voting disk(s).Very nice-job done. You should refer back to the relevant MOS note to read more about the problem but for now be advised that 4k sector sizes can cause surprises.
Materialized views open up all sorts of possibilities for making reporting more efficient – but at the same time they can introduce some “interesting” side effects when you start seeing refreshes taking place. (Possibly one of the most dramatic surprises appeared in the upgrade that switched many refreshes into “atomic” mode, changing a “truncate / append” cycle into a massively expensive “delete / insert” cycle).
If you want to have some ideas of the type of work that is involved in the materialized view “fast refresh”, you could look at a recent pair of articles by Alberto Dell’Era on (very specifically) outer join materialized views (which a link back to a much older article on inner join materialized view refresh):
My Oracle Support had a fairly lengthy outage today right in the middle of the Australian business day.
But I’m not going to blog about that. One thing I’ve learnt from many client sites is that people will understand and forgive things like outages, or errors, or crashes, or just plain wrong software, as long its evident that you are passionately working for the benefit of the user, that you were not lazy or flippant or learning from mistakes…
But one thing, perhaps the biggest thing, that customers will NOT tolerate, is when you don’t listen to what they’re trying to tell you
And that’s where MOS is suffering – not from outages, not from errors, but from not listening….
I logged this SR:
Problem: Making index partition unusable does not free underlying segment
Test Case:
SQL> sho parameter deferred
NAME TYPE VALUE
------------------------------------ ----------- ----------------------------------
deferred_segment_creation boolean TRUE
SQL> drop table T purge;
Table dropped.
SQL> create table T ( x timestamp, y int)
2 PARTITION BY RANGE (x)
3 INTERVAL( NUMTODSINTERVAL(1,'DAY'))
4 (
5 PARTITION ARCH_P0 VALUES LESS THAN (TIMESTAMP' 2009-01-01 00:00:00')
6 )
7 /
Table created.
SQL> insert into T values ('01-APR-13',1);
SQL> insert into T values ('02-APR-13',1);
SQL> insert into T values ('03-APR-13',1);
SQL> insert into T values ('04-APR-13',1);
SQL> create index IX on T ( x ) local;
Index created.
SQL> col partition_name new_value d
SQL> select segment_name, partition_name, bytes from user_segments;
SEGMENT_NAME PARTITION_NAME BYTES
---------------------------------------- ------------------------------ ----------
T SYS_P42997 8388608
T SYS_P42998 8388608
T SYS_P42999 8388608
T ARCH_P0 8388608
T SYS_P42996 8388608
IX ARCH_P0 65536
IX SYS_P43000 65536
IX SYS_P43001 65536
IX SYS_P43002 65536
IX SYS_P43003 65536
10 rows selected.
SQL> alter index IX modify partition &&d unusable;
Index altered.
SQL> select segment_name, partition_name, bytes from user_segments;
SEGMENT_NAME PARTITION_NAME BYTES
---------------------------------------- ------------------------------ ----------
T SYS_P42997 8388608
T SYS_P42998 8388608
T SYS_P42999 8388608
T ARCH_P0 8388608
T SYS_P42996 8388608
IX ARCH_P0 65536
IX SYS_P43000 65536
IX SYS_P43001 65536
IX SYS_P43002 65536
IX SYS_P43003 65536
10 rows selected.Now before people criticise that I didn’t show version and platform, remember that in logging an SR, these things are provided as the SR is logged. In this case, the platform is AIX and the version is 11.2.0.2. I also posted a case into the SR showing the under 11.2.0.3 on Linux, the segment is indeed correctly dropped when the index partition is set to unusable.
Its a trivial test case, and my inquiry was simple – is it platform or version or both that is the issue.
But this post is about listening…
First response to the SR:
Your problem is this: "Unusable Index Segment Still Exists in DBA_SEGMENTS for Alter Table Move"
Well…I dont think so. Probably because the test case makes no mention of alter-table-move.
I point this out via an SR update.
Second response to the SR:
You can drop the partition to reclaim free space
For starters, the ambiguity is risky advice. Do they mean drop the table partition or the index partition ? Might my next SR be "how can I recover the data I just dropped ?"
Secondly, its not addressing the original request.
So I’m more than happy to accept that an MOS outage happened….these things do in the IT world. We try to avoid them, but they happen.
But its sad when the NON-technical components of IT, that of simple good listening skills also suffer regular "outages".
Recent comments
17 weeks 4 days ago
27 weeks 2 days ago
29 weeks 17 hours ago
32 weeks 2 days ago
34 weeks 4 days ago
44 weeks 19 hours ago
45 weeks 4 days ago
46 weeks 4 days ago
46 weeks 5 days ago
49 weeks 3 days ago