scott>insert into emp select * from emp;
scott>desc user_objects;
sys>desc dba_objects;
sys>desc dba_tables;
sys>select owner,table_name,degree from dba_tables where owner='SCOTT';
sys>save degree.sql
sys>alter table scott.emp parallel 1;
sys>@degree.sql
scott>insert into emp select * from emp;
root@venu1>top -d .5
sys>select a.sid,b.spid from v$session a,v$process b where a.paddr=b.addr and b.spid=1290;
sys>select username,sid from v$session where sid=12;
sys>select sql_text from v$sqltext_with_newlines where hash_value=(select sql_hash_value from v$session where sid=&sid);
enter value for sid :12
scott>rollback;
scott>insert into emp select /*+ parallel(emp,8) */ * from emp;
oracle@venu1>export ORACLE_SID=venu1
oracle@venu1>sqlplus scott/tiger
scott>select * from emp;
sys>select sid,serial# from v$session where username='SCOTT';
sys>alter system kill session '12,9';
scott>select * from salgrade;
sys>select sid,serial#,username from v$session where username='SCOTT';
sys>exec dbms_system.set_sql_trace_in_session(19,3,TRUE);
scott>select * from salgrade;
sys>show parameter diag_
sys>select * from v$diag_info;
go to the trace directory.
oracle@venu1 trace>ls
sys>select a.sid,b.spid from v$session a,v$process b where a.paddr=b.addr and a.sid=19;
oracle@venu1 trace>vi sales_ora_1606.trc
oracle@venu1 trace>tkprof sales_ora_1606 output.txt sys=no explain=scott/tiger
oracle@venu1 trace>ls
oracle@venu1 trace>vi output.txt