Skip to Main Content

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, ludovic.

Asked: December 11, 2014 - 3:37 pm UTC

Last updated: August 31, 2015 - 2:34 pm UTC

Version: 11.2

Viewed 1000+ times

You Asked

Hello Tom,

When I'm loading a table with sql loader, I don't see my session in V$SESSION view. How I can display the active sessions related with sql loader and how I can display wait events too ?

Thanks in advance.

---
Ludovic

and Tom said...

your sessions show up just like any other session - sqlldr is just a program that logs into the database and executes sql, nothing special about it.

You'll have to prove to me you cannot see your sessions, I've *never* not seen them.

ops$tkyte%ORA11GR2> create table t as select * from all_users where 1=0;

Table created.

ops$tkyte%ORA11GR2> 
ops$tkyte%ORA11GR2> !cat t.ctl
LOAD DATA
INFILE *
INTO TABLE t
REPLACE
FIELDS TERMINATED BY '|'
(
username
,user_id
,created
)
BEGINDATA
TUNING|1234|30-JUL-14
USR|1246|25-SEP-14
FB_DEMO|1188|24-JUL-13
BIG_TABLE|1176|06-JUN-13
SCOTT|1158|30-MAY-13
B|1184|06-JUN-13

ops$tkyte%ORA11GR2> 
ops$tkyte%ORA11GR2> create trigger t_trigger
  2  before insert on t for each row
  3  begin
  4          dbms_lock.sleep( 1 );
  5  end;
  6  /

Trigger created.

ops$tkyte%ORA11GR2> 
ops$tkyte%ORA11GR2> set echo off

USERNAME        SID_SERIAL      STATUS     MODULE          ACTION
--------------- --------------- ---------- --------------- ---------------
CLIENT_INFO     LAST_CALL_ET
--------------- ------------
OPS$TKYTE       '13,1471'       ACTIVE     SQL*Plus
                           0


1 row selected.

ops$tkyte%ORA11GR2> !sqlldr / t.ctl &
SP2-0317: expected symbol name is missing

ops$tkyte%ORA11GR2> exec dbms_lock.sleep(1);

SQL*Loader: Release 11.2.0.3.0 - Production on Thu Dec 11 15:35:10 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


PL/SQL procedure successfully completed.

ops$tkyte%ORA11GR2> set echo off

USERNAME        SID_SERIAL      STATUS     MODULE          ACTION
--------------- --------------- ---------- --------------- ---------------
CLIENT_INFO     LAST_CALL_ET
--------------- ------------
OPS$TKYTE       '13,1471'       ACTIVE     SQL*Plus
                           0

OPS$TKYTE       '147,2733'      ACTIVE     SQL Loader      t.ctl
                                           Conventional
                                           Path Load
                           1


2 rows selected.

--------------------
OPS$TKYTE(147,2733) ospid = 18710 command = 2 program =
sqlldr@localhost.localdomain (TNS V1-V3) dedicated server=18711
Thursday  15:35  Thursday  15:35 last et = 1
INSERT INTO T   (USERNAME,USER_ID,CREATED) VALUES (:USERNAME,:US
ER_ID,:CREATED)
ops$tkyte%ORA11GR2> 



they are just normal sessions - they are there...

Is this answer out of date? If it is, please let us know via a Comment

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library