Query global_name table
SQL> SQL> set termout off SQL> column global_name new_value gname SQL> select lower(user) || '@' || global_name global_name 2 from global_name; GLOBAL_NAME ---------------------------------------------------------------------------------- java2s@XE 1 row selected. SQL> set termout on SQL> set sqlprompt '&gname> ' SQL> SQL> --