Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Database Link Question

Re: Database Link Question

From: Jared Still <jkstill_at_gmail.com>
Date: Tue, 16 Oct 2007 16:35:16 -0700
Message-ID: <bf46380710161635v2a1101b3u41fe22287d986248@mail.gmail.com>


On 10/16/07, Taylor, Chris David <Chris.Taylor_at_ingrambarge.com> wrote:
>
> SQL> select * from dba_db_links;
>
> No rows found
>
> SQL> select * from mytable_at_tst1;
>
> Waiting, waiting, waiting……waiting(n)
>
>
>

Use the script at the end of this email to see what the session is waiting on.

-- 
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

----------
-- sesswaitu.sql
-- show current waits for a username
-- may call as '@sesswaitu USERNAME'
-- eg. @sesswaitu '%'
-- eg. @sesswaitu '%TMR%'
-- eg. @sesswaitu 'USSP'
-- if username not passed, it will ask for it

set line 150 feed on pause off echo off
set trimspool on

clear col
clear break

col cusername new_value uusername
prompt Enter Username:
set feed off echo off term off
select '&1' cusername from dual;
set term on feed on


col sid format 99999
col username format a10
col event format a30
col p1text format a10
col p1 format 99999999999
col p2text format a10
col p2 format 99999999999
col wait_time format 999999 head 'WAIT|TIME'
col seconds_in_wait format 999999 head 'SECONDS|IN|WAIT'
col state format a20

break on username skip 1 on event


select
        s.username username,
        e.event event,
        s.sid,
        e.p1text,
        e.p1,
        e.p2text,
        e.p2,
        e.wait_time,
        e.seconds_in_wait,
        e.state
from v$session s, v$session_wait e
where s.username is not null
        and s.sid = e.sid
        and s.username like upper('&uusername')
        -- skip sqlnet idle session messages
        and e.event not like '%message%client'
order by s.username, upper(e.event)
/

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Oct 16 2007 - 18:35:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US