I have a procedure in mysql that encrypts a table when executed. I can do it successfully from mysql.
I need to be able to execute this from our Oracle server. We have a datalink and I am able to select from mysql successfully.
can you help me get this done?
i did this from MYSQL:
DROP PROCEDURE iwireless.encrypt_table;
DELIMITER //
CREATE procedure schema1.encrypt_table( OUT encrypted_value INT )
BEGIN
SET SQL_SAFE_UPDATES=0;
UPDATE schema1.zTestEncryption
SET
first_name = AES_ENCRYPT(first_name, 'password'),
encrypted = 1
where encrypted = 0;
SET SQL_SAFE_UPDATES=1;
SET encrypted_value = '1';
END; //
DELIMITER ;
CALL schema1.encrypt_table (@variable_name);
SELECT @variable_name;
@variable_name
----------------------
1
I try to do this from Oracle and i am doing it all wrong....help.
var D NUMBER(1);
Execute schema1."encrypt_table"(D)@Datalink1;
SELECT D from SYS.DUAL;
Error:
ORA-00904: "D": invalid identifier
00904. 00000 - "%s: invalid identifier"
*Cause:
*Action: