Change datatype to HEX notation / base 64 [message #589787] |
Wed, 10 July 2013 13:54 |
|
ajpl71
Messages: 4 Registered: July 2013
|
Junior Member |
|
|
Hi all:
I am currently in the process of migrating our database from US7ASCII to AL32UTF8 using DMU.
I am stuck at a point where I have encrypted data that, when the conversion happens, will be destroyed. Oracle suggests to move the data which is currently stored in VARCHAR2 datatype, to a "characterset safe way" like hex notation or base64 before converting.
I have no clue as to what that means and I haven't found information that could point me in the right direction.
Could someone please give me a hand?
Thanks and cheers.
|
|
|
|
Re: Change datatype to HEX notation / base 64 [message #589793 is a reply to message #589791] |
Wed, 10 July 2013 14:41 |
|
ajpl71
Messages: 4 Registered: July 2013
|
Junior Member |
|
|
Thanks Michel.
I'm following the example pertaining to TEXT_DECODE, which I believe resembles more what I want to accomplish, but it doesn't seem to work as it says (US7ASCII is the one that interests me since I'd be replacing the text with the column of the table I need):
-- DOC EXAMPLE
SQL> select UTL_ENCODE.TEXT_DECODE('Here is some text',WE8ISO8859P1,UTL_ENCODE.BASE64) from dual;
select UTL_ENCODE.TEXT_DECODE('Here is some text',WE8ISO8859P1,UTL_ENCODE.BASE64) from dual
*
ERROR at line 1:
ORA-00904: "WE8ISO8859P1": invalid identifier
-- MY TEST EXAMPLE
SQL> select UTL_ENCODE.TEXT_DECODE('Here is some text',US7ASCII,UTL_ENCODE.BASE64) from dual;
select UTL_ENCODE.TEXT_DECODE('Here is some text',US7ASCII,UTL_ENCODE.BASE64) from dual
*
ERROR at line 1:
ORA-00904: "US7ASCII": invalid identifier
Any ideas?
Thanks again and cheers.
|
|
|
|
|
Re: Change datatype to HEX notation / base 64 [message #589853 is a reply to message #589799] |
Thu, 11 July 2013 07:54 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
ajpl71 wrote on Wed, 10 July 2013 17:33
SQL> select UTL_ENCODE.TEXT_DECODE('Here is some text', 'US7ASCII', UTL_ENCODE.BASE64) from dual;
select UTL_ENCODE.TEXT_DECODE('Here is some text', 'US7ASCII', UTL_ENCODE.BASE64) from dual
*
ERROR at line 1:
ORA-06553: PLS-221: 'BASE64' is not a procedure or is undefined
I believe you have to use this in PL/SQL, and not in SQL*Plus.
|
|
|
|
|