Dinu Nicolae
Dinu Nicolae

Reputation: 1301

How to add database name to Oracle error?

I am copying some data via DB link from a remote DB (let's call it DB A) to another DB (DB B).

If any errors occur then I catch them and write them to a table like this:

EXCEPTION
          WHEN OTHERS THEN BEGIN
          INSERT INTO T_ERROR(...., SQLERRM, SQLCODE, ....)
        
          END;
    END;

So the procedure that copies data from remote DB A to DB B has been triggered and it failed, cause there was a tablespace issue on DB A. The error logged in the table was

ORA-01652: unable to extend temp segment by 128 in tablespace TEMP_STD_TBL

The guys who investigated that problem believed that the problem is in DB B gave it more space still the problem persisted, then he retrieved the logs from the server, and in the log file, the error contained the DB name.

DB_A(3):ORA-1652: unable to extend temp segment by 128 in tablespace TEMP_STD_TBL [DB_A]

How can I get that DB-NAME and attach it to the error message? And What is that (3)?

Upvotes: 1

Views: 57

Answers (0)

Related Questions