Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.sql.Connection;
- import java.sql.PreparedStatement;
- import java.sql.SQLException;
- public class Trace
- {
- public static void on( Connection conn )
- throws SQLException
- {
- String sql = "alter session set tracefile_identifier = tracefile";
- PreparedStatement pstmt = conn.prepareStatement( sql );
- pstmt.execute();
- sql = "alter session set events '10046 trace name context forever, level 12'";
- pstmt = conn.prepareStatement( sql );
- pstmt.execute();
- }
- public static void off( Connection conn )
- throws SQLException
- {
- String sql = "alter session set events '10046 trace name context off'";
- PreparedStatement pstmt = conn.prepareStatement( sql );
- pstmt.execute();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement