Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ORA-04052: error occurred when looking up remote object

Posted on 2008-09-29
4
Medium Priority
?
4,741 Views
Last Modified: 2013-12-18
I am getting error when I user DB_LINK

0/0      ORA-04052: error occurred when looking up remote object
         SCOTT.PASS_REP@TOM.target.COM
         ORA-00604: error occurred at recursive SQL level 1
         ORA-28000: the account is locked
         ORA-02063: preceding line from TOM.TARGET.COM

Any help

Thanks
CREATE OR REPLACE PROCEDURE SCOTT.change_pass (
   p_username     VARCHAR2,
   p_password     VARCHAR2,
   old_password   VARCHAR2
)
IS
   return_value   BOOLEAN;
   v_password     VARCHAR2 (30);
   v_host         VARCHAR2 (30) := SUBSTR (SYS_CONTEXT ('USERENV', 'SERVER_HOST'), 1, 3);
   v_sqlerrm      VARCHAR2 (32000);
   v_dblink       VARCHAR2 (30);
BEGIN
   EXECUTE IMMEDIATE    'ALTER USER '
                     || p_username
                     || ' identified by '
                     || p_password
                     || ' replace '
                     || old_password;
 
   SELECT PASSWORD
     INTO v_password
     FROM dba_users
    WHERE username = p_username;
 
   IF v_host = 'san'
   THEN
 
         INSERT INTO SCOTT.pass_rep@sandi.target.com
                  (username, new_password, old_password, dt_created,
                   hostname, error_message
                  )
           VALUES (p_username, v_password, old_password, SYSDATE,
                   v_host, NULL
                  );   
   
   ELSE
      INSERT INTO SCOTT.pass_rep@tom.target.com
                  (username, new_password, old_password, dt_created,
                   hostname, error_message
                  )
           VALUES (p_username, v_password, old_password, SYSDATE,
                   v_host, NULL
                  );   
   END IF;
   
   COMMIT;
--  RETURN (NULL);
EXCEPTION
   WHEN OTHERS
   THEN
      v_sqlerrm := SQLERRM;
 
      INSERT INTO SCOTT.pass_rep
                  (username, new_password, old_password, dt_created,
                   hostname, error_message
                  )
           VALUES (p_username, v_password, old_password, SYSDATE,
                   v_host, v_sqlerrm
                  );
 
      COMMIT;
END;
/
 
ERROR
=====
 
0/0      ORA-04052: error occurred when looking up remote object
         SCOTT.PASS_REP@TOM.target.COM
         ORA-00604: error occurred at recursive SQL level 1
         ORA-28000: the account is locked
         ORA-02063: preceding line from TOM.TARGET.COM

Open in new window

0
Comment
Question by:basirana
  • 2
4 Comments
 
LVL 35

Expert Comment

by:johnsone
ID: 22599413
I would guess that this is your real error:

ORA-28000: the account is locked
0
 

Author Comment

by:basirana
ID: 22600549
yes thats a real error when I try to compile
0
 
LVL 15

Accepted Solution

by:
Shaju Kumbalath earned 1000 total points
ID: 22603079
login to remote db
alter user   SCOTT  account unlock;
0
 

Author Closing Comment

by:basirana
ID: 31501294
thank you
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question