execute immediate
Hi,
I want to execute ALTER USER <USERNAME> IDENTIFIED BY <PASSWORD> in PLSQL block.
I tried to use execute immediate as mentioned below
DECLARE
cursor c_users IS
SELECT username
FROM xyz;
....
....
BEGIN
FOR rc_users IN c_users
LOOP
....
....
EXECUTE immediate 'ALTER USER :1 IDENTIFIED BY :2'
using r_users.username , v_actual_password;
END LOOP;
END;
I am not able to execute this block and get an error as stated below
ERROR at line 1:
ORA-01935: missing user or role name
ORA-06512: at line 31
Could someone please advise where I might be going wrong.
Thanks in advance.