ALTER SESSION SET SQL_TRACE = TRUE : Session Variables « SQL PLUS Session Environment « Oracle PL/SQL Tutorial






SQL> CREATE TABLE emp (
  2    id         NUMBER PRIMARY KEY,
  3    fname VARCHAR2(50),
  4    lname  VARCHAR2(50)
  5  );

Table created.

SQL>
SQL> INSERT INTO emp (id, fname, lname)VALUES (1, 'A', 'B');

1 row created.

SQL> INSERT INTO emp (id, fname, lname)VALUES (2, 'C', 'D');

1 row created.

SQL> INSERT INTO emp (id, fname, lname)VALUES (3, 'Enn', 'F');

1 row created.

SQL> INSERT INTO emp (id, fname, lname)VALUES (4, 'G', 'H');

1 row created.

SQL> INSERT INTO emp (id, fname, lname)VALUES (5, 'G', 'Z');

1 row created.

SQL>
SQL>
SQL> ALTER SESSION SET SQL_TRACE = TRUE;

Session altered.

SQL> SELECT lname
  2  FROM emp
  3  WHERE fname = 'Mike';

no rows selected

SQL> ALTER SESSION SET SQL_TRACE = FALSE;

Session altered.

SQL>
SQL> drop table emp;

Table dropped.








29.62.Session Variables
29.62.1.ALTER SESSION SET SQL_TRACE = TRUE
29.62.2.ALTER SESSION SET optimizer_dynamic_sampling
29.62.3.alter session set NLS_DATE_FORMAT='DD-MM-YYYY'
29.62.4.alter session set hash_area_size
29.62.5.alter session set sort_area_size = 102400000
29.62.6.alter session set workarea_size_policy=manual
29.62.7.alter system flush shared_pool
29.62.8.alter system quiesce restricted
29.62.9.alter system resume
29.62.10.alter system suspend