VALUE
34 FROM v$parameter
35 WHERE NAME = 'user_dump_dest'
36 ) d;
37 return v_result;
38 end get_trace_name;
建立公共同义词:
1 sys$logdw@logdw
SQL> create or replace public synonym get_trace_name for get_trace_name;
2 sys$logdw@logdw
SQL> grant execute on get_trace_name to public;
现在普通用户也可以使用了:
1 sys$logdw@logdw SQL> connect test/test
2 Connected.
3 test$logdw@logdw SQL> show user;
4 USER is "TEST"
5 test$logdw@logdw SQL> select get_trace_name() from dual;
6
7 GET_TRACE_NAME()
8 ------------------------------------------------------------------
9 /u01/app/oracle/diag/rdbms/logdw/logdw/trace/logdw_ora_8757.trc