Hi In my JDBC implementation, I need to alter session's trace value sometimes. Befrore I alter the current session trace value, I need to know whether the current trace has been enabled or not. We know that trace can been set in ini.ora, if trace has been set in ini.ora, I do not need to enable trace at my JDBC connection. How can I retrieve the default SQL_TRACE value? Thanx Howard
Now, I know that this answer will not be specific. But there are v$ and dba_ views that give you every piece of information about your Oracle database. The specific one that holds the information from the init.ora is not right off the top of my head. My guess is that it is either v$parameter or dba_parameter. But that is a complete guess. And since my work won't give me DBA priviledges, I can't go check. And on that note, you must log in as a DBA or sysDBA to access this information. Which in a Java class, seems to scare me greatly. Can't you set it in a try-catch statement and if it is already set, then an exception will be thrown that you catch, and continue on, since it is already running. Mark [ October 06, 2003: Message edited by: Mark Spritzler ]
V$PARAMETER still shows sql_trace as being set to FALSE, even after it has been explicitly set to TRUE using ALTER SESSION. Why? The answer is that it does not really change the parameter. It sets an event that is equivalent. If you use the which_events.sql script, you should see that event 10046 is set at level 1.
I can't see any way to find out from v$session, v$process etc. Simon [ October 07, 2003: Message edited by: Simon Lee ]