PL/SQL (MOSC)

MOSC Banner

run Alter User remotely

edited Mar 4, 2017 4:00AM in PL/SQL (MOSC) 3 commentsAnswered

Hi Guys,

Oracle Version: 11.2.0.3 on Linux

when run the following procedure though db_link I got error :

db01 has this procedure in System Schema:

create or replace procedure run_cmd (p_command varchar2, p_error out varchar2)
is
begin
execute immediate p_command;
p_error := 'NO ERROR';
exception
  when others then
   p_error:=sqlerrm;
end run_cmd;

db02:

create synonym run_cmd_db01 for run_cmd@db02;

SQL> declare

  2  vErr varchar2(1000);

  3  begin

  4  run_cmd_osrd('alter user dia identified by myPassw0rd account unlock',vErr);

  5  dbms_output.put_line(vErr) ;

  6  end ;

  7  /

ORA-02064: distributed operation not supported

the questions:

1- how to work around this error?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center