Hey,
I want to get the database name in a PL/SQL trigger.
At the SQLPlus prompt, these are some examples I've tried:
fsdevl75@fsdev> select sys_context('userenv', 'db_name') from dual;
SYS_CONTEXT('USERENV','DB_NAME
---------------------------------------------------------------------------
13
fsdevl75@fsdev> select '&_CONNECT_IDENTIFIER' from dual;
old 1: select '&_CONNECT_IDENTIFIER' from dual
new 1: select 'fsdev' from dual
'FSDEV'
--------------------------------
fsdev
fsdevl75@fsdev> desc v$database;
ERROR:
ORA-04043: object "SYS"."V_$DATABASE" does not exist
I want what _CONNECT_IDENTIFIER returns (fsdev in this case), but I can't figure out any way to do this in a trigger. Can anybody help with this?