Created
March 1, 2016 17:44
-
-
Save sebastianwebber/bc2b1e94843b1378d9bb to your computer and use it in GitHub Desktop.
SELECT to generate SQL statement to exec trace command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| 'exec SYS.DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION (' || p.pid || ', ' || p.serial# || ', true); ' AS start_trace_cmd, | |
| p.tracefile | |
| FROM v$process p, v$session s | |
| WHERE p.addr = s.paddr | |
| AND LOWER(s.username) LIKE LOWER('%user_name%'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment