Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2005
    Location
    Delhi, India
    Posts
    2

    Unanswered: Getting error in trigger

    Hi,

    I have a requirement for encryption/decryption of values in oracle table. I am using the dbms.obfuscation toolkit provide by Oracle for the purpose. I have created a function 'decrypt_card_function' in oracle to decrypt the encrypted value. For the simulation purpose, I have created a table with only two columns with 'before insert or update' trigger to decrypt the card before saving. When I use the function 'decrypt_card_function' in trigger it returns error "ORA-06502: PL/SQL: numeric or value error: hex to raw conversion error". The same function when used in select clause returns proper result. I am attaching the SQL file with necessary definitions.

    I will appreciate a quick feedback form the experts to handle the error.

    Regards
    Davendra
    Attached Files Attached Files

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Privs acquired via ROLE do not apply within PL/SQL procedures (triggers).
    >The same function when used in select clause returns proper result
    Before issuing SQL do the following:
    SQL> SET ROLE NONE
    -- then (re)issue SELECT
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Feb 2005
    Location
    Delhi, India
    Posts
    2
    Hi,

    Still the output is same even after setting the role to none.

    Regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •