Bdb 4.4 inserting after delete (bug?)

So I ran into a unique situation here, wondering if there is a method of fixing this without altering my database sorting algorithm.
In short: btree + record numbers, no duplicate keys, bdb 4.4.20 using the C API. The ordering algorithm specifically ignores the last several bytes of the key, since while informational they don't play a part in the database ordering and should never be duplicated.
I find that after deleting a key (using DB->del), if I insert another key that matches the old key using the algorithm (even though having different trailing content), the key will remain the deleted key value and the value will be updated.
IE:
- keys are in the format 12345.12345
- keys are ordered using only the first field, prior to the dot, and trailing characters are ignored.
- DB->delete key 12345.12345 with value of 5
- DB->put key 12345.54321 with value of 1
The database then contains a key/value pair of 12345.12345 with a value of 1.
Is there a way I can avoid this situation?
Thanks!
Message was edited by:
AaronWiebe

Hello,
Can you post a small stand-alone test case which illustrates
this problem?
Thanks,
Sandra

Similar Messages

  • How-To "Refresh a table of data after inserting or deleting"

    I'd like to say a word on the how-to article "How to refresh a table of data after inserting or deleting a row using ADF".
    (http://www.oracle.com/technology/products/jdev/howtos/1013/updtable/index.html?_template=/ocom/technology/content/print)
    I spent a lot of time on it because I needed help in implementing simple CRUD functionality on a table, using JSF-ADF-TopLink technologies.
    While the the article does provide correct steps, it is in one important place not specific enough, so the reader may easily get stuck. In section "Refresh the data table", point 1: when you double click on the removeEntity() button, in Structure window, then you do not get the required dialog. You get CommandButton Properties dialog.
    You must click on the removeEntity() button in Editor's Design view. But even there you may get the CommandButton Properties dialog, not managed beans dialog.
    You may resolve that by going to JSF configuration file, faces-config.xml, and switch to Overview view. This will show you the managed beans that you have.
    Then, you may already have a backing bean for the page. You can use that and avoid creating a new managed bean.
    I could understand what the operations mean only after very careful reading of "Creating More Complex Pages", section "Overriding Declarative Methods" in JDeveloper Help (or in ADF Developer's Guide PDF document).
    In general: I believe that "ADF bindings" need more conceptual explanation, maybe in form of an article. Grammatical form "bindings" may create a false understanding that "bindings" are just references. But they are not -- ADF bindings are active objects that handle traffic between UI components and Data Controls. It seems that "bindings" even communicate among themselves. Maybe it would be more understandable to differentiate strictly between "binding objects" (or "binders"?), binding object definitions and binding object references.
    It would be very helpful to have a diagram showing grahically what specific binder objects are created in a small apllication (2-3 pages using 1-2 tables), with whom they communicate and what type of data is passed on.
    Priit

    Hi
    Thanks for your infos.
    Yes exactly I use almost the same code you have post here.
    Could You answer to my next questions?
    First - >what do you mean by saying that "it's not good idea using refreshing in IE?" Of course I use refreshing in backing_bean for my button "remove" that removes row, commit changes to database and refresh table, almost the same as You said in your post:
    Code in backing_bean is and comments on difference to Your code is below:
    public commandButton2_action1(){
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("removeEntity");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    //above remove entity, but I dont now if it do commit to database? So i do it below
    OperationBinding commit1 = bindings.getOperationBinding("Commit");
    commit1.execute();
    //and at the end I refresh my table, "findAllRezerwacja1 - it is an id of the methodAction, not the iterator -> is it ok? or should I change to Iterator id?
    OperationBinding requery = bindings.getOperationBinding("findAllRezerwacja1");
    requery.execute();
    return null;
    Page Definition code for this:
    <methodAction id="findAllRezerwacja1"
    InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" MethodName="findAllRezerwacja"
    RequiresUpdateModel="true" Action="999"
    ReturnName="SessionEJBLocal.methodResults.SessionEJBLocal_dataProvider_findAllRezerwacja_result"/>
    <table id="findAllRezerwacja2" IterBinding="findAllRezerwacja1Iter">
    <AttrNames>
    <Item Value="dataDo"/>
    <Item Value="dataOd"/>
    <Item Value="idRezerwacja"/>
    <Item Value="liczbaUczestnikow"/>
    <Item Value="prowadzacy"/>
    <Item Value="uwagi"/>
    </AttrNames>
    </table>
    <methodAction id="removeEntity" InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" MethodName="removeEntity"
    RequiresUpdateModel="true" Action="999">
    <NamedData NDName="entity"
    NDValue="${bindings.findAllRezerwacja2.currentRow.dataProvider}"
    NDType="java.lang.Object"/>
    </methodAction>
    <action id="Commit" IterBinding="findAllRezerwacja1Iter"
    InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" RequiresUpdateModel="true"
    Action="2"/>
    </bindings>
    //and rest of code for Iterator etc
    My second question is, why when you use refresh button in IE (I know is not recommended as You said, but sometimes user do it, so I want prevent situations that I will describe here) so when I press refresh button in IE exactly after removing one row by clicking my button, refreshing by pressing IE button is doing the same --> is deleting next row. How to stop deleting row, when for example user would press IE refresh button after pressing remove button for table. If I change selection in table after deleting row, and press refresh button in IE, instead of deleting row, I got error message: JBO-29000: JBO-35007: and
    JBO-35007. So where Im doing wrong. Maybe I should do sth with postback ? Could You help me? Thanks in advance
    Last one question: what is the difference between using delete and removeEntity from operations node? Im now reading carefully ADF Dev Guide, so I hope I can find infos there? But if You know, please answer to this question.
    Thanks

  • Insert , Update & Delete Not working in BDB Berkley Database

    Hi,
    Anybody has used Oracle ADF & BDB ,to insert/ update & delete?
    imported db.jar,dbexample.jar,sqlite.jar ,derby.jar. still not working (Only Query working)
    Pls lets us know

    Hi,
    Do you have a small test case program that demonstrates this? A JDeveloper project showing what exactly is the problem when trying to use the BDB SQL JDBC driver to insert data into the BDB SQL database? What do you mean by "not working", do you get any errors, you do not get errors but you do not see the data in the database etc?
    What are the versions of Java, JDeveloper, ADF and BDB SQL you are using, and on what OS?
    Regards,
    Andrei

  • Trouble with format of files exported from pages as .doc - when opened on a pc they have extra spaces and pages breaks inserted after each line?  Can be manually deleted, but defeats sharing purpose. advice?

    Hi all, I have trouble with the format of files exported by email as .doc from pages - when opened in MS word on a PC or other device, they have extra spaces and pages inserted after each line - can be deleted manually, but defeats sharing purpose.  Any advice?  Not the most sophisticated user.

    Got it. I tried booting with MOD_AUTOLOAD set to yes, and it was working fine. Looks like I needed to specify some more modules in my list.

  • Insert/Update/Delete Non-PO Invoice Line Item via FM/BAPI?

    Does anyone know of a way to insert/update/delete an Invoice Line item (Non-PO Accounting Invoice - Transaction FB60 or FV60) using a BAPI or Function Module (or set of function modules) using ABAP? I have been trying to find some code to accomplish this and am stuck on a couple of issues.
    I have found PRELIMINARY_POSTING_FB01 and PP_CHANGE_DOCUMENT_ENJ but both seem to submit the details to background processes. This is an issue because it gives the user a success message after execution but later delivers the error to Workflow. This is for an interfacing program so the results should be as real time as possible.
    Has anyone accomplished this via FM or BAPI and if so would you mind sharing your experiences?
    Thank you very much,
    Andy

    SG- Thank you for the reply.
    I have been playing with BAPI_INCOMINGINVOICE_PARK and I'm not sure if it is doing exactly what we want, but it is something that I have considered in the past. I plan on looking into BAPI_ACC_INVOICE_RECEIPT_POST this morning, hopefully that will provide some more for us.
    If possible I'd like to avoid BDC sessions because this program could hypothetically interface with multiple SAP systems with different configurations.
    I will check into those FM's and thank you very much.

  • [Solved] Can't boot into Arch after deleting some partitons

    About 6 months ago I installed Arch on a machine that used to run Ubuntu. Had some trouble at the time getting to boot into Arch but somehow managed. Now eventually decided to delete the old Ubuntu partitons to free up some space using gparted. Arch partition number changed from sda12 to sda6.
    On rebooting after deleting ubuntu partitions with gparted, I got an ubuntu splash screen and a whole lot of ubuntu boot options. Somehow these were all contained in my Arch's /boot/grub/menu.lst. Arch is all on one partition and no separate boot partition (which I had with Ubuntu - maybe I haven't deleted that and this is the problem?). Will need to check that out.
    I can chroot into Arch and did the following -
    grub> find /boot/grub/stage1
    (hd0,5)
    grub> root (hd0,5)
    Filesystem type is ext2fs, partition type 0x83
    grub> setup (hd0)
    Checking if "/boot/grub/stage1" exists... yes
    Checking if "/boot/grub/stage2" exists... yes
    Checking if "/boot/grub/e2fs_stage1_5" exists... yes
    Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded.
    succeeded
    Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,5)/boot/grub/stage2 /boot/grub/menu.lst"... succeed
    ed
    Done.
    grub>
    The Arch /boot/grub/menu.lst had a whole lot of ubuntu stuff in it but I edited to the following -
    # menu.lst - See: grub(8), info grub, update-grub(8)
    # grub-install(8), grub-floppy(8),
    # grub-md5-crypt, /usr/share/doc/grub
    # and /usr/share/doc/grub-doc/.
    ## default num
    # Set the default entry to the entry number NUM. Numbering starts from 0, and
    # the entry number 0 is the default if the command is not used.
    # You can specify 'saved' instead of a number. In this case, the default entry
    # is the entry saved with the command 'savedefault'.
    # WARNING: If you are using dmraid do not use 'savedefault' or your
    # array will desync and will not let you boot your system.
    default 0
    ## timeout sec
    # Set a timeout, in SEC seconds, before automatically booting the default entry
    # (normally the first entry defined).
    timeout 3
    ## hiddenmenu
    # Hides the menu by default (press ESC to see the menu)
    hiddenmenu
    # Pretty colours
    #color cyan/blue white/blue
    ## password ['--md5'] passwd
    # If used in the first section of a menu file, disable all interactive editing
    # control (menu entry editor and command-line) and entries protected by the
    # command 'lock'
    # e.g. password topsecret
    # password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
    # password topsecret
    # examples
    # title Windows 95/98/NT/2000
    # root (hd0,0)
    # makeactive
    # chainloader +1
    # title Linux
    # root (hd0,1)
    # kernel /vmlinuz root=/dev/hda2 ro
    # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=(hd0,3)
    title Arch uuid
    #root (hd0,5)
    uuid d15cf4f9-18ca-4ec5-95bc-db0f6f264736
    kernel /boot/vmlinuz26 root=/dev/sda6 ro vga=775
    intrd /boot/kernel26.img
    title Arch hd
    root (hd0,5)
    kernel /boot/vmlinuz26 root=/dev/sda6
    intrd /boot/kernel26.img
    I have a bootinfo script which gives the following (from the chroot environment) -
    Boot Info Script 0.55 dated February 15th, 2010
    ============================= Boot Info Summary: ==============================
    => Grub 0.97 is installed in the MBR of /dev/sda and looks on the same drive
    in partition #6 for /boot/grub/stage2 and /boot/grub/menu.lst.
    => No boot loader is installed in the MBR of /dev/sdb
    sda1: _________________________________________________________________________
    File system: swap
    Boot sector type: -
    Boot sector info:
    sda2: _________________________________________________________________________
    File system: Extended Partition
    Boot sector type: -
    Boot sector info:
    sda5: _________________________________________________________________________
    File system: ext3
    Boot sector type: -
    Boot sector info:
    Mounting failed:
    mount: /dev/sda5 already mounted or sda5 busy
    sda6: _________________________________________________________________________
    File system: ext3
    Boot sector type: -
    Boot sector info:
    Mounting failed:
    mount: /dev/sda5 already mounted or sda5 busy
    mount: /dev/sda6 already mounted or sda6 busy
    sda7: _________________________________________________________________________
    File system: ext3
    Boot sector type: -
    Boot sector info:
    Operating System:
    Boot files/dirs:
    sda3: _________________________________________________________________________
    File system: ext3
    Boot sector type: -
    Boot sector info:
    Operating System: Ubuntu 10.04.1 LTS
    Boot files/dirs: /etc/fstab
    sda4: _________________________________________________________________________
    File system: ext3
    Boot sector type: -
    Boot sector info:
    Operating System:
    Boot files/dirs: /grub/menu.lst /grub/grub.cfg /grub/core.img
    sdb1: _________________________________________________________________________
    File system: xfs
    Boot sector type: -
    Boot sector info:
    Operating System:
    Boot files/dirs:
    =========================== Drive/Partition Info: =============================
    Drive: sda ___________________ _____________________________________________________
    Disk /dev/sda: 750.2 GB, 750155292160 bytes
    255 heads, 63 sectors/track, 91201 cylinders, total 1465147055 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    Partition Boot Start End Size Id System
    /dev/sda1 417,690 6,554,519 6,136,830 82 Linux swap / Solaris
    /dev/sda2 25,414,954 1,465,144,064 1,439,729,111 5 Extended
    /dev/sda5 25,414,956 1,360,287,809 1,334,872,854 83 Linux
    /dev/sda6 1,360,287,873 1,423,198,349 62,910,477 83 Linux
    /dev/sda7 1,423,198,413 1,465,144,064 41,945,652 83 Linux
    /dev/sda3 6,554,520 25,414,829 18,860,310 83 Linux
    /dev/sda4 * 63 417,689 417,627 83 Linux
    Drive: sdb ___________________ _____________________________________________________
    Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    Partition Boot Start End Size Id System
    /dev/sdb1 2,048 1,953,523,711 1,953,521,664 83 Linux
    blkid -c /dev/null: ____________________________________________________________
    Device UUID TYPE LABEL
    /dev/loop0 squashfs
    /dev/sda1 2a95d85a-45fe-4584-88dd-0ee20e651ec5 swap
    /dev/sda2: PTTYPE="dos" PART_ENTRY_SCHEME="dos" PART_ENTRY_TYPE="0x5" PART_ENTRY_NUMBER="2"
    /dev/sda3 32495e1a-227c-4d23-9f63-b1319def0dd9 ext3
    /dev/sda4 d6dc69b0-967d-4886-b62d-8c0d6be06b41 ext3
    /dev/sda5 37971286-b8d3-4a1b-9f94-4008288fed6d ext3 data
    /dev/sda6 d15cf4f9-18ca-4ec5-95bc-db0f6f264736 ext3 30GB-02
    /dev/sda7 eb736131-b558-4404-9b83-7f1e6d9e76ae ext3 var
    /dev/sda: PTTYPE="dos"
    /dev/sdb1 0e83045d-a0bd-4d36-b61d-bdb905130dc2 xfs 1TB-04
    /dev/sdb: PTTYPE="dos"
    ============================ "mount | grep ^/dev output: ===========================
    Device Mount_Point Type Options
    /dev/sda12 / ext3 (rw,commit=0)
    =============================== sda3/etc/fstab: ===============================
    # /etc/fstab: static file system information.
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc defaults 0 0
    # /dev/sda1 = swap
    /dev/sda1 none swap sw 0 0
    # /dev/sda3 = root
    #UUID=32495e1a-227c-4d23-9f63-b1319def0dd9
    /dev/sda3 / ext3 relatime,errors=remount-ro 0 1
    # /dev/sda4 = boot
    # UUID=d6dc69b0-967d-4886-b62d-8c0d6be06b41
    /dev/sda4 /boot ext3 relatime 0 2
    # /dev/sda5 = home
    # UUID=670eee83-0a3e-429c-863f-b9ecced9f97e
    /dev/sda5 /home ext3 relatime 0 2
    #/dev/sda6
    #UUID=37971286-b8d3-4a1b-9f94-4008288fed6d
    /dev/sda6 /home/ben/Data ext3 defaults,relatime 0 0
    # /dev/sda7
    # UUID=fdb14ca4-d71d-489f-a00e-6e608770674c
    /dev/sda7 /var ext3 relatime 0 2
    # /dev/sda8
    /dev/sda8 /opt ext3 relatime 0 2
    # /dev/sda10 - Arch
    /dev/sda10 /mnt/arch ext3 relatime 0 2
    # Not sure what this is doing here
    # Have commented it out - May be the reason why xbmc and mythtv were crashing on dvd insert and play
    # /dev/hda /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
    # /dev/sde1
    # uuid appears to be 644406B3570C1846 -> ../../sde1
    #/dev/sde1 /home/ben/Data/TVRecordings-1TB01 xfs defaults,relatime 0 0
    #1TB-01
    UUID=76f3823a-81dc-45c9-a0b7-2bc6c3beb2f8 /media/1TB-01 xfs noatime,nodiratime,allocsize=512m 0 0 #remove
    d defaults, relatime
    # 1TB-02
    UUID=59cbf7a1-7008-40d0-96ed-c6f231823d4f /media/1TB-02 xfs noatime,nodiratime,allocsize=512m 0 0 #remove
    d defaults, relatime
    # 1TB-03
    UUID=0e936800-3c53-4b87-abc8-19be0ffca7f9 /media/1TB-03 xfs noatime,nodiratime,allocsize=512m 0 0 #remove
    d defaults, relatime
    # 750GB-02 ext3 Partition
    # UUID giving problems, trying with dev
    # UUID=c23b9c9a-66fc-4256-9211-73156c1ac64a /media/750GB-02_ext3 ext3 defaults,relatime 0 0
    /dev/sde2 /media/750GB-02_ext3 ext3 defaults,relatime 0 0
    ============================= sda4/grub/menu.lst: =============================
    # menu.lst - See: grub(8), info grub, update-grub(8)
    # grub-install(8), grub-floppy(8),
    # grub-md5-crypt, /usr/share/doc/grub
    # and /usr/share/doc/grub-doc/.
    ## default num
    # Set the default entry to the entry number NUM. Numbering starts from 0, and
    # the entry number 0 is the default if the command is not used.
    # You can specify 'saved' instead of a number. In this case, the default entry
    # is the entry saved with the command 'savedefault'.
    # WARNING: If you are using dmraid do not use 'savedefault' or your
    # array will desync and will not let you boot your system.
    default 0
    ## timeout sec
    # Set a timeout, in SEC seconds, before automatically booting the default entry
    # (normally the first entry defined).
    timeout 3
    ## hiddenmenu
    # Hides the menu by default (press ESC to see the menu)
    hiddenmenu
    # Pretty colours
    #color cyan/blue white/blue
    ## password ['--md5'] passwd
    # If used in the first section of a menu file, disable all interactive editing
    # control (menu entry editor and command-line) and entries protected by the
    # command 'lock'
    # e.g. password topsecret
    # password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
    # password topsecret
    # examples
    # title Windows 95/98/NT/2000
    # root (hd0,0)
    # makeactive
    # chainloader +1
    # title Linux
    # root (hd0,1)
    # kernel /vmlinuz root=/dev/hda2 ro
    # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
    ### BEGIN AUTOMAGIC KERNELS LIST
    ## lines between the AUTOMAGIC KERNELS LIST markers will be modified
    ## by the debian update-grub script except for the default options below
    ## DO NOT UNCOMMENT THEM, Just edit them to your needs
    ## ## Start Default Options ##
    ## default kernel options
    ## default kernel options for automagic boot options
    ## If you want special options for specific kernels use kopt_x_y_z
    ## where x.y.z is kernel version. Minor versions can be omitted.
    ## e.g. kopt=root=/dev/hda1 ro
    ## kopt_2_6_8=root=/dev/hdc1 ro
    ## kopt_2_6_8_2_686=root=/dev/hdc2 ro
    # kopt=root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro
    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=(hd0,3)
    ## should update-grub create alternative automagic boot options
    ## e.g. alternative=true
    ## alternative=false
    # alternative=true
    ## should update-grub lock alternative automagic boot options
    ## e.g. lockalternative=true
    ## lockalternative=false
    # lockalternative=false
    ## additional options to use with the default boot option, but not with the
    ## alternatives
    ## e.g. defoptions=vga=791 resume=/dev/hda5
    # defoptions=quiet splash
    ## should update-grub lock old automagic boot options
    ## e.g. lockold=false
    ## lockold=true
    # lockold=false
    ## Xen hypervisor options to use with the default Xen boot option
    # xenhopt=
    ## Xen Linux kernel options to use with the default Xen boot option
    # xenkopt=console=tty0
    ## altoption boot targets option
    ## multiple altoptions lines are allowed
    ## e.g. altoptions=(extra menu suffix) extra boot options
    ## altoptions=(recovery) single
    # altoptions=(recovery mode) single
    ## controls how many kernels should be put into the menu.lst
    ## only counts the first occurence of a kernel, not the
    ## alternative kernel options
    ## e.g. howmany=all
    ## howmany=7
    # howmany=all
    ## should update-grub create memtest86 boot option
    ## e.g. memtest86=true
    ## memtest86=false
    # memtest86=true
    ## should update-grub adjust the value of the default booted system
    ## can be true or false
    # updatedefaultentry=false
    ## should update-grub add savedefault to the default options
    ## can be true or false
    # savedefault=false
    ## ## End Default Options ##
    title Ubuntu 10.04.1 LTS, kernel 2.6.32-26-generic
    root (hd0,3)
    kernel /vmlinuz-2.6.32-26-generic root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro quiet splash
    initrd /initrd.img-2.6.32-26-generic
    quiet
    title Ubuntu 10.04.1 LTS, kernel 2.6.32-26-generic (recovery mode)
    root (hd0,3)
    kernel /vmlinuz-2.6.32-26-generic root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro single
    initrd /initrd.img-2.6.32-26-generic
    title Ubuntu 10.04.1 LTS, kernel 2.6.32-24-generic
    root (hd0,3)
    kernel /vmlinuz-2.6.32-24-generic root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro quiet splash
    initrd /initrd.img-2.6.32-24-generic
    quiet
    title Ubuntu 10.04.1 LTS, kernel 2.6.32-24-generic (recovery mode)
    root (hd0,3)
    kernel /vmlinuz-2.6.32-24-generic root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro single
    initrd /initrd.img-2.6.32-24-generic
    title Ubuntu 10.04.1 LTS, kernel 2.6.32-23-generic
    root (hd0,3)
    kernel /vmlinuz-2.6.32-23-generic root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro quiet splash
    initrd /initrd.img-2.6.32-23-generic
    quiet
    title Ubuntu 10.04.1 LTS, kernel 2.6.32-23-generic (recovery mode)
    root (hd0,3)
    kernel /vmlinuz-2.6.32-23-generic root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro single
    initrd /initrd.img-2.6.32-23-generic
    title Ubuntu 10.04.1 LTS, kernel 2.6.32-22-generic
    root (hd0,3)
    kernel /vmlinuz-2.6.32-22-generic root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro quiet splash
    initrd /initrd.img-2.6.32-22-generic
    quiet
    title Ubuntu 10.04.1 LTS, kernel 2.6.32-22-generic (recovery mode)
    root (hd0,3)
    kernel /vmlinuz-2.6.32-22-generic root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro single
    initrd /initrd.img-2.6.32-22-generic
    title Ubuntu 10.04.1 LTS, memtest86+
    root (hd0,3)
    kernel /memtest86+.bin
    quiet
    ### END DEBIAN AUTOMAGIC KERNELS LIST
    ============================= sda4/grub/grub.cfg: =============================
    # DO NOT EDIT THIS FILE
    # It is automatically generated by /usr/sbin/grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    ### BEGIN /etc/grub.d/00_header ###
    if [ -s $prefix/grubenv ]; then
    load_env
    fi
    set default="0"
    if [ ${prev_saved_entry} ]; then
    set saved_entry=${prev_saved_entry}
    save_env saved_entry
    set prev_saved_entry=
    save_env prev_saved_entry
    set boot_once=true
    fi
    function savedefault {
    if [ -z ${boot_once} ]; then
    saved_entry=${chosen}
    save_env saved_entry
    fi
    function recordfail {
    set recordfail=1
    if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
    insmod ext2
    set root='(hd0,3)'
    search --no-floppy --fs-uuid --set 32495e1a-227c-4d23-9f63-b1319def0dd9
    if loadfont /usr/share/grub/unicode.pf2 ; then
    set gfxmode=640x480
    insmod gfxterm
    insmod vbe
    if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
    fi
    fi
    insmod ext2
    set root='(hd0,4)'
    search --no-floppy --fs-uuid --set d6dc69b0-967d-4886-b62d-8c0d6be06b41
    set locale_dir=($root)/grub/locale
    set lang=en
    insmod gettext
    if [ ${recordfail} = 1 ]; then
    set timeout=-1
    else
    set timeout=10
    fi
    ### END /etc/grub.d/00_header ###
    ### BEGIN /etc/grub.d/05_debian_theme ###
    set menu_color_normal=white/black
    set menu_color_highlight=black/light-gray
    ### END /etc/grub.d/05_debian_theme ###
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'Ubuntu, with Linux 2.6.32-26-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd0,4)'
    search --no-floppy --fs-uuid --set d6dc69b0-967d-4886-b62d-8c0d6be06b41
    linux /vmlinuz-2.6.32-26-generic root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro quiet splash
    initrd /initrd.img-2.6.32-26-generic
    menuentry 'Ubuntu, with Linux 2.6.32-26-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu -
    -class os {
    recordfail
    insmod ext2
    set root='(hd0,4)'
    search --no-floppy --fs-uuid --set d6dc69b0-967d-4886-b62d-8c0d6be06b41
    echo 'Loading Linux 2.6.32-26-generic ...'
    linux /vmlinuz-2.6.32-26-generic root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro single
    echo 'Loading initial ramdisk ...'
    initrd /initrd.img-2.6.32-26-generic
    menuentry 'Ubuntu, with Linux 2.6.32-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd0,4)'
    search --no-floppy --fs-uuid --set d6dc69b0-967d-4886-b62d-8c0d6be06b41
    linux /vmlinuz-2.6.32-24-generic root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro quiet splash
    initrd /initrd.img-2.6.32-24-generic
    menuentry 'Ubuntu, with Linux 2.6.32-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu -
    -class os {
    recordfail
    insmod ext2
    set root='(hd0,4)'
    search --no-floppy --fs-uuid --set d6dc69b0-967d-4886-b62d-8c0d6be06b41
    echo 'Loading Linux 2.6.32-24-generic ...'
    linux /vmlinuz-2.6.32-24-generic root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro single
    echo 'Loading initial ramdisk ...'
    initrd /initrd.img-2.6.32-24-generic
    menuentry 'Ubuntu, with Linux 2.6.32-23-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd0,4)'
    search --no-floppy --fs-uuid --set d6dc69b0-967d-4886-b62d-8c0d6be06b41
    linux /vmlinuz-2.6.32-23-generic root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro quiet splash
    initrd /initrd.img-2.6.32-23-generic
    menuentry 'Ubuntu, with Linux 2.6.32-23-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu -
    -class os {
    recordfail
    insmod ext2
    set root='(hd0,4)'
    search --no-floppy --fs-uuid --set d6dc69b0-967d-4886-b62d-8c0d6be06b41
    echo 'Loading Linux 2.6.32-23-generic ...'
    linux /vmlinuz-2.6.32-23-generic root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro single
    echo 'Loading initial ramdisk ...'
    initrd /initrd.img-2.6.32-23-generic
    menuentry 'Ubuntu, with Linux 2.6.32-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd0,4)'
    search --no-floppy --fs-uuid --set d6dc69b0-967d-4886-b62d-8c0d6be06b41
    linux /vmlinuz-2.6.32-22-generic root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro quiet splash
    initrd /initrd.img-2.6.32-22-generic
    menuentry 'Ubuntu, with Linux 2.6.32-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu -
    -class os {
    recordfail
    insmod ext2
    set root='(hd0,4)'
    search --no-floppy --fs-uuid --set d6dc69b0-967d-4886-b62d-8c0d6be06b41
    echo 'Loading Linux 2.6.32-22-generic ...'
    linux /vmlinuz-2.6.32-22-generic root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro single
    echo 'Loading initial ramdisk ...'
    initrd /initrd.img-2.6.32-22-generic
    ### END /etc/grub.d/10_linux ###
    ### BEGIN /etc/grub.d/20_memtest86+ ###
    menuentry "Memory test (memtest86+)" {
    insmod ext2
    set root='(hd0,4)'
    search --no-floppy --fs-uuid --set d6dc69b0-967d-4886-b62d-8c0d6be06b41
    linux16 /memtest86+.bin
    menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod ext2
    set root='(hd0,4)'
    search --no-floppy --fs-uuid --set d6dc69b0-967d-4886-b62d-8c0d6be06b41
    linux16 /memtest86+.bin console=ttyS0,115200n8
    ### END /etc/grub.d/20_memtest86+ ###
    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry "Arch Linux (on /dev/sda10)" {
    insmod ext2
    set root='(hd0,10)'
    search --no-floppy --fs-uuid --set 26851879-58d1-4d65-90b4-e0845fe1176c
    linux /boot/vmlinuz26 root=/dev/sda10 ro
    initrd /boot/kernel26.img
    menuentry "Arch Linux Fallback (on /dev/sda10)" {
    insmod ext2
    set root='(hd0,10)'
    search --no-floppy --fs-uuid --set 26851879-58d1-4d65-90b4-e0845fe1176c
    linux /boot/vmlinuz26 root=/dev/sda10 ro
    initrd /boot/kernel26-fallback.img
    #### END /etc/grub.d/30_os-prober ###
    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries. Simply type the
    # menu entries you want to add after this comment. Be careful not to change
    # the 'exec tail' line above.
    # From Arch grub menu.lst
    # (0) Arch Linux
    #title Arch Linux [/boot/vmlinuz26]
    #root (hd0,0)
    #kernel /vmlinuz26 root=/dev/sda3 ro
    #initrd /kernel26.img
    #Note: With a separate boot partition, omit /boot from the path, (i.e. type set prefix=(hdX,Y)/grub and insmod
    (hdX,Y)/grub/linux.mod).
    #This introduces the "linux" and "initrd" commands, which should be familiar (see #Configuration).
    #An example, booting Arch Linux:
    #set root=(hd0,5)
    #linux /boot/vmlinuz26 root=/dev/sda5
    #initrd /boot/kernel26.img
    #boot
    ###menuentry "Arch1" {
    ###insmod ext2
    ###set root='(hd0,10)'
    #search --no-floppy --fs-uuid --set d6dc69b0-967d-4886-b62d-8c0d6be06b41 = FOR UBUNTU THIS IS THE BOOT
    PARTITION
    #linux /vmlinuz-2.6.32-26-generic root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro quiet splash = FOR
    UBUNTU THIS IS THE ROOT PARTITION
    #initrd /initrd.img-2.6.32-26-generic
    ###search --no-floppy --fs-uuid --set d6dc69b0-967d-4886-b62d-8c0d6be06b41 # UBUNTU'S BOOT PARTITION UU
    ID
    ###linux /boot/vmlinuz-26 root=635d7d02-3f5b-4af6-9c74-16b2af8cc7fd ro quiet splash # ARCH'S ROOT UUID
    ###initrd /boot/kernel26.img
    # /dev/sda10 uuid = 635d7d02-3f5b-4af6-9c74-16b2af8cc7fd - obtain using ls -l /dev/disk/by-uuid/
    ###menuentry "Arch2" {
    ###insmod ext2
    ###set root='(hd0,4)' #= TRYING UBUNTU'S BOOT
    #search --no-floppy --fs-uuid --set d6dc69b0-967d-4886-b62d-8c0d6be06b41 = FOR UBUNTU THIS IS THE BOOT
    PARTITION
    #linux /vmlinuz-2.6.32-26-generic root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro quiet splash = FOR
    UBUNTU THIS IS THE ROOT PARTITION
    #initrd /initrd.img-2.6.32-26-generic
    #search --no-floppy --fs-uuid --set d6dc69b0-967d-4886-b62d-8c0d6be06b41 # UBUNTU'S BOOT PARTITION UUID
    ###linux /boot/vmlinuz-26 root=/dev/sda10 ro quiet splash # TRYING ARCH'S ROOT DEVICE FORMAT
    ###initrd /boot/kernel26.img
    # /dev/sda10 uuid = 635d7d02-3f5b-4af6-9c74-16b2af8cc7fd - obtain using ls -l /dev/disk/by-uuid/
    ###menuentry "Arch3" {
    ###insmod ext2
    ###set root='(hd0,10)' #= TRYING UBUNTU'S BOOT IN HD FORMAT
    #search --no-floppy --fs-uuid --set d6dc69b0-967d-4886-b62d-8c0d6be06b41 = FOR UBUNTU THIS IS THE BOOT
    PARTITION
    #linux /vmlinuz-2.6.32-26-generic root=UUID=32495e1a-227c-4d23-9f63-b1319def0dd9 ro quiet splash = FOR
    UBUNTU THIS IS THE ROOT PARTITION
    #initrd /initrd.img-2.6.32-26-generic
    #search --no-floppy --fs-uuid --set d6dc69b0-967d-4886-b62d-8c0d6be06b41 # UBUNTU'S BOOT PARTITION UUID
    ###linux /boot/vmlinuz-26 root=/dev/sda10 ro quiet splash # TRYING ARCH'S ROOT DEVICE FORMAT
    ###initrd /boot/kernel26.img
    # /dev/sda10 uuid = 635d7d02-3f5b-4af6-9c74-16b2af8cc7fd - obtain using ls -l /dev/disk/by-uuid/
    ### END /etc/grub.d/40_custom ###
    =================== sda4: Location of files loaded by Grub: ===================
    .0GB: grub/core.img
    .0GB: grub/grub.cfg
    .0GB: grub/menu.lst
    .0GB: grub/stage2
    .0GB: initrd.img-2.6.32-22-generic
    .0GB: initrd.img-2.6.32-23-generic
    .1GB: initrd.img-2.6.32-24-generic
    .1GB: initrd.img-2.6.32-26-generic
    .0GB: vmlinuz26
    .0GB: vmlinuz-2.6.32-22-generic
    .0GB: vmlinuz-2.6.32-23-generic
    .1GB: vmlinuz-2.6.32-24-generic
    .0GB: vmlinuz-2.6.32-26-generic
    =============================== StdErr Messages: ===============================
    No volume groups found
    mdadm: No arrays found in config file or automatically
    [/quote]
    Output of fdisk -l from chroot is -
    [quote]Disk /dev/sda: 750.2 GB, 750155292160 bytes
    255 heads, 63 sectors/track, 91201 cylinders, total 1465147055 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x0000b084
    Device Boot Start End Blocks Id System
    /dev/sda1 417690 6554519 3068415 82 Linux swap / Solaris
    /dev/sda2 25414954 1465144064 719864555+ 5 Extended
    /dev/sda3 6554520 25414829 9430155 83 Linux
    /dev/sda4 * 63 417689 208813+ 83 Linux
    /dev/sda5 25414956 1360287809 667436427 83 Linux
    /dev/sda6 1360287873 1423198349 31455238+ 83 Linux
    /dev/sda7 1423198413 1465144064 20972826 83 Linux
    Partition table entries are not in disk order
    Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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: 0x00025bd3
    Device Boot Start End Blocks Id System
    /dev/sdb1 2048 1953523711 976760832 83 Linux
    I need to post this now and come back from a different machine to note the error messages I am now getting on boot. ...
    Note that when I boot and press esc to get the menu I get the menu.lst I created (in the second quote) above in /dev/sda6, ie the one with the Arch hd and uuid entries - so grub is looking there and finding that menu.lst, but something goes wrong after that.
    OK. Have now booted the machine and after pressing esc and selecting the uuid entry (the same thing happens with the hd entry) I get a whole lot of stuff, but what seems relevant is (typing it out) -
    List of all partitions:
    No filesystem could mount root, tried:
    Kernel panic - not syncing: VS: Unable to mount root fs on unknown-block(0,0)
    Pid: 1, comm: swapper Not tainted 2.6.39-Arch #1
    If anyone can help I'd really appreciate it. This is my MythTV machine so the WAF is about to take a big dive!
    If I could just install grub to the MBR as if this was a new installation of Arch that would be great.
    I am really lost as to what is going on, which I'm sure is evident.
    Thanks a lot
    belbo
    Last edited by belbo (2011-08-12 13:31:23)

    Hi. Unfortunately that didn't help.
    So next, based on this post https://wiki.archlinux.org/index.php/Ke … el_version I chrooted into Arch and (a) rolled back and (b) reinstalled my kernel but that didn't help either. I suspected it wouldn't because the kernel was working fine before I deleted the partitions in question.
    [2011-08-08 23:32] ==> Image generation successful
    [2011-08-08 23:32] upgraded kernel26 (2.6.39.3-1 -> 2.6.39.3-1)
    I then did a pacman -Suy and the linux package has now replaced kernel26. ( See this wiki entry http://www.archlinux.org/news/changes-t … filenames/). I didn't change anything in menu.lst owing to this and it seems there is no need to. Unfortunately this hasn't helped either - still getting the kernel panic. 
    Pacman.log relating to the new kernel package below -
    [2011-08-09 00:22] Running 'pacman -Suy'
    [2011-08-09 00:22] synchronizing package lists
    [2011-08-09 00:23] starting full system upgrade
    [2011-08-09 00:23] Running 'pacman -Suy'
    [2011-08-09 00:23] synchronizing package lists
    [2011-08-09 00:23] starting full system upgrade
    [2011-08-09 00:26] removed python-mygpoclient (1.5-1)
    [2011-08-09 00:26] removed kernel26 (2.6.39.3-1)
    [2011-08-09 00:26] warning: /boot/grub/menu.lst installed as /boot/grub/menu.lst.pacnew
    [2011-08-09 00:26] upgraded grub (0.97-17 -> 0.97-19)
    [2011-08-09 00:26] upgraded icu (4.8-1 -> 4.8.1-1)
    [2011-08-09 00:26] upgraded linux-firmware (20110512-2 -> 20110727-1)
    [2011-08-09 00:26] >>> Updating module dependencies. Please wait ...
    [2011-08-09 00:26] >>> Generating initial ramdisk, using mkinitcpio. Please wait...
    [2011-08-09 00:26] ==> Building image from preset: 'default'
    [2011-08-09 00:26] -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
    [2011-08-09 00:26] ==> Starting build: 3.0-ARCH
    [2011-08-09 00:26] -> Parsing hook: [base]
    [2011-08-09 00:26] -> Parsing hook: [udev]
    [2011-08-09 00:26] -> Parsing hook: [autodetect]
    [2011-08-09 00:26] -> Parsing hook: [pata]
    [2011-08-09 00:26] -> Parsing hook: [scsi]
    [2011-08-09 00:26] -> Parsing hook: [sata]
    [2011-08-09 00:26] -> Parsing hook: [filesystems]
    [2011-08-09 00:26] -> Parsing hook: [usbinput]
    [2011-08-09 00:26] ==> Generating module dependencies
    [2011-08-09 00:26] ==> Creating gzip initcpio image: /boot/initramfs-linux.img
    [2011-08-09 00:26] 7079 blocks
    [2011-08-09 00:26] ==> Image generation successful
    [2011-08-09 00:26] ==> Building image from preset: 'fallback'
    [2011-08-09 00:26] -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
    [2011-08-09 00:26] ==> Starting build: 3.0-ARCH
    [2011-08-09 00:26] -> Parsing hook: [base]
    [2011-08-09 00:26] -> Parsing hook: [udev]
    [2011-08-09 00:26] -> Parsing hook: [pata]
    [2011-08-09 00:26] -> Parsing hook: [scsi]
    [2011-08-09 00:26] -> Parsing hook: [sata]
    [2011-08-09 00:26] -> Parsing hook: [filesystems]
    [2011-08-09 00:26] -> Parsing hook: [usbinput]
    [2011-08-09 00:26] ==> Generating module dependencies
    [2011-08-09 00:26] ==> Creating gzip initcpio image: /boot/initramfs-linux-fallback.img
    [2011-08-09 00:26] 23360 blocks
    [2011-08-09 00:26] ==> Image generation successful
    [2011-08-09 00:26] installed linux (3.0.1-1)
    I don't think I've mentioned that my old menu.lst seems to have disappeared and so must have been on one of the partitions that were deleted. I did have 2 Arch installations when I was setting things up months ago and that menu.lst may have been on the other partition but pointing to this partiton's kernel for booting. Presumably that's possible since this partiton is definitely the one I have been using for the last several months (confirmed by log and other files updated in the last few days etc). Even so, I suppose that probably wouldn't be relevant to this issue, since grub is finding the menu.lst on this partition when it boots so it is looking in the intended place now.
    It seems I'm at a bit of a dead end. It seems these kernel panics are usually because there is something wrong with the kernel - which there wasn't with mine (and presumably the kernel in the new linux package is fine) or there is a typo in menu.lst (I can't see one and nobody has pointed one out yet) or menu.lst is pointing to the wrong partition (mine is pointing to the same partition and /boot directory that is found by grub - which is where my boot image is located - so it seems to be correct). I have nevertheless tried editing the menu.lst entry when booting to boot from different partitions but so far that hasn't worked either.
    If anybody has other ideas I'd really appreciate it.
    If not, some suggestions on re-installing would also be appreciated. I have a recent tar archive of the partition, but presumably reinstalling that wouldn't be of much use since it would just put back what is currently there. I guess that I need to format the partition, create a separate boot partition, do a fresh install of Arch into the formatted partition (and with boot in the new boot partition). And then restore my tar backup (excluding the boot directory) into the formatted partition?
    Any assistance greatly appreciated.
    Thanks
    belbo
    Last edited by belbo (2011-08-08 23:17:49)

  • :NEW cannot be used in After Delete Trigger ?

    Hi,
    Is there any way to get the :NW.value in the After delete trigger for each row. My requirement is audit log of the end user DML operations along with user Name (HERE THE USER IS NOT THE ORACLE USER, BECAUSE OF THE LARGE NUMBER OF END USERS WE ARE MAINTAINING ONE TABLE TO CREATE USER NAME & PASSWORD, WHEN THE USER LOGIN TO ORACLE FORM SCREEN, ASSIGN THE USER NAME TO GLOBAL VARIABLE) & Action Date.
    Here is my code for trigger - It is working fine with INSER & UPDATE but for DELETE User is NULL
    CREATE OR REPLACE TRIGGER Tgr_stud_det
    AFTER INSERT OR UPDATE OR DELETE ON student_details
    FOR EACH ROW
    DECLARE
    BEGIN
    IF Inserting THEN
    -------------INSERT VALUE---------------
    INSERT INTO Log_student_details
    (Seq,
    App_User,
    Action,
    Action_Date,
    stud_name,
    stud_age,
    stud_sex)
    VALUES
    (stud_sequence.NEXTVAL,
    :NEW.App_User,
    'INSERT',
    SYSDATE,
    :NEW.stud_name,
    :NEW.stud_age,
    :NEW.stud_sex);
    -------------DELETE VALUE---------------
    ELSIF Deleting THEN
    INSERT INTO Log_student_details
    (Seq,
    App_User,
    Action,
    Action_Date,
    Comment_Up,
    stud_name,
    stud_age,
    stud_sex)
    VALUES
    (stud_sequence.NEXTVAL,
    :OLD.App_User,
    'DELETE',
    SYSDATE,
    NULL,
    :OLD.stud_name,
    :OLD.stud_age,
    :OLD.stud_sex);
    ELSIF Updating THEN
    -------------UPDATE VALUE---------------
    INSERT INTO Log_student_details
    (Seq,
    App_User,
    Action,
    Action_Date,
    Comment_Up,
    stud_name,
    stud_age,
    stud_sex)
    VALUES
    (stud_sequence.NEXTVAL,
    :NEW.App_User,
    'UPDATE',
    SYSDATE,
    'NEW VALUE',
    :NEW.stud_name,
    :NEW.stud_age,
    :NEW.stud_sex);
    INSERT INTO Log_student_details
    (Seq,
    App_User,
    Action,
    Action_Date,
    Comment_Up,
    stud_name,
    stud_age,
    stud_sex)
    VALUES
    (stud_sequence.CURRVAL,
    :NEW.App_User,
    'UPDATE',
    SYSDATE,
    'OLD VALUE',
    :OLD.stud_name,
    :OLD.stud_age,
    :OLD.stud_sex);
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END Tgr_stud_det;
    Thanks in advance.

    Rizly,
    As i mentioned in the above post, you should remove the references of :old and :new when you are trying to use the global variables. These values are only significant when you the talk about the record in the table.
    For the scenario, you explained, your trigger would insert two records....The trigger would be fired twice.. once during the insert and once during the delete. The audit table will have two records indicating both the actions..
    Take a look at this example below...I am artificially manufacturing a user id in the package test_pkg and using that in the insert trigger. As i explained above, you dont need the :old and :new references because the user id is not a column in the table . hence the :old and :new references have no relevance.
    Also note that, for the delete, I use the :old value and for the insert, I use the :new value.
    for update, I assume you want to store the old record and hence used :old (you can of course use :new too..technically.).
    I don't have access to a forms environement, but the user id logic should be similar to what I described below.
    sql> create table t(
      2     id number,
      3     name varchar2(20)
      4  );
    Table created.
    sql> create table t_audit
      2     ( id number,
      3       name varchar2(20),
      4       action varchar2(20),
      5       user_id varchar2(20)
      6  );
    Table created.
    sql> create or replace package test_pkg as
      2      function get_user_id return varchar2;
      3  end test_pkg;
      4  /
    Package created.
    sql> create or replace package body test_pkg as
      2      function get_user_id return varchar2 is
      3      begin
      4          return 'USER' || to_char(sysdate,'HH24:MI');
      5      end get_user_id;
      6  end test_pkg;
      7  /
    Package body created.
      1  create or replace trigger trg_biud_t
      2     before insert or update or delete on t
      3     for each row
      4  begin
      5     if INSERTING then
      6        insert into t_audit values (:new.id, :new.name, 'INSERT',test_pkg.get_user_i
      7     elsif UPDATING then
      8        insert into t_audit values (:old.id, :old.name, 'UPDATE',test_pkg.get_user_i
      9     elsif DELETING then
    10        insert into t_audit values (:old.id, :old.name, 'DELETE',test_pkg.get_user_i
    11     end if;
    12* end;
    sql> /
    Trigger created.
    sql> select * from t;
    no rows selected
    sql> select * from t_audit;
    no rows selected
    sql> insert into t values (100, 'Rajesh');
    1 row created.
    sql> insert into t values (200,'Kumar');
    1 row created.
    sql> delete from t where id = 200;
    1 row deleted.
    sql> commit;
    Commit complete.
    sql> select * from t
      2  /
            ID NAME
           100 Rajesh
    sql> select * from t_audit;
            ID NAME                 ACTION               USER_ID
           100 Rajesh               INSERT               USER15:36
           200 Kumar                INSERT               USER15:36
           200 Kumar                DELETE               USER15:37

  • Making a PDF with LiveCycle then being able to edit pages, insert pages, delete pages, attach files to document, be readable in Adobe Reader etc.

    We have been working for some time with LiveCycle to creat a documents and have experienced a host of problems with the end product.
    1.  Images inserted into the LiveCycle PDF document often come up as "broken links" after editing the document and resaving it.
    2.  Documents will not display in Acrobat reader unless a digital signature is applied to them and the document is re-saved.
    3.  After making the document, we are unable to use Adobe Pro to insert pages, delete pages, or insert files into the document as attachments.
    The end state was to use the simplicity of LiveCycle to create a document and do most of the hard work, and then save it as a PDF document that could be easily edited with Adobe Pro.  It has proven difficult, to say the least, to figure out how to make this work.
    Thanks in advance for any assistance.

    1- Thank you
    2- It only seems rational that if I make a form with LiveCycle that I should be able to view it with Adobe Reader or Adobe Pro.
    Making a form with LiveCycle to be distrubuted to personnel internally that have Adobe Reader and Adobe Pro and cannot open it without it having a digital signature field in it that has just recently been signed just doesn't make sense.  Nor does it seem to make sense to have to purchase 200 additional licenses just for LiveCycle so that people can open a PDF that was made with LiveCycle.  If I make it in LiveCycle and only people with LiveCycle can open it, what is the purpose of making it to begin with?
    3- This also totally sucks.  In a standard Adobe Doc I can at least attach documents to it?
    So, what, exactly then, is the purpose of LiveCycle if the only benefit it seems to provide is ease of creation, but the end product has way less functionality?
    And how do I go about contacting an Adobe rep on the phone in regards to this without getting "there is no support for this product, go to Adobe.com"
    We have millions of dollars of Adobe software and can't get support other than hunting and pecking in these forums?  Really?

  • Space reusage after deletion in compressed table

    Hi,
    Some sources tell, that free space after DELETE in compressed table is not reused.
    For example, this http://www.trivadis.com/uploads/tx_cabagdownloadarea/table_compression2_0411EN.pdf
    Is it true?
    Unfortunatly I cannot reproduce it.

    Unfortunatly the question is still open.
    In Oracle 9i space, freed after DELETE in compressed block, was not reused in subsequent inserts.
    Isn't it?
    I saw many evidences from other people. One link I gave above.
    But in Oracle 10g I see another figures. After delete rows in compressed blocks, and subsequent insert into that block, block defragmented!
    Please, if who know any documentation about change in this behavior, please post links.
    p.s.
    in 10g:
    1. CTAS compress. Block is full.
    2. after, deleted every 4 from 5 rows.
    avsp=0x3b
    tosp=0x99e
    0x24:pri[0]     offs=0xeb0
    0x26:pri[1]     offs=0xea8 -- deleted
    0x28:pri[2]     offs=0xea0 -- deleted
    0x2a:pri[3]     offs=0xe98 -- deleted
    0x2c:pri[4]     offs=0xe90 -- deleted
    0x2e:pri[5]     offs=0xe88 -- live
    0x30:pri[6]     offs=0xe80 -- deleted
    0x32:pri[7]     offs=0xe78 -- deleted
    0x34:pri[8]     offs=0xe70 -- deleted
    0x36:pri[9]     offs=0xe68 -- deleted
    0x38:pri[10]     offs=0xe60 -- live
    0x3a:pri[11]     offs=0xe58 -- deleted
    0x3c:pri[12]     offs=0xe50 -- deleted
    0x3e:pri[13]     offs=0xe48 -- deleted
    0x40:pri[14]     offs=0xe40 -- deleted
    0x42:pri[15]     offs=0xe38  -- live
    0x44:pri[16]     offs=0xe30 -- deleted
    0x46:pri[17]     offs=0xe28 -- deleted
    0x48:pri[18]     offs=0xe20 -- deleted
    0x4a:pri[19]     offs=0xe18 -- deleted
    0x4c:pri[20]     offs=0xe10 -- live
    ...3. insert into table t select from ... where rownum < 1000;
    Inserted rows were inserted in a several blocks. Total number of not empty blocks was not changed. Chains did not occure.
    Block above looks as follow:
    avsp=0x7d
    tosp=0x7d
    0x24:pri[0]     offs=0xeb0
    0x26:pri[1]     offs=0x776 - new
    0x28:pri[2]     offs=0x84b - new
    0x2a:pri[3]     offs=0x920 - new
    0x2c:pri[4]     offs=0x9f5 - new
    0x2e:pri[5]     offs=0xea8 - old
    0x30:pri[6]     offs=0xaca - new
    0x32:pri[7]     offs=0xb9f - new
    0x34:pri[8]     offs=0x34d - new
    0x36:pri[9]     offs=0x422 - new
    0x38:pri[10]     offs=0xea0 - old
    0x3a:pri[11]     offs=0x4f7 - new
    0x3c:pri[12]     offs=0x5cc - new
    0x3e:pri[13]     offs=0x6a1 - new
    0x40:pri[14]     sfll=16  
    0x42:pri[15]     offs=0xe98 - old
    0x44:pri[16]     sfll=17
    0x46:pri[17]     sfll=18
    0x48:pri[18]     sfll=19
    0x4a:pri[19]     sfll=21
    0x4c:pri[20]     offs=0xe90 -- old
    0x4e:pri[21]     sfll=22
    0x50:pri[22]     sfll=23
    0x52:pri[23]     sfll=24
    0x54:pri[24]     sfll=26As we see, that old rows were defragmented, and repacked, and moved to the bottom of block.
    New rows (inserted after compressing of table) fill remaining space.
    So, deleted space was reused.

  • PO Release Strategy not changed after deletion of few line items with less

    Subject : PO Release Strategy not changed after deletion of few line items with less Total PO
    Dear Friends
    We have issue with PO Release strategy. We have created the PO. with release strategy  with multiple approvers.  After approval of first approval manager , one of the PO line item got deleted and Total PO value is reduced . The new PO value should have changed the PO release strategy. But it is not changed. Old release strategy only showing in the PO which is wrong. 
    Details of the PO
    PO no 4500000123 with 5 line items Total PO value : 100,000 USD Release strategy : AB
    PO line item 5 deleted. Now total PO value changed to 50,000 USD and the PO release strategy should have been changed to AA but not changed. Still showing PO release strategy AB only.
    Are there any OSS notes available to correct his bug.
    Please let me know if you need more details
    Thanks in Advance
    Thanks
    MVS

    Hi,
    release indicators  change it to 4.It may works. Please explore to all 6 indicators..........
    i.e,
    1-cannot be changed
    2-changable,no new determination of strategy
    3-changable,new release in case of strategy
    4-changable,new release in case of strategy or value change
    5-changable,new release if new strategy/outputted
    6-changable,new release if new strategy or value changed/ outputted......
    And check   Characteristic description and value in Classification  of Release strategies ........
    I hope this will help you. Thanking you.
    Regards,
    Venkat.

  • Can a script manually insert a delete (or backspace) into a text area?

    I'm new to action script, so this may have a simple answer, sorry if that's the case.
    I have a little movie created with a simple purpose of trying to mimic a system like cell phones have for character input.
    There are two text areas, one hidden off the screen that accepts the input from the user; a second text area in on screen and displays what the user had entered after some basic processing on the input.
    The hidden text area is pretty basic with listener that is responsible for grabbing the input keys and then mangling them to be inserted into the displayed text area based on the cell phone text entry multi-tap rules. Example user press 2-2-2  and the hidden input accepts 222 and then appends 'C' to the display text area. That's working great, but I have a problem if the user wants to delete from the display text area. I can't find a way to insert a delete or backspace key into the display text area. I've tried using StringFromCharCode (8) // Key.BACKSPACE, but that doesn't work. That just displays one of those undefined glyphs. I figure that things like clear, and delete are handled somewhere higher in the input chain and that's where I'm having a problem.
    I've looked, but I can't find a way to delete a single character from the text area. I was thinking if I could find the cursor location that I could just use some delete character method to get the job done, but I couldn't find how to do that.
    Any ideas on how to pull off manual delete function in a text area?

    Ned, I do really want to manually (by method of code) trigger a delete in a text area. The delete (or backspace) that I want added to the text area isn't directly entered by the user, it's the result of several key presses by the user. That's why I called it "manual" because it's done by the code, not by the user's direct input.
    Think about how text entry works on most phones... if you want to enter a letter you have to cycle through all the letters on a single key until you get to the character desired. As I stated before, if you want a 'c' you need to press 2 button 3 times. This is basically what I'm trying to do, but I want to add the ability to delete a character too if the correct sequence in entered, for example a sequence of ### would equal a backspace.
    Rothrock, I think you were thinking the same thing that a single key is used to do a backspace.
    I was thinking that I could possibly insert key event into the event queue for the text area to process, but I wasn't sure about that.
    Sorry, if this is confusing, I know it's not a straight forward design. I need onscreen and offscreen text areas with the onscreen one acting as a slave of the offscreen one.
    The way the code currently works is hidden text area had a listner that responds to changes, and that handler processes the key entered and deletes that character from the hidden text area. After the full sequence of characters (say 2 button has been pressed 3 times) the handler then sends the resulting character into the display text area. This part of the code works great. I can add any character including some specials like tab and newline. However if I want the text area to delete a character I don't have a way to do that. That's why I tried to insert the backspace key (0x08 or ^H, for other oldschoolers), but using that as a char code or string from char code doesn't work.
    I had also tried to create to set the focus to the display text area then create and dispatch a backspace keydown and keyup events to the visible text area and then return the focus back to the hidden textarea, but... no luck.

  • Getting Problem after Deleting a record from Record Store

    I am trying to create a simple application for mobile device. This application storing some records. I used RMS for this. These records i show in a list. But i tried to show list of records after deleting any record then list shows only prior records of deleted records n then shows exception as
    Recordsjavax.microedition.rms.InvalidRecordIDException
    The code i written as follows
    For storing data
    public void storeExercise(String EName, String Etime)
    try
    //System.out.println("AAAA");
    recordstore = RecordStore.openRecordStore("Test3",true);
    catch (Exception error)
    //System.out.println("EEEE");
    System.out.println("Exception"+error);
    try
    byte[] outputRecord;
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    DataOutputStream outputdataStream = new DataOutputStream(outputStream);
    outputdataStream.writeUTF(EName);
    outputdataStream.writeUTF(Etime);
    outputdataStream.flush();
    outputRecord = outputStream.toByteArray();
    recordstore.addRecord(outputRecord, 0, outputRecord.length);
    outputStream.reset();
    outputStream.close();
    outputdataStream.close();
    zlist.append(EName+Etime, null);
    display.setCurrent(zlist);
    catch (Exception error)
    System.out.println("Exception in writing Records"+error);
    for getting records
    public void getExercise(ZimList zlist)
    this.zlist = zlist;
    try
    //System.out.println("AAAA");
    recordstore = RecordStore.openRecordStore("Test3",true);
    //recordstore.closeRecordStore();
    catch (Exception error)
    //System.out.println("EEEE");
    System.out.println("Exception"+error);
    try
    //System.out.println("Hello");
    String Ename = null;
    String Etime = null;
    byte[] byteInputData = new byte[100];
    ByteArrayInputStream inputStream = new ByteArrayInputStream(byteInputData);
    DataInputStream inputDataStream = new DataInputStream(inputStream);
    for (int x=1; x<= recordstore.getNumRecords() ; x++ )
    System.out.println("Record Id ="+x);
    //if (x != InvalidRecordID)
    recordstore.getRecord(x, byteInputData, 0);
    Ename = inputDataStream.readUTF();
    Etime = inputDataStream.readUTF();
    inputStream.reset();
    Final = Ename + Etime;
    System.out.println("Insert" + Final);
    zlist.insert(x-1,Final,null);
    inputStream.close();
    inputDataStream.close();
    //recordstore.closeRecordStore();
    catch (Exception error)
    System.out.println("Exception in Reading Records"+error);
    /*if (recordstore.listRecordStores() != null)
    try
    recordstore.deleteRecordStore("My Record Store");
    catch (Exception error)
    System.out.println("Exception"+error);
    And for deleting records I write
    public void deleteExercise(int index)
    try
    //System.out.println("AAAA");
    recordstore = RecordStore.openRecordStore("Test3",true);
    //recordstore.closeRecordStore();
    catch (Exception error)
    //System.out.println("EEEE");
    System.out.println("Exception"+error);
    if (recordstore.listRecordStores() != null)
    try
    byte[] byteInputData = new byte[100];
    ByteArrayInputStream inputStream = new ByteArrayInputStream(byteInputData);
    DataInputStream inputDataStream = new DataInputStream(inputStream);
    for (int x=1; x<= recordstore.getNumRecords() ; x++ )
    recordstore.getRecord(x, byteInputData, 0);
    if (x == index)
    recordstore.deleteRecord(index);
    //x--;
    inputStream.reset();
    break;
    inputStream.close();
    inputDataStream.close();
    catch (Exception error)
    System.out.println("Exception in Deleting Records"+error);
    Please Help me bcz i am new in j2me development n having no experience

    Ok ...
    When you add records in you store, the J2ME implementation create an ID.
    In the database, there is a list like that with ID <--> ]byte[ ]
    You can get back a record with a this ID.
    When you delete a record, it deletes the row. Lets say you have stored 3 records and that the ID are 1, 2, 3 ... if you delete the second one, then you have still in the database IDs 1 and 3.
    That's why you have this exception : you are iterating with an ID 1, 2, 3, 4, 5 ... if one is delete there is no reorganization. (If you add an other record, it could be stored with ID 2).
    To read all the records, you should get a list of existing IDs. Take a look at the API. Here is a piece of code, that you work but I have not tested :
    RecordStore rs;
    RecordEnumeration re = rs.enumerateRecords(null, null, false);
    while (re.hasNextElement()) {
      String str = new String(re.nextRecord());
      System.out.println("Record: " + str);         
    } Hope it will help you.
    Regards

  • Table size not reducing after delete

    The table size in dba_segments is not reducing after we delete the data from the table. How can i regain the space after deleting the data from a table.
    Regards,
    Natesh

    I think when you do DELETE it removes the data but
    it's not releasing any used space and it's still
    marked as used space. I think reorganizing would help
    to compress and pack all block and relase any unused
    space in blocks. Why do you think that? Deleting data will create space that can be reused by subsequent insert/ update operations. It is not going to release space back to the tablespace to make it available for inserts into other tables in the tablespace, but that's not generally an issue unless you are permanently decreasing the size of a table, which is pretty rare.
    Would you also please explain about different about
    LOB and LONG ? or point me to any link which explain
    baout it.From the Oracle Concepts manual's section on the LONG data type
    "Note:
    Do not create tables with LONG columns. Use LOB columns (CLOB, NCLOB) instead. LONG columns are supported only for backward compatibility.
    Oracle also recommends that you convert existing LONG columns to LOB columns. LOB columns are subject to far fewer restrictions than LONG columns. Further, LOB functionality is enhanced in every release, whereas LONG functionality has been static for several releases."
    LONG was a very badly implemented solution to storing large amounts of data. LOBs are a much, much better designed solution-- you should always be using LOBs.
    Justin

  • How to reclaim the space after delete

    Hi All,
    Today we deleted large number of rows from one table, but we didn't get free space after that. So for testing purpose, I have created one test tablespace with 5mb size .Created a table and inserted n number of rows in that table and made the tablespace full.I checked in dba_segments(5mb) and dba_free_space tables.It shows perfectly.After that I deleted all the records and try to create a simple table,but it returns (ORA-01658: unable to create INITIAL extent for segment).I read some time back in tom's forum that delete willn't reclaim the space ,instead it will go to freelist of table..Is there any way to reclaim the space?(after delete)
    and also I used to see the tablesize by using dba_segments table.but now it shows 5mb of size for the empty table.Is there any query to get the exact table size?Please help me to understand the concept.
    Thanks,Jvel

    880401 wrote:
    Hi All,
    Today we deleted large number of rows from one table, but we didn't get free space after that. So for testing purpose, I have created one test tablespace with 5mb size .Created a table and inserted n number of rows in that table and made the tablespace full.I checked in dba_segments(5mb) and dba_free_space tables.It shows perfectly.After that I deleted all the records and try to create a simple table,but it returns (ORA-01658: unable to create INITIAL extent for segment).I read some time back in tom's forum that delete willn't reclaim the space ,instead it will go to freelist of table..Is there any way to reclaim the space?(after delete)
    and also I used to see the tablesize by using dba_segments table.but now it shows 5mb of size for the empty table.Is there any query to get the exact table size?Please help me to understand the concept.
    Thanks,JvelDELETE simply deletes the specified rows. The blocks/extetents that were allocated to hold those rows remain allocated. The theory is that if the table once needed sufficient blocks/extents to hold 'x' rows, it may need so again at some time in the future. Allocating and de-allocating extents is a pretty expensive operation, so oracle is not going to waste time and resources constantly doing that just because you delete rows, which is a perfectly normal DML operation. Unless you don't expect that table to grow again, I'd not waste my time trying to reclaim the space.

  • Reuse of freed space after DELETE statement (ASSM)

    Dear Members,
    After DELETE of records in tables, the USED SPACE in tablespace still grows when new records are inserted. So the freed space is apparently not reused!
    DB is Oracle 9.2. and ASSM is used.
    Does anyone knows how to solve this problem?

    1) Table (heap) space will continue to grow after deletes if the new rows are appended (APPEND HINT). Appending rows does not reuse free space in existing blocks.
    2) Index space will continue to grow after deletes if the leaf blocks could not be reused. Index leaf blocks will be reused only if a) new data index keys will fit in on of the existing leaf blocks that still has entries after the delete completes; b) all of the entries in the leaf block were deleted and a new leaf block needs to be added to the index. It is possible to shrink/coalesce or rebuild an index to cure this phenomenon.

Maybe you are looking for